Go Down

Topic: Using 74HC595 for small motors (Read 4876 times) previous topic - next topic

michaelsngws

Hi,

I am using a 74HC595 shift register to control several small motors (vibration motors). I am hooking it up similarly to how LEDs are hooked up in the examples.

I understand that for motors, it is better to have a diode to prevent flyback. If so, where should I connect the diode to? Do I need separate diodes for each motor?

Also, if I want a capacitor for the motor, where should I connect it/them?

Thanks.

CrossRoads

Not going to get far with 74CH595 driving a motor - the IO has very small drive capability (8mA, 70 for the entire chip). You can use it to control a transistor to drive a motor.
Here's a good way using a logic level, low Rds N-channel MOSFET showing where the diode goes.
One diode per motor.
No cap needed.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Paul__B

If the running current of your motor does not exceed 150 mA, then you could use a TPIC6B595.

The capacitor is for RF (Radio Frequency) suppression and needed only for brushed motors - brushless motors generally do not require any.  Up to you to figure out if your motors have brushes.  If so, the capacitor goes across the brush terminals.  In fact, brushed motors with a steel case generally had a capacitor (0.01µF) soldered (with short leads) directly from each brush tag to the casing.

michaelsngws

Thanks Crossroad,

I guess my small vibration motors were fine because they could work without a high mA. True enough, I tried it with a geared motor and it could not move. I did use transistors, but wanted to control more with less pins. Now why didn't I think of using the shift register to control the transistor. Haha. Nice.

Thanks Paul B,

I will most definitely look into that shift register!

MarkT

I understand that for motors, it is better to have a diode to prevent flyback. If so, where should I connect the diode to? Do I need separate diodes for each motor?

It is not "better", it is necessary. The diode goes across the motor for single ended drive
and 4 diodes go across the switching devices in an H-bridge.  You must always provide
a path for current when a switching elements switch off since inductive loads will generate
any voltage necessary to keep current flowing if you provide no easy path. V = L dI/dt

The way you find out the current requirement of a small DC motor is measure the
resistance across the terminals, R, then I = V/R where V is the supply voltage.  Make
sure your switching devices can handle peak currents of at least the value of I, the
stall current.  Expect this to be several hundred mA or more.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

michaelsngws

Hi guys,

It's me again. I am probably going for a 74HC595 to ULN2803 and 8 diodes solution. However, when I was experimenting with the TPIC6A595, I encountered a strange (to me) phenomenon that I hope the brighter heads around here could enlighten for me.

I pretty much switched the 74HC595 out for the TPIC6A595 and it worked for the leds I was using to test the shifting. The phenomenon that I don't understand is as below.

When the breadboard was drawing power from the Arduino 5V, I managed to get at least 1 motor running, while I could see the leds dim when it was running. 2 motors was a bit of a stretch, but at least 1 worked. This is within my expectation of what should happen.

However, when drawing power from my external battery, I could not even get a single motor running. The motors make a mewing sound like something is going on inside but no turning. Plugging the motor directly to the battery works, so the battery is fine.

I tried separating the power supply, with the IC powered by the Arduino, and the motors and leds powered by the battery, and it still does not work. All this time, my Arduino GND is linked to the - of the battery supply. The Arduino is powered by USB.

I do not understand that with the same setup the Arduino 5V can power a single motor, and the battery could not, while through the IC, but could without the IC? I don't know what a continuous sink current is. Do I need to change the setup with the TPIC6A595 compared with the 74HC595?

MarkT

How much current do your motors take?
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

michaelsngws

#7
Mar 05, 2015, 04:21 am Last Edit: Mar 05, 2015, 05:10 am by michaelsngws
I am not sure, they are tiny vibration motors that I bought off the shelf.

The strange thing is that I've used this battery to power upwards of 8 servos before, and it is being out performed here by my Arduino through the USB, by a long way.


Go Up