Android app for sending Gcode!

Discussion about the arduino based g-code interpreter, grbl
billcat
Posts: 73
Joined: Fri Sep 20, 2013 4:00 pm
Location: Cedar Park, Texas

Android app for sending Gcode!

Post by billcat » Wed Apr 13, 2016 12:26 am

!!
Update 7.29.2017
1) CNC Bluetooth Commander
Pro is now available at the Play Store. This new version adds controls to utilize the nice REALTIME features of GRBL 1.1x!
CNC Bluetooth Commander PRO

demo video:https://www.youtube.com/watch?v=DdaPL9_C1i0

CommanderPro.png
CommanderPro.png (84.17 KiB) Viewed 3272 times
Update 3.1.2017
1) CNC Bluetooth Commander v4.1 is now live at the Play Store. This update will now allow proper DRO display when using the app with the latest GRBLv1.1x!

Update 2.4.2017
1) CNC Bluetooth Commander was developed to be compatible specifically with GRBL v.9. I've recently noticed the introduction of GRBL V1.1 which introduces several very nice features. However at this time there has been no testing between GRBL v1.1 and CNC Bluetooth Commander, and there may be compatibility issues, or even complete incompatibility. Please use caution if trying to use the app with GRBL versions later than .9x
***2.18.2017 I've since tested and found that the app remains compatible with GRBL v1.1 with the exception that the DRO display on the app no longer works. You may still control your GRBL v1.1 machine from the app, but I suggest to choose 'options/No DRO' within the app's menus, and then you may manually send the '?' character to display the coordinates.

2) To program the buttons on CNC Bluetooth Commander, simply hold them pressed for several seconds. I get asked the question often and guess I haven't addressed it anywhere.

3) CNC Bluetooth Commander looks for Gcode files in the default Android download directory, so this is where you should place them. For example, on my phone, I place Gcode files in ' /storage/emulated/0/Download '. The app will recognize Gcode files of the following type: .nc , .gcode , or . txt. For example, my_Gcode_file.nc ; my_latest_Widget.gcode ; new_Shapeoko_part.txt

Happy Mak`n
[/color]

Hi y'all...

Awhile back I raised a question about existence of an Android app for sending Gcode to GRBL from an Android phone(or perhaps tablet). I haven't checked on that post (really lost track of it and didn't bother searching ;/) but remember that there didn't seem to be anything available at the time.

Well, moving forward... I have worked with Kas, a fabulously helpful Arduino forum member, and splendid Android developer to create such an app.
Introducing... CNC BT Commander !
We plan to publish it to the Play store when I get my lazy arse around to it. I simply wanted to bring attention to it and explain the basics of its functionality. It was created to work hand in hand with the awesome GRBL CNC firmware.

First, you can get a general idea from my lamo video here:
https://www.youtube.com/watch?v=N_2CRhXGFUA

So the main idea behind this was that it seemed ideal to not bother with a PC connected to the GRBL controlled CNC machine just for the simple task of streaming some serial characters, basically I suppose an almost headless operation, I usually have my Android phone in my pocket, etc.

To highlight some of the key concepts...

* the app requires Bluetooth functionality/connection to GRBL, this is by design, I didn't want to bother with cables. Additionally, I designed my own PCB for a GRBL controlled machine which houses up to four DRV8825 type step motor drivers, the Atmega328 chip, an Atiny85 chip ( for my own version of BLDC spindle motor control), and supporting electronics. However, I didn't include galvanic/ opto isolation for the typical USB/Serial connection to the Arduino, which I read many posts about noise/EMI issues without this. However, through wireless operation over BT, this concern is diminished.

*You must purchase one of the ubiquitous HC-06 or HC-05 BT units (such as here: http://www.ebay.com/itm/Wireless-Serial ... 0924726178 ) and connect it to your Arduino/GRBL controller. Perhaps it will work with some of the many of other BT serial modules available, but these two are the only one's I have personally used.

* I tested the app on several different models of Android phones (until my friends became aggravated at me always messing with their phones) and on all it seemed to function nicely, although the screen layout on some models may not be quite as ideal as others. I haven't the resources to test on all models of Android phones... :shock: but I feel confident that basic functionality will exist on most available models!

* Fifteen programmable 'buttons' to set up as you like for sending simple text commands to GRBL. For example, Spindle on/off, Home, Jog axis', Configure GRBL, etc.

* DRO readouts for both machine and work coordinates.

* The app allows selection of a Gcode file of type .nc , .txt. or .gcode from the default Android 'download' folder. So , as an example of my basic workflow:
1) Design my 'part' in CAD on my general PC,
2) Create a Gcode file from my CAM program from the CAD design
3) Use Dropbox, email, BT file transfer, USB, etc, to transfer the Gcode file to my Android phone
4) Open CNC BT Commander, establish the Bluetooth connection with GRBL, load the Gcode file, and ...enjoy the wonders of modern tech!

Here are a few screenshots from some of the various phones I have tested...have a look!
LG-G4_v34B.png
LG-G4_v34B.png (226.54 KiB) Viewed 6147 times
Samsung Galaxy S6_v34B.jpg
Samsung Galaxy S6_v34B.jpg (104.97 KiB) Viewed 6147 times
Last edited by billcat on Tue Sep 26, 2017 11:04 pm, edited 11 times in total.

wunderaa
Posts: 51
Joined: Mon Apr 20, 2015 3:45 am

Re: Android app for sending Gcode!

Post by wunderaa » Wed Apr 13, 2016 1:35 am

This. Is. Awesome.

Do want!

billcat
Posts: 73
Joined: Fri Sep 20, 2013 4:00 pm
Location: Cedar Park, Texas

Re: Android app for sending Gcode!

Post by billcat » Wed Apr 13, 2016 10:56 pm

...Thanks for the kind comments,

will be trying to get it on the Play Store ASAP, just a few difficulties ATM...

BC

billcat
Posts: 73
Joined: Fri Sep 20, 2013 4:00 pm
Location: Cedar Park, Texas

Now available on Play Store!

Post by billcat » Sat Apr 23, 2016 11:03 pm

I finally published the app to the Play Store...
https://play.google.com/store/apps/deta ... nder&hl=en

Much credit due to Kas for his fine development work, the app works like a charm for me!

I'll be happy to answer any questions regarding the apps' usage.

BC

HenkvE
Posts: 1
Joined: Sat Jun 11, 2016 10:14 pm

Re: Android app for sending Gcode!

Post by HenkvE » Sat Jun 11, 2016 10:58 pm

Bill,
I just love this app. Unlike some other similar apps that I tried this app is stable and hasn't crashed at all. A very nice feature that I really like is the custom programmable buttons. Between you and Kas you did very well.

HPGreyling
Posts: 123
Joined: Sat Nov 15, 2014 11:37 am
Location: South Africa

Re: Android app for sending Gcode!

Post by HPGreyling » Sun Jun 12, 2016 1:50 am

Hi Bill

This is a great alternative to schlepping the notebook to the garage everytime I want to mill.

Just one tiny snag. I am not very experienced in setting up electronics. You couldnt post how t o connect the bluetooth module to the arduino?

billcat
Posts: 73
Joined: Fri Sep 20, 2013 4:00 pm
Location: Cedar Park, Texas

Re: Android app for sending Gcode!

Post by billcat » Sun Jun 12, 2016 3:17 pm

HenkvE wrote:Bill,
Unlike some other similar apps that I tried this app is stable and hasn't crashed at all............ Between you and Kas you did very well.
I really appreciate the nice comments! Our number one intention was stability, which is why Kas and I worked on such a simple app for such a long time. But all credit is due Kas, I'm just the test dummy! I tried other apps before as well and had lots of bugs/crashes. In keeping with what I understand to be the GRBL fundamental culture, our #1 goal was solid, simple and reliable operation.
HPGreyling wrote:Hi Bill
This is a great alternative to schlepping the notebook to the garage everytime I want to mill.
Just one tiny snag. I am not very experienced in setting up electronics. You couldnt post how t o connect the bluetooth module to the arduino?
Agreed!! that was my case exactly and motivation for the app.
Of course, here's a basic connection diagram for the Bluetooth/Arduino interface...simple!
hc06connect.jpg
hc06connect.jpg (180.8 KiB) Viewed 5903 times
I believe typically the HC-06 comes set at a default baudrate of 9600, which means it will not work with the latest GRBL at 115200 baud, without re-configuring the BT module.
I found several ways to do this, but one of the easiest was to run this Arduino sketch I found somewhere on the web some time ago. (attached) The comments in the top of the sketch indicate the connection requirements.
Just copy and paste the text file into a new Arduino sketch, upload the sketch and make the required connection between the Arduino and BT module. Then open the Serial Monitor. Make sure the Serial Monitor baudrate is set at 9600, and 'no line ending'. Just follow along with the Serial Monitor and it should give you the option to chose your baudrate by entering a number. Choose '8' for 115200 baud and you should now be set up for comms with the latest GRBL.

Now on a side note, I seem to recall difficulties using the sketch to revert back to the default 9600 baud on the HC-06. I believe this is because the sketch uses Software Serial, which I understand is limited to 57600 baud. So after you change the BT module to 115200, it is a one way ticket and can no longer communicate with the sketch on the Arduino. However there are other methods to restore the lower baudrates if need be. That's another process, fairly easy, I can provide info on that if needed.

Let me know if you have difficulties...

Cheers,
BC
Attachments
JY_MCU_Config_HC06.txt
(3.32 KiB) Downloaded 315 times

HPGreyling
Posts: 123
Joined: Sat Nov 15, 2014 11:37 am
Location: South Africa

Re: Android app for sending Gcode!

Post by HPGreyling » Mon Jun 13, 2016 4:23 pm

Thanks much appreciated!

billcat
Posts: 73
Joined: Fri Sep 20, 2013 4:00 pm
Location: Cedar Park, Texas

Re: Android app for sending Gcode!

Post by billcat » Mon Jun 13, 2016 9:46 pm

Gladly, hope it helps
:D

HPGreyling
Posts: 123
Joined: Sat Nov 15, 2014 11:37 am
Location: South Africa

Re: Android app for sending Gcode!

Post by HPGreyling » Wed Sep 07, 2016 4:24 pm

I finnally got my hands on the hc-06 module connected it and .....nothing. plugged the USB cable back in and suddenly the lights come on. My reasoning is that the USB feeds the arduino power. But with both the USB and bluetooth plugged into the arduino nothing wants to work except pairing.

My question this is: can I power the arduino with a 12v power source? While v the grbl shield is also powered by to 48v. This is the only logical solution i can think of to be able to use the bluetooth module.

Thanks in advance

Hermann

Post Reply