
Special Issue of International Journal of Computer Applications (0975 – 8887)
International Conference on Electronic Design and Signal Processing (ICEDSP) 2012
40
Bit 7 – ADEN: ADC Enable: Writing this bit to one enables
the ADC. By writing it to zero, the ADC is turned off.
Turning the ADC off while a conversion is in progress will
terminate this conversion.
Bit 6 – ADSC: ADC Start Conversion: In Single Conversion
mode, write this bit to one to start each conversion. In Free
Running Mode, write this bit to one to start the first
conversion. The first conversion after ADSC has been written
after the ADC has been enabled, or if ADSC is written at the
same time as the ADC is enabled, will take 25 ADC clock
cycles instead of the normal 13. This first conversion
performs initialization of the ADC.ADSC will read as one as
long as a conversion is in progress. When the conversion is
complete, it returns to zero. Writing zero to this bit has no
effect.
Bit 5 – ADATE: ADC Auto Trigger Enable: When this bit is
written to one, Auto Triggering of the ADC is enabled. The
trigger source is selected by setting the ADC Trigger Select
bits, ADTS in SFIOR.
Bit 4 – ADIF: ADC Interrupt Flag: This bit is set when an
ADC conversion completes and the Data Registers are
updated. The ADC Conversion Complete Interrupt is executed
if the ADIE bit and the I-bit in SREG are set.ADIF is cleared
by hardware when executing the corresponding interrupt
handling vector. Alternatively, ADIF is cleared by writing a
logical one to the flag.
Bit 3 – ADIE: ADC Interrupt Enable: When this bit is written
to one and the I-bit in SREG is set, th ADC Conversion Bits
2:0 Complete Interrupt is activated.
Bits 2:0 – ADPS2:0: ADC Pre Scalar Select Bits:These bits
determine the division factor between the XTAL frequency
and the input clock to the ADC.
TABLE 5 – DIVISION FACTOR
METHODOLOLY
In case of Fire in the house the temperature will automatically
rise, in order to detect this a temperature sensor is being used
which will detect the temperature of the surroundings and
send to the microcontroller which will alarm in case of very
high temperature.
An ATmega16 AVR microcontroller is used to carry out all
the computation and control. It has an in-built analog to
digital converter, hence an external ADC is not required for
converting the analog temperature into digital value. An
inexpensive temperature sensor LM35 is used for sensing the
ambient temperature.
The system will get the temperature from the sensor IC and
will display the temperature on LCD. The temperature is
compared with the set point temperature declared by the user,
if its more than that then the buzzer is activated else not.
Analog voltage from LM35 in fetched to ADC of
microcontroller and converted to temperature using following
conversion :
val=ADCRead(0)
voltage= ((val)/255.0)*5
voltage=((val)/255.0)*5*1000); //Voltage is in mV
t=((val)/1023.0)*5*100); //t is in degree centigrade
The block diagram of the system is shown in Figure 1.The
outputs of both sensors are given to microcontroller. The
Microcontroller in turn drive the stepper motor for door
opening, show display on LCD and buzzer in case of fire.
Fig 1: Block Diagram of the System
Commenti su questo manuale