Skip to content

Rover’s First Motor Circuit Test

by Puck on December 3rd, 2009

We built the first embedded test circuit from the original schematic using the Op-Amps and H-Bridges to test the Rover’s motor.

Schematics Maturing

For those watching the robot’s schematics for fun, we have gone from a “napkin scratch schematic” to one drawn up in DipTrace.

Operational Amplifier

Version 0 - "The Napkin Schematic"

The updated Schematic with amplified signals and H-Bridges (Click for full size)

Version 1.0 - "The Spiffy Schematic"

Voltage Regulator

You might notice that version 1.0 has a voltage regulator (labeled U1) tucked into the schematic that I haven’t talked about yet.  By using a 12 volt battery supply, we can use the voltage regulator to provide power to our 5 volt parts.

Voltage Divider

The only other mildly interesting bit is the voltage divider we use to provide 2 volts to the non-inverting input on the Op-amps.

V-Output = (R2 / (R1+R2)) V-input

V-Output = (2/(3+2)) x 5

V-Output = 0.4 x 5 = 2 volts

Pictures

Taking the design from paper to printed circuit board we built out the circuit for a single motor controller shown here:

The Test Circuit

The Test Circuit

The long chip under the header at the top of the prototyping area is the H-bridge.  On the right just above the gray test lead is the Op-Amp.

The Test Bench and the Rover

The Test Bench and the Rover

Pulse Width Modulation

Larry wrote up an interrupt service routine to pulse the motor over a set period. The longer the pulse within the period, the faster the motor would go.  That gives us a speed control for each tire.

For example, if:

  • The pulse is 10% of the period, the robot moves at 10% of maximum speed
  • The pulse is 50% of the period, the robot moves at half the maximum speed
  • The pulse is 100% of the period, the robot moves at maximum speed
The pulses used to drive the motor

The pulses used to drive the motor

It’s Alive!

If you listen to the audio, you can hear a rhythm coming from the motor.  You guessed it!  That is the rhythm of the pulse train passing through the H-bridge and applying power to the motors.  The rhythm is set by the period of the signal generated by the RCM5600W and is shown on the scope in real-time.

Based on this first successful test, I think we will want to tune the pulse width modulation (PWM) a bit.  If we shorten the period, we decrease the amount of time between pulses but it will cost us CPU time.

Like any engineering project, we need to strike the right balance.

Leave a Reply

You must be logged in to post a comment.