Datalogger "Sensor Egg"

Hi,

first of all I am from Austria - so please excuse any spelling/grammar mistakes.

My father breeds turkeys as a hobby and we noticed a difference in the mortality of embryos and chicks between eggs which are incubated naturally and the ones incubated in an incubator. The percentages of healthy chicks is roughly 80%/95% (incubator/naturally incubated) which in both cases isn’t bad at all. However we are curious about how different the conditions during incubation actually are. So I sketched up a little battery powered datalogger based on an Atmega328, a DS3232M RTC, a HTU21D (Temperature & Humidity Sensor), a LSM303D (tilt compensated compass) and a slot for a MicroSD card.

I bought breakout boards for each of the modules except the RTC and used them together with and Arduino Pro Mini 3,3V and available libraries.

As I do not have a lot of experience in making my own boards I wanted to share the schematic with you hoping to get some feedback.

Im planning to power the board with an external battery pack (e.g. 1 cell lipo 3,7V). The Atmega will be powered directly from the battery without a voltage regulator. To be able to save power (incubation takes approx. 28 days) I used a 3V LDO voltage regulator with an enable input. The input is pulled low via a pull-down resistor (regulator off) and will be pulled high by the arduino to turn on the sensors and SD card.
So all the sensors and the sd card are normally without power and the Atmega in power-down mode. The RTC will then wake up the Atmega every few minutes. The Atmega enables the powersupply for the sensors, gathers data, opens/writes/closes a file on the sd card, sets a new alarm time in the rtc, removes the power from the devices and goes back to sleep again.

I included pull-ups for all the I2C and SPI lines (I read it’s good practice to have them even if not needed for SPI), an ICSP header to be able to flash the arduino bootloader and a header to connect to a serial/usb converter.

I’d very much appreciate if you could have a look at the schematic and point out any mistakes it might and probably will contain.

Thanks for your help

Best Regards,
Dominik

Ohh and just in case u are wondering were I place the board. I’m planning to 3D print an egg and with slots for the datalogger and battery and then sneakily put it among the other eggs under the henn.

datalogger.pdf (20.3 KB)

Dominik_E:
Hi,

first of all I am from Austria - so please excuse any spelling/grammar mistakes.

Welcome to the forum! (Not sure I noticed any :D)

I included pull-ups for all the I2C and SPI lines (I read it's good practice to have them even if not needed for SPI), an ICSP header to be able to flash the arduino bootloader and a header to connect to a serial/usb converter.

But the ATmega has internal pullups, so why not use those. When sleeping, it's good practice to set unused pins to inputs and enable pullups. This will minimize current draw and help prevent EMI effects.

You may be interested in a similar datalogger that I designed. I recently entered it in Atmel's "SimplyAVR" contest. Probably the best way to get a quick overview is to go there and watch the short video and read the summary. There are links there to the hardware design and firmware. The contest site doesn't seem to have direct links to individual projects, but if you go to Smart | Connected | Secure | Microchip Technology then click on VOTE in the upper right, my project is currently on the first page in the gallery, bottom row, it's called "Double-A Data Logger". Clicking VOTE just takes you to the gallery, there's no need to vote if you don't want to. Cheers!

Thank you for your reply Jack.

Your project is really interesting and the design seems to be very versatile. I'm sure I will have to take at look at your code at some point.

I read that you had your prototypes made by ITead. How pleased were you with quality andservice? I was thinking of ordering my boards from them as well even though I have no idea of what I will be doing with 20+ pieces... I can't populate them anyway the sensors and the RTC are pretty pricy.

Back to your pcb - Why did you chose an eeprom as the main storage over an sd card? For power saving reasons or possible card failure if the device is deployed in difficult conditions (I am thinking of possible corrosion of the sd card contacts)? How do you upload the data to your pc after you gathered it?

Regards,
Dominik

Dominik_E:
Thank you for your reply Jack.

Your project is really interesting and the design seems to be very versatile. I'm sure I will have to take at look at your code at some point.

I read that you had your prototypes made by ITead. How pleased were you with quality andservice? I was thinking of ordering my boards from them as well even though I have no idea of what I will be doing with 20+ pieces... I can't populate them anyway the sensors and the RTC are pretty pricy.

Thanks! iTead does good work, although I have been leaning more towards Seeed Studio lately. The two seem to produce identical boards, their pricing and specs likewise seem the same. Seeed seems to give me a little more consistent turnaround time so that's the only reason I've been preferring them lately. One difference is that Seeed will do five copies of a board where I think the minimum is 10 from iTead. But the prices are reasonable enough that I don't worry much even if I only need one or two boards. Funny thing, when I have extra boards, it's not hard to find uses for some of them :smiley:

Back to your pcb - Why did you chose an eeprom as the main storage over an sd card? For power saving reasons or possible card failure if the device is deployed in difficult conditions (I am thinking of possible corrosion of the sd card contacts)? How do you upload the data to your pc after you gathered it?

Power was probably my first consideration, but I think the EEPROM took less space on the board, and also uses fewer MCU pins, effectively zero since it shares the I2C bus with the RTC. SD would have required the SPI bus, plus a slave select line and signal level translation. By using EEPROM, more pins are available for sensors and the SPI bus is unused. Not that an SD card couldn't have been made to co-exist but neither would it have made things simpler.

Logged data is transferred to a PC using an FTDI cable or breakout board, exactly the same as would be used to program an Arduino Pro Mini, Adafruit Boarduino, or any number of other clones.