Wireless LED Control

Bluetooth Wireless LED Control

Here is a little circuit you can use to control an LED from a PC without any wires.  This is based on the bluetooth module I talked about here.  The schematic I used in that article is very similar to this one except for the temperature sensor.

The firmware is very simple to control the LED.  The bluetooth module sends characters serially so, the firmware must read the serial port to tell if it is suppose to turn the LED on or off.  I setup the firmware to turn off the LED if it receives an o or O and turn on the LED if it receives an f or F.  So, you can see that the case doesn’t matter.

You could have a more sophisticated string to turn the LED on or off but since this is the only thing this firmware does I thought I would keep it simple.  The character receive routine is very simple it just grabs the character from the bluetooth module checks to see if it is one of the above two characters, if it is one of those characters it does the proper function then echos the character.  You can type any character and it will be echoed but only the o or f will change the LED state.

BlueTooth LED Control

BlueTooth LED Control

You can see the way the LED is hooked up it requires a low on the RB8 line to turn on the LED.  Just the opposite of what you might think.  The reason I do it this way is that the PIC I/O line can sync more current than it can source.  So, pulling down the LED allows the PIC to make the LED brighter.

When the PIC receives an o it sets RB8 to 0 when the PIC receives an f it sets RB8 to 1 thus turning on and off the LED.

Bread Board of BlueTooth LED control

Bread Board of BlueTooth LED control