loading

This is a minimal system for logging temperature.

You will need:

  • Arduino pro mini (ATmega328p) - use internal temperature sensor & EEPROM
  • Battery pack or anything else can power up the pro mini - power from 'raw' pin must >= 5V; power from 'vcc' pin, I'm only sure <= 2.75V not work.

  • any USB to UART bridge - FTDI, CP2102, CH340G..etc

Step 1: Attach Battery Pack

power from 'raw' pin must >= 5V

power from 'vcc' pin, I'm only sure <= 2.75V not work.

attach power for your condition.

Step 2: Program

program as normal arduino pro mini.

You can change the count in sleepMinutes() if you need.

default: 2s * 150 = 300 s = 5 minutes, record every 5 minutes (almost)

void sleepMinutes()
{
for (unsigned int i = 0; i < 150; i++) {
//for (unsigned int i = 0; i < 1; i++) {
LowPower.powerDown(SLEEP_2S, ADC_OFF, BOD_OFF);
}
cont++;
}

Step 3: Log the Temperature

just put on battery and do NOT press reset button,

and it will auto start logging.

Step 4: Read Out Temperature

  1. connect with "USB to UART bridge", for me is CP2102
  2. open serial monitor
  3. if there were data, it should print out automatic
  4. if not, press reset button once

the format is :

  1. current record count in EEPROM
  2. n-th record from boot up
  3. temperature (250 = 25°C)
  4. voltage (mV)

send char to do:

  • 'N' - show current temperature & voltage

  • 'D' - dump all log in EEPROM
  • 'C' - reset counter, next record will start at 0
  • 'R' - dump raw data in EEPROM
  • 'F' - fill EEPROM with 0xFF
<p>Thank you for the excellent code! I found it very useful.</p><p>I used 4 different Nano Arduinos. They varied in reading +/-7 F (+/-4C) in absolute accuracy, while being +/-2F (1C) in relative accuracy after offset adjustments.<br>I made update code versions to smooth out readings, output temps in F. and extend recording period to over 1 week; attached.<br>It is cool this requires no wiring. I also have done 2 instructables which require no wiring, which you may find interesting:<br><a href="https://www.instructables.com/id/Play-a-Game-with-a-bare-Arduino/" rel="nofollow">https://www.instructables.com/id/Play-a-Game-with-a...</a><br><a href="https://www.instructables.com/id/Fast-Easy-Simon/" rel="nofollow">https://www.instructables.com/id/Fast-Easy-Simon/</a></p>

About This Instructable

1,458views

5favorites

License:

More by 志允吳:Temperature logger with pro mini & battery only 
Add instructable to: