================================================================================================================================================

Wednesday, July 4, 2018

UART based 8-Channel Data-logger with temperature log




Hi Friends,
        here is one more data-logger circuit, which will be useful for some who have not much ventured into the ADC for datalogging or RTC or i2c communication, etc. This one is based on ATmega32. It has 8-channel 10-bit ADC. Hence, providing us with 8-channels with 0 to 5V voltage level measurement. The circuit also has on-board RTC (based on DS1307) to log the data with time-stamp. Data is logged via UART. The circuit has 3-pin UART connector, which can be used to connect to PC/laptop using UART(TTL) to USB serial converter, commonly available in electronic markets.
      Also, there is a thermometer IC, DS1621, which is connected via i2c (along with the RTC IC) and provides temperature measurement from -55 to +125 Deg. C. The temperature is also sent along with the voltages to the UART for logging.
      
(Note: The circuit also has the microSD card module connector, for logging the data into the card in FAT32 file format, instead of sending it to UART, but that part is not used here, as this initial part is more intended for new learners. Part-2 with microSD will be included shortly in the next update. Meanwhile, you may refer to my earlier post on microSD related posts, here and here, for getting some details and code for SD card/ FAT32 format).

    The circuit schematic is given in the following figure (pdf file can be downloaded from here):


     At power on, the current date and time are displayed on the first raw of LCD. The temperature and the logging ON/OF status is displayed on the second raw. A green LED is also turned ON as an additional status of the proper power-up of the microcontroller .
     The data measurement can be started anytime by pressing the 'SET' button (keep pressed till the red LED turns ON). The recording ON status is displayed on LCD as well as by the glowing red LED. During this recording, at a regular interval (as defined in the code), the microcontroller gets the temperature from DS1621, measures the 8 voltages connected to 8 of its screw-terminals, w.r.t GND on the 9th terminal (as shown in the schematic), and forms a string which includes line number, time (hh:mm:ss format), temperature and the 8 voltage values, in a comma separated format. This string is then sent to UART, which can be logged into a file or seen on a terminal program in the PC/laptop using the serial-to-usb converter.
     The operation is shown in the following screen-shot of the Proteus simulation (in the simulation, the temperature set in the IC and displayed by the LCD has difference of 1.5C, as the code applies the correction factors read from the IC to the temperature reading and then displays it, which represents the actual temperature):


     (Note: The Proteus simulation files are included in the source code folder download at the end of the post).
   
     The circuit in operation, with logging ON and OFF, is shown the following pics:




        The actual UART output captured on a terminal of the Atmel Studio during the logging ON,  is shown in the left side image, where temperature shown is 30.3 C, channel-2 was connected with +5V (VCC) and channel-7 was connected with the Li battery cell of the RTC. Rest of the channels were kept open at the screw-terminals.

      The RTC date and time can be changed using the three push-buttons, similar to the procedure shown in my previous post of the RTC based relay-control. The procedure is given here:











For setting RTC Date/Time:
  1. Press 'SET' button and Power ON the circuit, keeping the button pressed while the circuit is starting.
  2. "RTC Setting.." message will be displayed on the first row of the LCD.
  3.  Release the 'SET' button "Date: XX" will be displayed on the second row of the LCD, where XX is the existing current date as per the RTC.
  4.  Press 'UP' or 'DOWN' button to increase or decrease the Date. When desired date is displayed, press 'SET' button to store it
  5. "Month: XX" message will be displayed, where XX is the current month as per the RTC
  6. Press 'UP' or 'DOWN' button to increase or decrease the Month. When desired month is displayed, press 'SET' button to store it
  7. "Year: XXXX" will be displayed, use 'UP'/ 'DOWN' buttons to change the year and then press 'SET' button to store the year value
  8. Then "Hour: XX" will be displayed, set it as per the previous steps and also set next "Minutes: XX" similarly, and store using 'SET' button.
  9. When the Minutes is set, "RTC Setting" mode is over and normal operation resumes, where the LCD will display Date and time in the first row and temperature and log:OFF status in the second row.
     The circuit hardware is not much complicated, can be assembled on a general purpose PCB also. I'm including here the Gerber files also, along with the other downloads, if it's required.

Downloads:

1. Source Code project files with Simulation files (Atmel Studio-7 and Proteus formats)

Datasheets: ATmega32,   DS1307,   DS1621

Enjoy!!

Regards,

CC Dharmani
ccd@dharmanitech.com

14 comments:

Edward Lewis said...

Hi
I read your post and found it quite interesting.
The post you shared is very unique and informative.
Thanks for sharing such a useful post.
mcafee.com/activate
office.com/setup
norton.com/setup
mcafee.com/activate

A. Karaman said...

Hi,
I am following your interesting and very useful projects.
Now, I look forward to see the new version logger with SD card and DS1621 sensor together.
Of course it would be better with LCD display too.
Thank you

charlienoahim said...

Thank you so much for sharing these amazing tips. I must say you are an incredible writer, I love the way that you describe the things. Please keep sharing.

For more information visit on office.com/setup | office.com/setup | office.com/setup | Norton.com/setup

Ada Smith said...

You know after a hard day I decided to have fun and play games of chance I climbed a bunch of sites and only on this I understood what was happening prosperous best rated online casinos now I sit and spend all the time on this site

Stephen Kery said...

Thanks for sharing this helpful information.
Cheers

Unknown said...

It really makes me happy and I am satisfied with the arrangement of your post. You are really a talented person I have ever seen.
Norton.com/Setup

Sofia Williams said...

It really makes me happy and I am satisfied with the arrangement of your post. You are really a talented person I have ever seen.
Norton.com/NU16

RouterLogin said...

I love this post. Thanks for starting it. Loved the thought that was put behind writing this. I'm glad. :)

Regards.

norton.com/setup said...

This is really an amazing article. Your article is really good and your article has always good content with a good powerpoint with informative information.

norton.com/setup

mcafee.com/activate

office.com/setup

Anonymous said...

Cool post, loved it!

Regards: https://robloxfever.com/

office setup said...

Download and install your Norton product. Sign In to Norton. If you do not have a Norton account, click Create account and complete the sign up process. In the Norton Setup window, click Enter a New Product Key. To enroll in Automatic Renewal Service for your Norton subscription, Get Started

norton.com/setup
mcafee.com/activate
office.com/setup

norton.com/setup said...

This is really an amazing article. Your article is really good and your article has always good content with a good powerpoint with informative information.

norton.com/setup

mcafee.com/activate

office.com/setup

Allan Smith said...

I really happy found this website eventually. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog.

Norton.com/setup – Download, install and activate Norton antivirus setup to get robust security at
www.norton.com/setup. We Will help you to redeem product key.
Norton.com/setup - Enter Your Product Key Here

norton.com/setup

norton help

roadrunner email

webroot antivirus

martinapcexpert said...

I wish to say that this article is an amazing, interesting and nice written. Thanks for sharing this article with us and I would like to look more posts like this.
Norton.com/myaccount