Hi,
I´m working on a Zigbee-based environment sensor. You can find all related files here: https://github.com/Kampi/BeeLight
Now I have the following scenario: the whole sensor consumes around 5 mA in idle mode (when going to sleep to wait for a new transmission interval). I´ve started to investigate the issue by using a PPK 2, and I got the following results:
Setup:
- Zigbee2MQTT
- Tx power set to 0
- Device connected to the Zigbee network
Test case 1:
Change main in main.c to:
int main(void) { //dk_buttons_init(button_changed); //dk_leds_init(); //register_factory_reset_button(FACTORY_RESET_BUTTON); /* Register callback for handling ZCL commands. */ //ZB_ZCL_REGISTER_DEVICE_CB(zcl_device_cb); /* Register device context (endpoints). */ //ZB_AF_REGISTER_DEVICE_CTX(&env_sensor_ctx); //clusters_attr_init(); /* Register handler to identify notifications. */ //ZB_AF_SET_IDENTIFY_NOTIFICATION_HANDLER(SENSOR_ENDPOINT, identify_cb); /* Start Zigbee default thread. */ //zigbee_enable(); //zbus_chan_add_obs(&light_data_chan, &light_data_lis, K_MSEC(100)); //zbus_chan_add_obs(&battery_data_chan, &battery_data_lis, K_MSEC(100)); //zbus_chan_add_obs(&env_data_chan, &env_data_lis, K_MSEC(100)); //LOG_INF("BeeLight application started"); return 0; }
Goals:
- No I2C transmissions
- No Zigbee enabled
- Periodic wakeup of the processor to read the sensors
- Since no I2C, the sensors can´t be read
- No reports to Zigbee network
I got an average of 780 uA. I can´t say if this is good or bad because I don´t know any reference values.
Test case 2:
Change main in main.c to:
int main(void)
{
//dk_buttons_init(button_changed);
//dk_leds_init();
//register_factory_reset_button(FACTORY_RESET_BUTTON);
/* Register callback for handling ZCL commands. */
//ZB_ZCL_REGISTER_DEVICE_CB(zcl_device_cb);
/* Register device context (endpoints). */
ZB_AF_REGISTER_DEVICE_CTX(&env_sensor_ctx);
clusters_attr_init();
/* Register handler to identify notifications. */
ZB_AF_SET_IDENTIFY_NOTIFICATION_HANDLER(SENSOR_ENDPOINT, identify_cb);
/* Start Zigbee default thread. */
zigbee_enable();
//zbus_chan_add_obs(&light_data_chan, &light_data_lis, K_MSEC(100));
//zbus_chan_add_obs(&battery_data_chan, &battery_data_lis, K_MSEC(100));
//zbus_chan_add_obs(&env_data_chan, &env_data_lis, K_MSEC(100));
//LOG_INF("BeeLight application started");
return 0;
}
Goals:
- No I2C transmissions
- Zigbee enabled
- Periodic wakeup of the processor to read the sensors
- Since no I2C, the sensors can´t be read
- No reports to the Zigbee network
I got an average of 4.2 to 4.8 mA, so enabling Zigbee increases the current consumption by a factor of 6?!
Questions:
- Do you have some values as a reference to compare with?
- Do I have any additional power-saving options?
- How can I cut down the current consumption?