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

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 (also Check out my this post for updated version of this project with 16x2 LCD and DS1621 temperature sensor

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

New Version: Check out my this post for updated version of this project with 16x2 LCD and DS1621 temperature sensor. Project Code with FatFs library is also shared there.

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

432 comments:

«Oldest   ‹Older   401 – 432 of 432
Anonymous said...

This is one of the most incredible blogs Ive read in a very long time. The amount of information in here is stunning, like you practically wrote the book on the subject. Your blog is great for anyone who wants to understand this subject more. Great stuff; please keep it up!
https://recruitmentfield.com/nigerian-army-shortlisted-candidates

Emmanuel Essien said...

Nigerian Army Shortlisted Candidates

IIBM Institute of Business Management said...

https://iibminternships.com/get-in-touch-2/

Get In Touch With Us For All Your Quiers And Doubts About Courses

Get full details on the Internship Course In IIBM, Fees, Admissions, Career Options, Reviews, Exams, And Much More Information Call IIBM Internships Today!

IIBMINTERSHIP said...

https://iibminternships.com/post-graduate-program-in-project-management/

Post-Graduate Program in Project Management from IIBM Internships

Become certified intern in Project Management through our well developed Post graduate Program in Project Management in the shortest time from 5-6 months

IIBMINTERSHIP said...

https://iibminternships.com/post-graduate-program-in-business-analytics-data-science/

Online Internships with Post Graduate Programs

Get best internships program from IIBM Internships under the supervision of industrially-trained course experts.

IIBMINTERSHIP said...

https://iibminternships.com/post-graduate-program-in-logistics-and-supply-chain-management/

Post Graduate Logistics and Supply Chain Management Program from IIBM Internships

Become certified intern in Logistics and Supply Chain Management through our well developed Post graduate Program in Logistics and Supply Chain Management in the shortest time from 5-6 months

IIBMINTERSHIP said...

https://iibminternships.com/post-graduate-program-in-cloud-computing-and-devopes/

Post Graduate Program in Cloud Computing and Devopes from IIBM Internships

Internships and training in Cloud Computing and Devopes from IIBM Internships is an industry oriented course which integrates PG Program, Internships & 100% Placement.

IIBMINTERSHIP said...

https://iibminternships.com/post-graduate-program-in-cloud-computing-and-devopes/

Post Graduate Program in Cloud Computing and Devopes from IIBM Internships

Internships and training in Cloud Computing and Devopes from IIBM Internships is an industry oriented course which integrates PG Program, Internships & 100% Placement.

Anonymous said...

Nigerian Police Recruitment

IIBM Institute of Business Management said...

https://iibminternships.com/how-can-a-resume-make-or-break-your-job-search-strategy/

Make Your Resume As Professional & Get Your Dream Job

Make Your Resume As Professional & Get Your Dream Job Through IIBM Internships Provides For Business Marketing Skills To Know More Get in Touch With Us Today!

zack said...

I'm truly dazzled about the information you give in your articles. I should state am exceptionally overpowered by your entire story. It is difficult to get such quality data online these days. I anticipate remaining here for quite a while.

www.mcafee.com/mis/retail card

Activate McAfee Internet Security

IIBM Institute of Business Management said...

https://iibminternships.com/blog/

IIBM Internships Blogs & Reports

We have a series of Internships & Placement blogs which are published at our website regularly to express the needs of the corporates.

IIBM Institute of Business Management said...

https://iibminternships.com/technical-hr-interview-questions-and-answers-for-freshers-iibm-institute/

Get Free Train Here About Technical HR Interview Q&A In IIBM

Get Free Train Here About Technical HR Interview Q&A In IIBM Through IIBM Provides For Business Marketing Skills To Know More Get in Touch With Us Today!

IIBM Institute of Business Management said...

https://iibminternships.com/job-responsibilities-in-human-resources-jobs-iibm-institute/

Learn Job Resposibilites In Human Resources Jobs In IIBM Interships

Learn Job Responsibilities In Human Resources Jobs Through IIBM Internships For Business Marketing Skills To Know More Get in Touch With Us Today!

IIBM Institute of Business Management said...

https://iibminternships.com/factors-that-are-driving-the-focus-toward-the-career-in-data-science/

Career Suppourt In Data Science To Focus Your Life Though IIBM Internships

Career Supports In Data Science To Focus Your Life Though IIBM Internships For Business Marketing Skills To Know More Get in Touch With Us Today!

Unknown said...

Udaipur Escors Service
Ambala Escors Service
Bhiwani Escors Service

Anonymous said...

Such a great content. Thank you.

Mobile App Development
Web App Development
UI-UX Design

Emmanuel Essien said...

https://recruitmentfield.com/kaduna-state-government-recruitment/

Cricket Mazza 11 Live Line & Fastest IPL Score said...

Download Cricket Mazza 11 live match cricket score app, Live Line & Fastest Score. Get Fastest Live cricket score app, Scorecard, Commentary, Match Info, and Schedules of All International & Domestic Matches, Series wise Stats, Records, Analysis and Facts, Trending News and Tweets, Recent ICC Player and Team Rankings. Also Download live cricket score apps for IOS, including Beach Cricket, Cricket T20 Fever 3D and other top answers suggested and ranked.

PLC Training in Chennai said...

DeltaV system is a digital automation system that is widely utilized by engineers and technicians for improving their work operations by harnessing today's technological advancements in an easy and intuitive way to connect with people, processes and production. But, operating DeltaV systems is challenging and requires professionals having rich experience and knowledge of these systems. Therefore a huge number of technicians and engineers pursue Emerson DeltaV DCS training to get hands on experience in installation, configuration, maintenance, troubleshooting, and operation of the DeltaV systems. Keeping this in view, Excel Automation Solutions is providing Emerson DeltaV DCS training at a 15% discount these summer holidays. This training course is conducted by the company for a tenure of 10 days that covers topics like DeltaV DCS Introduction, System Overview, DeltaV DCS Architecture Overview, DeltaV Explorer, DeltaV Operate, DeltaV Control Modules, DeltaV Program Types, Input / Output Configuration and many others. Individuals planning to advance their career in this domain can count on them for providing them an exceptional training program.
Emerson DeltaV DCS Training

PLC Training in Chennai said...

We are Specialized in Engineering / Commissioning / Services / Training Courses for Emerson Delta V DCS Systems, Emerson Delta V SIS systems, Honeywell Experion EPKS C300 DCS, ABB 800XA DCS, Siemens PCS7 DCS, FGS, Various PLC'S, Various SCADA package's, All type of Field Instruments, Bus technology like Modbus, Foundation Fieldbus, Profibus and Process Control Systems. Click Here For Visit My Site thanks ....

Emerson DeltaV DCS Training

plc training in chennai

plc scada training in chennai

plc scada dcs training in chennai

Industrial Automation training in chennai

Industrial Automation training institute in chennai



plc training institute in chennai
Good PLC Training institute in chennai
plc training with placements in chennai
plc scada training placements in chennai
PLC Training Center in Chennai

Airlinesreservation247 said...


Delta airlines reservations


delta airlines reservations phone number


jet blue airlines


Aeromexico Airlines



Alaska Airlines bookings



Alaska Airlines Reservations Number

PLC Training in Chennai said...
This comment has been removed by the author.
PLC Training in Chennai said...

EXCEL Automation Solutions, Chennai has been acquired by INFERCON Automation Pvt. Ltd., Chennai, an “Indian subsidiary of INFERCON Inc, Houston, Texas”, offering advanced control solutions to process and manufacturing industries.

EXCEL Automation Solutions has been in the field of Industrial Automation & Process Control for almost a decade and has trained over 5000+ Automation & Process Control Engineers flourishing in various fields of Control & Automation including PLC, SCADA, DCS, Process system networking, and IoT.

With this merger between INFERCON Inc, our objective is to step up our activities to serve a larger pool of International clients on Training and Integration services.

Emerson DeltaV DCS Training

plc training in chennai

plc scada training in chennai

plc scada dcs training in chennai

Industrial Automation training in chennai

Industrial Automation training institute in chennai

Industrial Automation training institute in chennai

DeltaV DCS Training in Canada


Anonymous said...

plc training in chennai

plc training in chennai

Industrial Automation training institute in chennai

Industrial Automation training institute in chennai

Emerson DeltaV DCS training in Canada

plc training in chennai

jetblueflyhighs said...

jetblueflyhighs.com is a one-stop platform that facilitates flyers with incredible deals and discounts. Get hands on jaw-dropping deals and fly without shelling out your dollars. Endless flight options are available, pick the right one and feed the wanderer in you to the maximum extent.

Jetblue Telefono
Jetblue booking
Jetblue book a flight
Jetblue Flights Tickets
Jetblue airways group travel
Jetblue student discounts
Jetblue vacation Packages
Jetblue airways mint upgrade
Jetblue low fare Calendar

Daniel Jackson said...

United Airlines Booking
Alaska Airlines Booking
KLM Airlines Booking
Jetblue Book a flight
Copa Airlines Flights

Daniel Jackson said...

Southwest Airlines Booking
United Airlines Booking
Alaska Airlines Booking
KLM Airlines Booking
Jetblue Book a flight

earnersweb said...

for your music enjoyment music plug

service said...

It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. Status video free download for whatsApp

i customer service number said...

The Best Places to explore in Rest of January 2022
Five ways to save money while flying on Aeromexico Airlines
How to communicate with a live person on Spirit Airlines?
Ten Top Things to do in Oakland
Everything You Need To Know Before Visiting The Yucat√°n
How do I get a refund from Spirit Airlines?
Is It Safe to Fly Through a Storm?
How to book a flight ticket with a travel voucher on Spirit Airlines?
How do I speak to someone at Air Canada?

Unknown said...

How to Play Pai Gow Poker | BetRivers Casino - Wolverione
Pai Gow https://deccasino.com/review/merit-casino/ Poker is an online version worrione of gri-go.com a traditional table game in bsjeon which wooricasinos.info players place bets in the background. Pai Gow Poker uses only the symbols from a

«Oldest ‹Older   401 – 432 of 432   Newer› Newest»