Madame Lucy
The Amazing Fortune-Telling Goose
Natalie Levinson '09 & Christina Miller '08
Laying Eggs
A tube holds the eggs above a paddle wheel. An infrared reflectance sensor and foil strips marking the positions of each section of the wheel allow the wheel to turn just the right amount to dispense one egg.
  
The Process:
Building the Wheel 
The paddle wheel was constructed from two cardboard circles with cardboard flaps in between. We originally had four flaps, but the sections for each egg were too big. Sometimes two eggs would try to enter one section and the mechanism would stick. We put in five sections and decreased the radius of the wheel to make the sections smaller. We then hot-glued a lego axle through the center of the wheel.
The Feeder Tube 
We originally built a square trough that we were going to slant downwards. We planned to push the eggs through underneath the paddle wheel as it turned. We found it worked better to drop the eggs onto the paddle wheel and have it feed them over the top.
The more vertical the trough was, the better it worked. Therefore, we put a tube of rolled up paper in the trough to hold the eggs and made the mechanism vertical. We later replaced the paper tube with a sturdy cardboard tube. With the paper tube the eggs sometimes turned sideways, deformed the tube, and got stuck.

An early stage of the dispenser
We had to cut a notch in the bottom of the tube to let the eggs slide out the front better. We eventually put a foam flap across this notch to keep the eggs from pushing out too fast.
One Egg at a Time 
We tried to dispense one egg at a time by programming the paddle-wheel motor to turn on for a set time. Four or five tenths of a second worked pretty well, but the wheel didn’t turn exactly one section. Therefore, two eggs were dispensed on occasion.
We decided to try for the more elegant option of sensing how far the wheel had turned. We started out with the thought of using a reflectance sensor and placing a strip of black tape to mark each section. Due to a broken sensor, having the sensor too close, and the wheel not being exactly fixed in one side-to-side position, we had a lot of trouble getting a reflectance sensor to work.
At one point we tried an electrical resistance sensor: foil strips taped over the previous black lines and two wires that would drag along the wheel as it turned. When the wires were over foil the circuit would be connected. This didn’t end up working out because we couldn’t keep the wires in position well enough. However, when we returned to trying a resistance sensor again, the sensor could differentiate the foil from the cardboard much better than it had been able to with the black tape!

A reflectance sensor taped in place next to the paddle-wheel
The Code 
We then programmed the wheel to turn until it saw the next foil strip. We set a variable called shiny to determine what the sensor would see as foil and wrote shiny+10 and shiny-10 so we would be able to adjust this value from the handy board menu.
The dispense-egg function contains a when loop that looks to see if the sensor is over foil and then turns the wheel motor off. We had to add another global variable called egg-dropped? so that we could use a stoprules to stop the when loop after an egg had been dispensed.
Here are the sections of our code that pertained to the egg dispenser:
menu 1 [initialize]
menu 3 [shiny+10]
menu 4 [shiny-10]
menu 7 [dispense-egg]
global [coin-threshold change-coin shiny egg-dropped?]
to dispense-egg
setegg-dropped? 0
paddle-motor on thisway
when [(paddle-sensor) < shiny] [wait 1 off setegg-dropped? 1]
waituntil [egg-dropped?]
off
stoprules
end
to shiny+10
setshiny shiny + 10
printshiny
end
to shiny-10
setshiny shiny - 10
printshiny
end
to printshiny
type [shiny = ] print shiny
end
to shiny?
ifelse ((paddle-sensor) < shiny)
[output 1]
[output 0]
end
to paddle-motor
c,
end
to paddle-sensor
output sensor 1
end |