-
Notifications
You must be signed in to change notification settings - Fork 103
GRBL comms fine on USB but fails on BT #89
Comments
Can you post the verbose output as well please? The symptom is very much like a previous user reported, namely the communications path is dropping data. What you see in the Z display is the hint for that. The 1.1 protocol is a bit less forgiving in that only machine position is reported. |
While the Status info in the second screen shot looks fine, it doesnot reflect what got displayed earlier in the position display. At some point you lost data coming into GrblPanel. E.g. it doesn't show Idle in Status. |
The error, whatever it is, seems marginal. I find that if I launch GRBLPanel,connect on USB, and then disconnect the usb comm port and reconnect on the BT comm port, 2 times out of 3 it carries on working just fine. If, however, I launch GRBLPanel and first-time connect to the BT port, I can replicate this error every time. |
Ah, that is an interesting observation. Try changing the Startup Delay on the Settings page, it will give BT more time to connect etc. |
Does it retrieve Settings (on Settings tab)?, are there values set in State block such as Absolute etc? You should see a lot of chatter before the point you screen captured. |
I don't understand the symptom given what you see in the status window :-( Does the G54 value show on the Offsets tab? |
@Tom-Nelson Does your HC-05 module have level shifting? The HC-05 I/O pins operate at 3.3V instead of 5V like the Arduino. Even with level shifting circuitry, the signals can get a bit iffy at higher baud rates due to the high value pull-up resistors typically used. Weird though that all the verbose logs look normal, and yet it isn't parsing the responses properly. |
Could you trace the HC05 behaviour using http://freeserialanalyzer.com/? 5 sessions of 20 minutes per day should give enough time to figure out what is being sent to GrblPanel. |
Hopefully learnt something new that will be helpful. I did trace the serial streams using freeserialanalyser. Haven't quite figured out how to save the sessions, so will try to describe my observations here. |
I have discovered something new on this BT vs USB issue. It has nothing to do with the BT link itself, but the USB to Serial converter which drives the HC-05 from the pc. I connected the RX/TX lines from the converter straight into Arduino pins 2/3 and get exactly the same data corruption. Tried two different USB/serial devices and got exactly the same result. So it looks like there's some sort of incompatibility or port timing issue. I have the latest drivers installed for the serial devices, so don't think that's the problem. |
What brand are your serial converters? I know that the CH340 has issues. I use a FT232 converter, USB to PC, TX/RX/DTR to Arduino. |
The one converter is a Silicon Labs CP201x, the other is a Prolific PL2303 (or possibly chinese clones) I think I will shell out for a genuine FT232 and see what happens |
I no longer have those 2, had other issues at one time, like no drivers. Shall I close this issue? |
Thanks for your feedback, and yes please do go ahead and close the issue. Hopefully others will learn from this to avoid dodgy clones. |
Could be poor USB packetising in the serial converter in conjunction with the packetising behaviour of the BT protocol, but I'm still suspicious of mismatched I/O voltage levels between the BT module and serial converter at the PC end (or serial converter and Arduino). Ideally you'd want to use a BT module without level shifting circuitry, and a 3.3V USB to serial converter. When mismatched logic levels are used, things will mostly work but are out of tolerance and can randomly produce weird results like you've seen. It could be less noise immunity, or even temperature fluctuations pushing it just that bit extra, |
Well I for one would like to understand the cause and fix it! When you say 'connect to dummy Grbl, then disconnect and reconnect to BT' what are you actually doing? Are you swapping just the TX/RX wires? Part of the issue might be that DTR is used to reset the Grbl controller when I first connect in code. If you are unplugging the actual USB-Serial converter or USB cable then I will detect an error. |
@Tom-Nelson Thank you for the video, it helped a lot.
What is happening (or not happening to be more precise) is that Grbl is not sending the initial message when you connect this way. I use that message to detect if Grbl is 0.9x or 1.x version. If 0.9x is detected (also the default :-() you won't get Work coordinates displayed as that is a calculated value in Grbl 1.x. The message I am keying this from looks like |
Hi Gerrit, Would it be a lot of work to just look at the response to a "?" status report request, and set a switch based on the string composition Alternative, could you consider putting a switch on the setting page to pre-select the V1+ data stream format? |
I will add an override on the Settings page. Detecting from a status response would be somewhat delayed from the actual start-up, not sure of side effects of that. Might be a week or so but in the meantime you have a more workable workaround. |
I can remember many moons ago something about Arduino's having this handshake issue on startup. Unfortunately i've slept since then so my ram has been erased, but there was something. |
GrblPanel expressly blips DTR on connection to force a reset on the Arduino. In case of BT though I suspect that the DTR blip is not passed on. Depends on the implementation of the adapter. |
Gerrit,
You have it right about the DTR blip not going through.
The vanilla BT solution using HC05/06 modules only supports simple 2 wire
Tx/Rx, so there is no Arduino reset on connect.
…On Thu, Mar 23, 2017 at 1:57 PM, Gerrit Visser ***@***.***> wrote:
GrblPanel expressly blips DTR on connection to force a reset on the
Arduino. In case of BT though I suspect that the DTR blip is not passed on.
Depends on the implementation of the adapter.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI41I8lTsE8A7DahDP4Ly69AvSyLVpQyks5ronpegaJpZM4Lw0U1>
.
|
@Tom-Nelson I see you stated that you were able to control your machine via HC-05 BT and Arduino Uno. I know you are using GrblePanel, but you mentioned it works with UGCS as well. I currently use UGCS, but I haven't been able to get it to work with my BT. My connection is as followed, an Arduino UNO wired to the stepper drivers of my machine. I then have an HC-06 BT connected to the VCC, GND, D0(RX), and D1(TX) of the Arduino. The Bluetooth works with a simple turning ON/OFF a LED on the Arduino. However, when I tried to connect to the BT COM port through UGCS, the program simply finds only the "Incoming port" and not the "Outgoing port" as it should. When the program connects to the "Incoming port" (the wrong port), it then displays the connection message but resumes to freeze the program. Can you please help me? Do I need additional wiring or hardware connections? I figured I could just replace my USB cable with a BT module communicating over the onboard serial pins. Do you have any ideal as to why the UGCS isn't finding the COM port that connects and talks to the BT? Is it that I should simply replace the Bluetooth with the HC-05 instead of the HC-06. if so why? Thank you for any help in advance! |
Hello, I have been trying to run my machine with HC-06 BT and UGCS but I can't be the correct COM port to connect. Can anyone help me? |
@StrictlyTech I think the HC06 is Slave only, the HC05 can be slave or master, although if using it at the Grbl end I don't think it matters. |
@gerritv Ok I will go ahead and try that. Thanks |
I downloaded Putty and began sending Hello World to it. I got Arduino communicating with Putty through BT. I am able to turn the onboard Arduino LED on and off by entering 1 or 2 into Putty via BT. However, when I try to enter G00 X-1 into Putty, nothing happens. Putty actually doesn't even show that I am entering data into the command window (the screen just remains blank). Also, when I hook my scope up to the X-axis step pin, I do not receive any readings. |
I am really confused now, what is loaded on the Arduino? Is it Grbl or is it something else? |
From the response I would say that you are running an old version of Grbl, pre 1.1. Depending on the version of UGCS it might not like the old Grbl. Also because you are using HC06/05, there is no DTR signal to reset Grbl on startup. Using putty you could send a Reset (ctl-x) or use the Reset button on GrblPanel. UCS has a Soft Reset button on the Machine Control tab. For any sender that supports both, the response to the Reset is vital as it tell the sw what version of Grbl is running. This Issue list is for GrblPanel, you might try it and see how that goes. GrblPanel works with both old and newer versions of Grbl. If that works then I recommend asking at the GitHub for UGCS: https://github.com/winder/Universal-G-Code-Sender |
I've been using GRBLPanel for some time now with GRBLv0.9j for some time. I had some problems with noise on the USB connection, and tripping over usb cables when switching the laptop from mill to lathe, so made the serial connection from pc to Arduino using HC-05 Bluetooth controllers. It's been working great, and got rid of all of my noise problems.
I decided to upgrade both GrBLPanel and GRBL to the latest versions (1.0.9.12 and v1.1e respectively) and it worked fine when connecting via a usb cable. But when I tried connecting via B T I picked up an issue. The screenshot shows the work posn readout as blank, while the Z machine posn has a bit of the rest of the status string from GRBL showing. Other than that, GRBL seems to be responding correctly to gcode commands issued by the UI. Looking at the verbose output from GRBL, it all looks normal, which makes me think it may be GRBLPanel-related
The text was updated successfully, but these errors were encountered: