Low power data logger
I was asked to build a low power data logger for the University of Oslo that could measure light levels on two different water depths and the water temperature. This device should be able to log entries every 30min around the clock for weeks and hopefully months.
To attchive this I needed to cut the power to everything but the real time clock. So that the microcontroller was unpowered between every log entry and only the RTC remained active. I got lot of help from LMR users on this http://letsmakerobots.com/node/33532 and in hindsight OddBot had the correct answer all along.
This is now my version 3 of the logger and here is a list of the first versions.
This was my first try at building a complete SMD based PCB. It was also the first time that I built something around an ‘Arduino’ that wasn’t just a shield on top of an existing Arduino.
The version 1 consists of;
- ATMEGA328P-AU microcontroller
- DS18B20-PAR temperature sensor
- Headers for two TCS3200 RGB light sensors
- 24LC256SN EEPROM for data storage
- DS1337S+ Real time clock
To my amazement everything worked! I could upload the bootloader and program the ATmega using a FTDI cable. All the other devices functioned as designed as well.
But… my home grown power on/off (see the forum post) did not work as I hoped. It turned the circuit on but I was not able to turn it off again.
Inspired by the fact that I was actually able to design and solder an SMD microcontroller board I changed the shutdown circuit to the P-channel MOSFET that OddBot described.
This time I also changed out the EEPROM with a micro SD card. And as the SD card needs a regulated 3.3V I added a voltage regulator.
This time the shutdown function perfect but I had a new issue. I had put the voltage regulator directly on the battery in line so the circuit drew 10mA with everything off and it all was lost in the regulator.
And the battery in the back
and with the light sensors connected
I moved the MOSFET in front of the voltage regulator, but also added a coin cell battery to power the RTC as it was cumbersome to first upload the correct time, the upload the logging sketch. With a separate battery source for the RTC the device could sit on a shelf for months and only start logging when it got the main power.