If you're like me, you nearly always carry your phone or are frequently at a computer. I often find it more convenient when I can interact with the things around me like the garage doors, car starter, sprinklers, electric blankets, holiday decorations, etc. via my phone or computer.

It is relatively easy to Bluetooth enable many devices. These instructions will explain how I Bluetooth enabled my garage doors and car starter. The implementation is quite generic. Similar techniques could be used to Bluetooth enable many other things too.

The Bluetooth board that was used has at least six different connections that could each possibly control a different thing.

There is a corresponding free Android application that you can download; Daisy On/Off. It allows dynamically creating, labeling, and configuring multiple buttons so that you can easily control the various things that are Bluetooth enabled.

There are risks associated with wireless control and modifying any equipment. You assume full responsibility and associated risks related to your use of this information.

Materials: You can also buy a kit with all components.  For more information, check our website at http://daisyworks.net

  • Soldering iron and solder
  • Wire cutters/strippers
  • Screwdriver
  • Knife
In addition to the above materials and tools, you will need an Android device to utilize the corresponding Android Daisy On/Off application for interacting with the Bluetooth module. Alternatively, there are links to the simple commands so that applications for other types of Bluetooth devices can be created. For example, you could control the Bluetooth module from a laptop or PC that is Bluetooth enabled. Apple 'i' product hardware has restricted Bluetooth access and would have to proxy through another device like a PC. Not a difficult task, but another hoop to have to jump through - choice is a good thing.

Step 1: Getting to Know the Circuit and Parts

The Bluetooth board has at least six pins that can be used for general purpose input/output (GPIO). The Bluetooth module on the board operates at 3.3V, however the board has a voltage regulator so that it can be powered from USB power or via other power sources like wall-warts or batteries up to 18VDC. By connecting the Bluetooth module to a general purpose MOSFET switch it can switch higher voltages and currents.

The BS170 MOSFET is a general purpose N-Channel transistor. This means that the switch turns on when the voltage on the gate is positive ~2.1V with respect to the source. The MOSFET source and Bluetooth module ground are connected together so they are properly referenced to each other. The gate of the MOSFET is the control and gets connected to one of the Bluetooth board GPIO pins. The MOSFET is turned on by driving the corresponding GPIO pin high.

When the Bluetooth module is reset or not set as an output, the pin effectively floats - it actually has a weak pull-down. By connecting a resistor between the MOSFET gate and source, we ensure that it always turns off.

Alternatively, if we wanted to turn positive power on to a device instead of grounding it for control, we could connect a P-Channel MOSFET to the N-Channel MOSFET. The source would connect to power, the gate to the drain of the N-Channel MOSFET and the drain to the devices positive terminal. The device would be directly connected to ground. A resistor should be connected between the MOSFET gate and source to ensure proper turn-off.

The Bluetooth board GPIO 3, 6, 7, 10, and 11 default to low upon power-up and will be off. GPIO 8 and 9 default to high upon power-up and will be on. The power-up state of each pin is configurable, see the quick reference manual and/or user manual.

Step 2: Initial Assembly

See pictures of each step below.
  1. Attach the headers to the board
  2. Place the perforated board over the headers
  3. Place the transistor and resistor in the perf board - leave an extra row of holes between the resistor and headers  and transistor and outside edge of board for connecting wires
  4. Connect the resistor leads to the transistor leads

Step 3: Final Assembly and Connections

  1. Add more transistor and resistor pairs to switch more things if desired
  2. Connect the transistor source to the Bluetooth board ground pins - connect to both header grounds to physically stabilize the board
  3. Connect the transistor gates (center pins) to Bluetooth board GPIO pins - each one to a different pin (recommend 3, 6, 7, 10, 11)
  4. Connect wires to the devices to be controlled

I used old phone cable, but most any wire could be used. Cut two phone cables, each long enough to run to one garage door opener. The green and black wires were connected together and red and yellow together - this is not necessary though. The black/green wire pair is connected to the transistor source which is ground. The red/yellow wire pair is connected to the transistor drain.

The spare car starter key FOB was opened and the battery and switch pins were identified. One end of the switch connected directly to the battery. This pin was connected to the transistor source. The other switch contact pin was connected to the transistor drain.

The MOSFETs contain protection diodes between the source and drain. If the car starter FOB is connected backwards, it will conduct through the protection diode and activate the starter immediately. If this happens just reverse the wires.

Step 4: Connect the Garage Doors

I have Craftsman garage door openers. Terminals 1 and 2 are shorted when the garage door button is pressed. The transistor source is connected to terminal 1 and the transistor drain is connected to terminal 2.

The MOSFETs contain protection diodes between the source and drain. If the garage door opener is connected backwards, it will conduct through the protection diode and activate immediately. If this happens just reverse the wires.

Step 5: Configure and Test

The device can be tested many ways. The simplest way to test it would be to use the free Daisy On/Off application for Android. Just download, configure, and test. The device can also be controlled through any Bluetooth serial port connection (SPP). I like to use BlueTerm on my Android for command line testing and GtkTerm on Ubuntu Linux.
  1. Power up the Bluetooth module by connecting it to a USB host or a USB power adapter. The LED should blink red indicating waiting for connection.
  2. Enable Bluetooth and open the Bluetooth manager
  3. Scan for new devices - the device can be renamed so it can easily be identified, see the manual
  4. Pair with the device - default pin code if requested is 1234, can be changed for security (up to 20 characters)
  5. Connect with SPP - the Bluetooth module should change to green indicating connected
  6. Open a terminal like GtkTerm, on Linux
  7. Connect to the rfcomm port
  8. Immediately send just $$$ not followed by Enter - the device should respond with 'CMD', if it doesn't, the internal command mode timer has expired. Power cycle the Bluetooth module and try again.
  9. Once in command mode, send 'st,255' followed by Enter - this sets the command mode timer to indefinite
  10. Use the quick reference manual to figure out exactly which commands to enter to control the Bluetooth module GPIO pin that was selected for control, e.g., if GPIO pin 3 was selected enter the following commands:
    1. s@,0808 followed by Enter - sets GPIO 3 to an output
    2. s&,0808 followed by Enter - sets the pin high and turns on the transistor
    3. s&,0800 followed by Enter - sets the pin low and turns off the transistor
You will likely want to turn the transistor on and off quickly for applications like the garage door and starter FOB to simulate a one second press. For this reason having an application is ideal.

The direction command only needs to be sent once after the device is reset or power-cycled. Optionally  you can send s%,0808 to set the GPIO 3 direction to output on power-up. The direction command would then never have to sent again unless the device is factory reset for some reason.

Step 6: Package

So that the electronics aren't hanging in the breeze and exposed to potential damage, it is ideal to enclose them. Cardboard, plastic or rubber potting, or plastic project cases could be used. Potting is not desirable because it isn't easy to modify, repair, or re-purpose the electronics in the future if desired.

Since I have a MakerBot Thing-O-Matic, it is quick and easy to whip up a custom project case. Just draw one up in Google SketchUp, convert it to STL, and print it out. I can print for you.

The components were then test fit into the cases. Had to do a little filing on the perf board since I measured it close and it breaks slightly uneven. The starter FOB fit, but was also a little tight. Probably a bit of shrinkage in the plastic as it cooled.

After testing, the Bluetooth case was closed with hot glue and the starter FOB with duct tape. No respectable project would be complete without a little duct tape and hot glue.

To mount it to the garage rafters, I used some Velcro dots. The dots were stapled to the wood since the sticky back might come loose in the heat and humidity. The dots will probably stick OK to the plastic since it is clean and not very permeable.
<p>Hi,</p><p>I am a newbie and this project is my first so please excuse my ignorance. </p><p>I purchased Bluetooth 4.0 adapter, but it is soldered on top of another PCB and has input/output pins on one side. Could you please tell me if I can use RX and TX signals to control my garage doors or do I have to solder the leads to PIO contacts on sides of the BT board.</p><p>Thank you. </p>
<p>Sir, can you give some information about how you did the part of car system?</p>
Very nice concept <br>Saves BOM by replacing atmega and all related components. <br> <br>I suggest to give your products more aesthetic look.will make your daisy work products more awesome !!
I did a similar garage door opener project: <br> <br>http://goo.gl/mnYY2
So did I . <br> <br> www.pfod.com.au has step by step instructions for an Android controlled Garage Door opener (via bluetooth), NO Android programming and No Soldering required just plug and play <br> <br>Uses my pfodApp. which has a user interface controlled completely by the Arduino code. Multiple menus, navigation screens, user input, multiselection lists etc. <br> <br>Think HTML replacement for micros, with messages &lt;255 chars and simple code on the micro side. <br> <br>pfodApp is the micro-browser and your micro device (like Arduino) is the micro-server.
tcollinsworth, <br> <br>I setup the project but have run into some issues with it. I think one is that the garage door opener I have is older and it has power running through the lines that control the opener. I think in stead of pulling the transister to ground I need to just close the transistor. I'm not too sure of that. But my other issue is that my bluetooth board has stopped working properly. The indicator LED is no longer working and I may have lost the programming on the controller. Is there a way you can help diagnose this with me? Maybe via email instead of open forum. Let me know if you can. <br> <br>
Can you please send an e-mail to service@daisyworks.com and we'll try to help resolve the problem. Thank you.
I dont have a Garage door, but i do have a car alarm that start my car, how do i connect this to my car alarm?? would i have to get some type of Bluetooth receiver for my car alarm?? and if that the case where can i get it, and how do i install it??<br><br>Thanks in advance...
I wish I could answer your question, however, I would need to know the make and model of this doohickey car alarm that starts your car. If you tell me that, I could try to figure out how you could interface to it. Interfacing with the starter key fob is much easier. I have a new bluetooth board that has the MOSFETs on it and screw terminals to simplify installation. I'll be posting a new Instructable on it very soon.
Great idea and great work! Thank you for the excellent instructable. This project could only be improved for lazy people like myself by making the setup completely hands free. It has a very big &quot;wow factor&quot; to show friends that you can open and close the garage door or car door with your phone but it would be much more convenient to have the car automatically unlock when you walk up to it, or the garage door open when you drive up without even reaching for you phone. This project may be easily adaptable to a Bluetooth Proximity Detector that simply scans for your Bluetooth MAC address to do just that.
Altogether a VERY well layed out Instructable... bravo! The inclusion of videos is helpful as well. I've dreamed about walking around my hobby farm and being able to control floodlights, waterers, gates, etc. with my Android phone. Obviously BT wouldn't work due to range but are you aware of any similar 802.11 based breakout boards that might work for my goals?
The Bluetooth module is a <a href="http://en.wikipedia.org/wiki/Bluetooth#Uses">Class 1</a> device capable of ~100m (300ft) line-of-site (LOS). The <a href="http://developer.motorola.com/products/droid/">Motorola Droid</a> that I have is a Class 2 device capable of ~10m (30ft). I found that I can communicate over a hybrid of those ranges as expected. I've ordered an antenna for ~$5 (incl. shipping) that has been claimed to increase the range of BT to ~3/4 mile communicating with a phone. We'll see.<br> <br> I'm creating an 802.11 board for this and other purposes where BT won't work, like Apple iProducts.<br>
I work in an office building where my car is typically parked about 5-7 floors below where my desk is located (everything is above street level). My remote starter doesn't work from this distance/building environment. Would your Bluetooth w/ antenna or 802.11 plans for for my situation? I would love to be able to start my car with my phone while sitting at my desk. Thanks!
I've been working on a WiFi module with optional external antenna. As long as you have open wifi or know the codes, this could work for you. We also plan to support iPhone. I'll update the instructable when it is ready.
Any idea when that will be available or the cost?<br> <br> I am contemplating having a Viper SmartStart system (<a href="http://www.viper.com/smartstart/android/" rel="nofollow">http://www.viper.com/smartstart/android/</a> ) installed in my wife's car but am not too keen on the $400+ cost, or the $300+ cost to add it to my existing system.&nbsp; A basic starter + wifi would presumably achieve the same thing at a fraction of the cost of the Viper system.&nbsp;
We are testing the WiFi boards now. The anticipated price is under $100 depending on selected features. The final version is expected to have at least two control outputs, temperature, accelerometer, and several other features.
Hi Damonic,<br> You could try something from <strong><a href="http://www.relaycontrollers.com/Relay/Relay/WI-FI_RELAY_CONTROLLERS">National Control Devices</a></strong><br> I find NCD to be a bit on the pricy side for my projects, but that could be because of my budget<em> (not much)</em><br> <br> This is a great Instructable. Good videos too.<br> Nice work :)<br> <br> <a href="http://www.chookchooks.com">chookchooks</a><br> <br> <br> <br> <br>
sir' can u pls. post a sample video controlling ur device using commands instead of the daisy app.?
It is simple enough to explain.<br> <br> Discover and pair with the Bluetooth module. Then connect with SPP through the Bluetooth manager.<br> <br> On linux rfcomm0 or the next available&nbsp;number will be created in /dev. On windows the next available comm port will be created.<br> <br> Connect with the port that was created. You can use gtkterm on linux or hyperterminal or teraterm on Windows. You can also connect to the port with most any programming language for automation. This is the command on linux: gtkterm -e -p /dev/rfcomm0 -s 115200<br> <br> Send $$$ and the module will respond with CMD.<br> To set PIO3 to an output send s@,0808&lt;CR&gt; and the module will respond with OK.<br> To set PIO3 high send s&amp;,0808&lt;CR&gt;.<br> To set PIO3 low send: s&amp;,0800&lt;CR&gt;.<br> <br> You can find quick reference manual for the bluetooth commands <a href="http://daisyworks.com/products/daisy/ATMEGA328-1/Daisy-BT-Mega328-20110430/DaisyWorksBluetoothQuickReferenceManual.pdf" rel="nofollow">here</a>.
On Android devices you can use the Blueterm app to connect and send all the above commands.<br><br>The Android Bluetooth chat example is a good basis to begin from in order to create your own Android applications.
hi sir'.. if i order ur product how long it will take for me to receive if im in the philippines?
That would depend on which shipping method you select. If you want it quicker, you can pay more and get it faster. If you want to save your money and are flexible, then choose the USPS shipping and pay only a few dollars or zero depending on total order amount and location. I would expect the order to arrive in ~10 days depending on customs and local service.
sir can i use a none touchscreen cellphone for this device?<br>and doi need to have the daisy app. if i wish to control only one device?<br><br>im planning to use ur device for my door lock project using my current cp:<br><br>sony ericsson k530<br><br>pls.. help..
You can communicate with the module with any device that supports Bluetooth SPP profile. All you need to do is send it simple commands to turn any pin on or off. This can be done with probably any programming language that can communicate with the Bluetooth stack.<br><br>The Daisy On/Off app is an Android app and was specifically written for touch screen. A non-touchscreen app could easily be written.<br><br>According to the specs, the Sony Ericsson K530 does support the Bluetooth SPP profile, see: http://www.jawal123.com/1536090795/en-us/sony-ericsson-k530
I am trying to make it power a 5v relay I tried manny different resistors but none of them worked.....any suggestions?
Yes, you can power a relay. You will need more than a resistor. If you connect the Bluetooth module directly to a relay you will most likely damage it. The pins can only handle about 4 mA which is far less than most any relay. You will need to switch a transistor which can switch the relay. I've created a <a href="https://docs.google.com/drawings/d/15M9BFJAR_pAbrmES0uFg9WJhwbpuHThC5itA62g7s8M/edit?hl=en_US">schematic</a> for you.
Ok I built the circuit exactly as you're schematic and it still is not working, I double and tipple checked it and I know it's correct, but somehow it just isn't working!
It is possible that if you connected and tried to source or sink too much current that you damaged an output. Luckily there are several. The outputs can easily be tested with an LED and a 330 ohm resistor. Just connect them to each output and toggle the PIO pin it to see if the LED goes on and off. Try it with the LED+resistor connected to both +3.3V and to ground. Just remember to reverse the polarity. You might have blown either or both a high side or low side transistor.<br><br>I'm happy to work with you to try to identify the issue.
Take a closeup picture of the front and back and post it somewhere like google docs and send the links. I will do me best to help you solve the issue.
In your schematic you have what looks like a resistor but it's labeled U$2 is that supposed to be and inductor, resistor, I'm not familiar with that label
U$2 is a resistor. I forgot to change the reference designator. It should have been labeled R1. Any value between 1K and 100K would be fine. I typically just use 10K. It is there to make sure the transistor turns off quickly and completely if the gate is not driven.
I tried using the mosfet in your schematic but it didn't work, I'll try this circuit, thank you!
Good day sir.. I would like to ask if i can change the name of the switch in the Daisy on/off android apps.??? .example &quot;left garage door&quot; to &quot;Computer starter&quot; ..tnx.
Yes, the switch labels, number or switches, and associated pin are easily configurable.
Thank you sir...Did you have a blueprint for this project...or some of the digital circuits diagrams .? ? can i ask those sir. THANk ahead...^_^
A block diagram of the circuit is shown in one of the pictures and the schematic is drawn and described in one of the videos. The board schematic is available in the documentation listing if you click the link to the board.
Sir can i use ordinary bluetooth for this project?
I assume by ordinary you mean standard Bluetooth as implemented by most phones and/or PCs. The Bluetooth module implements the most common Bluetooth specs in use today - 2.1/2.0/1.2/1.1 and SPP. That being said, Apple iPhone and iPad do not support SPP and can't be used to directly communicate with the module. They could communicate vi TCP/IP to a PC that has Bluetooth as a proxy.
Great idea! I wonder if it can be hacked like a regular garage door opener?
Anything could be hacked given enough time. The Bluetooth module that is utilized supports encryption and up to a 20 character pin code. Since you only have to pair once, having a long pin code is not a big deal and provides decent security. You can manually change the pin code and enable encryption. Adding configuration of those features is planned for an update of the Daisy On/Off application.
Sound great, I will make that one for car, etc. I have a question, supports encryption and up to a 20 character pin code, how change pin in bluetooth module? use USB between computer and module?
You can change all the setting over the air. When you connect to the module, send $$$ to enter command mode. You many need to power cycle the module as it has a command timer so that it doesn't go into command mode arbitrarily. I set the timer to unlimited before I ship the modules to make it easier for users to configure.<br> <br> SA,1 - to set force pin code on<br> SP, - to set the case sensitive pin code<br> <br> I have posted all the docs <a href="http://daisyworks.com/dablbr.html">here</a>. These settings are documented in the user manual.
Cool, thanks. command what need BlueTerm? I will more learn about them.
It doesn't have to be BlueTerm, that is just what I use on the Android. Any terminal should work. I use GtkTerm on Linux. You could use hyperterm or whatever terminal is available on Windows.
Cool. that use on the Android what kind program? like type command.<br>Installed Daisy On/Off, set Button Behavior is On/Off, when connected and press is on then out of range cause going to disconnect what happen with module will keeping on and wont off itself when disconnect right?
That is correct. The app sends the on and off command within one second. It certainly is possibly that if you were moving away quickly that you could send the on and lose connection and not send the off. There is a connection pin that indicates if the connection is active and changes when lost. I was thinking of adding a self reset to reset all pins to the default state if/when a connection is lost. I didn't for the instructable as I will be using a <a href="http://www.daisyworks.com/daisy1t.html">Daisy</a> (Arduino clone w/Bluetooth) that I'm working on. It will have logic to complete the actions even if you lose your connection. I'm also working on a PC based proxy so that you can communicate via TCP/IP when you are out of Bluetooth range.<br>
Right I see, great for info. when send the on and lost connection and then staying the on, when back to range and re-connection but On is staying without default? but I will more practical with them, I already order RN-41 module, arriving should be tomorrow. What about Bluetooth Bee? maybe different command, isn't it?<br>Antenna Wifi same frequency 2.4Ghz from router, however possible put on the bluetooth module will work more range? <br>I wish trigger input module send to cellphone Android get a alert like pager, somehow might very practical to reprogram the bluetooth module, have available something?
The module allows you to program the default power up state of the GPIO pins. When reset, all pins are floating or tri-state, that's why I recommend the pull-down resistor.<br> <br> Yes, Bluetooth and some WiFi share 2.4Ghz. I have ordered an antenna to try to increase the range myself. I plan to post information on the results when I have it.<br> <br> I haven't investigated reprogramming the module. Also, the ICSP port is not broken out on this breakout board.<br>
I received the package last week just RN-41 module only, I made up own PCB with module. I set commands by Android use Blue Term, changed to the timer to unlimited, and pin (SA,SP), its great working with Daisy On/Off app, very well, module keep staying on after disconnect, and re-connect and Daisy will show button turn on green follow module stayed on, its amazing! <br><br>Pin I changed same 4 digit, but up to 20 like 20 digit use number or word or mix both? I haven't try yet. <br><br>I read other schematic RN-41, I see pull down with resistor 10K pin is 22 (P04_FAST_RST), I decide better follow put resistor 10K pull down 22pin, and all fine, maybe be safe, do you know that should be or doesn't matter?<br><br>How set just separate one output when connected and turn on then disconnect or out of range cause module will reset back to turn off? just separate one outside, other output keep stay on when disconnect or lost signal.
Little bit hard to follow the English. <br><br>The code is 20 characters, so you can use both upper and lower case letters and numbers.<br><br>The reset pulldown is not required as it has an internal pulldown - see the RN-41 spec sheet. It might be a good idea if you had a long trace or other logic connected, but not necessary if you don't.<br><br>It wouldn't be hard to add a self reset on connection loss. There are both positive and negative connect logic pins call CONN. You can program the powerup state of the pins so some will power up on and others off. When reset, they will tristate, you might want to add a low pass filter so they don't bounce when reset. A simple resistor cap circuit to slow down the gate voltage on reset would probably work just fine.

About This Instructable




Bio: Enjoy tinkering with electronics hardware and software. Very interested in the Internet of Things.
More by tcollinsworth:Remote Control Door - Internet Your Thing Simpler Bluetooth Garage Door Opener Bluetooth Garage Door Opener & Car Starter 
Add instructable to: