LED thermometer

Summary of LED thermometer


This article describes a DIY LED thermometer project using an ATTiny2313 microcontroller and a TCN75 temperature sensor. It features a three-digit 7-segment display readable in the dark, measuring temperatures from -9.5°C to 99°C or 0°F to 210°F. The system uses I2C communication, multiplexing software for display control, and can run on a 5V supply or batteries.

Parts used in the LED Thermometer:

  • TCN75 temperature sensor
  • ATTiny2313 microcontroller
  • Ceramic resonator
  • Three common cathode 7-segment displays
  • NPN transistors
  • 200 Ohm resistors
  • 5V DC regulated power supply or three 1.5 volt D-type batteries

his project shows the temperature on a three digit 7-segment display, it measures the temperature from -9.5 to 99 degrees Celcius in 0.5 C steps, or from 0 to 210 degrees Fahrenheit in 1.0 degrees steps.
Because of the LED display the temperature is also readable in the dark. This project is available pre-assembled and tested at www.bizztronix.eu
LED thermometer
The TCN75 from MicroChip is used to measure the temperature. The TCN75 has a 2 wire serial interface, which is a bidirectional bus with a speed up to 400Kbs. Up to eight devices of the same type can be controlled by the bus. In this case only one device is connected to the ATTiny2313 microcontroller. The 2 wire bus is also called I2C, this name is proprietery to the Philips Electronics company. I2C is a abbreviation for IC Inter Circuit. The TCN75 has also a build in programmable thermostat, which is not used in this circuit.

Hardware

The ATTiny2313 is used the control the two wire serial interfacing with the TCN75 and to translate the information for showing on the three digit 7-sement display. The reading of the temperature from the DS1621 happens every 3 seconds. A ceramic resonator is used for clocking the microcontroller.
Smart Medicine Box
The three 7-segment displays are of the common cathode type, at each cathode the display is connected to a transistor for ampifying the current. The transistors are of the NPN type and are controlled by the ATTiny2313 microcontroller. Each segment of the display is connected to a 200 Ohm resistor to limit the current of the ATTiny2313 port. The multiplexing of the three displays is handled in the software. Each display lights up consecutively for 5ms seconds. The LED digits have a height of 14,2mm (0.56″).
The circuits needs a 5V DC regulated power supply and draws about 50mA current. It can also be supplied with three 1.5 volt batteries, but then the brightness of the LED’s will be less. Three D-type batteries will last for about one month.

Software

The program is written in the BASCOM-AVR programming language. The program uses about 1Kb of the 2Kb flash memory that the ATTiny2313 has. There are two different programs that you can use, for Celsius and for Fahrenheit read out. BASCOM is a programming language for AVR-microcontrollers based on BASIC, a demo version can be downloaded for free and can be used for up to 4Kb of programming code. BASCOM has special commands for driving chips with the two wire interface. Below you can download the program code and the hex files for the Celsius and the Fahrenheit mesurement. The BASCOM program compiles the program code into the hex-file that can then be loaded into the microcontroller to make the circuit work. BASCOM has also a build-in programmer to get the hex-file into the microcontroller. If you have the STK500 you can directly program the code from BASCOM into the microcontroller. Or you can use the parallel port program cable and the Attiny2313 board and the Pony-Prog program to get the code into the microcontroller.
For more detail: LED thermometer

Quick Solutions to Questions related to LED Thermometer:

  • What is the measurement range of the device?
    The device measures from -9.5 to 99 degrees Celcius in 0.5 C steps, or from 0 to 210 degrees Fahrenheit in 1.0 degrees steps.
  • How often does the circuit read the temperature?
    The reading of the temperature happens every 3 seconds.
  • What type of transistors are used for the display?
    NPN type transistors are used to amplify the current for each cathode of the display.
  • Can this project operate without a 5V power supply?
    Yes, it can be supplied with three 1.5 volt batteries, though the brightness will be less.
  • What programming language is used for the software?
    The program is written in the BASCOM-AVR programming language.
  • Does the TCN75 sensor support multiple devices on the bus?
    Yes, up to eight devices of the same type can be controlled by the I2C bus.
  • How long do three D-type batteries last?
    Three D-type batteries will last for about one month.
  • What is the height of the LED digits used?
    The LED digits have a height of 14,2mm (0.56").

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top