Skip to content

This program is supports of an ongoing series of DIY 'Classroom Logger' tutorials from the Cave Pearl Project. The idea is to provide a starting point for self-built student projects in environmental monitoring courses.

Notifications You must be signed in to change notification settings

LeandroCannizzaro/2-Part-ProMini-EEprom-Data-Logger_2022

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 

Repository files navigation

2-Part-ProMini-EEprom-Data-Logger_2022

This program supports an ongoing series of DIY 'Classroom Logger' tutorials from Edward Mallon & Dr. Patricia Beddows at the Cave Pearl Project. The idea is to provide a starting point for student projects in environmental monitoring courses and/or thesis level research.

The tutorial that matches this code can be found at:
https://thecavepearlproject.org/2022/03/09/powering-a-promini-logger-for-one-year-on-a-coin-cell/
with a detailed building guide video at:
https://www.youtube.com/watch?v=58ps9fUyY0Q&t=0s&ab_channel=EdwardMallon


This 'low power' 2-module iteration runs the logger from a CR2032 coin cell and uses EEprom memory to store sensor readings. This necessarily involves several power optimization steps which add significant complexity to the base code (as compared to previous versions) but hopefully everyone can read through the code and understand what is happening from the extensive comments. There are several manual configuration settings controlled by #define statements at the start of the program, and the logger will not be able to read the coincell voltage properly until you tweak the InternalReferenceConstant.

Data download & logger control are managed through the IDE's serial monitor window at 500000 baud. The logger WILL NOT START taking readings until those serial handshakes are completed via the UART connection.

Note that all the readings are initially buffered in opdDataBuffer[16] & sensorDataBuffer[16] arrays so there won't be any data in the EEprom until those ram buffers get transfered. With the 1-byte RTCtemp only default configuration you will have to wait 16* sampleInterval minutes before that happens. The default 4k eeprom on the rtc module stores 4096 of those readings so takes ~2.8 days at 1min interval before it is full. (at which point the logger shuts down)

The most important rule to follow when adding new sensors is that the buffer arrays can only handle 'powers of 2' additions of 1, 2, 4, or 8 bytes. Odd byte quantities per sensor record (other than one) and you end up with page boundary issues in the EEprom.

Note: This script will still run on the 3-module "Modules & Jumper Wires" loggers described in the original Sensors paper: http://www.mdpi.com/1424-8220/18/2/530 and provides a 'no SD card' method of extending lifespan on the 2020 classroom logger described at https://thecavepearlproject.org/2020/10/22/pro-mini-classroom-datalogger-2020-update/ where multiple I2C eeproms can be added easily via the breadboard(s)

About

This program is supports of an ongoing series of DIY 'Classroom Logger' tutorials from the Cave Pearl Project. The idea is to provide a starting point for self-built student projects in environmental monitoring courses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%