# DC Motor Control

Hi, I am working on converting a Lego RC Car (Dirt Crusher RC - Model #8369) to an autonomous robotic car. The plan is to replace the all the electronics with Arduino based motor and sensor controls. I am working on the Motor Control. The car has a Servo to drive the steering and a DC motor to drive the Rear Wheels. The motors and electronics are driven by a 7.2V (1200ma I think) rechargeable battery. I would like to reuse the battery. I have implemented an H-Bridge circuit using Tom Igoe's DC Motor Lab at http://itp.nyu.edu/physcomp/Labs/DCMotorControl using the SN754410. I have tested the circuit without the motor and it is working fine. I am concerned about hooking the motor to the 7.2V battery. I am wondering if this is too much current for the H bridge to handle and also the motor runs to fast any way for my needs so I think I need to reduce current and or speed. It looks like I can control speed using PWM but do I need to reduce the current? If I do need to reduce or limit current how would I enhance the DC motor circuit? Note that eventually the 7.2V battery will be controlling the servo and possibly some of the electronics.

Thanks, Robin

Cool project.

Does the motor have any specs printed on it ?, frequently you can read voltage and current ratings on a motor somewhere.

You could try to hook the motor up directly to the battery with a multimeter set for meassuring amps in series with the motor to figure out how much current i draws.

Be aware of any peaks in current when the motor starts up.

Compare your readings with the datasheet for the H bridge you are using to see if you are on the safe side. If not you can find a H bridge with a higher current rating.

I don't think the speed of the motor depends on the curent, it's the voltage that determines the speed. This is why PWM works for speed control, it simulates changing the voltage. Of course Ohm's law is still valid :-)

To get a sense for how well your H-bridge is doing, put your finger on the chip while the motor runs. If the chip gets too hot to touch, you need more current handling capability. Keep a hand on the switch! Speed is going to be a problem for you; RC cars are designed to go fast, and robots are most easily controlled at slower speeds. Reducing the speed by adding resistance is like throwing battery power away in the form of heat. If you find that you can't control the robot well at the speeds available using PWM as input to your H-bridge, you may want to try a slow, 4WD RC chassis next. These are usually geared down farther, and you will find them easier to control.

I was able to open the housing and find out some more information about the motors. Inside the rear axle housing there are two RS-380SH motors (http://www.mabuchi-motor.co.jp/cgi-bin/catalog/e_catalog.cgi?CAT_ID=rs_380sh) wired in parallel. Assuming they are the 7.2V nominal versions the current rating looks high (3.2A at peak efficiency) for the SN754410. But I think Eustace's point is important. The motors are probably going to run too fast. Even though there is some gearing in the housing to reduce the rotation. they may well run too fast at the minimum 3V even if I build a better H bridge (the Lego board is using IRL3714 which is a 20V 36A MOSFET). It looks like if I want to use this platform I would need a beefier H-Bridge and perhaps some replacement gearing.

I was hoping to minimize the effort spent on the mechanical platform but this interaction between the mechanical and the electronics is exactly what makes robotics challenging and interesting!

I am really enjoying learning the Arduino by the way!

Thanks, Robin

If you use PWM you can control the speed of the motors almost all the way down to a complete stand still.

I just made a simple “laser show thing” with mirrors mounted on two DC motors pulled from old printers. My motors run on a seperate 12V wall wart, and i control them through a ULN2003 Darlington array (no H bridge because i only need speed control, not direction).

I can control the speed of the motors from not running at all to the full speed that the 12V supply gives. This control is achieved with PWM alone.

So before you start messing with the gears and voltage leveles, try PWM and see if it gives you enough control.