2023-06-08 01:56 AM - edited 2023-06-19 11:26 PM
Hello everyone,
I have designed a custom PCB with STM32WB15CC. I am using two sensors (VL53L1X and MPU6050). I am using CR2032 coin cell as a supply and I have big problems with the battery management. The project example is using sequencer and what I want to do is to take a single shot measurement with the VL53L1X sensor and then put the device to sleep until a wakeup command is received via bluetooth characteristics. What is the best way to implement this behavior when using sequencer?
The program behaves as expected when testing on NUCLEO-WB15CC. I first initialize the sensors and then use timer to trigger a function which returns accelerometer values. Then I check if I receive desired threshold values to call VL53L1X measurement. This is implemented in p2p_server_app.c. I would like to call the most convenient function to save power while keeping bluetooth connection alive since I want to wake up the device and do the same steps again when I send a command.
Please see attached files for more information about the design and codes.
Thank you for your time, best regards.
Example Project: STM32_WPAN / BLE_P2PServer
IDE version: STM32CubeIDE.1.12.0
Firmware Wireless binaries: stm32wb1x_BLE_Stack_full_fw from STM32Cube_FW_WB_V1.13.0
VL53L1X API: VL53L1X_API(STSW-IMG007)
Solved! Go to Solution.
2023-08-06 08:46 PM - last edited on 2023-08-06 11:49 PM by Anne BIGOT
Hi
With your email information, I can suggest, when you receive BT command, you can start L1X ranging one shoot and then stop sensor ranging, let sensor go to SW standby mode.
Attached my STM32 test code for your reference.
br
Zhiyuan.Han
2023-08-06 08:46 PM - last edited on 2023-08-06 11:49 PM by Anne BIGOT
Hi
With your email information, I can suggest, when you receive BT command, you can start L1X ranging one shoot and then stop sensor ranging, let sensor go to SW standby mode.
Attached my STM32 test code for your reference.
br
Zhiyuan.Han