XiLeit - Sound Reacting Light ToyWhen I first joined MITERS, I was the rushchair at tEp. Chatting with people at the ERS about projects, I thinking about creating small microcontroller badges which would respond to audio, in the grand tradition of the 23 Lightshow. Since I had no experience with hardware at all, the project took me about a year to see to fruition. Granted most of that time was spent working on iterations of the Eit-O-Clock the ArtThrob, and a wealth of other small projects. Finally, though, the summer I worked at Amazon, I felt that I had the tools I needed to build the project. Eventually, the XiLeit became exercise in cost effective design. For maximal flexibility, and low part count, I choose to use a simple digital design focused around a microcontroller. The cheapest I could find was the ATTiny15L The feature which made the whole circuit really possible was the 20x gain differential ADC on the chip. This allowed me to, using a small passive filter, measure the microphone voltage directly. The microphone itself is one of the sea of generic electret microphones. The microphone generates only 150mV peak to peak for loud claps and snaps, hence the need for amplification. The noise floor of the conversion reduced the 10-bit A/D to an 8-bit A/D. Furthermore, despite amplification, the dynamic range of the signal was still only between 0-24 of the possible 255. The rest of the design consists of passives. For a while, I misinterpreted this lack of dynamic range as flaws in my code. I developed a series of simple high pass filters, struggling to get the lights to oscillate reasonably. Finally I settled for static value to trip each light on successively (possible thanks to the differential amplifier). My strangest problem came from a feedback loop due to the small bypass capacitors (4.7uF) and large internal resistance of the coin cell battery. Fickering the lights would cause dramatic shifts in Vdd, thus, causing the microcontroller to incorrectly think more audio signals were incoming. As such, the microcontroller would on occasion get locked in to having its lowest bits flicker. I finally solved this problem by holding the lights on for a set amount of time, then turning them off for another delay, allowing Vdd to settle. The boards were run at Advanced Circuits as a prototype run. |