2
\$\begingroup\$

I consider this question different from others because of the variety of things I need this setup to be able to do.

Description: I want to build a minimalistic motor controller capable of controlling the speed and direction of 2 servos and 2 brushed dc motors. That is to say that I have size and weight constraints that I do not think would be satisfied by off-the-shelf solutions.

The Problem: I have an arduino board (all/any model) that can only output 40mA per pin which is not enough to power even the tiny dc motor I am using. If I power the dc motors directly from the 3.7v 150mA/h 25C LiPo battery it seems to spin at the top speed I need to be able to achieve from the arduino. I need to be able to controller the speed and direction of each of the motors from the arduino PWM output using power from 1 or more LiPo batteries. The battery I have came with the motors so I know it can power them.

Story: I salvaged the motors and battery from a small rc heli and I want to rebuild it as a UAV replacing the onboard chip with my small arduino (pro mini or teensy).

Update 1: Apparently I may have been overcomplicating the problem and a simple H-Bridge is all I need. I will post back if this turns out to be the case. Thanks for the helpful comments. I will upvote once I have enough rep.

Thank you!

\$\endgroup\$
8
  • 2
    \$\begingroup\$ There are quite a lot of existing questions on how to build an H-bridge motor controller; perhaps start with an existing shield design and modify it? \$\endgroup\$
    – pjc50
    May 15, 2013 at 16:11
  • \$\begingroup\$ My understanding is that an H-bridge only allows you to achieve bidirectional motor spinning and not speed. Am I mistaken? \$\endgroup\$
    – km6zla
    May 15, 2013 at 16:22
  • 3
    \$\begingroup\$ With H-bridge, you could control the speed in either direction by using PWM on one of the pins you control. \$\endgroup\$ May 15, 2013 at 16:30
  • 1
    \$\begingroup\$ I'm not sure what posts you are referring to. There are nuances and precautions to take when designing motor control circuits (snubbing diodes, etc.), or perhaps the posts are discussing how transistors work intimately. However, in simple applications, a beginner may survive with the simple idea that transistors and relays are just switches. \$\endgroup\$ May 15, 2013 at 17:05
  • 1
    \$\begingroup\$ The transistor article you linked to will give you speed control but not direction. It might be instructive to you to get it working anyway just to achieve a better understanding of the concepts. \$\endgroup\$
    – pjc50
    May 15, 2013 at 18:05

2 Answers 2

1
\$\begingroup\$

You have 2 questions here:

  • How to drive a servo motor?
  • How to drive a brushed DC motor?

Servos

Servos can be driven using a PWM signal. That's pulses between 1ms and 2ms at 50Hz, the length of the pulses controls the angle of the servo. There are 3 wires: GND, VCC, and one for the control signal.

Brushed DC motors

Brushed DC motors can be driven regulating the input voltage. This can be achieved by low-pass filtering the output of an open-loop op-amp driven by a PWM signal. This is a different PWM than for driving the servos, the high-level/low-level ratio determines the fraction of the input voltage you want to use to drive the motor.

A H-bridge might work but I am not familiar with this type of circuit.

I am not sure what kind of UAV you are making, sounds like a bi-copter. If this is the case you don't need to be able to control the direction of the rotation of the motors. You only need to hard-wire the motors to run in different directions, but the direction does not need to change in flight which greatly simplifies the problem.

This should give you enough leads to get going. If anything wasn't clear just shout :)

\$\endgroup\$
0
\$\begingroup\$

As you said that you are using motor from an RC heli,you will not be able to control it from a H-bridge. It's probably a brushless dc motor, so you have to use an ESC(Electronic Speed Controller). IF it's a brushed dc motor you can use an lm 298 or lm 293 ic based on your power requirement

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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