Single Chip Temperature Data Logger

Introduction

A data logger is a device that records measurements over time. The measurements could be any physical variable like temperature, pressure, voltage, humidity, etc. This project describes how to build a mini logger that records surrounding temperature values. It has following features:

– Uses just one 8?pin chip, so very compact size circuit.
– Temperature range: 0 to +125Β°C.
– Can store up to 254 measurements.
– Sampling interval options: 1 sec, 1 min, 10 min
– Reset feature to clear all previous measurements.
– Serial transfer of recorded measurements to a PC
– Three tactile switches for user inputs and a LED indicator.

Single Chip Temperature Data Logger Description

The beauty of this project is that it uses just a single chip for logging. It is PIC12F683, an 8?pin microcontroller from Microchip. PIC12F683 has six general purpose I/O (GP0?GP5, GP3 is input only) pins, and 2K x 14 Flash program memory
with 256 bytes of internal EEPROM.

Temperature will be measured with a DS1820 temperature sensor. DS1820 is a one wire digital temperature sensor from Dallas Semiconductor (now MAXIM). The operating temperature range of the device is -55Β°C to +125Β°C with an accuracy of Β±0.5Β°C over the range of -10Β°C to +85Β°C. The temperature sensor output is 9?bit Celsius temperature measurement, and so the temperature resolution corresponds to the least significant bit, and which is 0.5Β°C. But in this project we will use only the most significant eight bits. Therefore, the temperature resolution will be 1Β°C. The measured temperatures will be recorded into the internal EEPROM memory of PIC12F683.

The first location of the internal EEPROM will store the sampling interval of data logger. Sampling interval defines the time gap between two successive measurements. This project will have 3 options for sampling time: 1 sec, 1 min, and 10 min. These are user selectable. The second location of EEPROM will store the number of measurements recorded so far. And the remaining 254 EEPROM locations will store 8?bit temperatures. So, using 10 min sampling interval, 254 bytes of EEPROM will provide data logging for 42 hours. The recorded measurements can be sent to PC at any time through a serial link at 9600 baud.

User Inputs

There will be three tact switches for user inputs, namely Start, Stop, and Send/Reset. The three switches will be able to accept the following 4 user requests.

1. Start: When β€˜Start’ button is pressed, data logging starts.
2. Stop: Once the β€˜Stop’ button is pressed, data recording will stop.
3. Send: Transfer data to PC through serial port.
4. Reset: Holding the β€˜Send’ button for 2 sec or more clears the internal EEPROM memory.

Single Chip Temperature Data Logger SchematicSampling Time Selection

 

The sampling interval can be selected as 1 sec, 1min, or 10 min using the same three switches. Suppose if we need 1 min sampling time, first turn OFF the power, then hold the β€˜Stop’ button, turn the power ON, and wait till the LED glows. Once the LED glows, release the button, and the sampling interval will be set to 1 min. The new set sampling time will be updated to EEPROM location 0 so that in case of power failure, the previous sampling time will be restored. Similarly, use β€˜Start’ and β€˜Send’ buttons for 1 sec, and 10 min sampling intervals respectively.

LED Indicator

Every time the user presses input buttons, LED glows for a moment to indicate that the input is accepted. It also blinks thrice every time EEPROM Write operation takes place. It also blinks at the beginning when the power is turned β€˜ON’. It also glows when the EEPROM memory is full.

For more detail: Single Chip Temperature Data LoggerΒ 


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

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.