Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6726
    ThomasB
    Participant

    Hi,
    I am currently working with the Mini Ultra Pro V2 board. i am struggling with utilizing its full low power potential. In the documentation it is mentioned that the power consumption can go down to “Minimum 20.0 μA”, however, i am struggling to get it below 4 mA.

    I have tried to follow the example by Armel provided in this post:

    In my code i put the radio and the flash memory to sleep before calling a final sleep method standby() from the LowPower library. With this, the board is currently using 17mA when awake and around 4mA when asleep. My full sketch can be found here:

    
    #include <RTCZero.h>
    #include <LowPower.h>
    #include <SPI.h>
    #include <RH_RF95.h>
    #define RF95_CS 5
    #define RF95_RST 2
    RH_RF95 rf95(RF95_CS, RF95_RST); 
    #include <SerialFlash.h>
    #define FLASH_CS 4
    
    RTCZero rtc;
    
    int ledPin = 13;
    
    unsigned char count = 10;
    
    const byte seconds = 0;
    const byte minutes = 00;
    const byte hours = 17;
    
    const byte day = 17;
    const byte month = 11;
    const byte year = 15;
    
    void setup()
    {
      
    // Turn off built in LED
    
    pinMode(ledPin, OUTPUT);
    digitalWrite(ledPin, LOW);
    
    // Create timer. Timer is set to activate once every minute
    
    rtc.begin();
    
    rtc.setTime(hours, minutes, seconds);
    rtc.setDate(day, month, year);
    
    rtc.setAlarmTime(17, 00, 30);
    rtc.enableAlarm(rtc.MATCH_SS);
    
    rtc.attachInterrupt(alarmMatch);
    
    // Countdown to 10 to prevent sleep lock
    
    SerialUSB.println("Entering standby mode in:");
    
    for (count; count > 0; count--)
    {
    SerialUSB.print(count);
    SerialUSB.println(" s");
    delay(1000);
    }
    
    // initialise radio and Serial Flash
    
    rf95.init();
    pinMode(RF95_CS, INPUT_PULLUP);
    SerialFlash.begin(FLASH_CS);
    }
    
    void loop()
    {
      
    SerialUSB.println("Entering standby mode.");
    SerialUSB.println("Alarm will wake up the device.");
    SerialUSB.println("Zzzz…");
    
    // Enter standby mode
    sleepNow();
    // Wake up
    wakeUp();
    // Wait for serial USB port to open
    while(!SerialUSB);
    // Serial USB is blazing fast, you might miss the messages
    delay(1000);
    SerialUSB.println("Awake!");
    SerialUSB.println("Send any character to enter standby mode again");
    // Wait for user response
    while(!SerialUSB.available());
    while(SerialUSB.available() > 0)
    {
    SerialUSB.read();
    }
    }
    
    void alarmMatch()
    {
      SerialUSB.println("ALARM!");
    }
    
    void sleepNow(){
      rf95.sleep();
      SerialFlash.sleep();
      LowPower.standby();
      }
    
    void wakeUp(){
      rf95.available();
      SerialFlash.wakeup();
      }  

    I would greatly appreciate any feedback from other who have experimented with low power settings on the Mini Ultra Pro v2.

    Thank you in advance!

    #6752
    ThomasB
    Participant

    I want to add that i have tried the lowPower example found in the documentation, and that it have pushed the power consumption down to around 2 mA. I have tested it on another Mini Ultra Pro V2, and both of them uses around 2 mA in their sleep now.

    Is there any wat to turn off the PG led with code? As i would like to use as little power as possible, it would be nice if it could be turned off.

    #6761
    LIM PHANG MOH
    Keymaster

    Hi Thomas,
    It looks like you are powering the board from VIN (judging from your comment on PG LED turning ON), hence the mA range. If you want to achieve 20 uA, please power it through the Li-Ion/Pol connector as shown in this guide.

    You can think VIN as your secondary power (external DC, solar power) that is not always around. PG turns on when a valid and good VIN is applied on VIN or the USB port is connected.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.