ARM-7 Mobile phone communication with Microcontroller

Call for Price

This project is mainly based on mobile phone communication with Micro controller using Bluetooth Interface and Controlling the Device from mobile using Bluetooth.

SKU: ARM-7 Mobile phone communication with Microcontroller Category:

Description

Abstract

This project is mainly based on mobile phone communication with Microcontroller using Bluetooth Interface and Controlling the Device from mobile using Bluetooth. Bluetooth is a wireless technology is becoming a popular standard in the communication arena, and it is one of the fastest growing fields in the wireless technologies. It is convenient, easy to use and has the bandwidth to meet most of today’s demands for mobile and personal communications. Bluetooth technology handles the wireless part of the communication channel , it transmits and receives data wirelessly between these devices. It delivers the received data and receives the data to be transmitted to and from a host system through a host controller interface (HCI). The most popular host controller interface today is either a UART or a USB .Here, I will only focus on the UART interface, it can be easily show how a Bluetooth module can be integrated on to a host system through a UART connection and provide the designer an optimal solution for Bluetooth enabled systems. Here, I will show two examples of hardware interface between Bluetooth wireless technology and UART. One example shows an interface between a Bluetooth module and a PC via UART, and the other example shows an interface between a Bluetooth module and a Microcontroller via Mobile.

Concept

This project is mainly based on mobile phone communication with the Microcontroller through Bluetooth, here we are using the Android based mobile, and to communicate with the controller we need the supporting software installed in the mobile phone. Bluetooth SPP software must be installed in it. Connect the Bluetooth module with microcontroller using the serial port communication. Then dump the following code in flash memory of controller, open the Bluetooth SPP software it asks for pairing with the Bluetooth module and after pairing the mobile with Bluetooth module then start entering the message whenever the message ‘3’ is entered and sent the relay will be switched ON and if we send ‘4’ Relay is switched OFF. Using the Relay we can switch ON /OFF the electrical device.

Block Diagram

Block Diagram

Concept

GPS Module is attached to the vehicle, which is going to be traced. Using this Project we have to send the position of GPS Module (vehicle) to the control unit. The GPS receiver receives signal from the satellite. This signal shows the Latitudes and Longitudes of the GPS receiver. This signal is given to the micro controller. Output from Micro controller is given to the GSM module. GSM module, which is kept at the receiver side, will read this message. This message contains longitude and latitude and receiving time and date. Using this information we can easily find the position of GPS receiver, or simply the position of the vehicle. GPS receiver, which is fixed in transport, will collect the NMEA data from GPS Satellite, which incorporates Latitude, Longitude, time of receiving data, and date. ARM processor will receive these data through serial communication from GPS receiver.

These data are used to identify the position of that transport on the earth. Collected information is given to ARM processor and will be displayed on display board of that vehicle. So ARM processor will send the exact position of that vehicle to GSM module.

This GSM module will send this information to another GSM module, which is kept at the receiver side, where the position of the Transport is needed to be displayed. This information will be sent to ARM processor , which is kept at the receiver side, and position will be displayed at the required place.

Hardware requirements

  • ARM 7 (LPC 2148) Microcontroller ( ARM7 Evaluation Board)
  • Power Supply (9V Adaptor, 5V Adaptor)
  • Bluetooth Modules
  • Relay interface (user can interface any electrical device according to their Application)
  • Mobile phone with Android OS

Software requirements

  • Programming Language: Embedded C
  • KEIL U Vision IDE
  • Flash magic
  • Bluetooth Spp software 

Connect the Bluetooth device to the Microcontroller

To connect the Bluetooth device, you will need to find the Rx and TX pins on your microcontroller. Make sure that you cross the wires by connecting the Rx pin from your Bluetooth device to the TX pin on the microcontroller, and the TX pin from your Bluetooth device to the Rx pin on the microcontroller. Install the Bluetooth SPP software in Android based Mobile and pair the device and start the communication between Mobile and Microcontroller Bluetooth SPP provides Bluetooth connectivity for all android apps:

Lets us see the communication between Bluetooth Module pairs with Microcontroller & Mobile with Microcontroller as discussed below

Settings for Communication between mobile and microcontroller

Android Application Based Mobile

Install Bluetooth spp application software in Mobile

Install Bluetooth spp application software in Mobile

Bluetooth Module Setting with ARM 7

Bluetooth Module Setting with ARM 7

Settings for Communication between Bluetooth module pairs with microcontroller

To communicate the Bluetooth module with the PC we need to set the following settings in the HyperTerminal

  • 9600 Baud Rate
  • No parity
  • 8 data bits
  • Hardware flow control
  • 1 Stop bit

Connect the Bluetooth module 1 with the PC and connect the Bluetooth module 2 with microcontroller dump the Hex file to controller and start pairing the Bluetooth device after the device is paired the communication happens. User can see the output on HyperTerminal

Hyper terminal

  • From the Start menu select programs\Accessories\Communications\HyperTerminal or perform a search in My Computer for “HyperTerminal”

Hyper terminal

Type in a connection identifier name say “Test1” and click OK. The only restriction here is it cannot be a

  • Device name e.g. “COM1”
  • You will then be presented with the following dialogue box:

connect to

  • Here it is possible to choose the COM port to test using the drop down box. In this example we will use the onboard port COM1. Click OK.
  • The next dialogue box will ask for the Port Communication Settings:

COM Properties

Bluetooth Module setting with PC

COM Properties  Bluetooth Module setting with PC

Bluetooth Module setting with ARM 7

Bluetooth Module setting with ARM 7

ARM 7 Mobile phone communication Output Image

                                             ARM-7 Mobile phone communication Output Image

ARM-7 Mobile phone communication Output Image

Source Code

#define CR 0x0D 
#include 
 #define BUZZ 7
 #define LED 1
 void init_serial (void); 
int putchar (int ch);
 int getchar (void);
 void lcd_initialize (void);
 void delay (unsigned int);
 void lcd_cmd (unsigned char); 
void lcd_data (unsigned char); 
unsigned char test; 
const unsigned char msg[] = ("PS-ARM EVB KIT "); //msg
 const unsigned char msg1[]= (" ::LCD DEMO:: "); //msg1
 const unsigned char cmd[4] = {0x38,0x0c,0x06,0x01}; //lcd commands
 unsigned char ch, I = 0; 
//---------------------------------- // LCD Initialize //---------------------------------- 
void lcd_initialize (void) 
{
 int i; 
for(i=0;i<4;i++)
 {
 IOCLR0 = 0x00FF0000;
 lcd_cmd (cmd[ I ]);
 delay(15); 
} }
 //---------------------------------- // LCD Command Send //---------------------------------- 
void lcd_cmd(unsigned char data)
 { 
IOPIN0 = data << 16; 
IOCLR1 |= 0x100000; //RS
 IOCLR1 |= 0x200000; //RW 
IOSET1 |= 0x400000; //EN 
delay(15);
 IOCLR1 |= 0x400000; //EN 
}
 //---------------------------------- // LCD Data Send //----------------------------------
 void lcd_data(unsigned char data)
 { IOPIN0 = data << 16; 
IOSET1 |= 0x100000; //RS 
IOCLR1 |= 0x200000; //RW
 IOSET1 |= 0x400000; //E
delay(15);
 IOCLR1 |= 0x400000; //EN 
}
 //---------------------------------- // LCD Display Msg //---------------------------------- 
void lcd_display(void)
 { 
char i; /* First line message */ 
IOCLR0 = 0x00FF0000; 
lcd_cmd(0x80);
 delay(15); 
i=0;
 while(msg[i]!='\0')
 { IOCLR0 = 0x00FF0000;
 lcd_data(msg[i]);
 i++;
 delay(15);
 }
 delay(15);
 }
 //---------------------------------- // Delay Routine //----------------------------------
 void delay(unsigned int n) 
{ 
int i,j;
 for(i=0;i<n;
i++)
 {
 for(j=0;j<0x2700;j++) {;} 
}
 }
 //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Code Begins Here >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
int main(void) 
{ 
char *Ptr = "*** UART0 Demo ***\n\n\rType Characters to be echoed!!\n\n\r";
 PINSEL0 = 0;
 PINSEL1 = 0; 
IODIR0 = 0XFFFFFFFF; //PORT [P0.16--P0.31]
 output IODIR1 = 0X00Ff0000; //PORT [P1.20--P1.23]
 output IODIR0 |= 0xFF << LED; //Configure P1.24 - P1.31 as 
Output delay(10); 
lcd_initialize(); //Initialize LCD 
delay(10);
 VPBDIV = 0x02; //Divide Pclk by two
 init_serial(); 
delay(15);
 lcd_display();
 delay(15);
 while(1)
 { 
while (*Ptr)
 { putchar(*Ptr++);
 } 
ch=getchar();
 switch(ch)
 {
 case 0x33: IOSET1 |= 0x30080;
 break; 
case 0x34: IOCLR1 |= 0x30080;
 break;
 }
 lcd_cmd(0xC0 + i++);
 if(i==16) i=0;
 lcd_data(ch); 
}
 } //<<<<<<<<<<<<<<<<<<<<<<<<< Serial Initialization >>>>>>>>>>>>>>>>>>>>>>>>>>>> void init_serial (void)
 /* Initialize Serial Interface */
 {
 PINSEL0 = 0x00000005; /* Enable RxD0 and TxD0 */
 U0LCR = 0x00000083; /* 8 bits, no Parity, 1 Stop bit */
 U0DLL = 0x000000C3; /* 9600 Baud Rate @ 30MHz VPB Clock */ 
U0LCR = 0x00000003; /* DLAB = 0 */ 
} 
//<<<<<<<<<<<<<<<<<<<<<<<<<<< Putchar Function >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
int putchar (int ch)
 /* Write character to Serial Port */
 {
 if
 (ch == '\n') 
{ 
while (!(U0LSR & 0x20));
 U0THR = CR; /* output CR */
 }
 while (!(U0LSR & 0x20));
 return (U0THR = ch); 
}
 //<<<<<<<<<<<<<<<<<<<<<<<<<<<< Getchar Function >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 int getchar (void) /* Read character from Serial Port */
 { 
while (!(U0LSR & 0x01));
 return (U0RBR); 
}

Conclusion

Mobile communication with Microcontroller using Bluetooth using the serial port communication is an advantageous project; through this project you can control hardware from mobile. People can control their electrical devices via mobile. We think this product have high potential for marketing in the future.

Additional information

Weight 1.000000 kg

Reviews

There are no reviews yet.

Be the first to review “ARM-7 Mobile phone communication with Microcontroller”

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.