Search Your Query

Custom Search

Friday 20 May 2011

AVR Temperature Meter


This is a four-channel temperature measurmet adapter that works without external power supply. It will suitable for measureing temperature and logging its data with a PC. The circuit diagram is very simple and no adjustment is required, everybody will able to build it with ease. These great project created by ChaN.
AVR Temperature Meter
HARDWARE

Micro-controller

I chose an Atmel ATtiny15L for this project. It is the only device that has a built-in 10bit A-D converter in the 8 pin AVRs. The A-D converter has a bandgap reference and differencial amplifire as its front-end. The AVR core is clocked by only internal RC oscillator (calibrated to 1.6MHz), any other clock souce cannot be used. Also 25.6MHz clock source that 16x multiplied from core clock is available for timer/counter. This means that a fast PWM output can be generated. Therefore the ATtiny15L has good analog I/O capabiltity.
In this project, the A-D converter is used as four channels, single-ended, no gain and VREF from Vcc configuration. However RSTDISBL fuse must be programmed in order to use pin #1 as one of the analog inputs, an AVR programmer that can program in HVS mode is required.

Power Supply


The devices that works on the COM port without external power supply, such as serial mouse, are powered from the COM port. When an application program opens COM port, ER and RS signals will go high. The high level voltage is from 6V to 12V at most PCs, and it can supply 5mA at least. This is sufficient for low power micro-controllers.

Sensors

Four 103AT precision thermisters are used as temperature sensor. Its variation is very small, its temperature - resistance error at room temperature is ±0.3°C. The error of series resisters should be within ±0.5% to enable calibration-free design.

FIRMWARE:
The program only respond the values of each channel to the PC by trigger command. The temperature - resistance curve of the thermister is not linear so that the raw A-D value is linearlized and converted to temperature value in software process. When replace the thermister with any oters, the linearlization table in the source code must be re-built. The raw A-D value can also be read, it will be used as voltage meter.
The trigger command is one "T" or "R" character, returened results are the temperarute for "T" command, raw A-D value for "R" command. Each value is separated by a comma and terminated by a <CRLF>.

APPLICATIONS:
Sending commands with any program and logging the returened data to a file directly creates a CSV file. It can be read into most spleadsheets. However if you have a Microsoft Excel, it can be used as a data logger without any external program.
The Microsoft Excel has a subset of the Visual Basic that called VBA. This can be used as a control program to capture data and log it into the worksheet... it's great! I had not known that the Excel has this feature. This is one of the good solutions of automatic measurement.
The data in the sample worksheet is logged temperature in the refregerator for a day. The thermostat operation and defrosting oeration can be read well from the graph.
Alt-F11 opens the built-in Visual Basic Editor. The program might not readable because it is controling COM port and timer with API for portability. Any additional component is not used, only an Excel is required for this exsample VBA project.
Port-Powered
TECHNICAL DATA:




No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...