Home     Projects     Micro     Tools     Delphi     Developer     Site map
HOME  
 
   



5 channel temperature data acquisition

Update : 1-August-2005
www.sixca.com

This is a basic project that helpfully when we want to measure temperature several point at a time.DS1820 is temperature sensor which I use for this project becuase it easy to interface with general microcontroller.

Feature
- 5 channel temperature sensor
- use the Hyper-terminal program for display the temperature.
- use RS232 to communicate with PC,ASCII MODE 9600,8,1,N
- easy to understand and adapt to other project.
- measring from -55 to + 125 degree Celsius.
- accuracy 0.5 'C
- display temperature every 5 second. (Approx.)
- software compiled with CCS


Block diagram

The block diagram in the figure 1. consist of 5 temperature sensor, RTC(DS1307) ,Microcontroller(PIC), RS232 driver.For each temperature sensor it has acquisition time about 200 mS so it use about 1 second to read 5 sensor before send data to PC for display with hyper-terminal progeam



Figure 1. Block diagram


Schematic

Figure 2. is the schematic for this project.PIC16F84 used to control all task such read temperature,read RTC from DS1307
convert data to ASCII then send it to PC via RS232 interface.
As the above mentioned in block diagram description.The sensor use 200 mS for acquisition time if you want to read temperature every less than 200 mS you should be use other type of sensor devices (NTC ,Thermo couple etc.)

DS275 is the RS232 driver which you can replace with MAX232 or other driver that you can find.But DS275 no need extra component and easy to connect with microcontroller and use small space for pcb.

For power supply you can modify to use RS232 powered for this circuit which can found in the internet.

Click to enlarge

Figure 2. schematic


Software

The software which I use for this project programming with CCS C compiler V3.206 (it should be able to compiled with other version)

The main loop of software just looping for read all sensors and RTC from DS1307 then send it to PC via RS232.The ASCII data from CPU will sent to hyper-terminal that is the program on PC(come with Windows).
#include <16F84A.h>
#use delay(clock=4000000)
#fuses NOWDT,XT, NOPUT, NOPROTECT
#use rs232(baud=9600, xmit=PIN_B2, rcv=PIN_B3)
#include "ds1820.c"   // external module
#include "ds1307.c"   // external module

void main(void)
{
   int8 i,sec,min,hour; 	
   int16 tpx,all_tp;
   int8 tp,tpd;
   delay_ms(50);
   init_ds1307(); // initial DS1307
   // set second to 00 and enable clock(bit7=0)
   write_ds1307(0,0x00);   
   while(true) {
     printf("========================\r\n");	   
     sec=read_ds1307(0);  // read second
     min=read_ds1307(1);  // read minute
     hour=read_ds1307(2); // read houre     
     printf("%02X:%02X:%02X\r\n",hour,min,sec);	 
     for (i =0;i<5;i++) 
     {	    	    
            all_tp=read_sensor(i);  // read temperature
            tpx=all_tp;
            tp=make8(tpx,1);
            tpx=all_tp;
            tpd=make8(tpx,0);	    
            printf("Ch:%u = %03u.%u\r\n",i+1,tp,tpd);	    
      }
   }
}




Figure 3. When display with hyper-terminal






Download source code


Other PIC projects

2.3 " Digital thermometer.PIC Microcontroller base project
3 Channel IR remote control the RC5 protocol IR remote
Control stepping motor via USB interface with PIC18F4550
ICD2 Clone Programmer and debugger for PIC Microcontroller
USB Data Acquisition with PIC18F4550
50 MHz frequency counter with LCD display + PIC16F84



   
Copyright(c) 2005-2008 sixca.com, All right reserved.
Best view @ 800X600, IE 6.0 up   
Terms of Use  Privacy Policy