19-02-2013, 02:31 PM
EGR 345 Segway Design Project
Segway Design.pdf (Size: 859.71 KB / Downloads: 38)
Executive Summary
The goal of the project was to build a self-balancing Segway prototype that has line
following capabilities. The cart should be able to balance a 0.5 Kg mass placed on its
standing platform. The cart should follow standard black electrical tape on a light
colored background. If the tape is absent, the cart must slow down and stabilize itself.
The design constraints for the project were that the cart must be no taller than 6 inches,
excluding the handlebar, with wheel diameters between 0.5 and 6 inches. The height
from the standing platform to the top of the handlebar must be 7-9 inches. The design
must include a scaled version of a footplate that can support a container with a base up to
6 inches in diameter. The cart must be free to rock on its wheels over a range of +/- 60
degrees. A simple on/off switch must be used to start the cart. The target weight and
cost of the design was set at 1 Kg and $200, respectively.
The cart was built using 0.25-inch plastic for the top and bottom rectangular
plates. The wheels were 6 inches in diameter, milled out of 0.25-inch Plexiglas. The
corners of each plate contained a clearance hole for a threaded rod, which was 2 inches in
length and had a diameter 0.125 inches. Four hollow PVC tubes, 1.75 inches in height,
were used as spacers between the top and bottom layers, with a threaded rod running
through each of them. Distance measuring sensors were placed on each side of the cart
and used to measure the distance each side of the cart was from the ground. The output
voltages from the sensors were incorporated into a C program that was written to balance
the cart. Photo resistors were used to detect the electrical tapeline to allow the cart to
follow the line. A C program was written to control the motion of the cart by
implementing the voltages read across each photo resistor. The overall mass of the cart,
without handlebars, is 1.21 Kg and the total cost is $113.60.
Design Description
The goal of the project was to build a self-balancing Segway prototype that has line
following capabilities. The cart is driven by two Gearhead motors (one for each wheel),
and travels across the floor following an electrical tape path, which starts as a straight line
and becomes progressively complex. The objectives and constraints for the design can be
seen below:
• The cost of the cart should be less than $200.
• The target mass of the cart is 1.0 Kg.
• The total time to execute a motion should be minimized.
• The cart must be free to rock on the wheels over a range of +/- 60 degrees.
• The total height of the cart must be less than 6 inches tall, not including
the removable handlebar.
• There must be two wheels between 0.5 and 6 inches in diameter.
• There must be a scaled version of a footplate that will support a container
with a base up to 6 inches in diameter.
• The cart must have a removable post that is 7-9 inches tall.
• The amount of water spilled in the container should be minimized.
These constraints and objectives were all taken into account when designing the cart,
electrical system, and software for the Segway prototype design.
Drawing Summary
When designing the mechanical system of the cart, the main objectives were to minimize
the weight, maintain cart strength, and construct an aesthetically pleasing cart. Quarter
inch plastic was used for the top and bottom rectangular plates. Each wheel was made
out of 0.25-in. Plexiglas and contained a rubber band around its circumference. Plastic
and Plexiglas were chosen because they are light, strong, and inexpensive. The
orthographic drawings for each component of the cart can be seen in Appendix A. A
rubber band was placed around each wheel to create friction between the floor and the
wheel in order to prevent slipping and create movement. The rubber band was chosen
because it was easily available and lightweight. The solid model of the cart can be seen
in Figure 1.
Free Body Diagrams
To develop equations of motion for the cart, a free body diagram was produced to
show the forces acting on the cart. Since the cart’s motion was affected by the 0.5
Kg mass placed on it, the cart and the 0.5 Kg mass were modeled together in
order for the equations of motion to accurately represent the motion of the cart.
Together, the cart and the 0.5 Kg mass represent an inverted pendulum. The
forces that are experienced by the inverted pendulum are shown in the free body
diagram in Figure 5.
Circuit Description
A circuit was designed and built to drive the motors and read input from the distance
measuring sensors and the photo resistors. The schematic is shown in Figure 9 on page
16. Three +5 volt sources were needed to power the components of the cart. One was
needed for each distance measuring sensor and another one was needed for both of the
photo resistors to use as a shared source. As shown in the diagram, pins PB0, PB1, and
PB2 on Port B were used to provide the +5 volts to the distance measuring sensors and
the photo resistors. Originally, Port D was used to provide the components with the
required +5 volts, but it was determined that the PWM signals were interfering with the
regulated 5 volt output. It was determined that applying 12 volts to the Gearhead motors
was insufficient to produce the necessary motor speed for directly driving the axles. As a
result, two 9-volt batteries were wired in series to provide 18 volts to the motor driver Hbridge.
This also increased the motor torque and speed. A 9-volt battery was used to
power the board. The photo resistors were wired in a voltage divider circuit in order to
control the range of voltage values read back from the photo resistors. According to the
photo resistor specifications, the resistance across the devise had a range of 3k to 11k
ohms. Based on those specifications, 10k ohm resistors were implemented in the voltage
divider circuit because they were readily available and allowed for a fairly even voltage
distribution at a maximum resistance.