pekdb RTC Logger

About
A small logger has been created for saving time stamps at certain events. The logger has two opto coupled input channels and one temperature sensor which are used as triggers. When one event occure the logger saves the current time and the name of the trigger.

Features of the logger:
- Two opto coupled digital input channels, can trig on both flanks
- Temperature sensor
- Real time clock with resolution of one minute
- Max one saved timestamp for each trigger per minute
- Small size (compare the 9 pol DSUB with the rest of the electronics)
- Supply voltage between 1 and 5 volts (one or two AA/AAA batteries are optimal)
- Draws around 300 uA when using 3V supply
- RS232 interface for configuration and transferring of saved values (300 bps)
- Interface and communication is powered by the host
- 256 kBit none volatile memory which is configured into three memory banks of choosen size, one for each trigger
- Software for MS
Windows 98/NT/2k/XP

Hardware
The picture below is one early prototype of the logger. The heart of the system is an Atmel microcontroller, ATMega88.



Click here to open schematic.pdf, the circuit diagram of the logger.

The none volatile memory and the temperature sensor share one I2C-bus for communication. By using different addresses the microcontroller choose between the two circuits.

Communication with other systems are powered by the RS232 interface itself. By using low-power components and enable one of the control signals the logger saves it's own power. In the future the USB interface may be integrated instead of RS232.

The input channels are opto coupled for two reasons; the logger is safe from wrong signals and the signals can be of much greater amplitude than the supply voltage.

Software
Software has been developed for MS Windows. With the program you can configure the logger and transfer saved values. Below is one picture from the program.



The program has three buttons which are for communication; Test Com, Load and Clear.

Test Com: This button is testing the communication against the logger. It receives the current version of the logger firmware.
Load: This button downloads all the saved timestamps.
Clear: This button clears all saved values and transfer the configuration data.

As you can see WinLog has one progress window. In this window you can follow the communication when pressing the Load or Clear buttons.

Configuration is done by editing an ASCII text file, see one example below.


% WinLog Configuration File

[MEMORY]
trig0start=0
trig0end=8190
trig1start=8192
trig1end=16382
trigtstart=16384
trigtend=32766

[LOG]
logtrig0=1
logtrig1=1
logintervalt=5


Below [MEMORY] you can edit the areas for each sensor in the volatile memory. Each numer correspond to one byte and one saved timestamp contains two bytes.
Below [LOG] you can edit which triggers to use. Logtrig0 and Logtrig1 correspond to the two opto coupled triggers. Logintervalt is the time in minutes to use between each temperature measurement. A value of zero turns off the actual trigger.

Loaded values are saved in an ASCII text file, see example with saved temperatures below.



Logger values

Timestamp: 2005.08.30 17:59

Trigger Time Signal
Temp 2005.08.30 18:04 22
Temp 2005.08.30 18:09 22
Temp 2005.08.30 18:14 22
Temp 2005.08.30 18:19 22
Temp 2005.08.30 18:24 21
Temp 2005.08.30 18:29 21
Temp 2005.08.30 18:34 21
Temp 2005.08.30 18:39 21
Temp 2005.08.30 18:44 21
Temp 2005.08.30 18:49 21
Temp 2005.08.30 18:54 21
Temp 2005.08.30 18:59 21
Temp 2005.08.30 19:04 21
Temp 2005.08.30 19:09 21
Temp 2005.08.30 19:14 21


The text file contains three columns, divided by tab. The first column is the name of the trigger (0, 1 or Temp). The second column is the time of the saved value. The logger is configured to save the temperature in intervals of 5 minutes, look at the configuration file above. The third column is the value of the trigger, in this case the temperature. If it was one of the digital triggers the third column shows the flank of the trigger (0 or 1).

Future
- USB interface
- Serial flash-memory instead of EEPROM
- More channels
- Measure analog voltages
- Faster communication
- Draw less power
- GSM
Copyright (c) 2004 PerErik Klarenfjord, All Rights Reserved
All trademarks are the property of their owners
Any actions you take after reading this website are your own responsibility
MADE IN SWEDEN
Hosted by GMQ