[SOLVED] Arduino & gShield / Stepper Issues

I figured I’d start up a new thread to detail what I’ve been up to.

After I finished my initial wiring and started on the Easel setup, my Arduino stopped responding. I was able to get to the point after it connects to the com port, and lets you jog the stepper motors. I hadn’t turned on the power supply, so I figured I’d take a small break, reboot everything, and start over. After I did this, and restarted the Easel setup, I couldn’t communicate with my Arduino.

I noticed that when I turned my arduino on, it had a solid green and solid yellow LED. Turning on the power supply lit a blue LED, but nothing else. Tried connecting to it using Universal GCode Sender, and no response. Same with the Arduino software. It still showed up under connected devices whenever I plugged/unplugged it, but there was no communication.

At this point I moved to just the arduino, and disconnected everything, removed it from it’s case, and tried to communicate with it. After a while, i tried reflashing the firmware on the chip using FLIP and the instructions online (which worked smoothly), there was still no communication with the boarrd once it was plugged in. I tried working with a spare MEGA I had lying around, and was able to connect, upload, and run things pretty easily. I was going to try driving the x-carve with the mega, but apparently there is limited support for GRBL on the mega, and after two days of troubleshooting I figured I’d just stop by radio shack and get a new UNO.

That was yesterday. Got a new Arduino, uploaded the GRBL version as shown elsewhere on the site (Grbl 0.9j) and was able to power up and connect to the xcarve. I power on the psu, I get a blue light on the gshield. I plug in the arduino, i get a blinky yellow and solid green on the arduino, and the three axis LEDs on the gshield light up.

Now, when I jog the motors, the green axis lights flicker. I don’t know if that’s supposed to be normal, but after hitting any of the directional arrows a couple times, the lights go out completely for that axis (maybe a 3/4 rotation of the gear). If I keep pushing, it still moves and the lights eventually come back on. Spindle control does not work, and when I try to home everything to test my limit switches, it appears to hang.

I’ve just tried using UGS to start a homing sequence, and it throws:

$H
ALARM: Homing fail

I guess since the alarm is tripped, it locks everything up so Ihave to issue a $X to unlock it. I’m kind of at a loss at this point. I’m really over my head and don’t know where else to start trouble shooting. The steppers do move, and in the correct directions and distances, but I figured the lights should stay on. I’ve tried turning the POTs, and it doesn’t seem to make much of a difference. My wiring seems to be sound, as the steppers and spindle work (manual control of the spindle is fine, it’s the automatic control that doesn’t work), and the fan starts up.

Any help would be appreciated!

I should note:

  • When I try to home it (with 0.9j), the light for the z-axis goes out on the gshield and it appears to hang.

I’ve tried uploading GRBL 0.9i hex and now when I start homing, the z-axis starts to move down very slowly.

Let’s take a look at your Grbl parameters.

Get UGS to the point where you can talk to the Arduino. Go to the Commands tab in UGS and enter the following command: $$

It will dump out the settings in Grbl. Post that output to the forum so we can take a look at it.

I’ve just noticed that my limit switches may be offset by one pin, taking everything apart and double checking.

Here is the output of $$:

$0=10 (step pulse, usec)
$1=255 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=3 (dir port invert mask:00000011)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.020 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=0 (report inches, bool)
$20=0 (soft limits, bool)
$21=0 (hard limits, bool)
$22=1 (homing cycle, bool)
$23=3 (homing dir invert mask:00000011)
$24=25.000 (homing feed, mm/min)
$25=750.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=1.000 (homing pull-off, mm)
$100=40.000 (x, step/mm)
$101=40.000 (y, step/mm)
$102=188.976 (z, step/mm)
$110=8000.000 (x max rate, mm/min)
$111=8000.000 (y max rate, mm/min)
$112=500.000 (z max rate, mm/min)
$120=500.000 (x accel, mm/sec^2)
$121=500.000 (y accel, mm/sec^2)
$122=50.000 (z accel, mm/sec^2)
$130=790.000 (x max travel, mm)
$131=790.000 (y max travel, mm)
$132=100.000 (z max travel, mm)
ok

Ok, settings look good.

It’s not obvious from the instruction photos, but the first position in the homing switch / spindle control connector is not populated, so your first homing switch wire goes in the second position. Also note that the first two switches are in position 2 and 3, but the last one skips a position which is used by the spindle control.

Positions 1, 6 and 8 are empty. Position 7 is the ground wire from the spindle control.

All numbers are left to right looking into the back of the connector. My numbering is for illustration only and may not be the actual pin number scheme.

Thanks, I had two open pins on the left side, one on the farthest right. Had to move the three white and the one yellow over one pin. Just cleaning it up now.

Update:

Moved pins, now auto-spindle control works. Homing sequence starts with the z-axis spinning, but it doesn’t stop. Tried multiple times, tripping each of the limit switches but no dice. looking into my wiring again.

Looks like my limit switches were soldered wrong. Silly my for following this picture from the tutorial:

and not this one:

Looks like that was the issue with the limit switches and the auto-control of the spindle. Only took me like four runs to radio shack, two limit switches, a bunch of soldering and a new arduino uno to get it all working.

Thank you LarryM for your help and pointing me in the right direction. :smile:

@PhraustByte

Great news.

One other point before you go on. The switches are really just Homing switches as set up by the Inventables instructions. There is a long thread concerning this point, but for me the bottom line is that I would recommend that you use soft limits to keep your machine from going outside the work area if it gets a bad command.

To read the entire thread you could check this out:

I’ll take a look at that thread. I grabbed a couple extra switches yesterday just in case, and spent the day cleaning up and resoldering all my wiring so it’s in top shape.

Of course, when I plugged everything in and started setting it up, I get to the spindle test page and it doesn’t work (forgot to switch it to logic). Figure I’ll continue to the homing setup, so it homes Z, pauses for about 15 seconds, then a slight click and the spindle turns on (is that smoke I smell? Is it the weird factory-fresh power supply smell? Who knows?) Turn everything off, kill the power, check wiring, plug the arduino back in and now it appears to be fried just like the other one.

Totally bummed my trip. Had my test design and material already clamped down. Two dead arduinos, no idea what’s going on. Something’s gotta be shorting somewhere, maybe the enclosures touching something, I dunno.

@PhraustByte

Oh, no. There shouldn’t be any smoke or smell with the startup. It’s possible that you could have a component failure to cause that, but not likely. Check your wiring very carefully.

I would be cautious in doing the restart. If you don’t find anything wrong then you could have the same problem when you start it back up.

Got my replacement arduino yesterday, took off the limit switches and the spindle control, and I insulated the mounting posts for the arduino. Worked like a charm, actually carved something!

Instead of using those 90 degree pins, I unsoldered those and soldered the spindle control directly to the exposed pins. Automatic spindle control works now!

I’m on the fence in regards to reinstalling the limit switches. The switches are pretty weak, and since I have to home to material anyhow, don’t see the advantages.

Thanks for your help in troubleshooting this, the new Uno seemed to fix it. Though I wonder if there is a short somewhere between the case and the boards (or maybe those long screws from the fan?) that burns out the chip on the arduino. Having the exact same issue appear on two boards is making me really nervous with this one, so I’ll probably be building a new enclosure for it all.