Hi there,
I use a RAK19007 WisBlock Base Board 2nd Gen with a ESP in the CPU slot ( RAK11200 WisBlock WiFi Module). In Slot C is the Bosch IMU (RAK12034). I measured the power consumption of the different components when the ESP is in deep sleep. The IMU takes 6mA (at 3,3V VDD). This page says it draws about 1,6 mA in high performance mode ( RAK12034 WisBlock 9-Axis Accelerometer Module Datasheet | RAKwireless Documentation Center -Features → second point)
I use PlatformIO with arduino framework on a mac.
Is there any setting that I can choose from to set it into 1,5mA “power” consumption?
Sorry for the formating, I don’t get it. The Code starts here:
EDIT BY STUFF<< use ``` before and after the code part
#define HIGH_G_INT 0x07
#define HIGH_G_THRESHOLD 0x80 * 15.63
bool initIMU() {
bmx160.wakeUp(); // enable the imuGyroscope and accelerometer sensor
uint8_t PMU_Status = 0;
bmx160.readReg(0x03, &PMU_Status, 1);
Serial.printf("[I] [initIMU]: PMU_Status = %x\r\n", PMU_Status);
bmx160.InterruptConfig(HIGH_G_INT,
HIGH_G_THRESHOLD); // Not sure if this is correct, InterruptConfig() takes uint8_t -> overflow?
bmx160.ODR_Config(BMX160_ACCEL_ODR_200HZ, BMX160_GYRO_ODR_200HZ); // set output data rate
float OrdBuf[2] = {0};
bmx160.get_ORD_Config(&OrdBuf[0], &OrdBuf[1]);
Serial.printf("[I] [initIMU]: OrdBuf[0]= %f, OrdBuf[1]= %f\r\n", OrdBuf[0], OrdBuf[1]);
/**
enum{eGyroRange_2000DPS,
eGyroRange_1000DPS,
eGyroRange_500DPS,
eGyroRange_250DPS,
eGyroRange_125DPS
}eGyroRange_t;
**/
bmx160.setGyroRange(eGyroRange_500DPS);
/**
enum{eAccelRange_2G,
eAccelRange_4G,
eAccelRange_8G,
eAccelRange_16G
}eAccelRange_t;**/
bmx160.setAccelRange(eAccelRange_4G);
if (enableIMUInterrupt) {
Serial.println("[I] [initIMU]: Enable wakeup by Interrupt");
pinMode(WB_IO3, INPUT_PULLDOWN);
attachInterrupt(digitalPinToInterrupt(WB_IO3), IMU_InterruptHandler, RISING);
} else {
Serial.println("Interrupt disabled");
}
delay(100);
getIMU(); // something like: bmx160.getAllData(&imuMagnitude, &imuGyroscope, &imuAccceleration);
// bmx160.setLowPower(); //disable the imuGyroscope and accelerometer sensor
return true;}