[Logo] Anarduino and HopeRF Community Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics     [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Power consumption - Anarduino LoRa vs Moteino R4 LoRa  XML
Forum Index » Anarduino
Author Message
d00m



Joined: 19/10/2015 17:21:10
Messages: 32
Offline

Hello All.

Using this test code (from this topic http://forum.anarduino.com/posts/list/92.page):



I get 44.4uA on Anarduino with LoRa module and 4uA (!) on Moteino R4 with the same Lora module.

Don't know what the difference and how to fix Anarduino.

There is a suspicion that root cause maybe in memory flash chip, which is Spansion S25FL127S on Anarduino and WINBOND (W25X40CL) on Moteino.
This chip may consume such power in sleep mode.
But I'm not sure - in this forum is report:
http://forum.anarduino.com/posts/list/39.page#238
that power consumtion can be "~16uA" but not ~45uA as in my case (I'm also desoldered this resistor).

So is there a good explanation why this happens and how to fix it ?

d00m



Joined: 19/10/2015 17:21:10
Messages: 32
Offline

UPD:
in datasheet to Spansion S25FL127S said:
http://www.anarduino.com/docs/S25FL127S_00-247997.pdf

page 13.
2.2.2 Known Differences from Prior Generations

2.2.2.6 Deep Power Down
The Deep Power Down (DPD) function is not supported in FL-S family devices.
The legacy DPD (B9h) command code is instead used to enable legacy SPI memory controllers, that can
issue the former DPD command, to access a new bank address register. The bank address register allows
SPI memory controllers that do not support more than 24 bits of address, the ability to provide higher order
address bits for commands, as needed to access the larger address space of the 256-Mbit and 512-Mbit
density FL-S devices. For additional information see Extended Address on page 54.


so it is strange - why we use instruction flash.sleep() which is just starts command
#define SPIFLASH_SLEEP 0xB9 // deep power down
according to header of library SPIFlash.
this command shouldn't drive chip in sleep mode but it does - if I comment in my code this instruction - power consumption grows to 6mA instead 44.4uA _with_ this instruction!

d00m



Joined: 19/10/2015 17:21:10
Messages: 32
Offline

UPD:

I've desoldered memory chip and RTC chip - doesn't help.
power consumption in sleep mode still ~44uA
d00m



Joined: 19/10/2015 17:21:10
Messages: 32
Offline

referring to new topic http://forum.anarduino.com/posts/list/120.page#2963
real power consumption of Anarduino LoRa (without FTDI adapter connected) is 0.11mA or 110uA.

So again - not 44uA but 110uA
svorres



Joined: 29/03/2015 22:49:48
Messages: 4
Offline

I get 16 ua reliably after I bypass the regulator and run this setup code

*/


#include <SPI.h>
#include <EEPROM.h>
#include <RHDatagram.h>
#include <RH_RF95.h>
#include <Time.h>
#include <MCP7940RTC.h>
#include <LowPower.h> //get library from: https://github.com/lowpowerlab/lowpower
//writeup here: http://www.rocketscream.com/blog/2011/07/04/lightweight-low-power-arduino-library/
#include <Wire.h>

//Radio settings
#define POWER_LEVEL 22 // can vary from 5 to 23, 5 is the lowest.
#define FREQUENCY 913 // Default Transmission frequency, can be changed by EEPROM value
#define TIMEOUT 3000 // transmit timeout until ack is received
#define RETRANSMIT_DELAY 60 // Will retransmit an alarm after this number of seconds.
#define RETRANSMIT_TIMES 1 // How many times to retransmit
#define RETRIES 4 // how many initial retries are used
#define ATTEMPTS_TO_TRY 10 //This times radio setting of timeouts gives number of attempts before giving up

#define EI_NOTEXTERNAL
#define EI_ARDUINO_INTERRUPTED_PIN
#include <EnableInterrupt.h>

volatile uint8_t externalInterruptFlag=0;
volatile uint8_t pinChangeInterruptFlag=0;
volatile uint8_t pinState=0;

#ifdef ARDUINO_328
#define PINCOUNT(x) pin ##x ##Count

void interruptFunction () {
pinChangeInterruptFlag=arduinoInterruptedPin;
pinState=arduinoPinState;
}

void interruptExFunction () {
externalInterruptFlag=arduinoInterruptedPin;
pinState=arduinoPinState;
}

#define disablePCInterrupt(x) \
disableInterrupt( x | PINCHANGEINTERRUPT)

#define setupPCInterrupt(x) \
EI_printPSTR("Add PinChange pin: "); \
EI_printPSTR(#x); \
EI_printPSTR("\r\n"); \
pinMode( x, INPUT_PULLUP); \
enableInterrupt( x | PINCHANGEINTERRUPT, interruptFunction, CHANGE)

#define setupInterrupt(x) \
EI_printPSTR("Add pin: "); \
EI_printPSTR(#x); \
EI_printPSTR("\r\n"); \
pinMode( x, INPUT_PULLUP); \
enableInterrupt( x, interruptFunction, CHANGE)

#define setupExInterrupt(x) \
EI_printPSTR("Add External pin: "); \
EI_printPSTR(#x); \
EI_printPSTR("\r\n"); \
pinMode( x, INPUT_PULLUP); \
enableInterrupt( x , interruptExFunction, CHANGE)
#else
#error This sketch supports 328-based Arduinos only.
#endif

uint8_t client = 101; // we will change this with eeprom sn

RH_RF95 radio;
// Class to manage message delivery and receipt, using the driver declared above
RHDatagram manager(radio, client);

#define LED_BUILTIN 9 // mini-wireless board LED pin #
#define LED_ON digitalWrite(LED_BUILTIN,1)
#define LED_OFF digitalWrite(LED_BUILTIN,0)


d00m



Joined: 19/10/2015 17:21:10
Messages: 32
Offline

svorres
Thank you for your answer!

I also saw your other answer here:
http://forum.anarduino.com/posts/list/92.page#3060


But would you please clarify it in some details and confirm my next thoughts:

- so I can remove regulator and power MCU via VCC - can I use LiPo 1S battery? it provides nominally 3.7V (and fully charged ~ 4.25V) - is it possible to power MCU from such battery via VCC?

- would you please explain your code a bit? I suppose it is only setup section, right? If so - how do you run into sleep mode?

- how do you measure power consumption MCU powered from VCC? I can't measure it because my MCU every time reboots if I connected multimeter in mA and uA mode.
It works only if multimeter in A mode but it shows values like 0.01A which means 10mA and this is not what I want to check..
I can measure power consumption only if MCU powered via Vin.

I desoldered regulator from MCU and the same - MCU constantly reboots with multimeter connected.


This message was edited 3 times. Last update was at 22/04/2017 12:52:26

svorres



Joined: 29/03/2015 22:49:48
Messages: 4
Offline

Hi d00m,

1. Yes the Anarduino, the CPU and the radio should both be kept below 3.5Volts Max. So either us a regulator or don't use a LiPo battery.

2. The Sleep state is what the Arduino normally runs in until it gets an Interrupt, then it wakes runs a routine and goes back to Low Power Sleep.


3. To measure current Insert a 10 ohm resistor in series with your Anarduino. Supply it with a 3.5 V supply.

Measure the voltage drop across the resistor with a good quality meter. So 10mV drop = 1 mA, a 100uV drop = 10uA, and a 10uV drop = 1uA,

Don't worry much about less than 10uA drains, as your batteries i.e Lithium AA L91 will last a long time.
 
Forum Index » Anarduino
Go to:   
Powered by JForum 2.1.9 © JForum Team