The LM35 is an integrated circuit sensor designed for precise temperature measurement, providing an electrical output directly proportional to the temperature in degrees Celsius. It offers a higher level of temperature accuracy compared to using a thermistor. The LM35’s output voltage is linearly proportional to the temperature in Celsius.
In this particular project, we have constructed a temperature-controlled thermometer using an LM35 sensor integrated with a PIC16F877 microcontroller. The application harnesses the A/D (analog-to-digital) conversion capability of the PIC16F877 for the thermometer functionality. The output unit in the circuit is an LCD screen. The primary objective of this application is to control a fan or heater based on the temperature, specifically within a defined temperature range, such as 20°C to 25°C.
Circuit and Operation: The LM35 temperature sensor serves as the analog input for the A/D converter. The processed signals, representing the temperature values, are displayed on the LCD as temperature readings.
These temperature values are compared to a predefined temperature range (typically room temperature). If the temperature falls below the specified threshold, a 5V signal is observed at the C port of the microcontroller (RC6). This signal voltage activates a transistor connected to the RC6 pin, subsequently closing the relay’s contacts. As a result, the connected controller is triggered, and the LCD displays the message “cold” along with the temperature reading.
Conversely, when the temperature exceeds the predefined range, pin 7 of the C port (RC7) produces a 5-volt output signal. This output is then used to control another relay through a transistor, activating a fan. Simultaneously, the LCD displays “hot.” When the temperature falls within the specified range, the circuit functions solely as a thermometer, without any connected devices being activated. The LCD displays “normal” alongside the temperature reading.
SCHEMATIC CIRCUIT DIAGRAM:
Print circuit board and top view
When the circuit is viewed, it is seen that very few elements are required. This requires a simple design that is in print mode.