- STM32F103
- nRF24L01+
- TP4056 Battery charger
- MPU9250
- Programming header (4x 2.54mm)
- Vbat Sensing
- Reset button
- Pairing button
- Status LED (blue)
- Power LED (red) (blinks slowly on low power)
2 choices:
- A switch to switch the power on or off
- Automatically switch off power on accelerometer idle
Setup an interrupt on the MPU9250 to trigger when the device is moved, somehow.
TP4056 cannot charge the battery while it is under load. (Discovered after the first prototype) Solution: Use the +Vin pins to detect USB power, and use it instead of the battery power. The regulator can handle it. Circuit with diodes.
Don't use power from the programming connector.
Use programmer's NRST pin. No hardware reset.
MPU_INT is active high. There is no pull down internally. On rising edge it means it's triggered.
NRF_INT is active low. There is a pull up resistor internaly. On falling edge it means it's triggered.
- Status LED (blue) blinks when the device first connect. Off in normal state.
- Maybe add a shake function to show status? On shake detection, it blinks to show the connection status.
- Power LED blinks fast when there is an error
- Power LED is slowly blinking when the power is low.
Press the pairing button on both devices at the same time.
- The receiver begins transmitting on the last channel. It broadcasts the (fixed) channel it's going to take in a few seconds.
- The transmitter switches to the channel and pairing is done.
The channels paired are stored in the backup registers of the µc. (See reference page 83.)