Step 4: Building the master box.

A project log for Bluetooth Doorlock

A wireless door lock key pad and receiver using AVR and HC-05 Bluetooth modules.

david-droletDavid Drolet 08/16/2014 at 18:120 Comments

A little more work went into building the master box, but not that much. 

Here is the schematic to the master box :

This circuit is very simple. 7 lines control the LCD , in 4 bit mode. There are 4 data lines and 3 control lines. Pin 3 of the LCD is connected to a 1k resistor to ground to set the contrast. There are 2 switches to manipulate the master box. Switch 1 is used to enter the settings mode, where you can change the PIN to unlock the door. It is also used to switch between options inside settings. Switch 2 is used to select the displayed option. Both switches are pulled up internally so they only need to be closed to ground to change state. The Bluetooth module's TXD pin is connected directly to the MCU and the RXD goes through a resistor bridge to lower the voltage to 3.3v towards the Bluetooth module. Port C pin 5 drives the relay that simulates pressing the button on the intercom. RST, SCLK, MOSI , MISO are needed for the AVR ISP connection along with a connection to ground, and power to the AVR. A 5v voltage regulator drops the 15v coming from the intercom to 5v and is filtered with a 1µf at the input and output of the regulator.

Fitting the LCD was tight, but it turned out perfect. Using my dremel I cut the plastic but sadly I went to close to the side, bottom right and I went through the plastic. So I decided that's where the power switch would go. I drill 2 holes for the switches and cut a piece of toothpick to help glue them more solidly with super glue.

Both switches are grounded on one side , and connected to their respective pad on the board. The buttons for the switches were too short to come out the other side of the box. So I cheated and destroyed 2 extra switches and took the buttons, sanded the excess and glued them on top of the switches to make them taller :

This board turned out much cleaner than the slave keypad board, but this was also a different board that wasn't as old as the one used for the keypad. Here is a shot during the etching process using muriatic acid :

You should do this outside! There are a lot of fumes and your girlfriend might not enjoy the smell it leaves in the washroom once you are done.

I forgot to take pictures just after populating the board, so here are some take once everything is wired :

I used a 4 wire telephone cable connected to the phoenix connector inside the master box and soldered directly inside the phone :