SO3: Built a probe...got errors

Talk about all things CNC
cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: SO3: Built a probe...got errors

Post by cvoinescu » Fri Nov 13, 2015 2:02 pm

This sounds like a false triggering of the probe. You would not see that on the multimeter, because it's probably a brief pulse, or noise that averages to whatever you're measuring. A bunch of questions for you:

How did you wire the probe? Do you have any filtering or buffering, or a pull-up resistor? Did you connect the endmill to the probe input, or the touchplate?

Also, what does it mean that the Arduino does not accept GRBL 0.9j? It's just firmware -- unless the Arduino is broken, it should burn and work fine, even on the oldest version of Arduino Uno (which is the same processor, AtMega328P).
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Bluemetal
Posts: 13
Joined: Tue Apr 10, 2012 9:03 pm

Re: SO3: Built a probe...got errors

Post by Bluemetal » Fri Nov 13, 2015 10:22 pm

cvoinescu wrote:This sounds like a false triggering of the probe. You would not see that on the multimeter, because it's probably a brief pulse, or noise that averages to whatever you're measuring. A bunch of questions for you:

How did you wire the probe? Do you have any filtering or buffering, or a pull-up resistor? Did you connect the endmill to the probe input, or the touchplate?
A5 to end mill and ground to touchplate. No filtering nor buffering of any type. Internal pull-up resistor only, enabled by default in GRBL. Very same problem with probes not connected to anything. Alarm when connected.
cvoinescu wrote:Also, what does it mean that the Arduino does not accept GRBL 0.9j? It's just firmware -- unless the Arduino is broken, it should burn and work fine, even on the oldest version of Arduino Uno (which is the same processor, AtMega328P).
The same setup (Arduino 1.66 with GRBL 0.9j library from Github) never gets the "Done uploading" message with two Arduino Unos (originals bought at the Maker Faire NY two years ago) but works fine with knock-off Uno. All 3 Unos worked fine with GRBL 0.9g as the GRBL library and with other sketches. The issue only shows for 0.9j. Loading the hex file directly produces exactly the same results. 0.9g works on all 3, 0.9j produces a failure on the original Unos.
Proud owner of original Kickstarter Shapeoko #8 - still has original steppers, some end plates and screws but now looks like a Shapeoko 3.:)

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: SO3: Built a probe...got errors

Post by cvoinescu » Sat Nov 14, 2015 12:13 am

Bluemetal wrote:A5 to end mill and ground to touchplate. No filtering nor buffering of any type. Internal pull-up resistor only, enabled by default in GRBL.
Flip them; the spindle is a great antenna for all sort of noise. Have that connected to ground, and A5 to the touchplate.
Bluemetal wrote: Very same problem with probes not connected to anything. Alarm when connected.
That is alarming. Try with A5 connected to IOREF (or +5V). If that still doesn't move, there's a bigger problem (busted AtMega328P chip on the Arduino).
Bluemetal wrote:The same setup (Arduino 1.66 with GRBL 0.9j library from Github) never gets the "Done uploading" message with two Arduino Unos (originals bought at the Maker Faire NY two years ago) but works fine with knock-off Uno. All 3 Unos worked fine with GRBL 0.9g as the GRBL library and with other sketches. The issue only shows for 0.9j. Loading the hex file directly produces exactly the same results. 0.9g works on all 3, 0.9j produces a failure on the original Unos.
That's just weird. I have a bunch of original and knock-off Arduino Unos (and an AVR ISP programmer to fix them if I break the bootloader). Do you mind if I try those hex files too? Can you post both of them here? Change extension to .txt to upload, if the forum complains.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Bluemetal
Posts: 13
Joined: Tue Apr 10, 2012 9:03 pm

Re: SO3: Built a probe...got errors

Post by Bluemetal » Sat Nov 14, 2015 12:57 am

cvoinescu wrote:Flip them; the spindle is a great antenna for all sort of noise. Have that connected to ground, and A5 to the touchplate.
Done that and produced the same problem.
cvoinescu wrote:That is alarming. Try with A5 connected to IOREF (or +5V). If that still doesn't move, there's a bigger problem (busted AtMega328P chip on the Arduino).
Connecting the A5 pin to +5V (actually 4.35V as is being powered by the computer) did cause the z-axis to finally act properly :D and stop once the voltage is removed. I have connected an alternative 5V power supply for the arduino and it works almost every time. I believe that I still need to filter or shield it for it to work 100% of the time. Any recommendations?
cvoinescu wrote:That's just weird. I have a bunch of original and knock-off Arduino Unos (and an AVR ISP programmer to fix them if I break the bootloader). Do you mind if I try those hex files too? Can you post both of them here? Change extension to .txt to upload, if the forum complains.
I am sure it is something that I am doing wrong, but please go ahead and try the hex files. They are on this page ( https://github.com/grbl/grbl ) and specifically for GRBL 0.9j : http://bit.ly/1I8Ey4S and for GRBL 0.9g : http://bit.ly/1m8E1Qa. I cannot post them here as it goes over the 60K limit. I have tried again with Xloader in two different computers and it produces the same results.

Further testing today demosntrated that the issue was the bootloader. Using the other original Uno as ISP ( https://www.arduino.cc/en/Tutorial/ArduinoISP ), I was able to upgrade the bootloader with Arduino 1.6.6 and now the original UNO can use GRBL 0.9j without any issues.
Proud owner of original Kickstarter Shapeoko #8 - still has original steppers, some end plates and screws but now looks like a Shapeoko 3.:)

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: SO3: Built a probe...got errors

Post by cvoinescu » Sun Nov 15, 2015 1:05 pm

It looks like there's nothing for me to do, then. :) A flaky power supply can cause false triggering of inputs.

You mention a 5 V power supply. If you're using the barrel-plug connector or the V_IN pin, you need to supply at least 7 V for it to work reliably. I don't know whether it's okay to apply an external 5 V supply to the +5V pin directly (I don't remember the details of the supply circuit of the Uno). I'd use a 7-12 V wall-wart to power the Uno.

For additional filtering, try adding a 100 nF (10 nF to 470 nF) capacitor to ground and a 680 Ω (470 Ω to 1.2 kΩ) resistor to +5V.

As for the hex files, if upgrading the bootloader fixes it, I wouldn't have found the issue. All my Unos are new, so they likely have the current version. Please let @chamnit know that 0.9j requires an up-to-date firmware on the Uno, so that he can add a note to the site and spare others the same frustration you went through.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Bluemetal
Posts: 13
Joined: Tue Apr 10, 2012 9:03 pm

Re: SO3: Built a probe...got errors

Post by Bluemetal » Sun Nov 15, 2015 2:10 pm

cvoinescu wrote:It looks like there's nothing for me to do, then. :) A flaky power supply can cause false triggering of inputs.
Thank you very much for the help. Sometimes a simple question can set someone on the right path. You did much more than that.
cvoinescu wrote:You mention a 5 V power supply. If you're using the barrel-plug connector or the V_IN pin, you need to supply at least 7 V for it to work reliably. I don't know whether it's okay to apply an external 5 V supply to the +5V pin directly (I don't remember the details of the supply circuit of the Uno). I'd use a 7-12 V wall-wart to power the Uno.

For additional filtering, try adding a 100 nF (10 nF to 470 nF) capacitor to ground and a 680 Ω (470 Ω to 1.2 kΩ) resistor to +5V.
I have added a +5V through a 10K pullup directly to pin A5 from a wall-wart supply and it is working well.
cvoinescu wrote:As for the hex files, if upgrading the bootloader fixes it, I wouldn't have found the issue. All my Unos are new, so they likely have the current version. Please let @chamnit know that 0.9j requires an up-to-date firmware on the Uno, so that he can add a note to the site and spare others the same frustration you went through.
It is the first time I had seen this but I will make a point of keeping bootloaders up to date from now on. I've sent @chamnit a pm, as you've suggested, in case he has not seen it before. Thank you again for the help.
Proud owner of original Kickstarter Shapeoko #8 - still has original steppers, some end plates and screws but now looks like a Shapeoko 3.:)

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: SO3: Built a probe...got errors

Post by chamnit » Sun Nov 15, 2015 5:12 pm

Thanks for the note. I've run across the problem of not uploading before, but you're right I should note this in the uploading page. As you found out, the solution has been re-flashing the boot loader.

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: SO3: Built a probe...got errors

Post by cvoinescu » Sun Nov 15, 2015 8:46 pm

Bluemetal wrote:Thank you very much for the help. Sometimes a simple question can set someone on the right path. You did much more than that.
You're welcome. I seem to ask the right questions some of the time. :)
Bluemetal wrote:I have added a +5V through a 10K pullup directly to pin A5 from a wall-wart supply and it is working well.
Keep that resistor 10 KΩ then. Any lower and you risk frying the pin when the USB is unplugged, or when the "+5V" is below 5 V. It might be better to use 1 KΩ or so to the +5V of the Arduino, without an external supply -- less chance of killing the Arduino that way.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Post Reply