When date/time is set or debugging done, select option '0' to come out of the menu and start functioning a s data-logger.Select desired option and follow the displayed instructions A menu will be displayed on the Hyper terminal as shown in the figure below.Green LED will glow in the circuit board.Connect the power cable and power on the circuit while keeping the push-button pressed.Set-up hyper terminal with 19200 baud, no parity, 8-bit data, 1 stop-bit and flow-control as 'None' Connect the RS232 cable with the circuit.Connect the microSD module, insert the microSD card.The LEDs are used for indications of power and recording and the push-button is used to start-stop recording.įor setting RTC date/time (or for debugging mode): The schematic also shows two LEDs and a push-button. 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. 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. The microSD module used here is from eXtreme Electronics.
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). Here, the hyper-terminal connection is required only for setting RTC date and time. The project contains RTC interface (for date and time storage), RS232 (for connection with PC) and a microSD module.
Here is the schematic (click on the images for larger view or download PDF): 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
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.
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. This project is an example of how to use the microSD FAT32 library presented in my earlier post. A snapshot of the excel file is given later in this post. 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. This project can be used to interface 8 different sensors with ADC of ATmega32, similar to the LM35 used here. One channel is used for reading temperature from LM35 sensor and remaining channels are used for simply reading voltages and storing them. The data is received from in-build 8-channel ADC of ATmega32. Here, ATmega32 is used for data collection and microSD interface.
Herein, how do you determine the size of a sector?
A gigabyte is equal to 4,194,304 MPE sectors, 524,288 hardware PA-RISC pages or 262,144 software MPE/iX pages. A gigabyte (GB) is a measure of memory space equal to 1024 megabytes or 1,073,741,824 bytes (2 to the 30th power). Secondly, how many sectors are there in 1gb? Gigabyte. Likewise, how many bytes are in a sector? Multiplying this times the number of cylinders, we get the bytes for the disk. Multiplying this times tracks per cylinder, we end up with bytes per cylinder. The first way would be to multiply bytes per sector times sector per track.