This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC1310: RTOS/CC1310

Part Number: CC1310
Other Parts Discussed in Thread: SYSBIOS, TMP116

Tool/software: TI-RTOS

Hello,

I measure the total consumption of my personal PCB (CC1310 4x4 mm) intrefacée with a Tmp 116 sensor, in standby mode and I get readings around 129 μA. Our application requires a total system current consumption of less than 4 μA. What steps are we taking to achieve this, please?
NB: the sensor current in standby mode is approximately 3 μA. it is necessary to use SCS?
I'm working with the SDK for simplelink_CC13x0 and using CCS 8.0.

this is my code:

/*
* ======== rfEasyLinkTx.c ========
*/
/* XDCtools Header files */
#include <pthread.h>
#include <stdlib.h>
#include <xdc/std.h>
#include <xdc/runtime/System.h>
#include <xdc/runtime/Error.h>
#include <stdint.h>
#include <stddef.h>
#include <unistd.h>
#include <semaphore.h>
#include <ti/drivers/Power.h>
#include <ti/drivers/power/PowerCC26XX.h>


/* BIOS Header files */
#include <ti/drivers/rf/RF.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/drivers/GPIO.h>
#include <ti/drivers/I2C.h>


/* TI-RTOS Header files */
#include <ti/drivers/PIN.h>
#include <ti/drivers/Power.h>

#include <ti/devices/cc13x0/driverlib/aon_batmon.h>
#include <ti/devices/cc13x0/driverlib/aux_adc.h>
#include <ti/devices/cc13x0/driverlib/chipinfo.h>
#include <ti/devices/cc13x0/driverlib/sys_ctrl.h>
#include <semaphore.h>
#include <ti/sail/tmp116/tmp116.h>

/* Board Header files */
#include "Board.h"

/* EasyLink API Header files */
#include "easylink/EasyLink.h"

#include "sc/scif.h"

#include "version.h"
#include "../sonde_gw_fw/sys_intf.h"

#include <string.h>
#include <math.h>


#define RFEASYLINKTX_TASK_STACK_SIZE 1024
#define RFEASYLINKTX_TASK_PRIORITY 2

#define RFEASYLINKTX_BURST_SIZE 1

Task_Struct txTask; /* not static so you can see in ROV */
static Task_Params txTaskParams;
static uint8_t txTaskStack[RFEASYLINKTX_TASK_STACK_SIZE];

Task_Struct sensorTask; /* not static so you can see in ROV */
static Task_Params sensorTaskParams;
static uint8_t sensorTaskStack[RFEASYLINKTX_TASK_STACK_SIZE];

typedef struct {
uint8_t reason;
int16_t temp_deg_frac_8;
uint8_t bat_20mV;
} opto_sonde_data_t;

void sleepAndReset(uint32_t sleep_time_secs) {

// Enable button interrupt wake up
uint32_t secs = sleep_time_secs;
while (secs > 0)
{
uint32_t sleep_s = secs > 2000 ? 2000 : secs;
Task_sleep((sleep_s * 1000u * 1000) / Clock_tickPeriod);
secs -= sleep_s;
}

SysCtrlSystemReset();
}

static void rfEasyLinkTxFnx(UArg arg0, UArg arg1)
{

opto_sonde_data_t* optosonde_data = (opto_sonde_data_t*) arg0;

EasyLink_init(EasyLink_Phy_Custom);

/*
* If you wish to use a frequency other than the default, use
* the following API:
* EasyLink_setFrequency(868000000);
*/

/* Set output power to 12dBm */

EasyLink_setRfPwr(10);

EasyLink_TxPacket txPacket;

// Fill packet data
uint8_t payload_ptr = 0;
// Payload version
txPacket.payload[payload_ptr++] = (uint8_t) (0x0);
// Src MAC
EasyLink_getIeeeAddr(&txPacket.payload[payload_ptr]);
payload_ptr += 8;

// Copy data
txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->reason);
txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->temp_deg_frac_8 >> 8);
txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->temp_deg_frac_8);

txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->bat_20mV);

// Firmware version
memcpy(&txPacket.payload[payload_ptr], &VERSION_HASH, sizeof(VERSION_HASH));
payload_ptr += sizeof(VERSION_HASH);

txPacket.len = payload_ptr;
txPacket.absTime = 0;
txPacket.dstAddr[0] = OPTOSONDE_ADDR;

EasyLink_Status result = EasyLink_transmit(&txPacket);

if (result == EasyLink_Status_Success)
{
/* Toggle LED1 to indicate TX */
// PIN_setOutputValue(pinHandle, Board_PIN_LED1,!PIN_getOutputValue(Board_PIN_LED1));
}
else
{
/* Toggle LED1 and LED2 to indicate error */
// PIN_setOutputValue(pinHandle, Board_PIN_LED1,!PIN_getOutputValue(Board_PIN_LED1));
// PIN_setOutputValue(pinHandle, Board_PIN_LED2,!PIN_getOutputValue(Board_PIN_LED2));
}

// Prevent button reset overload
if (optosonde_data->reason == optosonde_reason_button) {
Task_sleep(1000000 / Clock_tickPeriod);
}
Task_sleep(5000 * 100);
// Tell RTC to sleep

uint32_t sleep_time_s = 1 * 30;

sleepAndReset(sleep_time_s);
}

void sendorTask(UArg arg0, UArg arg1)
{
static opto_sonde_data_t optosonde_data;


float temperature;
I2C_Handle i2c;
TMP116_Handle tmp116Handle;
I2C_Params i2cParams;

I2C_Params_init(&i2cParams);
i2cParams.transferMode = I2C_MODE_BLOCKING;
i2cParams.bitRate = I2C_400kHz;
i2c = I2C_open(Board_I2C_TMP, &i2cParams);
if (i2c == NULL) {

}
else { 
}

TMP116_init();
tmp116Handle = TMP116_open(Board_I2C_TMP, i2c, NULL);

if (tmp116Handle == NULL){ 
}else

}

sleep(2);
if (TMP116_getTemp(tmp116Handle, TMP116_CELSIUS, &temperature)) {

}

else {
}


if (TMP116_close(tmp116Handle)){

} else {

}
I2C_close(i2c);

uint16_t MSB = (uint8_t) (temperature);
uint8_t LSB = (uint8_t) ((temperature - MSB ) * 100);


optosonde_data.temp_deg_frac_8 = (MSB<<8) +LSB;

while (!AONBatMonNewBatteryMeasureReady())
{
// Wait
Task_sleep(1000 * 1000 / Clock_tickPeriod);
}
optosonde_data.bat_20mV = (AONBatMonBatteryVoltageGet() * 390625) / 2000000;
AONBatMonDisable();

// Init Tx task
Task_Params_init(&txTaskParams);
txTaskParams.stackSize = RFEASYLINKTX_TASK_STACK_SIZE;
txTaskParams.priority = RFEASYLINKTX_TASK_PRIORITY + 1;
txTaskParams.stack = &txTaskStack;
txTaskParams.arg0 = (xdc_UArg) &optosonde_data;

Task_construct(&txTask, rfEasyLinkTxFnx, &txTaskParams, NULL);

}

/*
* ======== main ========
*/
int opto_main(void)
{
/* Call driver init functions. */
Board_initGeneral();
Board_initI2C();

// Sensor task
Task_Params_init(&sensorTaskParams);
txTaskParams.stackSize = RFEASYLINKTX_TASK_STACK_SIZE;
txTaskParams.priority = RFEASYLINKTX_TASK_PRIORITY;
txTaskParams.stack = &sensorTaskStack;
txTaskParams.arg0 = 0;
txTaskParams.arg1 = 0;

Task_construct(&sensorTask,sendorTask,&sensorTaskParams, NULL);

/* Start BIOS */
BIOS_start();

return (0);
}

  • Hi,

    When you put the CC1310 device into standby, have you made sure to shutdown the TMP116 sensor (this consumes ~135 uA while performing active conversions). Furthermore, could you elaborate on the usage of "sleepAndReset" in your system?
  • Part Number: CC1310

    Tool/software: TI-RTOS

    Hello,

    I measure the total consumption of my personal PCB (CC1310 4x4 mm) intrefacée with a Tmp 116 sensor, in standby mode and I get readings around 129 μA. Our application requires a total system current consumption of less than 4 μA. What steps are we taking to achieve this, please?
    NB: the sensor current in standby mode is approximately 3 μA. it is necessary to use SCS?
    I'm working with the SDK for simplelink_CC13x0 and using CCS 8.0.

    this is my code:

    /*
    * ======== rfEasyLinkTx.c ========
    */
    /* XDCtools Header files */
    #include <pthread.h>
    #include <stdlib.h>
    #include <xdc/std.h>
    #include <xdc/runtime/System.h>
    #include <xdc/runtime/Error.h>
    #include <stdint.h>
    #include <stddef.h>
    #include <unistd.h>
    #include <semaphore.h>
    #include <ti/drivers/Power.h>
    #include <ti/drivers/power/PowerCC26XX.h>


    /* BIOS Header files */
    #include <ti/drivers/rf/RF.h>
    #include <ti/sysbios/BIOS.h>
    #include <ti/sysbios/knl/Task.h>
    #include <ti/sysbios/knl/Clock.h>
    #include <ti/drivers/GPIO.h>
    #include <ti/drivers/I2C.h>


    /* TI-RTOS Header files */
    #include <ti/drivers/PIN.h>
    #include <ti/drivers/Power.h>

    #include <ti/devices/cc13x0/driverlib/aon_batmon.h>
    #include <ti/devices/cc13x0/driverlib/aux_adc.h>
    #include <ti/devices/cc13x0/driverlib/chipinfo.h>
    #include <ti/devices/cc13x0/driverlib/sys_ctrl.h>
    #include <semaphore.h>
    #include <ti/sail/tmp116/tmp116.h>

    /* Board Header files */
    #include "Board.h"

    /* EasyLink API Header files */
    #include "easylink/EasyLink.h"

    #include "sc/scif.h"

    #include "version.h"
    #include "../sonde_gw_fw/sys_intf.h"

    #include <string.h>
    #include <math.h>


    #define RFEASYLINKTX_TASK_STACK_SIZE 1024
    #define RFEASYLINKTX_TASK_PRIORITY 2

    #define RFEASYLINKTX_BURST_SIZE 1

    Task_Struct txTask; /* not static so you can see in ROV */
    static Task_Params txTaskParams;
    static uint8_t txTaskStack[RFEASYLINKTX_TASK_STACK_SIZE];

    Task_Struct sensorTask; /* not static so you can see in ROV */
    static Task_Params sensorTaskParams;
    static uint8_t sensorTaskStack[RFEASYLINKTX_TASK_STACK_SIZE];

    typedef struct {
    uint8_t reason;
    int16_t temp_deg_frac_8;
    uint8_t bat_20mV;
    } opto_sonde_data_t;

    void sleepAndReset(uint32_t sleep_time_secs) {

    // Enable button interrupt wake up
    uint32_t secs = sleep_time_secs;
    while (secs > 0)
    {
    uint32_t sleep_s = secs > 2000 ? 2000 : secs;
    Task_sleep((sleep_s * 1000u * 1000) / Clock_tickPeriod);
    secs -= sleep_s;
    }

    SysCtrlSystemReset();
    }

    static void rfEasyLinkTxFnx(UArg arg0, UArg arg1)
    {

    opto_sonde_data_t* optosonde_data = (opto_sonde_data_t*) arg0;

    EasyLink_init(EasyLink_Phy_Custom);

    /*
    * If you wish to use a frequency other than the default, use
    * the following API:
    * EasyLink_setFrequency(868000000);
    */

    /* Set output power to 12dBm */

    EasyLink_setRfPwr(10);

    EasyLink_TxPacket txPacket;

    // Fill packet data
    uint8_t payload_ptr = 0;
    // Payload version
    txPacket.payload[payload_ptr++] = (uint8_t) (0x0);
    // Src MAC
    EasyLink_getIeeeAddr(&txPacket.payload[payload_ptr]);
    payload_ptr += 8;

    // Copy data
    txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->reason);
    txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->temp_deg_frac_8 >> 8);
    txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->temp_deg_frac_8);

    txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->bat_20mV);

    // Firmware version
    memcpy(&txPacket.payload[payload_ptr], &VERSION_HASH, sizeof(VERSION_HASH));
    payload_ptr += sizeof(VERSION_HASH);

    txPacket.len = payload_ptr;
    txPacket.absTime = 0;
    txPacket.dstAddr[0] = OPTOSONDE_ADDR;

    EasyLink_Status result = EasyLink_transmit(&txPacket);

    if (result == EasyLink_Status_Success)
    {
    /* Toggle LED1 to indicate TX */
    // PIN_setOutputValue(pinHandle, Board_PIN_LED1,!PIN_getOutputValue(Board_PIN_LED1));
    }
    else
    {
    /* Toggle LED1 and LED2 to indicate error */
    // PIN_setOutputValue(pinHandle, Board_PIN_LED1,!PIN_getOutputValue(Board_PIN_LED1));
    // PIN_setOutputValue(pinHandle, Board_PIN_LED2,!PIN_getOutputValue(Board_PIN_LED2));
    }

    // Prevent button reset overload
    if (optosonde_data->reason == optosonde_reason_button) {
    Task_sleep(1000000 / Clock_tickPeriod);
    }
    Task_sleep(5000 * 100);
    // Tell RTC to sleep

    uint32_t sleep_time_s = 1 * 30;

    sleepAndReset(sleep_time_s);
    }

    void sendorTask(UArg arg0, UArg arg1)
    {
    static opto_sonde_data_t optosonde_data;


    float temperature;
    I2C_Handle i2c;
    TMP116_Handle tmp116Handle;
    I2C_Params i2cParams;

    I2C_Params_init(&i2cParams);
    i2cParams.transferMode = I2C_MODE_BLOCKING;
    i2cParams.bitRate = I2C_400kHz;
    i2c = I2C_open(Board_I2C_TMP, &i2cParams);
    if (i2c == NULL) {

    }
    else {
    }

    TMP116_init();
    tmp116Handle = TMP116_open(Board_I2C_TMP, i2c, NULL);

    if (tmp116Handle == NULL){
    }else
    {
    }

    sleep(2);
    if (TMP116_getTemp(tmp116Handle, TMP116_CELSIUS, &temperature)) {

    }

    else {
    }


    if (TMP116_close(tmp116Handle)){

    } else {

    }
    I2C_close(i2c);

    uint16_t MSB = (uint8_t) (temperature);
    uint8_t LSB = (uint8_t) ((temperature - MSB ) * 100);


    optosonde_data.temp_deg_frac_8 = (MSB<<8) +LSB;

    while (!AONBatMonNewBatteryMeasureReady())
    {
    // Wait
    Task_sleep(1000 * 1000 / Clock_tickPeriod);
    }
    optosonde_data.bat_20mV = (AONBatMonBatteryVoltageGet() * 390625) / 2000000;
    AONBatMonDisable();

    // Init Tx task
    Task_Params_init(&txTaskParams);
    txTaskParams.stackSize = RFEASYLINKTX_TASK_STACK_SIZE;
    txTaskParams.priority = RFEASYLINKTX_TASK_PRIORITY + 1;
    txTaskParams.stack = &txTaskStack;
    txTaskParams.arg0 = (xdc_UArg) &optosonde_data;

    Task_construct(&txTask, rfEasyLinkTxFnx, &txTaskParams, NULL);

    }

    /*
    * ======== main ========
    */
    int opto_main(void)
    {
    /* Call driver init functions. */
    Board_initGeneral();
    Board_initI2C();

    // Sensor task
    Task_Params_init(&sensorTaskParams);
    txTaskParams.stackSize = RFEASYLINKTX_TASK_STACK_SIZE;
    txTaskParams.priority = RFEASYLINKTX_TASK_PRIORITY;
    txTaskParams.stack = &sensorTaskStack;
    txTaskParams.arg0 = 0;
    txTaskParams.arg1 = 0;

    Task_construct(&sensorTask,sendorTask,&sensorTaskParams, NULL);

    /* Start BIOS */
    BIOS_start();

    return (0);
    }

  • Duplication of e2e.ti.com/.../2564800

    Please do not start multiple threads asking the same question.
  • Thank you for reply,

    Yes I am sure that my sensor goes into shutdown mode, my sensor consumes 3-1 uA (One-Shot Mode (OS)), abot sleepandreset, it's the function I did not understand,
    so what instruction that allows the sensor to go into standby mode, please?
  • I'm not sure I follow you here. If you are indeed sure the sensor are in shutdown mode (have you verified this?) then you should know what instructions put the sensor in shutdown or standby mode.

    Just for me to clarify what we are talking about, the "sleepAndReset" function are mentioned in the context, are you actually referring to the CC1310 device as sensor here as well? If you are unsure on what the function does, could you provide me with some context on what you based your code on so that I might better help explaining it's purpose.
  • Thank you for your reply,
    Can you explain this fonction because it's made by another, please :


    void sleepAndReset(uint32_t sleep_time_secs) {

    // Enable button interrupt wake up
    uint32_t secs = sleep_time_secs;
    while (secs > 0)
    {
    uint32_t sleep_s = secs > 2000 ? 2000 : secs;
    Task_sleep((sleep_s * 1000u * 1000) / Clock_tickPeriod);
    secs -= sleep_s;
    }

    SysCtrlSystemReset();
    }
  • It does simply what the name says it does, it sleeps for a while and then performs a full system reset. Why you would want this function I can not answer, you would have to ask the initial software designer.
  • Thank you for reply,
    what instruction that allows the CC1310 to go into standby mode, please?
  • There is no specific instruction that puts the device in to standby, the closest you get is calling Power_standbyPolicy() (which you typically don't do when using TI-RTOS). When using TI-RTOS you dont need to worry about calling this function as the Idle task will invoke it. So if you for example perform an long Task_sleep() and there is nothing for the device to do (and no part of the application sets power constraints) the Idle task will invoke Power_standbyPolicy(). Power_standbyPolicy() will put the device in to the lowest state allowed by the current constraints and timings.
  • Thank You very much,
    Can You explain this: runtime object view, please:

    [
    {
    "module": "ti.sysbios.knl.Task",
    "view": "Basic"
    },
    [
    {
    "address": "0x20000964",
    "label": "ti.sysbios.knl.Task.IdleTask",
    "priority": "0",
    "mode": "Running",
    "fxn": [
    "ti_sysbios_knl_Idle_loop__E"
    ],
    "arg0": "0x0",
    "arg1": "0x0",
    "stackSize": "512",
    "stackBase": "0x20001830",
    "curCoreId": "n/a",
    "affinity": "n/a"
    },
    {
    "address": "0x20000c78",
    "label": "",
    "priority": "3",
    "mode": "Blocked",
    "fxn": [
    "rfEasyLinkTxFnx"
    ],
    "arg0": "0x20000bf8",
    "arg1": "0x0",
    "stackSize": "1024",
    "stackBase": "0x20000d18",
    "curCoreId": "n/a",
    "affinity": "n/a"
    },
    {
    "address": "0x20000cc8",
    "label": "",
    "priority": "1",
    "mode": "Terminated",
    "fxn": [
    "sendorTask"
    ],
    "arg0": "0x0",
    "arg1": "0x0",
    "stackSize": "512",
    "stackBase": "0x20001c20",
    "curCoreId": "n/a",
    "affinity": "n/a"
    }
    ]
    ]
  • From what I can tell the "Idle Task" is currently running:

    [
    {
    "address": "0x20000964",
    "label": "ti.sysbios.knl.Task.IdleTask",
    "priority": "0",
    "mode": "Running",
    "fxn": [
    "ti_sysbios_knl_Idle_loop__E"
    ],

    rfEasyLinkTxFxn is blocked (pending on something or someone):
    {
    "address": "0x20000c78",
    "label": "",
    "priority": "3",
    "mode": "Blocked",
    "fxn": [
    "rfEasyLinkTxFnx"
    ],

    sendorTask has terminated (due to the task function reaching the end and returning after creating the rfEasyLinkTxFxn task):

    {
    "address": "0x20000cc8",
    "label": "",
    "priority": "1",
    "mode": "Terminated",
    "fxn": [
    "sendorTask"
    ],
  • Thank You !!!

    I have two pin analog DIO7 and DIO8 on my PCB used for temperature measurement via a resistor, these pin currently floating, can be the source of this couant?
  • Pins used as input left floating could easily lead to extra current if not defined.

    I couldn't find how you define the DIO7 and DIO8?
  • Thanks !!!
    I have two pin analog DIO7 and DIO8 on my PCB used for temperature measurement via a resistor, these pin currently floating, can be the source of this couant? If yes, how? please
  • Are defined in the cc1310_lancher.h:

    GPIO_PinConfig gpioPinConfigs[] = {
    /* Input pins */
    GPIOCC26XX_DIO_13 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING, /* Button 0 */
    GPIOCC26XX_DIO_14 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING, /* Button 1 */

    /* Output pins */
    GPIOCC26XX_DIO_07 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW, /* Green LED */
    GPIOCC26XX_DIO_06 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW, /* Red LED */
    };


    So what is the source of the current 127 uA (System=Custem PCB+TMP116)?
    NB: the sensor current in standby mode is approximately 3 μA!!
  • Not following. You are stating that DIO7 and DIO8 are inputs. Here, you show DIO7 as output and DIO8 as undefined?
  • Thank you for your reply TER!!!

    These pins are not used how to do in this case, Please ?

    GPIO_PinConfig gpioPinConfigs[] = {
    /* Input pins */
    GPIOCC26XX_DIO_13 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING, /* Button 0 */
    GPIOCC26XX_DIO_14 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING, /* Button 1 */

    /* Output pins */
    GPIOCC26XX_DIO_07 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW, /* Green LED */
    GPIOCC26XX_DIO_06 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW, /* Red LED */
    };

    /*
    * Array of callback function pointers
    * NOTE: The order of the pin configurations must coincide with what was
    * defined in CC1310_LAUNCH.h
    * NOTE: Pins not used for interrupts can be omitted from callbacks array to
    * reduce memory usage (if placed at end of gpioPinConfigs array).
    */
    GPIO_CallbackFxn gpioCallbackFunctions[] = {
    NULL, /* Button 0 */
    NULL, /* Button 1 */

    };
  • TER,

    this post a day earlier:

    Yes I am sure that my sensor goes into shutdown mode, my sensor consumes 3-1 uA (One-Shot Mode (OS)), abot sleepandreset, it's the function I did not understand,
    so what instruction that allows the sensor to go into standby mode, please?

    It is obvious that a sensor is not in a shutdown. Shoud be @ 500nA.
    If sensor is in a shutdown why a question about sensor standby mode instructions?
    That is why I decided to do not participate in abdelkader posts.

    Being volunteer, ethic is the first.
  • Hello,
    Excuse me, on this question you're right, it's error instead of writing the microcontroller I wrote sensor, thank you for your patience with me, I'm a student and I was late in my project for find the solution to the problem of the current.
  • To get help with a problem it's very important to describe the problem and your system. Even more so when you are a student since our job is not to do your homework. We can give you answers to specific questions but finding excess current on hardware we don't have is something different.

    What have you actually done to debug this? One thing I would have done is to start from scratch with the simplest code possible and add more functionality to it step by step. Which added functionality causes extra current and why is that?
  • Actually, this current comes from the sensor? in this case what can I do?
  • If the current draw is actually comes from the sensor you have to look into methods to keep the sensor in power down either by programming it or removing the power to the sensor.