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 Project 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).
- 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.
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.
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.
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 DS1621devices. 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.
For more details, click: PC Thermometer Using ATTiny2313