DC Motor control with arduino

Hey all - I'm trying to interface a DC motor salvaged from a moderately fast RC Car. The only information I have on the motor is that the RC Car ran off of a 7.2 V battery pack which was also regulated to 5 V on the inside (but I'm not sure if the DC Motor was driven with 5V or 7.2V...)

This might be more of an external circuit question, so I was hoping someone might be more in the know-how than myself.

I've setup an H-Bridge using 2 NPN (2222) and 2 PNP (2907) transistors. This is a 2-bit controller thus far:

Arduino output:
A B Function
0 0 Motor is shorted with itself/Ground
0 1 Motor driven Clockwise
1 0 Motor driven Counter Clockwise
1 1 I NEVER use this option (would connect V+ to both motor leads)

I'm using the same 7.2 Volt battery pack the car used to use. I've gotten the circuit to work with the smaller DC steering motor, but I can't seem to get it to work on the larger Drive motor (motor Hums and transistors get a little warmer than I'd like them too) which leads me to believe my transistors are not going to work for the Drive motor.

I've read that the TIP120 mosfets work alright, but I've also read that the ones I'm currently using work as well. I was hoping to get some clarification.

Thanks!

Before you can properly design a motor driver circuit you need to know the maximum current that the motor can draw under load. Without that information you are shooting in the dark.

You can hook up the battery directly to the motor and measure the no load current with a multimeter, but that won't give you the max current you will need in your use of the motor.

Lefty

I've read that the TIP120 mosfets

Pssst, TIP120 aren't MOSFETs, they're NPN Darlingtons.
You may want to reconsider your choice of reading material :wink:

Yup, I must say that was my bad. I read both that mosfets are good for high current switching AND tip120 is good.

Anyone like to share any ideas? I think I may pick up some tip120s at this moment, to at least test out a possability while you readers out there stumble across this post!

Thanks for reading/posting!!!

Based on your description, most likely the stall current for the motor is in the 1-2 amp range, but it could be higher.

If you want to check it, you have a couple of options, but both involve what is called a "pony brake" - aka, a pair of vice-grips.

Mount the motor such that the body can't turn, then attach a pair of vice-grips to the shaft so that it can't turn. Alternatively, you can don a pair of good leather gloves and grip the shaft; depending on the motor and such, this might be the better method, as you can allow for some slip (indicating near full stall) without burning the motor winding out (which a full stall can easily do).

Hook the motor up to your power supply (note the voltage of the supply with no load) with a shunt resistor in-line; normally you would use a special alloy shunt resistor, but for this simple test, a couple of large ceramic wire-wound 10 watt power resistors, of about 1-5 ohms each, connected in parallel to drop the resistance down, will work fine. Connect a multi-meter set to measure voltage across the resistor. Hook up the motor with the pony brake, note the voltage you see across the resistor. The drop in voltage across the resistor will give you your stall current via application of ohm's law.

Alternatively (but can be worse for your meter if you completely stall the motor out), you can just put the meter on current setting and inline it with the motor, then put the pony brake on it; pick a range greater than 1 amp.

Another way (which I recently found out after picking up my junker power supply) is to use a power supply that has a settable current and current limiting feature; you just hook the motor up, crank the setting to max current, and if it trips, you need a larger power supply. If it doesn't, then check the running current, multiply by 5-6 or so, set the current to that, and see if it trips. Increase/decrease until you get really close. I was doing that to test this power supply with a small motor I had; running current was around 200ma, while stall was around 1 amp (startup current was really close to this, too).

Your transistors are definitely undersized for the task, though - you could try paralleling a few together in your h-bridge, but that would be just an experimental thing; you really want to use larger transistors or mosfets for the job (or a larger h-bridge driver IC). Remember that to get close to the rated capabilities of whatever driver you use, you will need a heatsink.

:slight_smile:

Wow, very in depth process to figure that out. The drive motor is currently in a case where it is geared with the rear wheels in the car. Would this work if I decided to leave it there, and prevent the wheels from moving 100%. I could set the circuit up outside no problem, but I want to make sure that will be accurate enough.

Also, when I find the necesary current - is that what I use to choose my H-bridge components? Does radioshack carry components capable of doing what this circuit could potentially need?

Out of curiosity, what components out there would you suggest I use to over compensate?

Out of curiosity, what components out there would you suggest I use to over compensate?

You probably could modify the below kit to do what you want. Without knowing your stall current, hard to guess what you need. Have you searched the board for H-bridge? MOSFETs are the desired transistors, and they have some quirks that have to be sorted out if you are going to DIY.

http://store.qkits.com/moreinfo.cfm/qk166

http://www.watterott.com/de/Motor-Steuerung-20A-IRF7842PBF-24v20

Good spec on this 20A H-Bridge but it's in the EU

Technische Daten:

  • IRF7842PBF MOSFETs Motor Driver
  • 1 Motor Channel
  • Operating Voltage: 5.5 - 40V
  • Continuous output current: 20 Amps
  • Peak output current: 170 Amps
  • Max PWM frequency: 40kHz
  • MOSFET on-resistance: 2.5mOhm