Home > Blog > Bluetooth Door Lock

Bluetooth Door Lock

Posted by admin on January 13, 2012

The keys to my front door kept breaking off, so, just like everyone would, i built a bluetooth door opener :)

More video's and explanation in the full blog post, click below

Ok, first 2 more video's. One of the first breadboard setup, and one of the inside of the intercom device.

Ok, so i took an MSP430 microcontroller (sampled), and soldered that onto a small piece of protoboard i cut out(less than a dollar). Then added a Relay (from an old device), a HC-06 Bluetooth module ($6.60 incl. shipping on DealExtreme), status led, protection diode, and some resistors (less than a dollar total)

So below $10, this is a pretty low budget hardware solution :)

On the Android side, I'm using BT_Serial_Tester for the first tests (just check the market) The free version can only send numerical values and cannot receive, but thats enough for a raw test of my implementation. For the final app i also want a response like "wrong code" or " code accepted" signalling the results.

Connecting is really easy with the HC-06 bluetooth module. You just have to power it with 3 volts, and connect the RX/TX to launchpad/msp430 TX/RX. Then pair with the Bluetooth module from your phone like you would with any device and you are done!

The code is still very rough, but functional: bluetoothdoorlockCRUDE.txt

And basic schematic - Im not really used to drawing them yet, but it should be clear:

Comments:

Posted by skumar on
Hi,

This project is nice....Can i use the relay shown in the link below....Also can u share the schematic if possible.

http://www.sparkfun.com/products/100

This is amazing and nice project...
Thank you
kumar
Posted by admin on
Thanks Kumar!

And that relay MIGHT work with an MSP430, depending on how you power it.
I also used a 5v relay in the first tests, and it worked fine while powered from the MSP430 Launchpad. But when i switched to battery, it quickly drained below the point it could still power the bluetooth and everything, but not enough power left to switch the relay.
If you are thinking about a powered solution, it will probably just work (no guarantees though)
And working on a schematic, coming soon!

Cheers,
MarkoeZ
Posted by Noccy on
You should be able to grab the 5V needed straight from the phone line I believe. If you let that control the relay, the batteries won't have to do anything but keep the msp430 alive. And by making use of LPM you should be landing at somewhere between 50µA and 50mA for the whole microcontroller part of the circuit. You might even get away with powering the whole system on the 40+V that you can tap in on. KipKay did a video on this a few years back; http://www.engadget.com/2007/10/14/tap-into-the-phone-companys-current-if-you-dare/

Nice to see the progress you are making :)
Posted by Chris on
Also, Kumar, for relays have a peek at http://futurlec.com/Relays.shtml - If you are good with controlling 2A over the relay, you can get a PCB relay matching a DIP socket for less than $1. Add to that $5 of shipping worldwide :) Might be able to save a few bucks there.
Posted by kumar on
Hello,

Thank you for reply. I already have launchpad .I will order relay ,bluetooth module and get started on this.

thank you
kumar
Posted by TopHatHacker on
I've made something almost exactly the same http://www.43oh.com/forum/viewtopic.php?f=9&t=1749&p=12033#p12033
feel free to hit me up if you want some help making an android app. I can send you mine, or whip up a custom version for you if you'd like. Cool stuff, keep it going!
Posted by Atomhax on
Great post. I have worked with that type of Bluetooth module before as well. I had some problems soldering the odd ball connections. Whats your strategy for soldering them?

Fantastic Post.
Posted by MarkoeZ on
Thanks guys!
I'll try to give some answers here:
"You should be able to grab the 5V needed straight from the phone line I believe"
It's not a regular phone line, it only works when the phone is off the hook, and even then only a signal line to the central control box. But working on a powered solution atm, to ensure it works all the time.

"Whats your strategy for soldering them?"
Lol, quite crude, as most of my stuff. I cut a small piece of protoboard with copper side up, took the bluetooth module, slipped a tiny piece of cardboard inbetween, and soldered some unused points of the bluetooth module to the protoboard. I made sure the TX/RX and ground/voltage were lined up with the pads as well as possible, but it wont fit perfectly of course, with the size difference.
On the 43Oh.com forum, http://www.43oh.com/forum/viewtopic.php?f=35&t=1748 , you can find a boosterpack/breakoutboard for the HC-05/HC-06 though. If you dont want to use it with the launchpad you can cut away the parts for the connectors.

And thanks again for the positive feedback!

Cheers,
MarkoeZ
Posted by Abhijeet on
Hi MarkoeZ I like your project. I am also doing project on this concept called 'Bluetooth enabled smart home'. I want to display the command on LCD which is received by Bluetooth module(sent by mobile). What should I do? Please Reply.
Thanks.
Abhijeet
Posted by Ryan Gibson on
Hey Markoez,

Great build you've put together here. Excellent work with the door lock. Do you have an email I can grab you on? I have a few questions to ask.

Thanks

Ryan
Posted by Semo on
Hey Markoez,

Amazing work :))))

I am planning to work on the same project
if you don't mind.. send me your email address for collaboration
(my email will appear with this reply)


Thanks so much, and looking forward to collaborate with you
Posted by admin on
Thanks again people!
I sent a mail to those requesting it, but still feel free to post stuff here, as it might help future visitors.

QUOTE: "I want to display the command on LCD which is received by Bluetooth module(sent by mobile). What should I do?"

Well you'd need something to hold the received text, an array comes first to mind, since it's easy to work with. Does draw quite some memory though, so depends on your implementation. But you might want to check www.43oh.com for information of how to drive character displays and other example projects.

Cheers!

MarkoeZ
Posted by bocin on
Hey markoezz..
great works..
I really inspired by your project, I want to do some imporovement from this project..
if you don't mind, can you send me your email, maybe i will ask a few question..

thank you so much for inspiring me.. hehehe..
Posted by Dave on
Hi MarkoeZ,

Sorry to bother you but I'm using the HC-05 Bluetooth Module with the MSP430G2231. I'm having some problems in that I can't find the module when I search for it through Bluetooth.

Following your blog you said: 'You just have to power it with 3 volts, and connect the RX/TX to
launchpad/msp430 TX/RX. Then pair with the Bluetooth module from your phone like you would with any device...'

So you never had to send commands from the MSP430 to the module to make it discoverable or anything? I'm pretty new to all this so forgive me if I sound like an idiot!

Any help at all would be greatly appreciated

Thanks for your time,

Dave
Posted by admin on
Hello Dave,

In my initial tests of the module i did not even attach it to the launchpad. I hooked it up to a pair of AA batteries and connected to it with my cellphone.

BUT, you mentioned you are using a HC-05 Module? That is a different module than the HC-06 module i am using. i thought the HC-05 is preconfigured as Bluetooth Host, and the HC-06 as Bluetooth Client, but might be wrong there, not sure.

Quotes by others on the subject: "Power it up on the 3v3 and GND, then with a resistor and LED see if you get a blinking light on pin 24, if you do then you have a HC06.. if you get it on pin 31 or 32 then you have a HC05."

and: "HC-06 are dead simple to use, HC-05 can be quite a pain to set up for pairing"

Hope that helps a little, and if you have more questions, comments or other stuff, dont hesitate to post here or mail me.

Greetings,

MarkoeZ
Posted by Kunal Pillai on
Hey Markoez

Great project there!!! I was reading through your code and I couldn't help but notice that you haven't called the Transmit function anywhere in the code although it has been defined. Also
could you explain to me the working? In the sense that, is the transmit function for transmission from HC-06 to MSP430? Is the
receive function for reception of the data by the MSP430? Also there is a P1.3 Interrupt used in the code. Where is the use of that in the project? How is the timer Interrupt called?
Sorry I have a lot of questions but I would really like to understand this.
Thanks a lot
Hope to hear from you soon.
Kunal
Posted by Kalin Nakov on
Greetings Markoez!

This is a great project! I started a similar way, but simplified the setup a lot. I have a similar project that uses only the Bluetooth module without additional microcontroller, the Bluetooth module is a powerful microcontroller itself. Look at my blog where I have setup the HC05 module to trigger a cheap $25 solenoid drop bolt door lock (http://viacont-bg.blogspot.com/2012/12/bluetooth-door-lock.html).

Cheers,
Kalin
Posted by WiseCHARMAINE on
According to my own monitoring, thousands of people in the world get the personal loans from various banks. Thence, there is a good chance to find a financial loan in every country.
Posted by Apurva on
Can i get the complete details about this project? im trying to work on this for my final year project work
Posted by download microsoft product key for windows 7 ultimate on
Feelings of ?what TMs wrong with me? are abundant.. download microsoft product key for windows 7 ultimate http://www.tucksteam.com/
Posted by nadia on
Hello markoez :)
How i can get the complete detail about this project?
Posted by oncpvejtxb on
wncyynbslpf{, zdmeoecntz , [url=http://www.zvcxkwmsbk.com/]dytuxwkenm[/url], http://www.znocbezktw.com/ zdmeoecntz
Posted by wpqvmajjqg on
vnbennbslpf{, jhltvhivsj , [url=http://www.ecfmvhktno.com/]zpybrfrafk[/url], http://www.hzpvphnhhc.com/ jhltvhivsj
Leave a Reply



(Your email will not be publicly displayed.)

Please type the letters and numbers shown in the image.Captcha Code