Would you love to roll some balls on a track? If you did, then you must check out this cool Perpetual Ball Roller.
Based on its appearance, it looks like a simple ball roller, but it can do more than we could imagine here!
Well, this machine is fully-controlled by a PicAxe Microcontroller. A servo, which is used for steering in R/C cars, is also being used to tilt the track for a ball to roll round. The degree of the tilt can be controlled by a potentiometer in a manual mode or in automatic mode; preset instructions on the microcontroller tell the servo how to move!
Honestly, electromagnets would probably work well for this project. However, it would be trickier to get so many different positions accurately.
Ok, as you see on the above figure that the circuit is not a fancy stuff. Hey, it doesn’t matter, as long as it works, isn’t it? For the switch, the left switch is manual, right one is automatic while the center is off.
For manual mode, the potentiometer is used to change the resistance, which can be detected by a pin on the microcontroller using the “readadc command”. It converts to pulses and sends to servo that changing its position. As for the automatic mode, the potentiometer is used to select one of five routines for the tilting of the track. Normally, the final routine is actually random mode that effectively cycles through the other modes!