Author Topic: using moteino r6 in extremely low-power project  (Read 87 times)

d00m178

  • Jr. Member
  • **
  • Posts: 70
using moteino r6 in extremely low-power project
« on: September 11, 2019, 02:05:38 PM »
Hello all.
I need some advice for my project which I want to improve for better power consumptions and better stability.
Im using several old moteinos with RFM95 radiomodule and several Anarduinos (pretty the same MCU+RFM95) in my project.
And I want change all Anarduino to Moteino R6, because moteionos has better power consumption in sleepmode and better support in this forum.
So I going to buy at least 4 moteino r6 and 2 moteino m0 for testing.

I have 2 types of devices in my project:

 - "server" - each "server" device located outdoor, in the mountains region during winter season - from November till Marth approximatly.
 server has 10-15 termosensors ds18b20 and laser distance module.
 
 - "client" - portable device that I can use for send command to servers and receive  answers from them.
 
lets say - currently I have 10 servers and 2 clients devices.
 
"server" device works in this way - it sleep 1 minute, wakeup, check the current light from photoresistor, if it is the day time - it starts to listen radio broadcast for specific command from the "client" device.
if such command received - server start to measure temperature of snow and distance to snow surface.
then it send meausured data to client and go to sleep for 1 minute.
and then all starts again.
usually we ask servers for data 1-2 time per day - so most of the time servers are in sleep mode.
Server powered from LiPo batteries, and these days Im testing new power supply - LiFePo4 batteries + solar panel.
Most of my issues with devices - because of a power part of device, so my questions will be about this.

The main goal that I want to reach - it is the device which powered from battery+solar panel.
Device should live long in winter-snow conditions, so I think I need to use LiFePo4 18650 batteries, because my LiPo batteries in cold conditions start to do bad and usually it works 1-2 winter work seasons and then I need change it.

I have some specific questions and would be great if I have the exactly answers.

Q1: Im going to make an order Moteino's and would like to know - if I add Extra flash module (onboard 4Mbit) - will it consume power during sleep mode?
if so - I would rather not to add this module to order.

Q2: I use Laser Distance module like this:
https://ru.aliexpress.com/item/32792768667.html?spm=a2g0s.13010208.99999999.259.5b943c00k90TW5

Because I want to decrease power consumption as much as possible - LRF connected through mosfet IRLZ44N as shown on the picture attached, so it should power-off LRF before entering into sleep mode.

Code: [Select]
...
  pinMode(LASER_PWR, OUTPUT);
  digitalWrite(LASER_PWR, HIGH);
 
  // use LRF
 
  //go to sleep
  digitalWrite(LASER_PWR, LOW);

...

but I have an issue - sometime my device rebooting when I power on LRF module.
Seems it happens because of battery low level and MCU brown-out level, anyway - I want to minimize power drain by mosfet and want to change it to power switch,
for example to TPS27081ADDCR.
or another variant - use the AP2125 regulator with enable pin as I was adviced in this topic - https://lowpowerlab.com/forum/moteino/lifepo4-for-moteino/msg25439/

so my Question #2 - What would be the best variant in my case? And probably I need make some changes in my circiut? 


Q3: As I power my device from battery - I need to know the current level on voltage.
From the begining of my project I used the simple circuit like resistor divider to know the current level of power - R1, R2, C1 - on picture.

but I've seen this topic - https://lowpowerlab.com/forum/moteino-m0/battery-monitor/ - and would like to know more info about this battery-monitor and A7 pin.
Is it possible to know the voltage on battery without using separate resistor divider, only using pin A7?

Q4: the most difficult question for me - choose the type of batteris.
as i said - I use LiPo - mostly on my servers, and I have one server with test power supply based on LiFePo4 (4x18650 batteries) + solar panel and TP5000 charge module - but seems it doesn't work as expected.
I had to remove LDO from Moteino and power it from 3V3 pin.
but when LiFePo4 bundle become low - I often faced with "brow-out level" issue when I power-on LRF module.
So everything related to each other, so seems I need change battery type AND fix the way to control power for LRF and make the right way to know the current level of battery.

Also I've read this page about supercapacitor: https://lowpowerlab.com/2017/09/15/weathershield-supercapacitor-tiny-solar-cell/
probably I need to check this variant also, but Im unsure if such power supply is enought for my device consumption.

Thank you for reading this long story.
Hope that someone will advice useful ideas.


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: using moteino r6 in extremely low-power project
« Reply #1 on: September 12, 2019, 12:12:15 PM »
My answers to your Qs:

Q1: The FLASH-MEM will use less than 1uA on average during sleep. There is a command to sleep it - flash.sleep().
An extra 1uA drain current is not going to hurt you significantly when your active current is several magnitudes more.

Q2: If your battery/power supply browns out during powering up anything, then you need a supply that can handle that inrush current demand from whatever your device you're powering, or another device that is less demanding. In the case of Moteino the brownout level is set to 2.7V or 1.8V for the 8mhz variant.
You can use a mosfet to cut power to the device, no need for fancy power switches.

Q3: If your circuit runs at a regulated voltage (through LDO) then you need to divide the battery voltage if it's higher than that voltage. Otherwise if your MCU runs directly from battery you can use the internal bandgap (1.1v for atmega328p) to determine the VCC.

A supercap may help when the surge from your power hungry device happens, but you have to keep it charged constantly, and I would not recommend using that in addition to a battery. For your application it sounds like a supercap is not feasible to be the only power supply.