The dual temperature sensor have applications like measuring temperature of indoor and outdoor . Since there are 8 analog to digital channel inside AVR atmega16 microcontroller we can interface 8 sensors at a time . Actually they do not produce simultaneous output but it seems like they are giving simultaneous result if we multiplexed them . In this project multiplexed concept is used .
Request: If you do not know what ADC is and how sensor works you can check our previous tutorial on ADC like voltmeter and soil moisture meter . Or if you are absolute beginner on microcontroller do not afraid it is very easy to learn it please check this section of analog to digital conversion on AVR . There is well explained on analog to digital conversion process inside avr microcontroller .The code for above circuit diagram is shown below . If you do not understand this code after checking previous section please comment below . I will try to explain everything what's going inside microcontroller .
First of all include standard avr/io library and then lcd library .This library consists of lcd.h and lcd.c file yor u have to include both file You can download lcd library from this link . Since we have used 16*4 alphanumeric LCD display you have to do some modification on lcd.h file . Open lcd.h file and scroll down slowly until you reach .You can download LCD library from this link lcd library for avr
#define LCD_LINES 4 /**< number of visible lines of the display */
if there is 2 instead of 4 please make it 4
again scroll down until you reach
#define LCD_PORT PORTB /**< port for the LCD lines */
if there is PORTA change it to PORTB
because we are using 4 line display on PORTB .
You can download whole project with code ,proteus isis , image and atmel studio 6 file from this link dual thermometer electronify
That's it now upload the code to your microcnotroller and then enjoy with your dual temperature monitorng device .
Do it yourself : If you want to make automatic fan on if certain temperature is reach or if you want to interface alarm to warn if certain threshold is reached then please put "if" and "else if " condition so that you can do what ever you want if certain thereshold is reached . Like this project temperature controlled dc fan .
Please share this project if you enjoy this . This will encourage to make good projects like this .