Hamster Wheel: A Multidiscipline Embedded Teaching and Competing Device
Department of Computer Science, UML
198 Riverside Street
Olesen Hall 301A
Lowell, MA 01854
+1 978 934 1992
In this paper, I introduce the "Hamster Wheel," a
programmable tangible device that brings together ideas in kinematics, control
engineering, discrete mathematics, computer and mechanical engineering.
The connections between the device and each of these scientific disciplines are
discussed. The Hamster Wheel has potential as both a toy and design tool
to attract people into scientific explorations.
Toy, teaching device, competing device, kinematics, control engineering, discrete mathematics computer engineering, mechanical engineering
Toys or devices with many undetermined factors, which influence the toy’s behavior and performance, always attract the attention of people who are full of curiosity. Their curiosities help them quickly and effectively learn science knowledge. A toy with teaching function can definitely expedite the process in a fun fashion. Usually for this kind design of toys, it is not easy to find a approach or interface to satisfy all of these aspects, such as intuitiveness, fun, cost, accessibility, containing as many science disciplines as possible.
Hamster Wheel device shown in the figure (Fig. 1 ~ 5), is a rotating device looks like, as its name implies, a general hamster wheel. But this wheel is not hung on a trestle; instead


Fig. 1 Hamster Wheel Outlook Fig. 2 Hamster Wheel Structure
it is put on floor. The rotation of the pendulum forces the
wheel to move forwards or backwards. The pendulum drives the wheel
rotating similar the role hamster plays inside its wheel. The pendulum is
driven and controlled by a gear motor (next development will use a digital
servo motor to achieve more precise and flexible control). The lift of pendulum
within below 90 degree range always tries to force the wheel move, the wheel
move always lowers the position of
pendulum. If we want the wheel move at certain possible speed, there must be a feedback to control the pendulum. This feedback makes the whole system a loop control (Fig. 3). The
Fig. 3 Loop
Control System

feedback is got through a sensing system to measure the wheel move speed, The speed sensing system contains an Infrared Beam Break type counter sensor and a homemade hollowed engrave grid wheel. The beam break sensor functions as a speed sensor with the assistance of software.
The aim of the loop control is to make the pendulum respond as quickly as possible, not go overboard, which will cause the wheel oscillation. Apparently these two goals are contradiction. Only a well-configured system can make the wheel move stably at our expected speed. The appropriate configuration of the system is really a challenge. Lots of factors and science knowledge are involved. This is just the point why I develop this device and expect it will attract the attentions of developers of toy with teaching functions, as well as toy fans full of curiosity and spirit of science exploration.
Fig. 4 Inside Look 1 Fig. 5 Inside Look 2


|
||||
|
||||
The complexity of this kinematical analysis needs a strategic model. It should not be discussed here in detail. Interested reader may be referred to [1] .
Weight balance is another kinematical issue. Any eccentric weight except for the pendulum on the wheel is not what we expect. It will affect wheel move unevenly. Although the loop control system has a function to overcome unevenness, this is easy to mess loop control. So it is highly recommended to balance the wheel very well.
The sensing system is typical shaft encoder, which is widely used in manufacturing machine. The shaft encoder usually is an untouched sensor in order to avoid the wire connection problem between two coordinates with relative movement. For Hamster Wheel, there are three coordinates involved: ground coordinate, wheel coordinate, and motor shaft coordinate. If there is no sliding between the wheel periphery edge and floor, the wheel move speed is proportional to wheel rotation speed relative to ground coordinate. Since the sliding is very rare in this case, measuring the wheel rotation speed relative to ground leads to obtain of wheel move speed. To measure the wheel rotation speed we have to build ground coordinate on Hamster Wheel. This is a mechanical engineering problem. The problem is resolved as shown in Fig. 7, there is a
supplemental weight on the hollowed engrave grid wheel, which cause no relative movement between the grid wheel and ground no matter how motor shaft and hamster wheel rotate. In such a mechanical structure, the measure signal from the beam break sensor mount on hamster wheel reflects the wheel rotation speed relative to ground. There is no wire connection problem too.
Fig. 7 Sensing System Fig. 8 Motor Response Performance


Electronic Hardware
Hamster Wheel works on microcontroller based control system. For my demo I used Handy Cricket [2] system for main control and Gleason CX-MSEXP Motor-Sensor Expansion Board [3] as interface for infrared beam break sensor, though this selection is very luxurious for Hamster Wheel.
It is suggested to design a simpler hardware system to best meet the device’s requirement. When designing the hardware system, it had better use two separate thread processes each for motor control and sensing signal process. If adding remote control function, embedded real time control technique is applied.
Software Code
For the Cricket control system, the simplest code is as:
global [x]
to velo :n
bsend $112
setx bsr :n + 3
output x * 256 + bsr 0
end
to go
a, setpower 2
loop [
repeat 1000 [ ifelse (velo: 1) > 70 [on][off] ]
rd ]
end
This code works on my demo Hamster Wheel quite well. The wheel evenly rolls on a flat and smooth floor forwards and backwards for a while repeatedly. The parameter settings for 2 and 70 in above code are critical. Either motor speed setting higher than 2, or target velocity setting higher 90 or lower 40 will cause the wheel unacceptable oscillation. Since the Handy Cricket has capabilities to record the velocity data while it is performing the control, and then after the performance run upload the data to PC for observation and analysis, I used following code to capture the velocity data under different parameter situations, then drew the time curves which showed the corresponding oscillation degrees.
global [x, vel]
to velo :n
bsend $112
setx bsr :n + 3
output x * 256 + bsr 0
end
to go
resetdp ; reset data pointer
setpower 2
repeat 2500 [
setvel velo 1
record vel
ifelse vel > 70 [on][off]
]
end
Besides above simple control code, there are also other ways to develop the code to fit the individual Hamster Wheel.
For example:
to go
a, setpower 2 on
loop [
repeat 1000 [ ifelse (velo: 1) > 70 [thisway][thatway] ]
repeat 1000 [ ifelse (velo: 1) > 70 [thayway][thisway] ] ]
end
Logically this code will make the wheel move same as using first code, the difference is this code cause reverse rotation when needed instead of stop in the first code. From the point of control engineering theory, this change increase the speed coefficient Ks [4] , which causes increase both of response time and instability.
This code didn’t work on my demo wheel, and indeed caused oscillation as indicated by the theory. However this code must work somewhere else with certain configuration.
Another flexibility comes from the direct process of counter signal of sensor. When using Gleason CX-MSEXP Motor-Sensor Expansion Board as interface for sensor, the available code [3] wrote exclusively for this device gives the chance to play with.
Since the speed-sensing signal is a countering converted signal instead of direct velocity signal, this makes the control a digital loop system. The theory of digit control system, which involves discrete mathematics, is much more complicated than analog control system. I won’t cover this theory [4] here in detail, but we do need know the resolution of hollowed engrave grid will significantly influence the system stability. The finer the resolution of grid, the better the system stability
Motor Performance
The motor is one of important components involved in the loop control system. According to the control engineering theory, the actuator response time shown in Fig 8 is a critical factor to manipulate the loop system. The response time is related to motor torque output feature. This is why the motor performance influences the behavior of Hamster Wheel.
The player of this device may make the decision about these factors, then build the whole system to see how it behaves, and judge how factors affect your system behavior, bad or good?
Mass of wheel
Mass and position of pendulum
Weight balance of wheel
Electronic hardware
Performance of motor
Software code
Fineness of hollowed engrave grid
Friction coefficient between wheel periphery edge and floor
Toy Oriented
I positively expect a well funny looking design with a remote control of Hamster Wheel will attract younger kid to see this weird wheel move on the ground, flat, bump, slight slope wherever.
Competing Device Oriented
A component based kit and programming interface of Hamster Wheel allow junior science explorer to build their personalized wheel. There are some competitions held to see whose wheels go faster under different wheel diameter levels. For the competitors it is not easy to make wheels go under their control only determined by a few factors. This game is full of challenge and fun. Behind the game, the players learn lots of science knowledge.
ACKNOWLEDGEMENTS
Thanks to Professor Fred Martin for his instruction and direction, 91.548 Robots 2003 Fall classmates who gave suggestions, comments, even showed interest on this project.
REFERENCES
1. George H. Martin, Kinematics and Dynamics of Machines, Waveland Press; 2nd edition (May 2002), ISBN: 1577662504
2. http://handyboard.com/cricket/
3. http://gleasonresearch.com/
4. Katsuhiko Ogata, Modern Control Engineering, Prentice Hall; 4th edition (November 13, 2001) ISBN: 0130609072
5. Bonnie Pettifor, Human Kinetics, Physical Education Methods for Classroom Teachers Human Kinetics Organization, ISBN: 0880118423