An ATtiny-based tiny USB lamp that can be turned on/off by knocking, clapping, blowing, finger snapping and shouting.

If you don’t mind having a bit of fun with electronics this project is for you. In this project, I am making an ATtiny-based USB lamp that can be turned off/on by multiple sources such as:

Knocking
Clapping
Blowing
Finger Snapping
Shouting
In this project I utilized, or I can say I misused, microphone sound sensor to detect different sources to turn on and turn off lamp.Also I wanted to make this project as small as possible, so I used a ATtiny 85 microconntroller.This is cool because the ATtiny is tiny, and - well - this allows you to make tiny things that don’t need a big micro controller.

Basic Idea
A microphone is an acoustic to an electric transducer or sensor that detects sound signals and converts them into an electrical signal.

To generate an electrical signal all you need to do is make movements in the diaphragm. So when blowing on a microphone sound sensor, microphone’s diaphragm responds because it is a displacement of air molecules pushing on one side of the membrane to the other causing electrical signal in the microphone to make it seem like sound.

Also here I am describinghow to program ATtiny microcontrollers using the Arduino IDE.

Let’s get started…”

Link