On his website, under the title ‘AVR Blue Remote, the author describes (in German) a Bluetooth-based remote control unit featuring six.output relays and six sensor inputs. The site also includes Smartphone software (avrblueremote.exe) and micro-controller software (avrblueremote.hex). These can be used as the basis for projects such as a short-range (up to 10 m or so) remote garage door opener or a remote lighting controller. The software is free for use by private individuals.
Any Smartphone running the Windows Mobile 5.0 operating system can be used as the transmitter. The receiver used is the postage-stamp-sized Blue lice Corn Ill Blue-tooth module with integrated chip antenna from Amber Wireless. The module is based around the LMX9220A from National Semiconductor, and decoded messages are passed over a UART-like interface (TX and RX signals) between it and an Atmel AVR ATMega8L microcontroller. Connected to the outputs of the microcontroller is a ULN2803 octal driver which can comfortably switch enough current to drive power relays. Completing the circuit area 3 V voltage regulator (type LP2950-3V) and an ISP (in-system programming) connector. Four LEDs indcate the status of the connection: LED1 shows when the microcontroller has received data correctly and LED2 indicates when a timeout has occurred. The Bluetooth module’s LEDs indicate the link status (LED3) and transmit mode (LED4).
The printed circuit board layout for the circuit has to meet several constraints. For maximum range there should be no ground plane, conductors, components or other metal parts within 8 mm of the antenna; other requirements are set out in the manual for the module. The microcontroller can be programmed using the ISP interface: you must of course make sure that the pinout of the connector is compatible with that of your programmer. Suitable programmer circuits can be found on the Internet as well as within the pages of Elektor Electronics, and further information is provided on Atmel’s website. The sensor inputs can be used for any desired purpose or simply left floating. With the hardware built we next turn to the accompanying Smartphone software. You will fist need to install the appropriate version of Compact Framework 2.0 (available for download from Microsoft):
- Windows Mobile 5.0 Pocket PC and Smartphone: wm.armv4i.cab;
- Pocket PC 2003 and 2003 SE: NETCFv2.ppc.armv4.cab;1
- Windows XP: netcfsetupv2.msi.
Next, copy the file avrblueremote.exe to the target platform (for example onto an SD card for use with a Smartphone). The two Bluetooth devices, the Smartphone and the receiver board, now need to be ‘paired’ (which only needs to be done once). The program can now be started, and the COM port set with a click or two of the mouse on the upward- and downward-pointing arrows. The central square opens the interface, creating a connection with the receiver. The arrows now allow the outputs on the receiver board to be switched on and off; the sixth output is switched by pressing the space key.
Towards the top of the display the six sensor inputs are represented as LEDs. If you should move out of range of the receiver, these LEDs will be extinguished and a timeout bar will appear. If the timeout period should expire without a valid signal being received the interface will be closed.