Microcontroller Based Programmable Data-cum-Temperature Display

Microcontroller Based Programmable Data-cum-Temperature Display.

LCD display are most widely used in applications like token display machine in malls, supermarkets, restaurants, cafe-houses etc. The project presented here demonstrates the working through wireless by use of Bluetooth technique. This circuit is designed by Mr. Vivek Kumar Kamboj from Haryana.

Circuit and working.

This circuit uses microcontroller that accepts data via Bluetooth from various types of gadgets like android based smartphones, laptop, etc. The IC1 AT89C51 is the heart of this programmable display whose circuit is shown in the figure below.

bluetooth temperature module

The mains power supply is applied to the primary winding of transformer TR1 and is stepped down to 12V AC , 300mA by the transformer. The bridge rectifier comprising diodes D1 through D4 rectifies the AC voltage. The linear voltage regulator IC 7805 is used to provide 5V regulated DC voltage to drive the circuit including Microcontroller , ADC and LCD display. The circuit has two applications :

– First it can be used as data display by using Bluetooth technique

– Second it can be used as a digital temperature display

For the application of data display, the Bluetooth module used in the circuit that acts as a transmitter and receiver which is compatible with the smartphones , PCs , laptops etc. An 11.0592MHz crystal is connected to the crystal input pins 18 and 19 of the IC1 to provide an internal clock for operation. Port pin 1.0 to 1.7 of the IC1 are used to drive the LCD 16X2.The message typed by the user on the android based smartphone or window based laptop is received by the port pin P3.0/RXD of IC1 via Bluetooth module. In this manner data communication takes place between the user and microcontroller.
To display the temperature, the IC3 LM35 is used as a temperature sensor. It is a precision temperature sensor, whose output voltage is linearly proportional to the Celsius temperature with + 10.0 mV/°C scale factor. The pin 2 of LM35 is connected to the port pin IN0 of IC2 ADC0809.

The IC2 ADC0809 is a data acquisition device which has an 8-bit analog -to- digital converter that uses successive approximation as the conversion technique. The analog data converted by ADC in digital form at the output port pins OUT1 to OUT8 is connected to the port pins P0.0 to P0.7 of IC1. The IC1 drives the LCD 16X2 which results in display of temperature.

Software program.

The circuit operation is performed using the software program loaded into the internal memory of IC1 microcontroller AT89C51. The program implements all required functionalities including user inputs through the smartphones, laptops etc by displaying messages on LCD. The program is written in embedded C language and is given below for reference:

#include<reg51.h>  sbit soc=P2^0;  sbit eoc=P2^1;  sbit oe=P2^2;  sbit clk=P2^3;  sbit ad_a=P2^4;  sbit ad_b=P2^5;  sbit ad_c=P2^6;  sbit ale=P2^7;  sbit rs=P3^6;  sbit e=P3^7;    void clock()  {  int v;  for(v=0;v<500;v++)  clk=~clk;  }  void delay()  {  int a;  for(a=0;a<300;a++);  }  void cd(unsigned char w)  {  P1=w;  rs=0;  e=1;  delay();  e=0;  }  void dd(unsigned char w)  {  P1=w;  rs=1;  e=1;  delay();  e=0;  }  void main()  {  unsigned char a,b,c=0,d;  cd(0x38);  cd(0x06);  cd(0x0c);  cd(0x01);    soc=0;  eoc=1;  oe=0;  ale=0;  SCON=0x50;  TMOD=0x20;  TH1=0xfd;  TR1=1;  ad_a=0;  ad_b=0;  ad_c=0;  while(1)  {  if(RI==1)  {  if(c==16)  {  cd(0x01);  c=0;  }  cd(0x80+c);  d=SBUF;  dd(d);  c=c+1;  RI=0;  }  ale=1;  soc=1;  clock();  ale=0;  soc=0;  clock();  while(eoc==0);  oe=1;    b=P0;    cd(0xc1);  dd('T');  dd('e');  dd('m');  dd('p');  dd('-');    a=b*2.0;  dd((a/100)+0x30);  dd(((a/10)%10)+0x30);  dd((a%10)+0x30);  dd(' ');  dd('^');  dd('C');  }  }

Operation and testing.

The operation of the circuit is as explained below:

1- Operation with LM35 to display the temperature :

When the circuit is switched ON, initially the LCD shows the temperature sensed by IC3 LM35. The user can reset the operation.

2- Operation with Bluetooth module :

To display the data using android based smartphone, the user has to download android based Bluetooth terminal application from playstore. The user can type the desired message on their smartphone in this application after connecting it with the circuit via Bluetooth. The desired message would be displayed on the LCD.

In similar way to display data using laptop, the user is required to download the Hyper terminal software application on their laptops having windows as operating system. The prototype is shown below:

bluetooth temperature display


IC1 AT89C51 Microcontroller
IC2 ADC0809 Analog to Digital Convertor
IC3 LM35 Temperature Sensor
IC4 7805 Voltage Regulator
LCD 16X2 Alpha Numeric Display
Bluetooth Module Bluetooth Module
D1-D4 1N4007 Diode
R1 10k, 0.5 W
R2 1k, 0.5 W
C1 33pF Ceramic disk
C2 33pF Ceramic disk
C3 10uF, 6.3V Electrolytic
C4 1000uF, 25V Electrolytic
X1 11.0592 MHz Crystal Oscillator
Push Button Push Button
TR1 12V/300mA Transformer