Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NRG 2.0 Power Consumption
11-05-2015, 03:48 AM
Post: #1
NRG 2.0 Power Consumption
Hi All,
I'm building a low power weight scale with the NRG 2.0 and a T.I. ADS1232.

I can not get the current draw below 2 ma when the NRG 2.0 is in sleep mode. I'm powering the load cells and ADS1232 from a NRG output pin and I'm controlling a power_down pin to the ADS1232 from another NRG output pin. (The T.I. spec calls for holding power_down low until power is applied and stable).

I've constructed my own carrier board and done my own assembly of the fine-pitch ADS1232. I only mention this to point out that the problem could be anywhere.

As a first test, I went back to a new NRG 1.1 and a new NRG 2.0 and connected just power and ground wires to the appropriate pins. No programming at all. No carrier boards of any kind. The NRG 1.1 draws 10 micro-amps, while the NRG 2.0 draws 2 milliamps.

Does the NRG 2.0 have to be programmed to force it into low power mode?

What is the best sketch that I can use to get minimum power readings?

Thanks,
Bob
Find all posts by this user
Quote this message in a reply
11-05-2015, 05:49 AM
Post: #2
RE: NRG 2.0 Power Consumption
Hi Bob,

Calling sleep(), sleepSec() or goToSleep() is necessary in order to put the module into deep sleep mode. This wiki page is a good starting point:
https://github.com/panStamp/panstamp/wik...power-mode

But you can also take a look at any of our battery-powered sample sketches, including ntc, htusensor or co2meter.

Regards,

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
11-05-2015, 07:47 AM
Post: #3
RE: NRG 2.0 Power Consumption
(11-05-2015 05:49 AM)dberenguer Wrote:  Hi Bob,

Calling sleep(), sleepSec() or goToSleep() is necessary in order to put the module into deep sleep mode. This wiki page is a good starting point:
https://github.com/panStamp/panstamp/wik...power-mode

But you can also take a look at any of our battery-powered sample sketches, including ntc, htusensor or co2meter.

Regards,

Hi daniel, thank you for your quick response.

I'm using swap.goToSleep();

IDE: Arduino 1.6.5
Board Manager: panStamp NRG version 1.0.5
Libraries: SWAP version 1.0.5

I have simplified the test hardware to a bare, NRG 2.0 connected to a panStick 3.1
The NRG draws 3.3ma as measured by an inexpensive digital ammeter connected in series with the ground wire. The NRG produces this output on startup:
Rved: (F833)00140001001400000000340000000D
Rved: (F72E)0014000200140A0258
Rved: (F630)0014000400140302

I checked the digital meter with a 3.6v Li cell and a 1 meg resistor, seems OK.

Here is the code:
powerTestv01
Code:
#include "regtable.h"
#include "swap.h"
/**
* Sensor pins
*/
const int powerPin        = 14;  // ADS1232 Power          <-- Arduino D14, MCU P2.0
const int powerDownPin    = 15;  // ADS1232 NOT(PDWN)      <-- Arduino D15, MCU P2.6
const int dataPin         =  2;  // ADS1232 NOT(DRDY)/DOUT --> Arduino  D2, MCU P1.2
const int serialClockPin  =  3;  // ADS1232 SCLK           <-- Arduino  D3, MCU P1.3


/**
* setup
*
* Arduino setup function
*/
void setup()
{
  panstamp.init(CFREQ_915);  // Init panStamp at 915 MHz as the center frequency
  // Set pin directions

  pinMode(powerPin,       OUTPUT);
  pinMode(powerDownPin,   OUTPUT);
  pinMode(dataPin,        INPUT);
  pinMode(serialClockPin, OUTPUT);
  
  digitalWrite(powerPin,       LOW);
  digitalWrite(powerDownPin,   LOW);
  digitalWrite(serialClockPin, LOW);

  swap.init();


  // Transmit product code
  swap.getRegister(REGI_PRODUCTCODE)->getData();
  
  swap.txInterval = 600; // 10 minutes for PRODUCTION
  ////swap.txInterval = 10;  // 10 seconds for TESTING and INITIAL SETUP

  // Transmit periodic Tx interval
  swap.getRegister(REGI_TXINTERVAL)->getData();
  // Transmit power voltage
  swap.getRegister(REGI_VOLTSUPPLY)->getData();

  // Switch to Rx OFF state
  swap.enterSystemState(SYSTATE_RXOFF);
}

/**
* loop
*
* Arduino main loop
*/
void loop()
{
  // Sleep
  swap.goToSleep();
  return;
  
}

product.h
Code:
/**
* product.h
*
* Copyright (c) 2014 panStamp <contact@panstamp.com>
*
* This file is part of the panStamp project.
*
* panStamp  is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* panStamp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with panStamp; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
* USA
*
* Author: Daniel Berenguer
* Creation date: 04/29/2013
*/

#ifndef _PRODUCT_H
#define _PRODUCT_H

/**
* Hardware version
*/
#define HARDWARE_VERSION        0x00000100L

/**
* Firmware version

*/
#define FIRMWARE_VERSION        0x00000100L

/**
* Manufacturer SWAP ID
*/
#define SWAP_MANUFACT_ID        52L //bee-certain.com

/**
* Product SWAP ID
*/
#define SWAP_PRODUCT_ID         13L //weight from ADS1232

#endif

regtable.h

Code:
/**
* regtable.h
*
* Copyright (c) 2014 panStamp <contact@panstamp.com>
*
* This file is part of the panStamp project.
*
* panStamp  is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* panStamp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with panStamp; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
* USA
*
* Author: Daniel Berenguer
* Creation date: 04/29/2013
*/

#ifndef _REGTABLE_H
#define _REGTABLE_H

//#include "Arduino.h"
#include "register.h"
#include "commonregs.h"

/**
* Register indexes
*/
DEFINE_REGINDEX_START()
  REGI_VOLTSUPPLY,
DEFINE_REGINDEX_END()

#endif

regtable

Code:
/**
* regtable
*
* Copyright (c) 2014 panStamp <contact@panstamp.com>
*
* This file is part of the panStamp project.
*
* panStamp  is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* panStamp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with panStamp; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
* USA
*
* Author: Daniel Berenguer
* Creation date: 03/31/2011
*/

#include "product.h"
#include "regtable.h"

/**
* Definition of common registers
*/
DEFINE_COMMON_REGISTERS()

/*
* Definition of custom registers
*/
// Voltage supply       (battery)                                    id = 11
static byte dtVoltSupply[2];
REGISTER regVoltSupply(dtVoltSupply, sizeof(dtVoltSupply), &updtVoltSupply, NULL);

/**
* Initialize table of registers
*/
DECLARE_REGISTERS_START()
  &regVoltSupply,
DECLARE_REGISTERS_END()

/**
* Definition of common getter/setter callback functions
*/
DEFINE_COMMON_CALLBACKS()

/**
* Definition of custom getter/setter callback functions
*/

/**
* updtVoltSupply
*
* Measure voltage supply and update register
*
* 'rId'  Register ID
*/
const void updtVoltSupply(byte rId)
{  
  unsigned long result = panstamp.getVcc();
  
  // Update register value
  regTable[rId]->value[0] = (result >> 8) & 0xFF;
  regTable[rId]->value[1] = result & 0xFF;
}
Find all posts by this user
Quote this message in a reply
11-05-2015, 08:23 PM
Post: #4
RE: NRG 2.0 Power Consumption
Why are you calling "return" in loop? Remember that loop() is an endless loop so you don't want your program to exit.

Otherwise, try with a simple sketch like basicbeacon.

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
11-06-2015, 11:10 PM
Post: #5
RE: NRG 2.0 Power Consumption
(11-05-2015 08:23 PM)dberenguer Wrote:  Why are you calling "return" in loop? Remember that loop() is an endless loop so you don't want your program to exit.

Otherwise, try with a simple sketch like basicbeacon.

Thanks for pointing out the "return". basicbeacon helpd as well.

I was using one of the output pins on the NGR to power the instrumentation amplifier chip. A couple of other pins were being used as diagnostic pins.

I was able to make the current draw problem go away by setting the digital outputs to inputs when not in use. Does that make sense, or am I missing something?

Thanks,
Bob
Find all posts by this user
Quote this message in a reply
11-07-2015, 01:35 AM
Post: #6
RE: NRG 2.0 Power Consumption
(11-06-2015 11:10 PM)bobatosf Wrote:  I was able to make the current draw problem go away by setting the digital outputs to inputs when not in use. Does that make sense, or am I missing something?

This depends on the topology of your circuit. The common practice is to set any pin connected to an external consumer as an output. You should then switch the output state to the level which will cause almost no current to circulate. For example, if this circuit includes a pull-up resistor then you will want to switch this output to HIGH and switch it to LOW if there is a pull-down resistor.

Configuring a pin as an input may work in some cases but you have to know that inputs can sink current from external consumers.

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
11-12-2015, 06:00 PM
Post: #7
RE: NRG 2.0 Power Consumption
If your circuit uses 2mA with pin as output/low and nothing with pin as input, you should double check for the presence of some (hidden?) pull-ups in your circuit. Remember that a Vcc connected to ground means there is a potentially active diode from that pin to all IOs...
Find all posts by this user
Quote this message in a reply
03-20-2017, 07:51 AM
Post: #8
RE: NRG 2.0 Power Consumption
Hi there!

I have a question: how much should be the minimum power consumption of the panStamp NRG2 in sleep mode, for example using swap.goToSleep()?

In my case is 70uA but I thing that is too much...Am I doing something wrong or 70uA is the NRG2's minimum power consumption? Confused Huh

Thanks Smile
Find all posts by this user
Quote this message in a reply
03-20-2017, 08:15 AM
Post: #9
RE: NRG 2.0 Power Consumption
Hi Mauro,

NRG typically consumes under 2 uA in sleep mode, with all sensors and outputs disabled. Your application is probably leaving a part of your circuit active.

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)