I recommend building the circuit on a solderless breadboard first to make sure that everything works before soldering it into place. Check out the "Operation" section for use and testing.

The diagrams/images below are all the same circuit represented in different ways. Use whichever are most helpful.

Build Notes:

1: The Piezo.
Solder the piezo buzzer to the back of the PCB so it can be installed flush against the desk/drawer/etc and hear knocks more clearly.

2: Wire Length. The length of wire between the lock and the knock sensor depends on where you plan to mount it. (See "Installation" section for more information.) Measure your distances and be sure to allow some extra for movement of drawers and doors. You should be able to put the lock several feet from the detector without any problems.

If you're installing them close to each other then simply cut the connector off the solenoid lock.

3: Programming. The circuit uses the Trinket's pin #3. In some cases you might need to disconnect the 2.2KΩ resistor from pin #3 to program the circuit.

Note that my sample programs just fine with pin 3 connected, but your mileage may vary. If you want to be extra sure of being able to program it after it's soldered in place consider using female headers to mount the Trinket, or put a jumper between pin #3 and the 2.2KΩ resistor.

This guide was first published on Oct 31, 2013. It was last updated on Mar 08, 2024.

This page (Wiring) was last updated on Oct 14, 2013.

Text editor powered by tinymce.