I am trying to connect 4 small DC motors to Arduino, like those in the following image: my kit, 4WD, with 4 simple motors
The specification for each of them is:
Suggested Voltage: 3V DC;
No Load Speed: 65 ± 10rpm;
No Load Current: 125mA (170mA MAX).
But I have no useful knowledge in electronics to do so...
I would be really thankful if anyone could explain me why it is so difficult to connect DC motors to Arduino (I've heard about problems with the magnetic field, but I don't really understand why); and possible point me to an easy (and cheap) solution. I am, of course, willing to study (not expecting a complete solution).
I'm aware there are some shields for doing this kind of connection, but they are really expensive, and I've seen some people using only transistors or components like SN754410.
Thank you in advance! :-)
-
It's not really the no-load current you need to know, but rather the load current. Those look suspiciously like the type of low-voltage, high-current motor which is hard to drive, such that many people replace the actual motors in the gearboxes with others. But if you want to try, consider an FET H-bridge like the TB6612FNG, probably already on a PC board.Chris Stratton– Chris Stratton2014年09月04日 15:36:59 +00:00Commented Sep 4, 2014 at 15:36
-
@ChrisStratton, thanks! I am planning on using a L298N driver motor; wiring the two left motors together and the two right motors together (being able to use a single dual H-Bridge). Would you happen to know if this configuration would suffice? :-)user282723– user2827232014年09月05日 06:49:06 +00:00Commented Sep 5, 2014 at 6:49
-
may i ask where you got that kit ?Magic-Mouse– Magic-Mouse2014年09月05日 08:03:28 +00:00Commented Sep 5, 2014 at 8:03
-
I would not use the L298 in a battery powered application - the losses are a bit high, in particular you will drop more than a volt across the two transistors.Chris Stratton– Chris Stratton2014年09月05日 14:44:51 +00:00Commented Sep 5, 2014 at 14:44
-
Thank you, guys! I have used the L298 and it was perfect. :-)user282723– user2827232014年10月04日 03:05:36 +00:00Commented Oct 4, 2014 at 3:05
1 Answer 1
First you make 4 parallel H-Bridges, http://en.wikipedia.org/wiki/H_bridge then you attach it to an external powersource ( or attach directly to the battery to prevent burning your arduino )
Attach every up to a pin, making it high makes the motor running, you need 8 pins for this, eg pin 1 makes motor 1 go forward, pin 2 makes motor 1 go back and so.
This is by far the most practical solution, but it is the easiest, and can be done with 8 PNP and 8 NPN transistors.
If you don't know how transistors work i suggest https://www.youtube.com/watch?v=-td7YT-Pums collins lab, it is both educational and entertaining.
-
1Making your own H bridges from discrete transistors is probably not the best solution here, especially for a poster facing this for the first time.Chris Stratton– Chris Stratton2014年09月04日 15:34:57 +00:00Commented Sep 4, 2014 at 15:34
-
Just wire 2 motors to turn forwards, and 2 to turn backwards. That way you don't need an H-bridge (which in theory is easy to make, but in practice can be difficult to do right, I'm told).Gerben– Gerben2014年09月04日 17:49:01 +00:00Commented Sep 4, 2014 at 17:49
-
1@Gerben true true, but this is 4 motors attached, i was just afraid that the current going through them would be more than the arduino could handle, thats all. (Besides it is fun to play with H-Bridges, since it is the first step for a stepper motor. No pun intended)Magic-Mouse– Magic-Mouse2014年09月05日 05:33:57 +00:00Commented Sep 5, 2014 at 5:33
-
1@Gerben The Arduino does not handle more than 40mA on an IO pin (according to documentation) and 200mA on the Vcc pin meaning he could only run 1 motor or risc frying the board.Magic-Mouse– Magic-Mouse2014年09月05日 05:37:42 +00:00Commented Sep 5, 2014 at 5:37
-
1Yes the L298N is perfect for that since it supports up to 4 amps of current so you could serial couple about 23 of those motors without frying it.Magic-Mouse– Magic-Mouse2014年09月05日 07:45:39 +00:00Commented Sep 5, 2014 at 7:45
Explore related questions
See similar questions with these tags.