reserved-bit hosted a 6-hours long Arduino introductory workshop on 27/01/2019. Participants were in the 8-15 years age group. After the basics were covered, we began with what is the “hello world” in the world of electronics – blinking an LED. Various sensors were introduced; DHT11 helped us print the temperature and humidity on screen. This triggered a humidity-war among the very excited participants.
The goal of the workshop was not just to introduce the board but to also open minds to the possibilities micro-controllers held in the real world. With this in mind, Shrikant put together a demo using the Arduino Uno + bluetooth module to unlock the door lock of the makerspace, so Siddhesh could unlock the door by sending a command from a console on his smartphone (Have you seen the Amazing Spiderman?). This demo was whipped up in 2 days and will be the starting point for our door-lock project.
Shrikant talks about the door lock
In this project,the door lock is controlled wirelessly using Bluetooth with the help of Arduino Uno.
Bluetooth module used is HC-05 which is interfaced with Arduino uno using serial communication. The HC-05 Bluetooth module has 3.3V level for receiver(RX)/transmitter(TX), micro-controller(the Arduino Uno in this case) can detect 3.3V, so there is no need to shift TX voltage level of HC-05 module. But we need to shift the transmit voltage level of 5V from micro-controller to 3.3V RX of HC-05 module, this is achieved by using a resistor divider.
Through a smartphone app the user can connect to the HC-05 bluetooth module via a password.The door lock solenoid works on 12V DC and needs 1A current to activate. This voltage is switched through a 2-relay module(5V, 10A). Arduino upon receiving the correct password activates the relay and activates the solenoid of door lock, thus unlocking it. The relay should not be activated for longer than 6 seconds because otherwise the solenoid will burn up. We keep it on only for 600ms, which is more than enough to activate the solenoid.
When choosing the power supply to power the door lock, we need to take into account the resistance of the solenoid too, so a 12V 1A supply will not be enough; the net current would always stay under 1A. After sampling a few power supplies we ended up with a 12V 2A power supply which was more than sufficient for our needs. Eventually we will switch this power supply to a battery that can give us a similar output, i.e. 12V and 1A without voltage drops.
For the code or more details refer our project on github: https://github.com/reserved-bit/arduino-workshop
That’s the beginning of the story of the reserved-bit smart-door-lock. Stay tuned for more as we build a simple app for the kids to see how all of these things fall into place.