Inverted Pendulum

Inverted Pendulum Design, Construction and Operation

An Electronics Bachelor’s Degree Student Project

Purpose

The purpose of this page is to document the design, construction and operation of a six-foot high by three-foot wide inverted pendulum, in such a way that you, the reader can duplicate this project using this information as your guide. This is the story of how a five student team made this happen.

What Started This?

In February, 2009, I asked five students in an embedded systems class to make a list of electronic and/or robotics projects that they might be interested in building.

This request was preceded by several classes where I demonstrated many previous projects that students in the Associate’s and Bachelor’s Degree Programs had completed, and I also suggested several other projects that might interest senior electronics students. When the students produced their list of preferred projects, three of the five had listed ‘Inverted Pendulum’ on their five favorites list. When the other two agreed to come on board with this project, they were off and running.

The Team

Here are the team members:

  • Christopher Anderson
  • Horacio Bautista
  • Robert Dunn
  • Yulon Johnson
  • Rodney Labiano

Background

Sowing the seeds

As an electronics and programming instructor, I often cruise the Internet to look for original and interesting projects for my students. Several months ago, I saw an inverted pendulum for the first time on YouTube.com. I then found many YouTube and other videos and sites which had photos and descriptions of inverted pendulum projects. At that time, I decided to include this project in my ‘pitch’. My ‘pitch’ is a presentation I give to senior electronics students at the beginning of any class that lends itself to projects that combine programming and electronics. My pitch included line following robots, line maze solving robots, mechanical hands, flashing light displays, light chasing or light avoiding robots and many other projects requiring electronics knowledge and programming talent. [Note: See the Home Page for this site RichardVannoy.info for many videos and photos of projects completed by students.]

Several years ago, some of my students came up with a six-foot high cardboard cutout of ‘The Hulk’ to be used as part of their electronics project.

The Hulk

When I saw that most inverted pendulums on line looked like a broomstick and were rather boring, I had the idea to find a colorful cutout for the project. A search of cardboard cutout suppliers revealed Superman, The Statue of Liberty, John Wayne and other colorful figures. When I came upon a cutout of a male graduate and a female graduate in cap and gown, I knew that would be an appropriate figure students about to receive their degrees to use.

Here are the 3 X 6 foot cutouts I found:

female graduate Male Graduate

I then included the ‘Graduate Inverted Pendulum’ in my pitch.

Back to top

Theory and Research

Back to top

Mechanics

Back to top

The Frame for the Graduate

Robot frame

The frame is made of clear plastic, square tubing. Here you can see the full frame just after it is assembled. The cardboard cutouts will be mounted on either side.

The Team Building the Frame

Team Photo

Here the entire team discusses the design for the frame. Since the cardboard cutouts have not arrived yet, the team made a 6 X 3 foot cardboard rectangle to be used in the frame.

Drilling Mounting Brackets

Drilling Brackets

Most of the material was off the shelf fittings and materials. Some of the mounting brackets and braces had to be hand cut.

Cutting Out Custom Mounting Brackets

Grinding parts

In the photo of the frame, you can’t see these parts. (See next photo)

Two Plastic mounting Brackets

T connectors for frame

These T’s are mounting brackets for the inner two vertical beams of the frame. The top of the T is attached to the top of the frame with the leg of the T extending down from it. The inner two support beams are fitted over the extended legs to hold the inner beams in place.

The Temporary Cardboard Figure

Cardboard for frame

Until the cardboard cutouts arrive, this piece of cardboard will be measured and cut to 3 X 6 feet for use in the frame.

The Bottom, Supporting Chassis

Robot Chassis

This is the bottom chassis turned upside down to allow you to see the geared DC motors mounted on each end of the chassis.

End View of the Chassis

Chassis end view

This side view (tilted to the right) shows one wheel and the chassis in such a way that you can see all the way down the slot. The three bolts extending up inside the slot fasten the L-bracket for the motor mount. This will be cut off later to allow one motor controller and one battery pack to be installed in the slot. Between these components, the fram will be mounted.

Top View of the Chassis

Chassis top view

This shows the top view of the chassis. The three bolts inside the slot are for the motor mount. The two rods, extending up and down, hopefully will keep the frame from falling if the computer fails.

DC Gear Motor mounting Detail

Robot Motor

And the same view from the side. The motor is attached using an L bracket. Just above and a little to the left of the label, you can see one of the two bolt heads holding the L bracket to the bottom of the chassis. From that bolt head, travel left and you can see the 90 degree turn in the L bracket and where it extends down betweem the left side of the motor and the tire. The tire is a high-traction sumo robot tire that was canabalized for this project.

Bracket for the Top of the Frame

Top frame bracket

The top right and left corners are fastened using L shaped plastic screwed into the top and side frame pieces.

Bracket for the bottom of the frame

bottom frame bracket

The bottom of the frame will have a larger load, so stronger L brackets are used to connect the side and bottom beams.

Fitting the Chassis to the Frame

Chassis to frame alignment

Here the assembled frame is fitted into the chassis to check clearances. The finger seen inside the chassis to the left is where the bottom right corner of the cardboard cutout will fit. The space in the chassis to the right, where the students three fingers are, is the space to hold the motor controller and battery pack. One student has placed his foot on the tire to steady the assembly.

The Frame and Cardboard Cutout

Frame and Cardboard

Here, the completed frame is on the floor. over, but not lined up with, the cardboard cutout. The dark shape with the white rectangle in the bottom center is the Parallax Board of Education board that will house the Basic Stamp BS2sx microcontroller that will control the robot’s actions.

Back to top

Electronics Hardware

Accelerometer

One Hitachi H48C Tri-Axis Accelerometer, $34.99, Parallax Part #28026

Accelerometer

Documentation for the Accelerometer

We found and used the following documentation:

  • H48C 3-Axis Accelerometer Module (#28026), A six page article with specs and source code by www.Parallax.com.
  • Accelerometer – Getting Started, Andy Lindsay, Parallax.com, An eight page article with on accelerometer principles.
  • H48C_3-Axis.BS2, Basic Stamp 2 Source Code Sample from Parallaz.com
  • Free-Fall Detection utilizing H48C, Materials Magic, Hitachi Metals, Ltd.
  • H48C Datasheet, Materials Magic, Hitachi Metals, Ltd.

Gyroscope

One Lisy 300 Gyroscope Module, $34.99, Parallax Part #27922

Gyroscope

Documentation for the Gyro

We found and used the following documentation:

  • LISY300 Gyroscope Module(#27922), A three page Datasheet from Parallax.com
  • LISY300 Gyroscope Schematic, Parallax.com
  • LISY300 Test V1.0.bs2, Basic Stamp test code from Parallax.com

Motor Controllers

Two HB-25 Motor Controllers, $34.99 each, Parallax Part #29144

Motor Controller

This is an air-cooled motor controller.

Microcontroller

One Basic Stamp 2SX Module, $59.00, Parallax Part #27922

 

Basic Stamp chip BS2sx

Battery Pack and Charger

Four Tenergy Nickel-Metal Hydride Battery Packs, 12V, 2000 mAh, $15.99 each, Tenergy Part #11606, Supplier: www.all-battery.com

Battery

One Tenergy Universal Smart Charger, 12V-16.8V Battery Pack, Model OH-1048A2501800U-T, Tenergy Item #01004, Supplier: www.all-battery.com

Battery Charger

Back to top

Software

The robot will use the Parallax BS2sx chip which is programmed in PBASIC. The BS2sx chip was selected over the popular BS2 chip because the BS2sx has more memory and more speed.

Back to top

Testing and Experimenting

Back to top

The Finale

Back to top

Documentation

The students were given this guidance about their documentation. “Make sure that the documentation you produce can be given to a team of students in a future class, and that team, using your documentation, can produce exactly the results you achieved.” There were other standard requirements such as the inclusion of a cover page, Table of Contents, Project Description page, Parts list page, etc.