I am hacking a vacuum cleaner robot by trying to control the motors with an Arduino.

I have then two 8V motors, each one needing from 50mA (when the wheel is turning free) to more than 1A (when the wheel is blocked).

The robot battery provides 16V (and I know it can provide enough current for the motors because that is the original battery).

Now, how can I connect the battery to the motor ?

I guess once that is done I can just add a transistor to control it with my Arduino.



Use PWM to provide 8V to the motors from the 16V supply via suitable drivers. Adafruit supplies this motor control shield kit that you could use, with software that you can adapt.

  • \$\begingroup\$ That looks like it handles bi-directional as well, which should make it easy. \$\endgroup\$ – Joe May 24 '11 at 17:27
  • \$\begingroup\$ Yes, it's got an H-bridge. \$\endgroup\$ – Leon Heller May 24 '11 at 18:44
  • \$\begingroup\$ You are a genius :p you made my day. This is so simple I feel guilty ! Thanks \$\endgroup\$ – Matthieu Napoli May 25 '11 at 12:43
  • \$\begingroup\$ I've got one. It's a nice kit, and easy to build. \$\endgroup\$ – Leon Heller May 25 '11 at 13:00

For that small of a current draw motor, I would think about just using an LM7808 Positive 8V regulator to generate the 8V from the 16V. Then use a logic level N-channel MOSFET to drive the motor from the Arduino. This only works for always turning one direction.

If you need to reverse the directions of the motors, then you need to look into driving an H-bridge or other method of reversing the motor.

The easiest might be to look into the original control circuitry and see if you can tie into it at the logic level. I'm betting they have a simple H-bridge in place to control these (which I assume is a Roomba.) The engineers that designed it probably spent a good bit of time figuring this out, so it is probably a great thing to borrow.

  • \$\begingroup\$ I completely agree with the idea of reusing what has been done in the original control circuitry, but it really seems complicated to me :p. I've tried to follow the lines and connections, but that is all mixed with the control of the motor for the vacuum cleaner so I'm afraid to mixed them. \$\endgroup\$ – Matthieu Napoli May 24 '11 at 15:00
  • \$\begingroup\$ I didn't think of going backwards though, thank you for bringing that up. With the H-bridge, will I still need the N-channel MOSFET ? \$\endgroup\$ – Matthieu Napoli May 24 '11 at 15:02
  • \$\begingroup\$ Do a google search on the term "H-bridge" Wikipedia has a simple explanation of 4 switches. These will usually be 4 MOSFETS, either 2 N channel and 2 P channel or with some extra complexity 4 N channel. (N channel is better than P channel in most regards.) There are chips out there for driving an H-bridge and might even be a shield you could use on the Arduino. \$\endgroup\$ – Joe May 24 '11 at 15:33

What kind of motors are there?

If they are using stepper motors (which is extremely common these days, as stepper motors offer superior torque, and are much more reliable), the answer might be surprisingly simple - they could've used 'universal' motors - 6 or 8-lead ones, that can be wired in series to operate directly at 16V.

  • \$\begingroup\$ Steppers taking 50 mA? \$\endgroup\$ – Leon Heller May 24 '11 at 17:27
  • \$\begingroup\$ from 50mA at idle, to 1A loaded - but then the author mention the wheel is turning free - so I guess he either already figured out how to wire a stepper, or it is some form of a DC comutated motor. \$\endgroup\$ – qdot May 24 '11 at 17:30
  • \$\begingroup\$ I have NEVER seen steppers to drive wheels (well, maybe in some hobby projects). Stepper motors are horrible for just about everything. The robot's is almost guaranteed to use brushed DC motors. Steppers have HORRIBLE torque (brushed DC motors have ~10x the torque in the same volume), and brushed motors are also far easier to control. They just don't offer precision positioning without a encoder. The only situation where you would ever want a stepper is when you need some precision and are too cheap to put together a servo-motor system. \$\endgroup\$ – Connor Wolf May 25 '11 at 2:46
  • \$\begingroup\$ I have only 2 wires per motor, I think a stepper needs more right ? \$\endgroup\$ – Matthieu Napoli May 25 '11 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.