proportional to its rate of rotation, the cart position can
also be measured by simply integrating the motor voltage.
This is a simple method to measure
the cart position as we design the
circuit for our test model.
The schematic diagram of an
analog control system implementing
these ideas using three op-amps is
shown in Figure 6. Component values
are selected for a 0.5m pole (wp = 4. 4
rad/s). The dominant mass of the
system is the battery pack ( 10 AAA cells).
Except for the motor and wheels, all components
including the batteries are placed at the top of the
pole. This minimizes the mass of the cart and
increases the maximum cart acceleration and
The motor is a typical small DC motor with a
40:1 gear-down ratio. Plus and minus 5V regulators
are used for the angle offset adjustment and to
power the angle sensor. This makes the system
A PCB for this project is available in the Nuts & Volts
Webstore at http://store.nutsvolts.com/.
The AAA battery pack is shown with its top PCB removed.
The 10 cells are wired to supply ± 7.5V.
The four PCBs used in the test model are laid out on one board to reduce
fab costs. They are the level sensor cantilever (top left); battery pack top
(bottom left); control circuitry (bottom center); and battery pack bottom
(bottom right). Additional circuits on the right side are unrelated to the
inverted pendulum project.
All of the control circuitry fits on this
1.9 x 2.1 inch PCB.
+ 7. 5
- 7. 5
270 k 1.6M
+ 7. 5 V
- 7. 5 V
Angle Zero Adjust
Band Stop Filter
CW+ 7. 5
- 7. 5
Squ are Wave
10 u F
GP2Y0A51SK0F 1 2
1 0.1 0.01 10 100
Frequency in units of
~ 1 V
1.8 M - 5 V
g / L
+ 7. 5
- 7. 5
Figure 6. The schematic of the control
system for stabilizing the inverted
pendulum of Figure 2. Note that unlike
Figure 5, the position signal is
connected after the filter rather than
before it. Since the position is a
relatively slow signal, this makes little
difference in the performance, but it
saves one op-amp because the
position signal at U2 pin 6 would have
to be inverted if it fed in at U1 pin 2.
50 SERVO 12.2017