🛠 M5Stamp Timer Power 2: Wiring and First Boot
Objectives
This tutorial aims to integrate the M5Stamp Timer Power 2 into an advanced prototype. Unlike simple modules, this component requires a fine understanding of multi-stage energy management via the I2C bus. The goal is to confirm communication with the PY32L020 microcontroller, validate output voltages, and test ultra-low power consumption modes (6.72uA in shutdown).
Required Hardware
- M5Stamp Timer Power 2 board (PY32L020)
- Host microcontroller (e.g., ESP32 or Arduino) with I2C bus
- 5V DC power supply or 3.7V LiPo battery
- Precision multimeter (for measuring uA currents)
- Connecting wires (1.27mm pitch)
- I2C pull-up resistors (if not present on host)
Steps
- Physical Preparation: Solder the castellated pins or use an adapter. Ensure no short circuits on traces. The format is compact (18x14mm), handle with care.
- Power Connection: Connect the
EXT_5V_INOUTpin to your 5V source. If using a LiPo battery, connect it to dedicated terminals. Note that the LGS4056HDA circuit handles charging at 650mA or 180mA depending on configuration.
- I2C Wiring: Connect the module's SDA and SCL pins to your microcontroller. The default I2C address is
0x6E. Add pull-up resistors (4.7kΩ) if necessary to ensure bus stability at 400 kHz.
- Software Initialization: On the host, initialize the I2C bus. Send a read command to verify device presence. A valid response confirms the PY32L020 is active.
- Output Verification: Using a multimeter, measure voltages on
3V3_DCDC_OUTand3V3_LDO_OUT. They must be stable at 3.3V. Also checkPY_3V3.
- Consumption Test: Configure the module to shutdown mode via I2C. Measure the current draw. It should drop towards 6.72uA. Wake it up via an external interrupt to validate IRQ functionality.