The knock-activated noisy box

This project was intended as a prank; when I was thinking about the uses of a knock sensor I thought it would be funny to use it to make a doorbell. The thing you see is a small box that produces a funny chirping noise when you knock or shake it. It is intended to be attached to a door, or some other moving object. Not really an Arduino project since it uses only basic electronic components, but still it was quite entertaining to make and it’s a chance to have fun with analog electronics!

Read ahead to see instructions on how to make one!

I used:

  • a 6x4cm PCB (2.36″ x 1.578″) (obtained by cutting a bigger PCB)
  • one CR2032 coin cell battery
  • a ghetto coin cell battery holder… made out of a binder clip and some insulating tape
  • a KY031 knock sensor
  • a 470uF capacitor (the bigger the better, basically)
  • an active 5V buzzer
  • a very small project box I couldn’t find another use for (8x5x2cm, or 3.1x2x0.8″)
  • wire and soldering iron

The circuit itself is very simple. When you bump the knock sensor, the circuit closes; the capacitor is charged (very quickly) and then slowly discharges thru the buzzer. Note that the knock sensor usually has a digital output/pull-up pin which I’m not using: the 10k resistor it has attached would make the capacitor charge too slowly.

knock-activated-doorbell-schema

The assembly is quite straightforward or in other words I forgot to take pictures of the process.

wpid-wp-1443286858330.jpeg

This is the final circuit. As you can see I used a binder clip for lack of a better coin cell holder… I stole the idea from here. Then I soldered the clip to the PCB. I tried to leave some room in front of the battery to make replacement easier. The cables go from the battery to the back.

wpid-wp-1443286862974.jpeg

The wires on the back make the soldering quite easy. Just solder the knock sensor in series to everything else (green wire – going to ground on the other side), and the capacitor and buzzer (bottom left) together in parallel. Double check the capacitor polarity (red wire goes to Vcc on the other side). I used velcro to attach the PCB to the box; very handy if you, like me, never have available screws of the right size.

wpid-wp-1443286865931.jpeg

The box is just of the right size for the half PCB.

wpid-wp-1443286852087.jpeg

They couldn’t fit any better.

wpid-wp-1443286868985.jpeg

As I mentioned, the box is very small, almost matchbox-sized. The idea is to glue it (maybe with velcro, I like that stuff) to a door or another moving object you want to produce a “pew” sound when you knock or move it.

Some things I learned today:

  • Maybe I should buy a proper coin cell holder.
  • If nothing else, I should have mounted the ghetto holder the other way around.
  • Wires are best cut at the exact length you need them.
  • The KY031 is REALLY poorly sensitive, you have to shake it really hard. They should call it the car crash sensor or the ground-reached-after-freefall sensor or the shake-as-hard-as-you-can sensor or something. It has a very very precise impact angle at which it is somewhat sensitive. I should get a more sensitive vibration sensor, I’ve been looking around and afaik you have these alternatives:

Anyway, the final result for this article is this weird bleeping thing! I hope you enjoyed it!