Go Down

Topic: feeding problem (Read 888 times) previous topic - next topic

christophe_myriam

i have an arduino mkr fox 1200 with a hx711 and 4 weight sensors. Everything works perfectly ... I send the message well every 15min, the return works too.
I plugged in two AAA batteries, on the 3.3v input; and I wanted to measure the power consumption to evaluate the battery usage time.
I have 13mA of ordinary consumption, and at the time of sending sigfox, I go around 50mA (more or less) and then after 50s, it drops to 13mA;
But if you calculate, it's been 8 days before exhausting the batteries. It's not much...
Here is my question. Is it normal that it consumes so much sleep (between two shipments)? What could I miss?

PerryBebbington

#1
Jul 17, 2019, 10:37 pm Last Edit: Jul 17, 2019, 10:37 pm by PerryBebbington
Quote
I have 13mA of ordinary consumption, and at the time of sending sigfox, I go around 50mA (more or less) and then after 50s, it drops to 13mA;
But if you calculate, it's been 8 days before exhausting the batteries. It's not much...
Ignoring the brief periods of 50mA...

Consumption at 13mA for 8 days will be:
0.013 * 24 (hours) * 8 (days) = 2.496Ah. I don't know the capacity of AAA batteries, yours or any others, but 2 and a bit Ah seems like it should be in the right ball park.

If you want to run from batteries for a long time you need the investigate power saving methods, such as sleep, which I am not the expert. I suspect an expert will be along shortly...


wolframore

Bad Boys Race Our Young Girls But Violet Generally Wins - Get Some Now :) - ELI ICE man

christophe_myriam

I added the function LowPower.sleep (30 * 60 * 1000) to sleep 30 minutes. But by testing the current, I still have a consumption of 13 to 17mA; While the documentation says that this function allows to go down to 0,5mA.
It worked once, but not now. Is there a forgotten feature?

wolframore

please post circuit diagram and code.
Bad Boys Race Our Young Girls But Violet Generally Wins - Get Some Now :) - ELI ICE man

christophe_myriam

Quote
/*
  SigFox First Configuration

  This sketch demonstrates the usage of MKRFox1200 SigFox module.
  Since the board is designed with low power in mind, it depends directly on ArduinoLowPower library

  This example code is in the public domain.
*/
/*
 * Result of power consumption is quite bad 2017-09-07
 * 1.1 mA residual current in sleep mode - multimeter in serie
 * 110 mV measured accross a serial 100 Ohms resistor - Multimeter measures voltage : 120 mVolt drop
 * If schematics are not buggy (tbc), perhaps Arduino Low Power library ddoesn't do enough in software ...
 */
// 1. Initialisation
//******************************************************************

#include <Arduino.h>                              // required before wiring_private.h
#include <wiring_private.h>


#include <SigFox.h>
#include <ArduinoLowPower.h>
#include <RTCZero.h>


#define SIGFOX_SPI

// 2. Setup
//******************************************************************

void setup() {

  pinMode(LED_BUILTIN, OUTPUT);
  SigFox.begin();
  delay(200);
  SigFox.end();
  delay(200);
 
  //------------------------------------------------------------------
  //  2.1. Low poser configuration
 
  // Uncomment this function if you wish to attach function dummy when RTC wakes up the chip
  LowPower.attachInterruptWakeup(RTC_ALARM_WAKEUP, dummy, CHANGE);
 
  delay(10000);
}

// 3. Loop
//******************************************************************


void loop() {


  LedBlink(2000,3);

  SigFox.begin();
  delay(200);
  SigFox.end();
  delay(200);
  LowPower.deepSleep(30000);
 

  LedBlink(100,10);
  delay(10000);


}


void dummy() {
  // This function will be called once on device wakeup
  // You can do some little operations here (like changing variables which will be used in the loop)
  // Remember to avoid calling delay() and long running functions since this functions executes in interrupt context
}


void LedBlink(int TiBk,int NbBk) {
  int i=0;
  while (i++<NbBk) {
    digitalWrite(LED_BUILTIN, HIGH);
    delay(TiBk);
    digitalWrite(LED_BUILTIN, LOW);
    delay(TiBk);
  }
  }
no input is wired. I just want to test the sleep of the circuit. But I can not go below 10mA. How to get the POWER DOWN 0.036Ma

sterretje

I'm not familiar with the MKR family, but if there are other component on that board, they will also consume power. E.g. a power led.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Go Up