Rhythm Coded Door Lock

by regele in Circuits > Microcontrollers

269 Views, 0 Favorites, 0 Comments

Rhythm Coded Door Lock

sound door

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

micro_bit_V2.png
servo.jpg
crocodile_clip_wire.png

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.

BBC micro:bit

Servo Motor

Crocodile Tweezers

Programming the Micro:bit

code door.PNG

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

servo_image.jpg
sound_door.PNG
circuit.PNG
  1. You need a cardboard, about 25x25cm or 10x10 inch.
  2. Cut a rectangle (the door) out of the cardboard. The rest of the cardboard is the wall.
  3. Glue the servo motor on the wall, above the door. (see the images)
  4. Attach the door to the servo motor.
  5. Then connect the servo motor to the micro:bit and we're done.

Good applause!

Gergely Duronelly

Hungary