How to make Bluetooth Garage Door Opener & Car Starter


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.com


Tools:
  • 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 1Getting to know the circuit and parts


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 thequick reference manual and/or user manual.

Step 2Initial assembly


Initial assembly
  • moduleWithHeaders.JPG
  • assymblyOneSwitch.JPG
  • assymblyOneSwitchBottom.JPG
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 3Final assembly and connections

Final assembly and connections
  • assymblyThreeSwitchesWithGround.JPG
  • assymblyThreeSwitchesNoWiresBack.JPG
  • assymblyWithGndAndGPIO.JPG
  • assymblyWithAllWires.JPG
  • assymblyWithAllWiresBack.JPG
  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 4Connect the garage doors

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 5Configure and Test

Configure and Test


The device can be tested many ways. The simplest way to test it would be to use the free Daisy On/Offapplication 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 6Package

Package
  • makerBotPrintingCase.JPG
  • BluetoothModuleAndFobInOpenCase.jpg
  • HotGlueCaseClosed.jpg
  • BluetoothCaseAndFobEnclosed.jpg
  • MountedCasesAndPowerRouting.jpg
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.
Read More

How to Make a USB phone charger for almost any cell phone!


My charger burned up, so I thought,"Why not build your own?"

Step 1Get the parts:

Get the parts:
1. Altoids tin.
2. Old wall/car charger that fits your cell phone.
3. Male USB.
4. 220 ohm resistor (red-red-brown).
5. LED (color is up to you).
6. Power Switch.
7. USB extension cable (just in case you can't fit the USB plug directly into your computer).

Step 2Connect the dots...

Connect the dots...
Now I'm sure most of you know what the leads on USB ports look like, and how all you will need are the 1st and 4th leads (Red, that's your positive 5V, Black is the ground). Just cut of the white and green wires if you have them, if all you have is the metal male USB part, then you just solder wires to the first and last leads. Now connect the positive wire (negative will also work) to your power switch. Then from the other wire on the other end of the switch, connect one end of the 220 resistor (a higher resistance would also work, it just depends on high bright you want your power light to be). And from that connection between the wire comming from the switch an end of the resistor, also run a wire directly to the positive (red) wire comming from the cut-off end of the charger (you just need the side with the adapter that plugs into your phone, it should only have 2 wires, (+) & (-) ).

Step 3Jam the crap in there.

After soldering the wires together, and wraping em with electical tape (better yet, heat shrink),cut a square hole in the front of the altoids tin that the USB plug come out of.... Once you get the right size (I just used my pocket knife to cut through the tin), wedge the USB in through it, and glue it in, I just used hot glue, but super glue or silicon would work better.

Cut, or drill the hole in the lid for the LED. Once you wedge that in, glue it in also.

Same deal for the power switch, and cord exiting going to your phone. Dont be bashful with the glue/filler, cause the most secure everything is, the longer it'll last.

Step 4That's Done!

Ta Da!
You should be done! Plug your altoids tin into your computer (if it doesn't fit, simple run a USB extender cable (1 male end w/ a female on the other) from the tin to your comp. The LED should light up, if not, flip the power switch. If the LED still doesn't turn on, then you did something wrong. If it lights up when you turn on the switch, plug it into your phone. If your phone doesn't reply like it should, quickly disconnect it and back track. Thank you for checking out my instructable, and realize that I am not responsible for any damaged items, though highly unlikely, there is always the chance of error when dealing with electronics. Thank You!
Read More