Go Down

Topic: Looking for an off-the-shelf shield data logger with efficient deep sleep (Read 160 times) previous topic - next topic

pierrepoulpe

Hello,

I'm developing a product, that basically makes a measurement every day, and sends it over a network.
Measurement implies to act on a stepper motor, and use the analog input.
Network can be wifi (esp8266 as slave, or master MCU), GSM, or LPWAN (sigfox/lorawan).
Targeted power supply would be most available AA alkaline batteries, 3 or 4 of them (is it enough current for GSM? not tested yet, but at least ok for wifi and lpwan)


And the goal is to maximize battery life.

Energy optimization includes many factors, but one important is the current consumed in standby state between two measurements.

After some prototype with off-the-shelf boards, I started to create a custom board.

Strategy I chose for my 'deep sleep' function, is to use an external RTC, with a wakeup function. I chose in function of timekeeping current, price, etc.... : NXP's PCF8523, => 150nA on paper, 0.1µA measured (the minimum measurement of my basic multimeter).
This RTC is supplied directly by main batteries, no additional coin battery, and no energy-costly voltage regulator.
The wake up pin directly trigger the enable pin of my voltage regulator (LM3671, 3.3V output), this chip drinks 10nA in off state.
160nA sleep current on paper, pretty nice, uhh? Probably much less than self-discharge current of my battery.

Well, for a few reasons, I'm considering abandoning the idea of a custom board. (project will be more DIY-friendly with off-the-shelf boards, easier to switch to the next technology with modular shields, and I don't spend energy on producing custom boards)

Arduino UNO became de facto the standard for the idea of stacking up shields. Even if the MCU board is not an arduino, or even not with an ATMEGA328.
In this UNO shield format, I'll easily find a motor shield, GSM shield, Wifi shield, lora shield, sigfox shield, and the next-future-technology shield (5G?).

What I do not find, and I finally come to my root question, is a shield to do an efficient power management by waking up (and powering) the rest of the stack on a regular basis.
Datalogger shield that I find (adafruit) have an RTC (and the good one : PCF8523), have an SDCard slot (which might be an interesting option for me), but don't have the power management part.

For a prototype, I could easily add this feature to the adafruit board by adding my battery input and a mosfet or kind of SSR. But I'm potentially targeting people without soldering iron...


I'd be really surprised if I were the first to have this need....

Any idea?

If it really doesn't exist, but you think it might be interesting... we could push the idea to some shield maker (arduino/adafruit/sparkfun)


Many thanks, Pierre

wvmarle

These shields are very much limited to the Arduino Uno. I know WeMOS tried to build something that looks like an Uno but has an ESP8266 on board - they stopped doing it as most Arduino shields just wouldn't work with it. So you'll be producing for Arduino Uno only.

I also wonder how many of the shield-using crowd have advanced enough projects that they want such high-level power management for their projects. If you really want to save battery power, you start by ditching the Uno altogether and go for more stripped down boards, down to the bare processor.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

pierrepoulpe

Well UNO's ATMEGA328 is by far powerful enough to do what I need.

You're right that UNO is not a good basis for low power project.

But we could imagine an UNO-compatible board, with jumpers to disconnect USB-Serial, leds, etc...
ATMEGA328 consumption by itself it not really an issue, as I wake up for quite a short time, and during this time, my network layer will be dominant in the power consumption.

In one word, you're saying that custom board for low power is the way to go?



srnet

The wake up pin directly trigger the enable pin of my voltage regulator (LM3671, 3.3V output), this chip drinks 10nA in off state.
So when setup and the PCF8523 timer expires or the alarm is activated the LM3671 goes off ?
$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

wvmarle

Pretty much so.

Too many parasitic power users on an Arduino board that can't be switched off (and for good reason: it would make it way too complex for beginners, too much risk of them accidentally switching something off or forgetting to switch something back on and the whole project going awry).

The Pro Mini would already be a much better starting point for such a project.

Low power projects also tend to be highly customised. For projects that need less I/O pins and not so much code (which many such projects may very well be), the ATtiny can be a great fit. Very little power use even in normal mode, you can easily go down to <0.5 mA by reducing speed and supply voltage.

This page has a nice write-up on how to go low power with the ATmega328, but it also adds the comparison with an Arduino Uno: in normal mode it uses 49 mA, in sleep mode about 35 mA. That's still more than double the 16 mA a bare bones ATmega takes running at 5V, 16 MHz!


Another power saving option that the Uno doesn't offer is lowering the speed, from the default 16 MHz to 8 MHz or even just 1 MHz. More than enough for many a project, and the lower clock speed allows you to reduce the working voltage for even more savings. The ATmega328 draws about 17 mA in a 5V, 16 MHz configuration (just as the Uno). At 1 MHz and 3.3V that's 0.92 mA (95% saving - still in full on mode, that is!). Using the internal oscillator instead of an external one also saves power. Switch off the ADC, unneeded timers, and other peripherals and you can get it to run at <0.5 mA. After that apply sleep modes to go even further down in power use.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

srnet

Indeed, a 3.3V 8Mhz Pro Mini is as good as any.

Easy to remove the LEDs and regulator and add a decent low current external one.

Probably cheaper to modify a Pro Mini than it is to use a bare bones Atmega.
$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

cattledog

Quote
Indeed, a 3.3V 8Mhz Pro Mini is as good as any.
You might want to take a look at the Low Power Lab 8MHz Moteino.

https://lowpowerlab.com/guide/moteino/moteino-8mhz/

pierrepoulpe

So when setup and the PCF8523 timer expires or the alarm is activated the LM3671 goes off ?
PCF8523 timer doesn't expire, you have to reset the alarm flag by I2C, even if a second alarm comes during wakeup.

For initial startup : PCF8523 start with a 32kHz square signal output on the output pin. I added a kind of low pass filter with a 10nF cap + 100k resistor.
(And you also need a kind of not gate, as I didn't find a RTC with active high alarm, or too exensive, or something else wrong.)



You have to detect that this is a first power up (with RTC registers), then setup everything on your RTC (including alarm), and last, disable 32kHz out. Blackout...

Next alarm trigger, you detect that your RTC is setup correctly, do your measure, send it, and last, clear RTC alarm flag, Blackout.


Even easier than having an additional MCU output to ensure regulator enable pin is high even if RTC doesn't do it.


PS : wire that you see going up out of my screenshot is connected to a jumper, so that I can manually wakeup the system, for instance to setup via wifi/web page interface the system.



srnet

PCF8523 timer doesn't expire, you have to reset the alarm flag by I2C, even if a second alarm comes during wakeup.

For initial startup : PCF8523 start with a 32kHz square signal output on the output pin. I added a kind of low pass filter with a 10nF cap + 100k resistor.
(And you also need a kind of not gate, as I didn't find a RTC with active high alarm, or too exensive, or something else wrong.)



You have to detect that this is a first power up (with RTC registers), then setup everything on your RTC (including alarm), and last, disable 32kHz out. Blackout...

Next alarm trigger, you detect that your RTC is setup correctly, do your measure, send it, and last, clear RTC alarm flag, Blackout.


Even easier than having an additional MCU output to ensure regulator enable pin is high even if RTC doesn't do it.


PS : wire that you see going up out of my screenshot is connected to a jumper, so that I can manually wakeup the system, for instance to setup via wifi/web page interface the system.

Ah IC, so when you said the Enable pin is directly triggered there are other components involved.

What is the actual measured current consumption of the completed circuit, from battery, when the LM3671 is disabled and the main circuit is off ?
$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

pierrepoulpe

My multimeter (velleman DVM850bl) lowest scale is 200µA. It displays a value varying between 0.1 and 0.2, meaning somewhere betwenn 100 and 200nA.
I checked it by picking a known value resistor, it was consistent.

pierrepoulpe

It may be overkill for alkaline batteries if we consider a self discharge current over 5µA. But for coin battery, may be interesting.

Go Up