I have the ‘Blink an LED’ program running on my Photon. D7 led blinks. I connected D7 to the STEP pin on the A4988. I noticed the voltage at that pin the collapses to around 1V and the LED does’t blink either. It should be around 3.3v. I unplugged power from the A4988 and it still happens.
WEIRD! I figured the STEP input on the A4988 was high impedance. Even with it unplugged from power, it still happens. Doesnt this seem weird? I think I may have got a dud. Any input is appreciated!
Can you post pictures here that show how everything is connected? We expect the STEP pin to be a high impedance input. Has this A4988 driver ever worked?
I have tried to get two of my 4988 stepper drivers going and neither is working. I am using a 20 volt source connected to the motor power + and -. Then, I have a 5V regulator connected to the same 20V source. The output of the 5V source is connected to the logic + and -. I have the ground pin connected to the 5V ground pin and the 20V ground. I have sleep and reset connected to each other. I have left the direction pin floating, grounded, and 5V. I have been using 5V to “pulse” the step pin. I have my reference voltage on the driver set to 400mV.
It does not turn the moton. I am using a voltmeter to check the motor outputs and there does not appear to be any voltage at those pins at any point during pulsing the step pin.
Like I said - I tried 2 drivers and they both dont seem to do anything. Is it because I have the motor voltage negative pin connected to the logic ground? I had to do this since I am using a 5V regulator off the 20V motor voltage to get my 5V.
It seems to me like a weird thing if I really had to connect to voltage sources (rather than being able to branch off with a regulator.
I have combined both of your threads since the posts seem to concern a single problem you are having. The grounds on our logic and motor power supplies should be tied together and all of the GND pins on our A4988 boards are internally connected.
Can you post pictures here that show how everything is connected?
So the black wires coming in toward the top supply 20V and this is connected to both the input of a 5V regulator and a the motor controller voltage + input on the driver. The ground on 5V regulator is common with 20V ground and the logic ground. Everything else should be connected the way the Pololu website shows. The long, orange wire at the bottom (routed like a “U”) is not acutally connected to anything. I was pulsing it with 5V and it is connected to the STEP input on the driver.)
I dont get any output from the driver on the motor outputs. (I have the stepper unplugged until I solve the problem.) The only thing I can think of is that I cannot have the 20V motor power ground common with the 5V logic ground. Since I am using a 5V regulator off the 20V motor power, I had to do this. It seemed goofy to actually have 2 power sources plugged in. What do you think?
It looks like you have a solder bridge between the 1A and 1B output pins on the driver, which could explain the behavior you are seeing. You should try retouching the soldering for those pins so that they are not connected together to see if that helps. The Adafruit Guide To Excellent Soldering has a lot of detail about the techniques for making good connections and might be helpful for you.
Alas it is only solder flux. I checked for continuity to make sure there wasn’t a little solder mixed in. I cleaned it off and tried again and no luck. I bought 2 drivers and neither seems to work with this setup…
How do others supply motor voltage and logic voltage - or rather, does anyone use a single power supply and a voltage regulator to supply the logic voltage? And did it work? I am thinking I will pick up a second power supply that supplies 5V and power them both separately to see if that takes care of the issue.
Having more than one board not working in the same setup makes it seem more likely that the setup is the issue. Using a regulator that is powered from your main 20V supply for the logic supply like you are doing should be OK. If you have any more information about your 20V supply, can you could post it here? Can you use your multimeter and measure at the A4988 board’s pins to verify that 5V, or GND is making its way through your breadboard circuit to the A4988? Checks like those can help identify if there are bad breadboard connections.
Yeah - I agree… Here is what I found…
- First off, my power supply (which is a typical brick power supply that plugs into the wall which I scavenged so I didn’t initially know the condition) is supposed to output 14.5V @ 1.5A. Oddly, it outputs 19.2V with about 50mV of fluctuation when everything is idling. I won’t ask for any more troubleshooting help till I replace the power supply.)
- The motor voltage is 19.2 ± 0.05V. This seems like a lot of fluctuation and should really be 14.5V.
- The logic 5V input is a steady 5V with no significant fluctuation. This should be correct.
- The RESET and SLEEP pins both measure 500mV tied together. This should be correct.
- The motor voltage ground pin and logic ground pin are both continuous with the power supply negative wire. This should be correct.
- When I measure the motor output pins (with no load connected), they all simultaneously fluctuate from about 900mV to 1.1V
- With the motor connected, the motor output pins are all at the same potential about 600mV. When I pulse the STEP pin, the voltage drops to about 200mV and then after a few seconds, it goes back to around 600mV. But, all the motor output pins measure the same potential so there is no current flowing through the coil!
- I had initially set the reference voltage for the current limitation to about 200mV and then I raised it to about 600mV during troubleshooting.
- Just now when I plugged in the power supply, my 5V regulator got super hot (I could smell it) so I unplugged the power supply. That’s weird… I think I will order a couple more of these drivers and I will get a legitimate power supply and try all over again. Sigh…
The SLEEP pin (and the ENABLE pin when they are tied together) should be at VDD (5V in your system) by default, so it seems likely that your drivers are damaged at this point. Perhaps there is something on the logic side of the IC that is shorted out and drawing more power than it should. I do not see anything obviously wrong in your system. However, we test all of our boards before they ship, so there is probably something with it that is damaging them.
A voltage spike on VMOT above 35V when the power supply is first powered or a Vdd above 5.5V could damage something. Since you do not have any capacitance on the output of your regulator, you might place a small electrolytic capacitor (a few 10s of uF should be fine) at the Vdd input to the driver board.
If you contact us by email (email@example.com), we can see what we can do to help you with some replacement drivers.
So I got my 2 new drivers and this evening I installed one (same ones as before.) Now, I get the 5V at the SLEEP and ENABLE pins (they are tied together.) So that’s good. Buuuut… When I power on, the motor turns a little and vibrates a bit. I powered off quickly. I disconnected the motor and powered back on and measured voltages to make sure everything is normal. I powered off and plugged the stepper back in and powered on and the same vibration again. It shouldn’t do anything if I am not pulsing 5V on the STEP pin right? I am still using the other power supply that I said I would replace… Just got back into town so I haven’t had a chance to drive to Frys yet…
Oh I just thought of something. Since I don’t have my micro controller connected to the STEP pin, technically, I am leaving the pin floating in between 5V pulses. When it’s floating, maybe there is noise and it thinks I am PWMing the STEP pin… Could that be? Should I use a pull down resistor or something?
I installed a new power supply which outputs 12V and it is stable. But when I plug it in, the motor instantly starts vibrating again. Could this be that I need to use a pull-down resistor on the STEP pin and then pulse with 5V? I’m so sad I don’t have any resistors handy.
EDIT: Oh so I tried another (this is the 4th) stepper driver and when I plug in power, the stepper motor begins to turn all by itself but seems to be vibrating crazily while it turns! I noticed when I connect the STEP pin directly to 5V (to keep it from floating) it stops (though it makes a little noise - I think its is normal maybe when the stepper has holding current applied to it?) Also, same thing when I connect the STEP pin to ground. Stops but exhibits holding current. This sort of confirms my suspicion that the STEP pin does not like to be kept floating. I will now connect it to my new Particle Photon microcontroller and see how it does. (I blew up my last Photon by applying too high a voltage on accident from the previous ghetto power supply.)
WOOHOO it works
I think this note should be added to your minimal connection diagram - something along the lines of “If testing the stepper driver without a microcontroller, the STEP pin should never be left floating.” But your diagram indeed works so nothing is misleading. It seems I just had 2 bad drivers - and it may have been be that made them bad haha.
I am glad to hear you got it working. Thanks for letting us know. The IC does not have an internal pullup or pulldown resistor and although we have not run into any problems like that before, I suppose it is not too surprising the step pin could be triggered by noise like that.