A4988 in circuit

Good day,

I want to build my stepper drivers into a pcb,

What i would like to know is if there is any components that i am missing?

Q1:
Do i need to put a resistor on the ms1, ms2, ms3 and enable pins? Or can i hook them up straight to 5v ?

Q2:
i want to protect my chips from feed back voltage if my motors are spun, as i sometimes have to manually move my cnc axis back to home position.
I have put a 50v 470uF cap on the vmot and gnd pins (as in schematic) and i also bought some zenner diodes ( the man at the electronics shop said they could work, (on the motor pins)) the are 1N5363B 30v 5W zenner diodes, how would i go about connecting them?

Q3:
Please check my schematic attached and see if there are any necessary components that i am missing.

Thanks
Dylan
[ps; a quick reply would be appreciated :slight_smile: ]


Hello.

Q1: No, hooking them to same voltage as on Vdd is fine.
Q2: You connect the Zener diode’s cathode to Vmot and the anode to GND, so that it conducts if Vmot goes above 30V. You should probably use a TVS (transient voltage suppressor), which is a Zener diode optimized for this application.
Q3: I don’t see any obvious problems with your schematic. I would not recommend calling the Vmot net Vcc, since that could be confused for the logic voltage of your system. The position of the +5V label where the wire connects to Vdd is on top of other wires.

- Ryan

thank you very much for your reply,

Q1:Is my capacitor fine? I got a larger one to hopefully protect more.
Q2: Would i then use the capacitor and the TVS ? (can i ?)

Also why would i put it on the vmot ? surely that means that if the volts go over 30v that the power would have had to have gone through the driver (from motor to driver to vmot) ?

Then surely it will cook it.

Q3:
does the motor ground and the logic ground have to be connected?

Thanks

Q1: Your capacitor looks fine.
Q2: Yes, you would use the cap and the TVS. Current flowing up through the H-bridges doesn’t break the driver. What breaks the driver is if those voltages build up to higher than the driver can tolerate.
Q3: Yes.

- Ryan

Perfect, Thank you for your help!
:smiley:

Another Q:

I want to put leds on the motor output, 2 LEDs on each phase (in opposite polarity) just so that i can see whats stepping :laughing: .
I will obviously have the ideal resistor is place,

Can i do what i want? Will putting the two leds in parallel with the motor outputs effect anything (besides the tiny amount of power it will use)?

Thanks

Yes, that is okay to do. You can look at how we do it here on our Pololu dual VNH5019 motor driver shield for Arduino schematic.

- Ryan

Why thank you, That was really helpful, i will do just that,

I just thought of some thing, Should i not be putting in a pull down resistor on my step and direction pins? So that if a wire is not connected it wont jump around?

also,

I wired my leds as they where in that schematic with the single resister etc.
But they blew, And i went now and looked and their reverse volts is only 5v, so i am assuming this is why they blew,

Should u put a diode in ?

It doesn’t really matter if your direction pin is jumping, it will only step based on the step pin moving. However, the typical procedure is to use the microcontrollers pull-up resistor. If the pullup resistor is enabled, there will be no jumping. *Edit: I will point out, there is one benefit to offering a pull-down. In my project every time I reset the power, there is a half second of jitter on my stepper motors while the pins are not yet set. There’s an even longer period of jitter every time I upload new code. So weak pullups or pull downs are not a terrible idea.

What are you saying? I don’t think leds have a reverse voltage of only 5v…that would be like a zener diode, not a light emitting diode :p. typically they’re much higher than 60v.


Overall, are you really posting on Pololu’s forums asking how to build a copy of their driver? :p, i guess if you can’t copy it by yourself without asking these questions, there have no risk in helping you (and it’s education and kind to offer help), but you are asking rather intensive questions. Have you considered using their board in your board? A sort of “plug and play” addition. A lot of sanguino based 3D printers do that, and I did that on a small automatic feeder I was making at work. The cost is sure as hell cheaper to buy 20 pololu boards than to get tooled on a pick and place machine and buy all the parts for a copy of their board.

Still, I understand it might also be a learning experience for you. You can look up “step-stick” to see a semi-copy of pololu’s drivers, with a lot of detail how it’s made because it’s an open-source reprap project.

What resistor value did you use? Is your coil voltage getting up to 30V?

- Ryan

i realized i was a moron i soldiered the pin that goes to the resistor to the main power,

So i basically by passed the resistor. fixed it and it works fine now.

and @ Tomek
I am not rebuilding one of their boards, I am building a PCB that will then have 3 of their stepper boards fit into in.