Simple digital thermometer with AVR

14,773

Circuit Image

This is a simple digital thermometer utilizing an Atmel AVR microprocessor, capable of measuring temperatures in the range of 2 to 99 °C with a resolution of 1 °C. The circuit is managed by an Atmel AVR ATmega8, ATmega8L, or ATmega8A microprocessor. The temperature sensor employed is the LM35 integrated circuit, which outputs a voltage that is linearly proportional to the temperature, with a coefficient of 10 mV/°C. The temperature reading is displayed on a two-digit seven-segment LED display, which is multiplex controlled. The cathodes of the display are connected to port D, while the anodes are connected to the lowest two bits of port B. The use of a super-bright display eliminates the need for a current amplifying transistor. The multiplexing frequency is approximately 100 Hz. Resistors R1 to R8 control the current flowing into the display, thereby determining its brightness. These resistors are selected to ensure that the maximum output current of the IO1 individual pin (40 mA) is not exceeded, even when all eight LEDs are illuminated simultaneously. The thermometer employs a single-ended 10-bit ADC, which is integrated into the ATmega8 AVR. Only the upper 8 bits of the conversion are processed. When the temperature exceeds 99 °C, the display shows "- -". The refresh rate for the displayed data is about 2 Hz. The IO1 ATmega8 utilizes an internal oscillator set to 1 MHz, eliminating the need for an external crystal, as the clock frequency is not critical for the ADC operation. The ADC utilizes an internal voltage reference with a nominal voltage of 2.56 V, which is adequate for achieving a temperature measurement resolution of 1 °C. The thermometer operates from a supply voltage of approximately 5 V, with a current consumption of about 25 mA, most of which is attributed to the LED display. This thermometer can serve as a room thermometer or as a temperature indicator for various devices, such as a PC box, power transistor, CPU heatsink, motor, or refrigerator. The 5 V supply can be obtained using a simple power supply circuit with an integrated circuit 7805, with a suitable fuse included at the input.

The digital thermometer circuit is designed to provide accurate temperature readings with minimal complexity. The LM35 temperature sensor is chosen for its linear output, which simplifies the analog-to-digital conversion process. The ATmega8 microcontroller's built-in ADC allows for efficient processing of the sensor output, converting the voltage signal into a digital value that corresponds to the measured temperature.

The multiplexing technique employed for the seven-segment display is essential for minimizing component count and power consumption. By controlling the display through port D and the lower bits of port B, the circuit can efficiently manage the illumination of each segment without requiring additional driver circuits. The selection of resistor values for R1 to R8 is crucial, as it ensures that the display operates within safe current limits, preventing damage to the microcontroller and extending the lifespan of the LEDs.

The internal oscillator of the ATmega8 provides a reliable clock source for the microcontroller, facilitating the operation of the ADC and the timing of the display refresh rate. The choice of a 1 MHz frequency is a balance between power consumption and performance, ensuring that the thermometer remains responsive while conserving battery life.

In terms of power supply, the use of a 7805 voltage regulator ensures that the circuit receives a stable 5 V supply, which is necessary for the reliable operation of the microcontroller and the display. The inclusion of a fuse in the power supply circuit adds a layer of protection against overcurrent conditions, enhancing the overall safety of the device.

This digital thermometer is versatile and can be adapted for various applications, making it a valuable tool for monitoring temperature in a wide range of environments. Its straightforward design and efficient operation make it suitable for hobbyists and professionals alike, who may require a reliable temperature measurement solution.This is a very simple digital thermometer with an Atmel AVR microprocessor, measuring the temperature in range of 2 to 99 °C (degree Celsius) with a resolution of 1 °C. The circuit is controlled by a microprocessor IO1 - Atmel AVR ATmega8, ATmega8L or ATmega8A. As the temperature sensor an integrated circuit LM35 is used. It provides the output voltage linearly proportional to the temperature with coefficient of 10mV / °C. The temperature is displayed on a two digit seven-segment LED display. The display is multiplex controlled. Cathodes of display are connected to port D, anodes to the lowest 2 bits of port B. Using the superbright display allows to omit the current amplifying transistor. Multiplex frequency is about 100Hz. The resistors R1 to R8 determine current into display and thus its brightness. They are chosen not to exceeded the maximum output current of IO1 individual pin (40 mA) even when all 8 LEDs are lit at once. The thermometer uses single-ended 10-bit AD converter, which is part of the ATmega8 AVR. Only the upper 8 bits are processed. At a higher value than 99 °C the symbol "- -" appears. Refresh rate of displayed data is about 2 Hz. IO1 ATmega8 is using internal oscillator that is set to 1MHz. Crystal is not needed because the clock frequency is not critical for the analog to digital converter (ADC).

The converter uses internal voltage reference with a nominal (typical) voltage of 2. 56 V. Fot the temperature measurement with a resolution of 1 °C it is sufficient. Thermometer is powered from a supply of about 5V. Current consumption is about 25 mA (most of which is the consumption of the LED display). This thermometer can be useful as a room thermometer or temperature indicator of different devices (PC box, power transistor or CPU heatsikn, motor, fridge, . ). 5V voltage can be obtained using a simple supply with an integrated circuit 7805 (use suitable fuse at the input).

🔗 External reference