Rover’s First Motor Circuit Test
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.
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 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.
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
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.





Trackbacks & Pingbacks