Hi
This article is about how to interface your hardware to your Android handset using a bluetooth model. When i say hardware, i mean a board powered by a microcontroller. You can interface the handset either using an
- USB port
- Bluetooth
- Wi-Fi
- GPRS
Here we will only discuss how to interface using a bluetooth connection. For this, you will need any simple microcontroller with UART interface and a Linvor Bluetooth module. The Linvor bluetooth module operates on 5V power supply and can be connected to the microcontroller using an UART interface.
Device control Application:
On the application side, I modified the Bluetooth chat application example from Android SDK. The application was developed for Gingerbread 2.3. HC 05 bluetooth module works using the SPP protocol. The application takes care of initializing the handset's bluetooth for SPP protocol and also provides options to search for bluetooth devices and sync with them. You can control 3 devices ON-OFF and fan speed from 0 to 99. I used a stepper motor to control the fans regulator/potentiometer and relays for devices and a stepper motor.
- Connect the
- VCC ->+5V,
- GND->GND,
- TXD->MCU RXD,
- RXD-> MCU TXD
- As soon as you power up the module, the red LED on the module starts blinking indicating that the module is ready for connection.
- Next, search for bluetooth devices in range using the application.
- The Linvor module will appear as linvor in the found devices list.
- Select and sync the handset with the linvor device.
- Once the handset and the module are connected, the red LED on the module stops blinking and stays ON until the bluetooth connection is terminated.
No comments:
Post a Comment