3. Test Equipment for an H-Bridge Motor Driver Circuit

(article continued from previous page)

The purpose of a motor driver is to control a motor, and the purpose of the motor is to convert electrical energy into motion. The motor driver’s performance can be measured by how much power it delivers to the motor versus how much is wasted in the motor driver electronics.

The amount of power delivered to the motor is crucial to a robot. The amount of motor power directly impacts the torque (pushing strength) and speed (RPMs). Furthermore, since most robots are powered by batteries, it is important to avoid wasting electricity on the H-bridge components.

A very simple technique for approximating the efficiency of a motor H-bridge is to measure the battery voltage with a multimeter while simultaneously measuring the voltage on the motor wires with another multimeter. For example, if the battery measures 5 volts (during usage) and the motor voltage measures 2.5 volts, then only half of the voltage is reaching the motor!

Test equipment set up to measure the performance of an electronic H-bridge and DC motor.

Test equipment set up to measure the performance of an electronic H-bridge and DC motor.

  1. A bench-top power supply with adjustable voltage. This is better than using a battery, since a battery’s voltage can’t be adjusted easily and it will decrease with usage. I believe I got this power supply at Circuit Specialists/Web-tronics. But you can also find variable power supplies at Electronix Express.
  2. An autoranging digital multimeter to verify that the power supply display is accurate (it’s not). This particular multimeter is a Protek 506.
  3. Three H-bridges on solderless breadboards. Each h-bridge has a different set of bipolar transistors.
  4. The gearmotor being tested. It is held in a vise and has an optical tachometer target on top of the motor for measuring speed.
  5. Another digital multimeter to measure the actual voltage delivered to the motor. This handheld meter is an old reliable Metex I purchased from RadioShack about 7 years ago.
  6. A handmade non-contact portable tachometer that also includes a thermistor for measuring temperature. During a sudden test failure, it turns out that a temperature measurement was necessary!
A Solarbotics GM6 gearmotor being tested with an optical tachometer and digital voltmeter.

A Solarbotics GM6 gearmotor being tested with an optical tachometer and digital voltmeter.

Note: A 0.1 microfarad ceramic capacitor was added to the motor leads to reduce spikes that otherwise would have made the measured voltage unsteady or electrically noisy. Put another way, the capacitor smooths voltage readings.

For testing purposes, I selected the highly popular GM6 “Baby GM2” 120:1 ratio gear motor from Solarbotics. This motor is compact, relatively inexpensive, and has been successfully deployed on champion sumo robots.

One of the most common errors made by beginners is to use plain motors rather than gearmotors. A plain DC motor can be stopped by pinching your fingers on the axle. As soon as the robot is set on the floor, it stops. Or, worse yet, the motor spins so fast that the robot’s sensors can’t process quickly enough and the whole thing goes crashing into a wall.

The second most common mistake made by beginning robot builders is to use oversize gearmotors (such as from power screwdrivers or industrial equipment). Such motors require far more power than consumer batteries or low-end motor driver chips can handle. Often times, the electric motor won’t even start up. A simple test is to try connecting the motor directly to the battery. If the motor doesn’t spin, then it sure isn’t going to spin when the battery is fed through the motor driver!

While small motors can be found in discarded toys and high tech junk (tape players, power tools), it is best to pay $10-$20 each and get gearmotors from a robotics supplier. For example, there are many reasons that the GM6 is a good match for a robot:

Testing the GM6 gear motor while it spins a paper disc (tach target) does not simulate real world conditions. This state is called “no-load”. In order to really see what the motor driver transistors can put out, I needed to add an artificial load to simulate the weight of a robot pushing down on the wheels attached to the motor.

A chain of LEGO gears to simulate a loaded motor.

A chain of LEGO gears to simulate a loaded motor.

Gears are necessary to convert a motor’s speed. However, like all moving parts, gears lose energy due to friction. Normally, that’s a bad thing. But, in this case, I connected together a bunch of LEGO gears such that their accumulated friction loaded down the gearmotor for testing.

As an electrical motor’s load increases, so does the amount of electricity it draws. Transistors become less efficient as they supply greater amounts of current. So, loading the GM6 motor with LEGO gears stresses the H-bridge, just like would occur on an actual working robot.

A Solarbotics gear motor, GM6, being tested with a friction load as it might encounter in a moving robot.

A Solarbotics gear motor, GM6, with a homemade LEGO coupler, being tested with a friction load as it might encounter in a moving robot.

Other than the gearing, the test setup is similar between the loaded and unloaded motor. By the way, a home-made coupler connects the GM6 off-the-shelf gearmotor with the LEGO parts. You can find out how to make one in either Robot Building for Beginners or Intermediate Robot Building.

And now it is finally time for the H-bridge transistor test results...