EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: newtekuser on October 30, 2023, 01:33:54 am

Title: 12V bi-polar motor wiring to A4988
Post by: newtekuser on October 30, 2023, 01:33:54 am
I picked up a A4988 driver to use with my 12V bi-polar motor (yes, it's a QFN ;D). In the datasheet I do not see a VMOT pin as per the many articles I found online, but I see VBB1 and VBB2 pins which according to the datasheet are for the load supply. I assume these are for supplying the voltage needed to drive the stepper motor, in my case 12V.
Does that mean that I connect both pins of this driver to my 12V rail, or only one? The motor has four pins and no ground or power pins.

From what I gather, I need to connect A+,A-, B+,B- wires from the stepper to the OUT1A, OUT2A and OUT2B, OUT2B and connect the VBB1 and VBB2 pins to 12V, is that correct? Where does the 12V ground connect to?

Here are my components:

https://www.digikey.com/en/products/detail/allegro-microsystems/A4988SETTR-T/2237991 (https://www.digikey.com/en/products/detail/allegro-microsystems/A4988SETTR-T/2237991)
https://www.omc-stepperonline.com/dual-shaft-nema-17-bipolar-1-8deg-26ncm-36-8oz-in-0-4a-12v-42x34mm-4-wires-17hs13-0404d (https://www.omc-stepperonline.com/dual-shaft-nema-17-bipolar-1-8deg-26ncm-36-8oz-in-0-4a-12v-42x34mm-4-wires-17hs13-0404d)
Title: Re: 12V bi-polar motor wiring to A4988
Post by: JJ_023 on October 30, 2023, 07:21:30 pm
From what I could tell from the datasheet you would connect OUT1A and OUT1B to A+ and A-.   OUT2A and OUT2B to B+ and B-.

VBB1 and VBB2 would connect to your 12 V.  The ground would be provided through the driver.  Is the way I would interpret that datasheet.

Title: Re: 12V bi-polar motor wiring to A4988
Post by: newtekuser on October 31, 2023, 01:01:33 am
From what I could tell from the datasheet you would connect OUT1A and OUT1B to A+ and A-.   OUT2A and OUT2B to B+ and B-.

VBB1 and VBB2 would connect to your 12 V.  The ground would be provided through the driver.  Is the way I would interpret that datasheet.

That's what I was thinking too. I also hooked up DIR and STEP pins to my PIC. Since there are no coil sequences with this driver, I simply turned STEP pin high then low with a 1ms delay in between but nothing happens.
There's 12V coming into the driver. I suspect soldering as I barely had paste left. Tomorrow I'll have more coming from Amazon and will "bake" it again.
Title: Re: 12V bi-polar motor wiring to A4988
Post by: sarahMCML on November 01, 2023, 02:01:13 am
Motor GND basically connects to the Common side of the 2 Sense resistors on pins 23 and 27 of the  I.C.
Title: Re: 12V bi-polar motor wiring to A4988
Post by: liaifat85 on November 01, 2023, 07:01:31 am
 To power the A4988 and your stepper motor, you should connect VBB1 and VBB2 pins to your 12V supply.  You don't need to connect both pins to the 12V rail. You only need to connect one of them to your 12V supply.
Connect A+ and A- of your stepper motor to the OUT1A and OUT1B pins on the A4988 driver and  B+ and B- of your stepper motor to the OUT2A and OUT2B pins on the A4988 driver.
Connect one of the VBB pins on the A4988 driver to your 12V power supply's positive terminal.
Connect the GND (ground) from your 12V power supply to the ground (GND) of the A4988 driver.

For further reference, you can check the pinout here.
https://www.theengineeringprojects.com/2019/05/introduction-to-a4988.html (https://www.theengineeringprojects.com/2019/05/introduction-to-a4988.html)

Title: Re: 12V bi-polar motor wiring to A4988
Post by: newtekuser on November 01, 2023, 10:41:16 pm
To power the A4988 and your stepper motor, you should connect VBB1 and VBB2 pins to your 12V supply.  You don't need to connect both pins to the 12V rail. You only need to connect one of them to your 12V supply.
Connect A+ and A- of your stepper motor to the OUT1A and OUT1B pins on the A4988 driver and  B+ and B- of your stepper motor to the OUT2A and OUT2B pins on the A4988 driver.
Connect one of the VBB pins on the A4988 driver to your 12V power supply's positive terminal.
Connect the GND (ground) from your 12V power supply to the ground (GND) of the A4988 driver.

For further reference, you can check the pinout here.
https://www.theengineeringprojects.com/2019/05/introduction-to-a4988.html (https://www.theengineeringprojects.com/2019/05/introduction-to-a4988.html)

Shouldn’t the GND pin be connected to the ground of the logic supply? Because the VDD pins for the driver are for logic supply according to the datasheet and that’s 5v not 12v.
Title: Re: 12V bi-polar motor wiring to A4988
Post by: liaifat85 on November 01, 2023, 10:58:58 pm
The ground should be the same for your entire circuit. That means the 12V power supply and 5V logic supply and the Motor driver must have the common GND.
Title: Re: 12V bi-polar motor wiring to A4988
Post by: newtekuser on November 02, 2023, 12:16:01 am
The ground should be the same for your entire circuit. That means the 12V power supply and 5V logic supply and the Motor driver must have the common GND.

Is this going to be an issue if the rest of the components in my circuit are not 12v tolerant? I.e.: In the circuit I also have a PIC microcontroller, LCD and RTC that operate on 5v max.