Today I’ve been working on a robot that turns around slowly and moves a pen closer to or further away from its center point, inspired by a movie I saw on YouTube. The pen is moved according to amount of sound it hears – the louder the noise, the further away from the ce nter it goes. The robot’s design allows for an iPad to be positioned so that its speakers are exactly below the microphone, so the NXT can hear the music more easily.
First, the robot configures the pen-motor, moving it backwards until it presses against the touch sensor. It then starts turning and sets the pen-motor’s encoder to 0. The loudness of the music multiplied by 22 (or a smaller number to decrease the maximum drawing radius) forms the target for the motor to spin to. As the motor spins, it unwinds a piece of rope on one side and winds it up on the other side, thus creating forwards or backwards motion. The side to side movement is controlled by the two bottom motors, which are connected to worm wheels, which in turn spin around a 40-tooth gear on a platform. The touch sensor on the top (next to the sound sensor) is used to change the direction the robot spins in. Video:
It is currently working on a big canvas (piece of cardboard, really) using dj tiësto music. I’m happy with it, but these are some functions I’ll hopefully be adding some time this week (or after Christmas):
- Ability to lift the pen or other writing instrument
- Random pauses in the program to let ink flow out and make random dots
And, last but not least, some pictures:
More information:
- Video on YouTube (also above)
- Coding (word – copy to RobotC)





