PC Thermometer

PC_Thermometer.jpg PC_Thermometer.jpg

Description

With this project you can show the temperature on you PC. This thermometer plugs in on any free serial port. It gives temperature readings accurate to 0.5°C with no calibration.The project consists of the ATTiny2313 RS232 board and the DS1621 Thermometer board and software for the PC. It can display both indoor and outside temperature on the PC screen (see picture below).

You cab buy the ATTiny2323 RS232 board at www.bizztronix.net.

Features:

  • Plugs in on any free PC com port.
  • Temperature range -20 ... +125°C (-4 ... 257°F).
  • Basic accuracy and resolution 0.5°C.
  • Centigrade (°C) or Farenheit (°F) scale.
  • Data logging on easily readable text file.
  • Sample interval 10 seconds, 1 minute, 5 minutes, 30 minutes or 60 minutes.
  • One or two temperature sensors.
  • No calibration required.

Hardware

The ATTiny RS232 project Board works as the interface between the DS1621 Temperature board and the PC. The DS1621 Temperature board is connected to PortB of the ATTiny2313 microcontroller. The DS1621 measures the temparature and the microcontroller contains the firmware for passing through the measured temparature to the serial port. The AVR Projects Board has an on board voltage convertor, the MAX232, to convert the TTL signals of the microcontroller to the RS232 signals of the serial port. The ATTiny RS232 project board has a 9-pin DB connector to hook the board to the serial port of your PC.

The DS1621 uses the I2C interface also called Two Wire Interface (TWI) to communicate with the microcontroller. The DS1621 has three address pins up to in total adress eight devices. The eight devices can be connected in a daisy chain and the address of each device needs to be configured with the address pins.

Microcontroller Firmware

The software for the microcontroller is written with the AVR BASOM compiler. The ATTiny2313 microcontroller has to be programmed with this software. The output of the software can also be read out with a terminal program HyperTerminal.

PC Software

The PC software is written in Microsoft Visual Basic.Net 2003. Below you can see a screen dump of the Windows application. It shows the temperature of two DS1621 devices. In the Settings menu you can choose the COM-port you use and open and close the COM-port. In the Logging menu you can choose the sample interval time. The logging samples will be stored in a text file, so you can easily import these files in MS-Word or in MS-Excel where you can make a graph of the data. The program needs the file PORT.DLL to acces the serial port in Windows. The PORT.DLL needs to be placed in the WINDOWS/system32 folder, or in the same folder as the .exe file. The program is tested in Windows XP Home Edition, but should probably also work in previous versions of Windows. Below you see the screen dump of the program.

PC_Thermometer_scr.jpg

Downloads

 firmware for the attiny2313 mc pc_thermometer_ds1621.bas
hex file of the firmware pc_thermometer_ds1621.hex