Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - martin7743

Pages: [1]
1
I am using 2 Simblee devices (sparkfun breakoutboards) and want to establish a power efficient wireless communication via SimbleeCOM between them.
Therefore I used the 2 standard sample sketches for sending and receiving via SimbleeCOM.
The first device ist continuously sending every second and the other devices continuously receiving.
Everything works but is using a lot of power.
So a modified the sending part by changing the loop to: 
Code: [Select]
void loop()
{
 SimbleeCOM.begin();
 SimbleeCOM.send(payload, sizeof(payload));
 SimbleeCOM.end();
 Simblee_ULPDelay(1000); 
}

Everything still works fine!

But if trying a similar power saving trick with the receiving part, the SimbleeCOM_onReceive callback is never called.
(see the complete receiving sketch below)

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

void setup()
{
 pinMode(2, OUTPUT); //this is the red LED (sparkfun simblee breakoutboard)
 SimbleeCOM.mode = LOW_LATENCY;
 SimbleeCOM.begin();
}

void loop()
{
  Simblee_ULPDelay(1000); //without this line everything works
}

void SimbleeCOM_onReceive(unsigned int esn, const char *payload, int len, int rssi)
{
 digitalWrite(2, HIGH);
}

So I am asking, is this normal desired behaviour or a bug or am I doing something wrong?

Best regards,
Martin

2
Hi,

even if "RFduino_ULPDelay( INFINITE )" is called and Connection Interval is set to 1000ms (and connection established), every 4 seconds some extra current (red dots in diagram) is drawn.
Does anyone know the reason therefore and does someone have an idea what I can do against it?



Code: [Select]
//24.07.2016
//Arduino 1.5.8
//RFDuino-Lib v 2.2.4
//RFduino is comsuming some additional power every 4 seconds (no matter if advertising or connected)

#include <RFduinoBLE.h>

void RFduinoBLE_onConnect() //callback if connection starts; set connection intervall here; (is called only once, at beginning of connection)
{   
  RFduinoBLE.updateConnInterval(1000, 1000); //ms (min, max)  [7.5-4000ms in 1.25ms steps] //default [20ms] (16,24)?;   
}

void setup()
{
  RFduinoBLE.advertisementInterval = 1000; //ms (default: 80) (Range: 20-10240 in 0.625ms steps)   
  RFduinoBLE.begin();   
  //RFduinoBLE.end();
}

void loop()
{       
  //android app "BLE Device Scan - BluetoothLeGatt" connects with RFduino; (Android 4.4.2)
  RFduino_ULPDelay( INFINITE ); //ms  //ulp would draw <5µA if BLE advertising (started with RFduinoBLE.begin()
                                      // has been stopped before (with RFduinoBLE.end())
}

Some diagram related infos:
The white numbers are voltage measurements in [mV] at a 100 Ohm shunt. So a value of 33mV for example means 330µA current.
The black [µA] value is the long term current average.
The non uniform peak height is due to aliasing effects of this undersampled measurement. If measured with 1000 Samples/s, these 1s connection peaks have more or less the same height (and higher peak levels).

Best regards,
Martin

Pages: [1]