A tiny circuit I designed and built-in five copies for dancer Raffaella Galdi. With the help of a small magnetic sensor, this circuit makes it possible to start and stop sound coming from an MP3 player. Because the five circuit boards, speakers and MP3 players are mounted inside pointy hats, the electronics had to be light and draw very little current from the battery.
For the sound volume control, I used a vactrol (LDR+led) and the timing and fade in/out logic are encoded in the firmware of a little microcontroller (ATtiny45). To save battery, the ATtiny45 is put to sleep and is only active when the magnetic reed sensor is triggered. I used the great JeeLib.h for controlling the sleep cycles of the microcontroller.
Schematics, firmware and parts list attached below.