Temperature Logger With Pro Mini & Battery Only
3777 Views, 6 Favorites, 0 Comments
Temperature Logger With Pro Mini & Battery Only
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
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.
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++;
}
Downloads
Log the Temperature
just put on battery and do NOT press reset button,
and it will auto start logging.
Read Out Temperature
- connect with "USB to UART bridge", for me is CP2102
- open serial monitor
- if there were data, it should print out automatic
- if not, press reset button once
the format is :
- current record count in EEPROM
- n-th record from boot up
- temperature (250 = 25°C)
- 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