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

Tuesday, May 10, 2011

microSD ATmega32 Data-Logger



Hi friends,

aim of this project is to present a way to store a large quantity of data into microSD card in files with FAT32 format. Here, ATmega32 is used for data collection and microSD interface. The data is received from in-build 8-channel ADC of ATmega32. One channel is used for reading temperature from LM35 sensor and remaining channels are used for simply reading voltages and storing them.

This project can be used to interface 8 different sensors with ADC of ATmega32, similar to the LM35 used here. The data is stored in CSV (comma separated values) format, which can be read using a PC/Laptop with Microsoft Excel or other compatible software. A snapshot of the excel file is given later in this post.

This project is an example of how to use the microSD FAT32 library presented in my earlier post. In that post, the files were created using hyper-terminal and entering data with the PC keyboard, since that demonstrates the file creation and it's easy to debug. But many users have requested to make the file creation independent of the terminal, done inside the microcontroller, so I'm showing here how to use those functions independent of terminal. If you have directly landed on this page, it would be more helpful if you visit the original post first as it would be a better starting place for learning SD or FAT32 functions.

Here is the schematic (click on the images for larger view or download PDF):

The project contains RTC interface (for date and time storage), RS232 (for connection with PC) and a microSD module. Here, the hyper-terminal connection is required only for setting RTC date and time. Once the date/time are set, the RS232 connection is not required anymore for normal data-logging operation (It can be used for debugging purpose if there is a problem).

The microSD module used here is from eXtreme Electronics.
The module is shown in the figure here. Other than the microSD socket, this low-cost module also contains on-board 3.3v regulator for the microSD card, a 5v-3.3v level converter and other safety features required for the card. This module is used here as it provides a stable interface and makes the the card compatible with 5v supply and 5v signals of microcontroller.

The module is available at: http://store.extremeelectronics.co.in/MicroSD-TF-Module.html

The schematic also shows two LEDs and a push-button. The LEDs are used for indications of power and recording and the push-button is used to start-stop recording.

Operation of the circuit:
-----------------------------------------------
For setting RTC date/time (or for debugging mode):
  • Connect the microSD module, insert the microSD card
  • Connect the RS232 cable with the circuit. Set-up hyper terminal with 19200 baud, no parity, 8-bit data, 1 stop-bit and flow-control as 'None'
  • Connect the power cable and power on the circuit while keeping the push-button pressed
  • Green LED will glow in the circuit board
  • A menu will be displayed on the Hyper terminal as shown in the figure below. Select desired option and follow the displayed instructions
  • When date/time is set or debugging done, select option '0' to come out of the menu and start functioning a s data-logger
  • At this point, the RS232 cable can be removed


Operation as Data-Logger:
  • Connect the power cable and power on the circuit
  • Green LED will glow
  • Whenever the data-logging is required, press the push-button
  • Red LED will glow, indicating that the recording has started
  • To stop recording, press the push-button again, recording will stop and red LED will turn off
  • Files stored in the card can be read using a PC card-reader or using hyper-terminal with the circuit started in debugging mode

The operation is very simple as it uses just one push-button and an LED indication. In case of any error in accessing the card, red LED will blink continuously. In such a case, you can start circuit in debug mode (with terminal) and see the error messages.

Files are stored with the date as a name and .CSV extension. For example, data-logging done on 10 May 2011 would be stored in "10052011.CSV" file. Since the date is the name of file, everyday a single file is created and all the data recording done in a day goes into single file, no matter how many times the recording is stopped/started. First column of the file shows date, second shows time and next 8 columns show data from the 8 channels.

A file created during testing is shown in the figure below, where 5 sec interval was set for measurements (click on the image to enlarge it). Here channel-0 was used for LM35 temperature sensor, and remaining channels measure voltage. 5v was connected to channel-1 and 3v Li cell was connected to channel-3 (Channel 2 & 4 show some small voltages due to noise from voltages connected to nearby channels, which can be corrected by using bypass caps).


The interval between two measurement cycles is defined in main.c file, which can be set as per the user requirement. Basically, the program forms a dataString in every measurement cycle and appends this string to the file, if the file already exists or it creates a new file (for example, during the first recording in a day). You may go through the comments in the source code file for more info.

Note: Make sure that RTC circuit is properly connected, otherwise the code will simply hang waiting for receiving date & time from RTC

Download project files
--------------------------------------
The source code is written in AVR-GCC format using winAVR with AVRStudio-4, complete AVRStudio project folder can be downloaded from here:

- Download Source Code

Download schematic:
- Schematic (PDF)
- Schematic (EAGLE)

References:
--------------
Visit my earlier post for the references on SD card & FAT32 which are given at the end of the post

230 comments:

«Oldest   ‹Older   201 – 230 of 230
Smith said...

mcafee.com/activate Online Help – Step by Step guide for McAfee Activate, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Activate McAfee product. Just fill the form below and will get in touch with you as quick as possible.mcafee.com/activate

Smith said...

Enter Key for Office.com/setup, after purchasing Office from visit office.com/setup, sign in to your www.office.com/setup account then enter product key for Office Setup.
office.com/setup

Smith said...

mcafee.com/activate Online Help :– Step by Step guide for McAfee Activate, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Activate McAfee product. Just fill the form below and will get in touch with you as quick as possible.mcafee.com/activate

Smith said...

office.com/setup Online Help – Step by Step guide for office Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup office product.office.com/setup

Smith said...

Enter Key for Office.com/setup, after purchasing Office from visit office.com/setup, sign in to your www.office.com/setup account then enter product key for Office Setup.office.com/setup

rahul gupta said...

Norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product.

norton.com/setup

rahul gupta said...

Norton.com/setup Online Help – To enable this protection for your Windows or Mac PC, all you need to do is download, install and activate the Norton Setup. But, before you start with the downloading process, remember to uninstall the already installed security software or antivirus (if any) from your device. This is mandatory to avoid any software conflict issue.

norton.com/setup

rahul gupta said...

Norton.com/setup Online Help – To enable this protection for your Windows or Mac PC, all you need to do is download, install and activate the Norton Setup. But, before you start with the downloading process, remember to uninstall the already installed security software or antivirus (if any) from your device. This is mandatory to avoid any software conflict issue.

norton.com/setup

john wick said...

Microsoft office has a different version, and the entire version has the different setup file office.com/ set up . Some of the version is Office 2013, Office 2016 and Office 365 etc. Go to www.office.com/setup and redeem your key.here are multiple manufacturers making printers for home and office use with varied range as printer series per the need and affordability of different customers. Printer Tech Support. It has become one of the most useful computer hardware devices that allow people to convert computer generated typescript into a physical printed document. Norton is one of the most reliable antivirus providers in the market. Norton is delivering top rated protection from mobile devices and computers. Norton has 3 antivirus packages www.norton.com/setup .mcafee.com/activate McAfee have the complete set of features which can protect your digital online and offline life of the computing devices, and it not only help you to protect itinstall mcafee.

Jon Don said...

Microsoft office has a different version, and the entire version has the different setup file office.com/ set up . Some of the version is Office 2013, Office 2016 and Office 365 etc. Go to www.office.com/setup and redeem your key.here are multiple manufacturers making printers for home and office use with varied range as printer series per the need and affordability of different customers. It has become one of the most useful computer hardware devices that allow people to convert computer generated typescript into a physical printed document. Norton is one of the most reliable antivirus providers in the market. Norton is delivering top rated protection from mobile devices and computers. Norton has 3 antivirus packages norton.com/setup .mcafee.com/activate McAfee have the complete set of features which can protect your digital online and offline life of the computing devices, and it not only help you to protect it install mcafee.

ajay kumar said...

Norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product.
norton.com/setup

office.com/setup Online Help – Step by Step guide for Office Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Office product.
office.com/setup

office.com/setup Help – Step-by-Step guide for Microsoft Office – Activate, Donwload & complete installation from office.com-setup.de online. We are providing independent support service if in case you face problem to activate or install Microsoft office product.

Norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product.
norton.com/setup

Norton.com/setup Online Help – To enable this protection for your Windows or Mac PC, all you need to do is download, install and activate the Norton Setup. But, before you start with the downloading process, remember to uninstall the already installed security software or antivirus (if any) from your device. This is mandatory to avoid any software conflict issue.
norton.com/setup

McAfee Support said...


McAfee Support

McAfee Customer Service

McAfee Antivirus Support

McAfee Technical Support

McAfee Help

McAfee phone number

McAfee Customer Support

Norton Support said...

Get Norton Setup Instantly get protection from Malware, Trojan ,Cyber Attack And all other threats,Norton Antivirus Repair all the corrupt and Infected Files . To Get Norton Security Software get in touch with Norton Support Experts with the following Link Norton.com/Setup

www.McAfee.com/Activate said...

Protect Your Computer , Network, Social Media Account And all other from hackers, infection ,Virus and other online threats, Mcafee Total Protection Software very Important to Activate or Setup with the Official Link McAfee.com/Activate
Facing Issues With Antivirus? McAfee Activate Is Just A Call Away with the following link mcAfee.com/Activate to get Total protection Online instant Help

paul william said...

mcafee.com/activate have the complete set of features which can protect your digital online and offline life of the computing devices, and it not only help you to protect it but also it can maintain the stability of your computer, increase the speed with inbuilt PC Optimisation tool.
mcafee.com/activate have the complete set of features which can protect your digital online and offline life of the computing devices, and it not only help you to protect it but also it can maintain the stability of your computer, increase the speed with inbuilt PC Optimisation tool.

ajay kumar said...

Norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product.
norton.com/setup

office.com/setup Online Help – Step by Step guide for Office Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Office product.
office.com/setup

mcafee.com/activate Online Help – Step by Step guide for mcafee activate, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup mcafee product.
mcafee.com/activate

Norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product.
norton.com/setup

Norton.com/setup Online Help – To enable this protection for your Windows or Mac PC, all you need to do is download, install and activate the Norton Setup. But, before you start with the downloading process, remember to uninstall the already installed security software or antivirus (if any) from your device. This is mandatory to avoid any software conflict issue.
norton.com/setup

Norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product.
norton.com/setup

john wick said...

Norton is one of the most reliable antivirus providers in the market. Norton is delivering top rated protection from mobile devices and computers. Norton has 3 antivirus packages
norton.com/setup
Microsoft office setup is the software setup file with this setup file you can install on your computer and some of the supported device to use Microsoft office.
www.office.com/setup
McAfee have the complete set of features which can protect your digital online and offline life of the computing devices, and it not only help you to protect it but also it can maintain the stability of your computer, increase the speed with inbuilt PC Optimisation tool.
mcafee.com/activate
mcafee card activate
If your PC is having a slow performance and you are facing problems due to this, then we can provide a solution to that. at TechSalvation, we have a highly experienced team for resolving the issues related to the slow performance of computers and laptops.
avira tech support
Our Avira Customer Support is open to those who have issues relating to downloading, updating or upgrading Avira Antivirus software. We can also assist you to confirm your product if you are not sure about its validity.
avira support number
Our Avira Refund Support is open to those who have issues relating to downloading, updating or upgrading Avira Antivirus software. We can also assist you to confirm your product if you are not sure about its validity.
avira refund

Abhay Kalmegh said...

Gr8..., your research is excellent. I'm currently building a similar project, using an Arduino nano. I'm using FAT16lib, works fine, but I will try FAT32 eventually with LM35 sensors.Keep it up.

Aman tripathi said...

Norton, one of the largest security products providers, has made it quite easy to protect your computer system from the malicious online activities, viruses, Trojan horses, scams and other threats. By installing a Norton setup to your device, you can be sure of the privacy of your important files as well as confidential information. Be it a business or consumer, Norton offers a special security software to suit the needs of everyone. You can choose anyone from the following:

Aman tripathi said...

Norton, one of the largest security products providers, has made it quite easy to protect your computer system from the malicious online activities, viruses, Trojan horses, scams and other threats. By installing a Norton setup to your device, you can be sure of the privacy of your important files as well as confidential information. Be it a business or consumer, Norton offers a special security software to suit the needs of everyone. You can choose anyone from the following:
norton.com/setup

Aman tripathi said...


Microsoft Office is basically an office suite which may involve wide variety of programs such as PowerPoint, Excel, Word, Access etc and compatible with Windows, Mac, Smart Phones etc. Microsoft Office is the basic requirement or need of the user now-a-days. Office is the best program available in the market and there is no comparison of Microsoft Office with any other software till now
Office.com/setup

Aman tripathi said...

We are providing step-by-step process of activation. McAfee antivirus enables users to safely connect to the online (Internet), and securely surf and shop the website. With McAfee All Access, McAfee Total Protection, McAfee Internet Security, and McAfee AntiVirus Plus, subscribers get complete antimalware and antispyware protection, along with an integrated firewall to ensure their computer, PC and laptop systems remain virus-free. Additionally, McAfee's virus removal service helps you easily delete viruses and spyware from your computer, PC and laptop—all from the comfort of your house.
Mcafee.com/Activate

ajay kumar said...

Norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product.
norton.com/setup

office.com/setup Online Help – Step by Step guide for Office Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Office product.
office.com/setup

mcafee.com/activate Online Help – Step by Step guide for mcafee activate, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup mcafee product.
mcafee.com/activate

Norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product.
norton.com/setup

Norton.com/setup Online Help – To enable this protection for your Windows or Mac PC, all you need to do is download, install and activate the Norton Setup. But, before you start with the downloading process, remember to uninstall the already installed security software or antivirus (if any) from your device. This is mandatory to avoid any software conflict issue.
norton.com/setup

Norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product.
norton.com/setup

bella bason said...

We are a third party technical support service. Avast Customer Support is here to help you out with the whole procedure to Download Avast Antivirus online, We not only fix your Avast Support related issues but will guide with how to get started with your new Avast product once it gets installed successfully.We at Avast Tech Support provides service to protect your PC from potential online threats and external attacks like viruses, Trojans, malwares, spywares and phishing scams. And Avast Refund. Call on our Avast Phone Number.


Norton Tech Support is a third party service provider and not in any way associated with Norton or any of its partner companies. At Norton Support we offer support for Norton products and sell subscription based additional warranty on computer and other peripheral devices.


The Antivirus Package protects one device and works on IOS, Windows, Android and MAC. It includes real time protection, virus, spyware, Malware and phishing protection.

bella bason said...

We are a third party technical support service. Avast Customer Support is here to help you out with the whole procedure to Download Avast Antivirus online, We not only fix your Avast Support related issues but will guide with how to get started with your new Avast product once it gets installed successfully.We at Avast Tech Support provides service to protect your PC from potential online threats and external attacks like viruses, Trojans, malwares, spywares and phishing scams. And Avast Refund. Call on our Avast Phone Number.


Norton Tech Support is a third party service provider and not in any way associated with Norton or any of its partner companies. At Norton Support we offer support for Norton products and sell subscription based additional warranty on computer and other peripheral devices.


The Antivirus Package protects one device and works on IOS, Windows, Android and MAC. It includes real time protection, virus, spyware, Malware and phishing protection.

Norton.com/setup
Norton.com setup
Norton setup

bella bason said...

We are a third party technical support service. Avast Customer Support is here to help you out with the whole procedure to Download Avast Antivirus online, We not only fix your Avast Support related issues but will guide with how to get started with your new Avast product once it gets installed successfully.We at Avast Tech Support provides service to protect your PC from potential online threats and external attacks like viruses, Trojans, malwares, spywares and phishing scams. And Avast Refund. Call on our Avast Phone Number.


Norton Tech Support is a third party service provider and not in any way associated with Norton or any of its partner companies. At Norton Support we offer support for Norton products and sell subscription based additional warranty on computer and other peripheral devices.


The Antivirus Package protects one device and works on IOS, Windows, Android and MAC. It includes real time protection, virus, spyware, Malware and phishing protection.

Norton.com/setup
Norton.com setup
Norton setup

bella bason said...

Avast Customer Support is a third party technical support service. We are here to help you out with the whole procedure to Download Avast Antivirus online, We not only fix your Avast setup related issues but will guide with how to get started with your new Avast product once it gets installed successfully. We at Avast Tech Support provides service to protect your PC from potential online threats and external attacks like viruses, Trojans, malwares, spywares and phishing scams.

http://avastcomsetup.com

Avast Support

bella bason said...

Norton Tech Support is a third party service provider and not in any way associated with Norton or any of its partner companies. At Norton Support we offer support for Norton products and sell subscription based additional warranty on computer and other peripheral devices.

http://supportfornorton.com
Norton Support

bella bason said...

The Antivirus Package protects one device and works on IOS, Windows, Android and MAC. It includes real time protection, virus, spyware, Malware and phishing protection. The Standard Package has the same features like the Antivirus Package plus secure pass protection ad additional protection option

http://nortoncomsetup-norton.com

Norton.com/setup

Activate said...

Activate your Antivirus https://activateantivirus.com/

«Oldest ‹Older   201 – 230 of 230   Newer› Newest»