I can get much reduced current draw by using SLEEP_MODE_POWER_DOWN and using the watchdog to wake up, but the minimum watchdog period is 15~16ms, which would not allow polling of the anemometer frequently enough for high winds. I am leaving timer0 enabled so that millis() works and the chip wakes every 1ms, enables an internal pull-up, polls the anemometer pin, disables the pull-up and goes back to sleep. Maybe I could disable BOD and WDT also, not sure if that would make a significant saving at this point.
The atmega is running at 3.3V using 8MHz internal clock and I am saving power by disabling timer1, timer2, SPI, UART, TWI, and using SLEEP_MODE_IDLE.
I have it down to 2.5mA, but would like it to be considerably lower. I am trying to minimise the current draw while still monitoring the anemometer. It will run for (hopefully) a long time on batteries, perhaps 3xAAA or 3xAA NiMh or 1x18650 Li-ion.įor the moment, I am just prototyping with the atmega and the anemometer on breadboard. The brains will be an atmega328P and a RFM95 LoRa transceiver. The new circuit eventually have an anemometer (3 rotating cups with magnet + reed switch type), a rain gauge (see-saw bucket with magnet & reed switch) and wind direction vane (magnet + 8 reed switch + 8 different resistors).
Background: I'm working on a new weather station project to replace my old one.