Let's Make Robots!

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.

Version 1

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.

Version 2

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.

Version 3

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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
NilsB's picture

Great to see your progress on SMD soldering. Looks like you dno't need to come back to regular (non-SMD) parts anymore.

Great logger. Very useful if you can reduce the power-consumption to such a minimum in this application.

Geir Andersen's picture

I would encourage everyone to have a go at SMD. It’s not as hard as it looks and you can cram lots of electronics onto a small surface area. And from http://imall.iteadstudio.com/open-pcb/pcb-prototyping/im120418001.html you’ll get 10 each 50x50mm boards (like this data logger) for only $9.90 That’s under a dollar for a two layer PCB with silk screen on both sides and HASL.
It takes a couple of weeks to get them from China to Norway but I’m not under any deadline so for me this is not a problem.

OddBot's picture

That looks really good. I'm going to have to find the time to learn to use Dip-Trace.

Geir Andersen's picture

I would highly recommend DipTrac as I think it is a great program and with you LMR membership you can get additional pins.

I always start with the schematic and use autoroute for the actual routing. This gives me the advantage of being able to change the schematic and have the PCB layout updated very fast. I know auto routing is looked down upon by many but at my level of PCB design it is faster and more accurate than anything I could have done manually.

OddBot's picture

Sometimes autorouting is fine. But sometimes you need to run some traces (such as wide, high current traces) so that they have the shortest path or do not get too close to a sensitive area of the board.

 

Geir Andersen's picture

Some of that can probably be handled by DipTrace itself. As you can define your own net classes and set up things like.

  • What layer to use
  • Trace with
  • Clearance (to trace, via, pad, SMD, copper)
  • Trace length limits (min / max)
  • Autorouting priority
  • Max vias