Tag Archives: data logger

This SD card logger library fits on an ATmega8

David Gironi has designed an SD card logger library – with log rotation – that neatly fits on an ATmega8 microcontroller (MCU). Precise date and time are obtained via a DS1307 chip.

“This library implements an SD card data logger that runs on [an] ATmega,” Gironi explained in a recent blog post.

“It has a small footprint, so it can be loaded on an ATmega8, leaving space for user code; [while also] supporting SD and microSD cards formatted with FAT16.”

According to Gironi, the “Petit FAT File System Module” by ChaN is used to facilitate write capabilities to the SD card.

“We had to format the card we would like to use with FAT16 and then load it with a predefined number of empty files of a know dimension,” Gironi continued.

“Once we have files on the card, we can write on those files. You can create empty files by using the python helper provided in code.”

Configuring file dimension and number is executed on the firmware side, although the file dimension cannot be greater than 2^16 bytes as a uint16_t type variable is used to store this information. Similarly, the max number of files is limited to 256, because a uint8_t variable is employed.

“Given the number of files used by the logger and every file size, we just have to record the last written position and the file number we are using to implements the log rotation,” added Gironi. “When a file is filled up with logged data, it skips to the next one, if the file is the last one, we go back to first.”

Interested in learning more? You can check out the project on David Gironi’s official page here.

Agricultural monitoring with Atmel AVR

Calibit is a digital caliper equipped with an AVR-powered data logger that allows the device to efficiently monitor hectares of orchards.


The datalogger – based on an 8-bit Atmel microcontroller (MCU) – features 128Kb EEPROM memory, LCD display, USB/UART slots, watch/calendar, as well as a rechargeable lithium battery with integrated safety system and temperature control.

“[This] new technology promotes the monitoring of fruit growth as it simplifies data collection – 15-20 minutes is all it takes to gather enough data to monitor each hectare,” a FreshPlaza writer explained in a recent article.


“[Plus, users can] create multiple measuring sessions to group data and improve management, [with] the USB cable and software enabling data downloads in CSV format.”

Although Calibit was originally designed to monitor fruit growth, the platform is capable of supporting a wide-range of applications including:

  • Cooperatives and collection warehouses to sample fruit before processing
  • Plant nurseries to verify the diameter of striplings, branches and trunks
  • Mechanical and carpentry workshops
  • Scientific laboratories


Interested in learning more? You can check out Calibit’s official product site here. Readers may also want to browse through some of our previous stories on technology and farming including “The Internet of Things, Stalk by Stalk,” “Smart Urban Aquaponics in West Oakland“, “DIY Farming with Atmel and Arduino” and “Open Source Aquaponics with APDuino.”