Author Topic: Using a RFDuino rfd22102 as a BLE tag  (Read 5250 times)

MisterMike

  • RFduino Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Using a RFDuino rfd22102 as a BLE tag
« on: October 25, 2014, 07:52:55 AM »
Dear reader,

I am currently having problems using my RFD22102 BLE module board.

I have a RD22102 BLE module, attached to it is a RFD22128 Coin battery shield.

Im trying to make the BLE chipset advertise its name over BLE (Bluetooth Low Energy) so some of my sensors across the house can pick him up.

However; the problem is; the chipset wont last for a day. I've heard alot about BLE and was very disappointed to see my coincell batteries dieing over a day. The sensors I have placed around my house are sensors with BLE antennas.

Do you guys maybe know what the cause is of my battery dieing that quickly?! The batteries are standard CR2032 3Volt Lithium batteries.

The code I have uploaded to the RFDuino is the following;


#include <RFduinoBLE.h>

void setup()
{
  RFduinoBLE.deviceName = "RFduino";
  RFduinoBLE.advertisementData = "data";
  RFduinoBLE.advertisementInterval = MILLISECONDS(1000);
  RFduinoBLE.txPowerLevel = 0;  // (-20dbM to +4 dBm)

  // start the BLE stack
  RFduinoBLE.begin();
}

void loop()
{
  // switch to lower power mode
  RFduino_ULPDelay(INFINITE); 

  // to send one char
  // RFduinoBLE.send((char)temp);

  // to send multiple chars
  // RFduinBLE.send(&data, len);
}

void RFduinoBLE_onAdvertisement(bool start)
{
}



Is there maybe an other, energy-saving way to make the chipset broadcast his name? The only thing I need the chipset to send out is its name, pairing process is not relevant.

Thanks in advance.


MisterMike

  • RFduino Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #1 on: October 26, 2014, 04:53:30 AM »
Just tested another battery - After a day the POWER light on the battery coin shield dims and I cant find any bluetooth devices with my scans anymore.

tolson

  • Global Moderator
  • *****
  • Posts: 812
  • Karma: +19/-0
    • View Profile
    • Thomas Olson Consulting
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #2 on: October 26, 2014, 12:29:34 PM »
Quote
  RFduinoBLE.advertisementInterval = MILLISECONDS(1000);

That doesn't look right. Should be...
Code: [Select]
  RFduinoBLE.advertisementInterval = 1000; // already in milliseconds.

Quote
Is there maybe an other, energy-saving way to make the chipset broadcast his name? The only thing I need the chipset to send out is its name, pairing process is not relevant.
How about start out super simple and see how the battery holds up.

Code: [Select]
#include <RFduinoBLE.h>

void setup()
{
  RFduinoBLE.deviceName = "MRmike";

  RFduinoBLE.begin();
}

void loop()
{
  RFduino_ULPDelay(INFINITE);
}

MisterMike

  • RFduino Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #3 on: October 26, 2014, 01:51:23 PM »
Thanks for your reply tolson.

What is the default Tx power maintained by the BLE RFDuino if I just call RFDuinoBLE.begin(); ? Any pre-set value?

Thanks

tolson

  • Global Moderator
  • *****
  • Posts: 812
  • Karma: +19/-0
    • View Profile
    • Thomas Olson Consulting
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #4 on: October 26, 2014, 05:43:03 PM »
I think the default is usually 4 dBm.

Did the minimum sketch resolve your battery drain time.

Do have multi-meter to measure current draw or oscilloscope.

Are you using nRF Master Control Panel to analyze your BLE info?

MisterMike

  • RFduino Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #5 on: October 27, 2014, 03:47:42 AM »
Dear tolson,

Thanks for your reply.

The minimum sketch unfortunately doenst hold longer than a day.

I have now triex a tx power level of -2dbm and its still holding out after a day. Maybe that helps.

Im currently looking for an oscilloscope to use, and thanks for the app suggestion of nRF. Im currently taking a look.


Do you maybe have a programming suggestion / way of advertisement for my situation?

The tag just has to sent out it's name every 10 seconds, and then sleep. I presume it does now, but maybe there's another way of waking it up during a scan?


Regards

bsiever

  • RFduino Full Member
  • ***
  • Posts: 89
  • Karma: +4/-0
    • View Profile
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #6 on: October 27, 2014, 05:33:21 AM »
Just tested another battery - After a day the POWER light on the battery coin shield dims and I cant find any bluetooth devices with my scans anymore.

I don't have the battery shield and am not quite sure how it works...but just to check, you aren't leaving the LED on all the time are you? (If my math/process is right, the LED's resistor alone would use ~10mA. A CR2032 is about 200mAh. 200mAh/10mA = ~20hrs)


MisterMike

  • RFduino Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #7 on: October 27, 2014, 06:40:03 AM »
Just tested another battery - After a day the POWER light on the battery coin shield dims and I cant find any bluetooth devices with my scans anymore.

I don't have the battery shield and am not quite sure how it works...but just to check, you aren't leaving the LED on all the time are you? (If my math/process is right, the LED's resistor alone would use ~10mA. A CR2032 is about 200mAh. 200mAh/10mA = ~20hrs)

Thanks for your reply bsiever, yes I do leave the LED on all the time to see if it dims (to see any reducing activity). I've been thinking to leave it off to see the difference however I'm an software engineer, not a electrical engineer. Would a constant 10mA charge be a game changer in my case? E.g. leaving the LED off would prolong the battery life?

tolson

  • Global Moderator
  • *****
  • Posts: 812
  • Karma: +19/-0
    • View Profile
    • Thomas Olson Consulting
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #8 on: October 27, 2014, 10:37:21 AM »
Would a constant 10mA charge be a game changer in my case? E.g. leaving the LED off would prolong the battery life?

Hi MisterMike,
bseiver is correct when he deduced that the circuitry on the battery shield is what is draining your battery. There is a dip switch on the battery shields to disconnect the LED.

Yes, leaving an LED on, as well as any  kind of sensor or display will draw down your battery fast. The Low Energy part of BLE really only refers to the current draw of the transceiver when it is not being used. If the goal of a device is also to be low energy, then anything that draws current should do so only momentarily when it is needed.


MisterMike

  • RFduino Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #9 on: October 29, 2014, 01:24:54 PM »
Thanks for your replies people. The only thing I have to find out now is the power usage of a 1 second -20dBm advertisement... Any suggestions?

tolson

  • Global Moderator
  • *****
  • Posts: 812
  • Karma: +19/-0
    • View Profile
    • Thomas Olson Consulting
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #10 on: October 29, 2014, 05:23:49 PM »
Thanks for your replies people. The only thing I have to find out now is the power usage of a 1 second -20dBm advertisement... Any suggestions?

Do you have an mA/uA meter? Oscilloscope?

MisterMike

  • RFduino Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #11 on: October 30, 2014, 04:53:25 AM »
Unfortunately not at the moment.

However; i can tell you the following;

The RFDuino with a CR2032 battery, with a Coin battery shield LED turned on managed to survive for 5 days.

I'm still amazed at how manufacturers claim a battery life of a year when using BLE. How do they do it?

Can you guys maybe give an rough estimation on the battery life extension if I  turn the LED off? Every 10 seconds I advertise with "data" in it. However, this is also not needed. Could that save some battery life too?

I'm still hoping for the claim of 0,5 - 1 year of battery life! :-[

bsiever

  • RFduino Full Member
  • ***
  • Posts: 89
  • Karma: +4/-0
    • View Profile
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #12 on: October 30, 2014, 06:37:24 AM »
I'm still amazed at how manufacturers claim a battery life of a year when using BLE. How do they do it?

The LED was drawing a lot of power compared to the radio. If you look at the BLE devices on the market that claim a 1+ year life you'll find that most don't have any lights/LEDs/motors. Those that do have LEDs usually only blink them in special, rare circumstances. They also blink on for just a few milliseconds at a time (it may only be "on" for a total of a few seconds over the course of a year).

Other things can also cause a higher power consumption (like the "Serial" object to print debugging messages). You should probably find a way to measure power and then you can try to adjust your sketch to minimize power usage. Based on actual power usage you will be able to estimate battery life.

callmekart

  • RFduino Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Using a RFDuino rfd22102 as a BLE tag
« Reply #13 on: April 19, 2015, 08:52:19 PM »
Using a multimeter, here are my values -

MCU Shield(+4DBm) + Coin Battery shield(LED ON) + USB Shield(not connected to PC) - ~15mA
MCU Shield(+4DBm) + Coin Battery shield(LED ON) - ~5mA
MCU Shield(-20DBm) + Coin Battery shield(LED ON) - ~0.7mA
MCU Shield(-20DBm) + Coin Battery shield(LED OF) - ~0.4mA


 

anything