LibreSolar / bms-c1

16s / 100A Battery Management System
https://libre.solar/bms-c1/manual/
Other
120 stars 38 forks source link

Switching off with button does not work #26

Closed martinjaeger closed 1 year ago

martinjaeger commented 2 years ago

The TS2 / WAKE pin of the bq76952 is only pulled up during shutdown mode, but not during operation. Thus, the MCU cannot detect if the button is long-pressed to put the battery pack into sleep mode.

Even though the TS2 pin is a multi-purpose pin, it cannot be configured as an output, but only as a general purpose ADC input.

We need something like an additional external pull-up to the 3V3 rail.

EarthLord commented 2 years ago

Not sure if I understand this situation completely, wouldn't the internal pull up on STM32 help?

martinjaeger commented 2 years ago

You are right, that's probably sufficient. Will double-check this next week.

martinjaeger commented 2 years ago

An internal pull-up does not help IMO: image

The BTN_SIGNAL is read by the MCU and the BTN_1 is floating after wake-up, which means we cannot detect any button-switch with BTN_SIGNAL pulled up either.

martinjaeger commented 2 years ago

New circuit introduced in new design. Will close the issue after testing.

martinjaeger commented 1 year ago

Fixed in current board design.