Project Member(s) Romita Mullick What’s it about ? An MSP430 based project using the HC-05 Bluetooth module and a phone Android App. The project monitors the surrounding temperature and transfers the live feed to the user’s phone via Bluetooth. It is a simple user friendly application which enables the user to keep track of the temperature simply by a few clicks on the phone, which continuously receives temperature feeds serially from the MSP430.
Project Description This is an MSP430 G2553 based project. The main modules of the MSP430 used here are the ADC and the USCI modules. The ADC used is a 10 bit adc with 1024 steps. The USCI stands for the Universal Serial Communication Interface. Particularly, the USCI_A module is used here which includes the UART (Universal Asynchronous Receive Transmit). A Bluetooth module HC-05 is used to link the MSP430 to the Android phone. The aim of the project is to send live temperature data from the microcontroller to the user’s phone via Bluetooth connectivity. Temperature is being read using the inbuilt temperature sensor in the G2553 IC. This temperature is being transmitted serially to the phone’s Bluetooth feeds continually. It has been coded in such a way that the temperature can be received in three different modes, depending on the type of command the user sends to the HC-05. They are the digital, Celsius and Fahrenheit modes.
The Idea is.. The app is capable of both receiving serial data in the real time mode and sending commands in the keyboard mode. As can be seen in the picture, there are 9 buttons, any number of which can be customized according to the requirement to send command. In the project, only three of these buttons have been used. It’s been set to 1) Digital – command > send character ‘0’ 2) Celsius – command > send character ‘1’ 3) Fahrenheit – command > send character ‘2’ What the code does is, as the user sends a command from the phone via Bluetooth, this command is received by the microcontroller via the HC-05 Bluetooth. The code will serialRead the character received and store it in a unsigned character variable, say ‘a’. The ‘a’ character is received in the receive shift register which sends it to the UCA0RXBUF from which this ‘a’ is read. Now, a simple if else algorithm is implemented for the three possible values of ‘a’. If (a== ‘0’ ) then send Digital else if (a== ‘1’) then send Celsius else if (a==’2’) then send Celsius else if (a==’2’) then send Fahrenheit. What 'send' basically implies is the data, whether in the digital/celsius/farenheit format is serially sent from the MCU to the phone via Bluetooth again and displayed on the app screen. The working is again completely based on the ADC10 and the USCI modules. The ADC10MEM register stores the digital values. The Nadc, temp_C and temp_F values are serially sent via serialWrite to the UCA0TXBUF from which it is sent to the transmit shift register onto the TXD line. This explains the working of the project. Simply pressing a button on your phone will show you the temperature anywhere within the Bluetooth range. Project Features This is a very handy, cheap user friendly project. Only four jumper wires were needed for connecting the MSP430 with the HC-05 BT module. This project is the very basic, fundamental illustration of bigger applications that can be achieved along similar lines, using the same principles. This project simply serves as a template for more complex applications such as home automation, wireless communication, media file transfer etc. While this project only explores the transmission of ASCII characters and character arrays, more complex data files such as audio and video files, word and document formats etc are transferred via Bluetooth in practice today.
Check out a YouTube video for this project which shows how this App actually works ! Click on the link below: [View:http://www.youtube.com/watch?v=x-0tHRR-lsk] |
GUIDE & RESOURCES:
[View:http://e2e.ti.com/cfs-file.ashx/__key/communityserver-components-userfiles/00-00-19-66-05-Attached+Files/5381.bluetooth-msp430.rar] |