I wanted a clap switch to make my life easier. My bedroom light switch is at the doorway, but bedlamp switch is at the bed. A clap switch saves me from choosing between fumbling for the bedlamp switch after turning off the room lights, or having to walk to the bed and turn on the lamp before going back to the door to turn off the room lights.
An inspiration here was DIYODE magazine's Three Stage Clap Switch project. I built that project on a breadboard, using a BoldPort Cuttle instead of an Arduino. It worked mostly OK. However, I had bigger plans.
First Plan
My first plan was pretty simple: take my existing bedlamp, use its power supply to power an ATTiny microcontroller. When the ATTiny detected a clap, it would switch a MOSFET to turn the lamp on and off.
I was keen to use parts I had in my cupboard, without buying more. I tend to buy components in fives or tens, and this has led to me having, well, a cupboard full. This leads to choices such as:
- ATTiny3217: way overpowered for this project, but I have plenty
- 7805 because I have a tube full.
- Knowles SPU0410LR5H-QB-7 MEMS microphone, because, again, I have many spare.
I also wanted to use my new prototyping board, BlueBoard#01. By no coincidence at all, I have a microcontroller and microphone that fit it perfectly.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.