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:
- Bluetooth board - newer plug & play version
- Perf board - approximately 1.1" x 1.5" (29mm x 38mm)
- BS170 N-Channel MOSFET, or similar transistor
- Resistor 1K - 1M
- Wire for hookup - old phone wire works well
Tools:
- Soldering iron and solder
- Wire cutters/strippers
- Screwdriver
- Knife
Remove these ads by
Signing UpStep 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.








































Visit Our Store »
Go Pro Today »




http://goo.gl/mnYY2
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
Uses my pfodApp. which has a user interface controlled completely by the Arduino code. Multiple menus, navigation screens, user input, multiselection lists etc.
Think HTML replacement for micros, with messages <255 chars and simple code on the micro side.
pfodApp is the micro-browser and your micro device (like Arduino) is the micro-server.
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.
Thanks in advance...
Discover and pair with the Bluetooth module. Then connect with SPP through the Bluetooth manager.
On linux rfcomm0 or the next available number will be created in /dev. On windows the next available comm port will be created.
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
Send $$$ and the module will respond with CMD.
To set PIO3 to an output send s@,0808<CR> and the module will respond with OK.
To set PIO3 high send s&,0808<CR>.
To set PIO3 low send: s&,0800<CR>.
You can find quick reference manual for the bluetooth commands here.
The Android Bluetooth chat example is a good basis to begin from in order to create your own Android applications.
and doi need to have the daisy app. if i wish to control only one device?
im planning to use ur device for my door lock project using my current cp:
sony ericsson k530
pls.. help..
The Daisy On/Off app is an Android app and was specifically written for touch screen. A non-touchscreen app could easily be written.
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'm happy to work with you to try to identify the issue.
SA,1 - to set force pin code on
SP, - to set the case sensitive pin code
I have posted all the docs here. These settings are documented in the user manual.
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?
Antenna Wifi same frequency 2.4Ghz from router, however possible put on the bluetooth module will work more range?
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?
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.
I haven't investigated reprogramming the module. Also, the ICSP port is not broken out on this breakout board.
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.
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?
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.
The code is 20 characters, so you can use both upper and lower case letters and numbers.
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.
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.