Rhythm Coded Door Lock
As the hit says, "The wall of Jericho has been dusting long ago." The walls of the city were once demolished with horns. Is it possible that we can open a secret-protected door lock with a voice? Yes, it's possible! A door can be opened with a door handle, a motion sensor, or even kicking a door. But with sound?
The new micro:bit V2 provides an opportunity to open it clapping your hands, singing a voice or screaming. The new chip has a microphone that can be used to magnify the volume of the sound.
The essence of our experiment is to give a secret sound pattern or rhythm, which opens the servo motor-operated door. If you know what rhythm to produce, you can open it. If you don’t, depending on the length of the pattern, you can try all-day long.
Supplies
All you need is a micro:bit V2 and a servo motor to assemble. Connect the servo signal pin to the PO pin. If you do not have access to the servo wires with the alligator tweezers, cut off the servo connectors, strip the wires, and insert them into the tweezers.
Programming the Micro:bit
Guess a secret code. For example applause-pause-pause-applause-pause (10010), this is stored in a list. in order to protect against accidental and minor noises, add 3 consecutive values and increase the sensitivity (volume) higher. We store the volume changes in another list. The oldest are deleted and the newest is stored. Then compare the entered signals with the secret code. If you've found a match, open the door and close it after a few sec. If you want to open it with vocals, make sure that the pitch of the sounds is irrelevant, only the volume matters.
Door Installation
- You need a cardboard, about 25x25cm or 10x10 inch.
- Cut a rectangle (the door) out of the cardboard. The rest of the cardboard is the wall.
- Glue the servo motor on the wall, above the door. (see the images)
- Attach the door to the servo motor.
- Then connect the servo motor to the micro:bit and we're done.
Good applause!
Gergely Duronelly
Hungary