I made a dribbling robot that dribbles faster as a defender approaches. An IR sensor is used to detect the distance of a defender. The signal then determines the speed of a DC motor. Rotary motion of the motor is converted to a rather linear one inspired by a clockwork sping squirrel tail that i saw at shadyside varieties. A similar mechanism called quick return can be found on fly pig.
The circuit and code are very simple in this case, but it took me a long time to tweak the material, shape and position to make the whole thing functions smoothly. I used basswood and sponge tape to attach to the motor because they provide more friction while i used my chicago CTA transit card and acrylic rod to make the quick return unit because they allow rapid spinning, and at the same time, are strong enough to stand the centrifugal force.
Motor was a pain. I tried one gear motor (9V) which ran too slowly, one fan motor (12V) which i had a hard time connecting all the batteries, and one regular motor (3V) which i went with. Whichever took me a long time to test, and i almost burned my arduino once… i was to use a styrofoam ball or pingpong ball, but they are both too heavy for my tiny parts, so i ended up just drew a flat basketball.
Finally, i illustrated my circuit. hopefully it’s more clear than the photos!
Arduino Sketch: Wu_dribbling robot