- Chapter 0 – Introduction
- Chapter 1 – Arduino I2C
- Chapter 2 – Continuous EEPROM Addressing (digression)
- Chapter 3 – Update and Sleep Design
- Chapter 4 – Clock Design and Sleep Investigation
- Chapter 5 – Gallery
- Chapter 6 – Results
- Chapter 7 – Final Report
- Chapter 8 – Followup 1
Make Magazine is running a new series called “Make It Last“. It’s evidently all about designing embedded projects to last as long as possible on battery power, and they’re starting it off with a data logger build contest.
I’ve been plotting a data logger project of my own for some time, so I’m thinking of entering, if I can get my act together in time.
The example data logger project in the series is a simple analog temperature sensor, with long-term storage using an EEPROM module. My own project is to collect temperature data to compare the climate inside my cold frames (which, unfortunately, are in the shade for most of the winter), outside my cold frames in the shade, and outside my cold frames in the sun, to see how good they are at retaining heat. In addition to the temperature sensor and the EEPROM, I intend to use a real-time clock to more accurately record the date and time of the samples, for easier correlation.
I intend to build three devices to record temperature in these three conditions, and to monitor temperature for as long as my cold-frames are in use.
My secondary objective is to rely as much as possible on components I have on-hand, since that will make things both cheaper and more interesting.
My recent binge of messing around with microcontrollers has left me with several options. I recently received my TI Launchpad, and have yet to do anything with it. I also have a number of ATmega328Ps just begging to be used, and a few PICs lying around also.
For temperature sensing, I have some TC74 temperature sensors, which use an I2C two-wire interface and are accurate to +- 2 degrees C…not that great, but it will probably serve.
For EEPROM, I happen to have the Microchip 24AA1025 they are using in the example build.
For real time clock, I have a couple of DS3231M temperature-compensated real time clock ICs. I only have 2 of them, so I’ll have to come up with something else for the third device, or leave it off altogether.
Since I have three different platforms, and have not really done much with any of them, I was thinking I might try and implement the project three different ways, once on each platform, to get a feel for how easy development and porting is on these different platforms, and to see how difficult it is to get good low-batter-power operation out of them.
I don’t have a lot of time, so I’ll probably start getting it to work on the AVR, using the Arduino development environment and my Ardweeny. [Edit: I ended up using my Boarduino instead]. Once that’s working, I’ll probably make a custom board for it and burn it right onto the ATmega328.
When I’m done with that, I’ll try it on the PIC (since the contest is sponsored in part by Microchip, maybe that will help me out…).
If I have it working on both the PIC and the AVR, then I’ll try the MSP430.
[Edit: Spoiler Alert! I didn’t have time to get to the PIC or the MSP430 before the end of the contest. Maybe I’ll get them going afterwards…]
I’m really new at this, so my design is probably full of holes, but I’m here to learn, that’s the whole point. Anyway, all the peripherals I intend to use TC74, 24AA1025, and DS3231M use the I2C interface, which will make things easier. Also, all the devices are capable of running at 2.7V, which means I can probably power it with 2 AA batteries [edit: no need for a voltage regulator, which would only burn battery power). The DS3231M has a built-in temp sensor (for its internal temperature compensation mechanism), but the granularity is even worse than the TC74 I have.
If I assume the cold frames will be on from November through the end of March (from first to last frost), that’s 5 months, or about 150 days.
For data record size, figure the following:
- sample number (2 bytes) – I need more than 256, but probably fewer than 65K, at least for one season.
- date (6 bytes, or 7 if I include the year) – from DS3231M datasheet
- temperature sample (1 byte)
So, 10 bytes per record, and my EEPROM has space for 1024Kbits, leaves about 13,100 samples. That means, with 150 days, I could store up to 87 samples a day. It would probably be enough to measure every hour, which means I could run for 545 days without running out of space. We’ll try and figure out later on how long the batteries will let me run…
- TI Launchpad: http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_%28MSP-EXP430G2%29
- TC74: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010749
- 24AA1025: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en024638
- DS3231M: http://www.maxim-ic.com/datasheet/index.mvp/id/6861