Ardumotive Arduino Greek Playground
  • Home
    • About us
    • License
  • Arduino
    • Tutorials
    • Workshop
  • Raspberry Pi
  • DIY 3D Printer
  • News
    • Events >
      • Unboxing & Review
    • Blog
The 1st Arduino Playground in Greece - Open Source Hardware

Arduino Bluetooth Controlled Electric Door Opener

Available Languages
Picture
Picture

Introduction 

Published date: 28/05/2016
Picture
Hello! In this guide I will show you how to make your own Bluetooth controlled unlock door system by using the Arduino uno board. I made my own circuit by using the ATmega328 micro controller but this is an optional step. In this guide I will help you to make it easily on breadboard by using the Arduino uno board, and I will give you some extra tips on how you can make your own Arduino-based custom circuit.

By using this system you will be able to unlock a door for 3 seconds. After 3 seconds the electrical door opener will be automatically be locked. You can unlock it by pressing a button from the Android application that you will have in your smartphone. You have just to add your BT module in your Android phone (or tablet). In this guide we will also change the default code "1234" for safety reasons. It also has a buzzer for making a tone during unlock time.
​
Watch the operation video:
The electrical door opener that I used need 9 to 12V to operate. So for this system I used an 12V power adapter. As current passes through it, the electric lock remains open. Otherwise it remains closed.

​This device was made only for educational and presentational purpose reasons, please don't use it in your home's door. But you can use it in the main door of your apartment building.

Let's get started!

What you will need - Hardware

Picture
For this project you will need:
  • Arduino uno board
  • Bluetooth module HC-06*
  • NPN transistor NP2222A
  • 2 pin screw driver circuit
  • Electric door opener (12V)
  • Power source 9 to 12V (max!)
  • 10k resistor
  • buzzer
*This guide will cover the password change procedure only for the HC-06 BT module! Don't ask me for the HC-05, just google it ;) And yes, the connection it's the same!
(ONLY) If you want to make your own custom - Arduino based - circuit you willalso need:
  • DIP socket for atmega328
  • LM7805 Voltage regulator (5V output)
  • 16Mhz crystal osc
  • 2x 22pF ceramic, 2x 0.22uF electrolytic capacitors
  • 1x 10K resistor
  • DC power jack
  • pcb prototyping board
And one box to fit them all!

​Tools:
  • Hot glue gun
  • Drill for opening holes on the box
  • Soldering tool (only for custom circuit)
Picture

Change BT Password

Picture
Picture
Change the default name and password of the HC-06 BT module:

Step 1: Upload the blink sketch in the Arduino uno board.

Step 2: Make the connections:
  • BT Vcc pin with Arduino 5V pin
  • BT GND pin with Arduino GND pin
  • BT RX pin with Arduino RX pin
  • BT TX pin with Arduino TX pin
  • Wake (or key) pin with 10k resistor to Arduino 5V pin (or BT Vcc)
​
Step 3: Press the connect button on the serial monitor below (9600bps, No line ending) and type:
  • AT - You will see ok
  • AT+NAMEMydoor - You will see OKsetname, the name of bt changed to "MyDoor"
  • AT+PIN1988 - You will see OKsetpin, the password of bt changed to "1988"
Step 4: Unplug your Arduino from the usb port and proceed to the next step

The Circuit 

Picture
The connections are pretty easy, see the above image with the breadboard circuit schematic.
BT HC-06:
  • Vcc - 5V
  • GNG - GND
  • RX -TX
  • TX -RX
NPN Transistor:
  • B Base pin to Arduino pin 9
  • C Collector pin to 1st pin of the screw driver terminal *
  • E Emitter to GND
The 2nd pin of the screw driver terminal will be connected with Arduino "Vin" pin and will give power to our electrical door opener (9V to 12V) .

The Code

Picture
Here's the code, embedded using Codebender!
Try downloading the Codebender plugin and clicking on the "Run on Arduino" button to program your Arduino board with this sketch. And that's it, you've programmed your Arduino board directly from your browser! It's really amazing.
  • Step 1: Remove RX and TX cables from the Arduino uno board
  • Step 2: Connect your Arduino board with one usb port
  • Step 3: Click on the "Run on Arduino" green button to program your Arduino with this sketch. And that's it, you've programmed your Arduino board! If you want to make any changes in the code below just click the "Edit" button.
  • Step 4 : Connect the RX and TX cables again with the Arduino uno board
Tip: If you want to change the time that door remain unlocked change the delay(time) at line 26.

​Android application

Picture
Download the apk file in your Android phone or table
bt_power_socket_v1.apk
File Size: 953 kb
File Type: apk
Download File

You can use this application on android smartphone or tablet with Bluetooth support.
(make sure that you have already enabled the "unknown sources" from security settings to install this apk)
​

How to use it:
  • Enable Bluetooth connection from settings
  • Scan for devices and make a connection with "MyDoor" (pass:1988)
  • Pair device
  • Open app and click on "Load Paired Devices" button
  • Now click to yours

Make your own custom Arduino - based circuit

Picture
Picture
Now that you have successfully test your new project with the Arduino uno board, you can start making your own Arduino-based custom circuit! The procedure it's easy, but you will need some extras skills for making it.
So, I will try to give you some tips here to try it out by yourself:
  • 10K resistor must be connected between 1st (reset) pin and 7th (Vcc) of the Atmega328 micro controller.
  • 16MHz crystal oscillator must be connected at pins 9 and 10, labeled as XTAL1 and XTAL2
  • Connect to each pin of oscillator one 22pF capacitor. The other pin of capacitors goes to pin 8 (GND) of micro controller.
  • Remember to connect the second power line of the ATmega328 with your power source, pins 20-Vcc and 22-GND.
  • All other information for the Arduino pinout can be found at the second image above.
  • Use the LM7805 with two 0.22uF electrolytic capacitors (on input and output pins) to take 5V from your 12V power source. This is important! Do not provide more than 6V on your custom circuit!!! It will burn your Atmega micro controller and lcd circuit.

​Put it in a box

Picture
Picture
Take your time and configure your box to fit your circuit.
​
​You can make it as big (or small) you want.

Well done!

Picture
That's it! You have successfully completed this guide and now you have your own Arduino Bluetooth controller door unlock system!

I hope you liked this, let me know in the comments!
Picture

Search Engine

Picture

Licence 

Picture

Help us to grow up!

Picture


Donate us
About us
License
Cookies policy

Visit the biggest Arduino Shop in Greece!

Picture
find us on dwrean.net
find us on Codebender
find us on Instructables
Developed and designed by Vasilakis Michalis Copyright © 2013 Ardumotive All Rights Reserved
All trademarks referenced herein are properties of their
Powered by Create your own unique website with customizable templates.
Design by DivTag Templates
Ardumotive Arduino Greek Playground