Detecting HI-Z state of charge controller

The best way to measure the Hi-Z state is to hook up a voltage divider to the output. When the output is not being driven, the voltage will settle at the potential set by the voltage divider, which provides you with a third voltage to measure.

Distinguishing these three voltages using transistors is tricky, and probably not worth it - using an MCU, or failing that, window comparators, is a better solution.


I'm reasonably new to circuit design, but was struck with the same problem in that I did not want to put 5v on my 3.3v MCU. I also wanted something that did not draw much current.

As an alternative to the voltage divider that others have suggested, I used a second GPIO pin of the MCU to toggle a pull-up / pulldown resistor using a P-Channel and N-channel MOSFET (see circuit below). I then took STAT and put it through a simple inverted to ensure it is within the MCU 0v - 3.3v range. Note: Weaker Pull-up and pulldown resistors could probably be used to even further reduce current usage.

For this to work, the MCU would then need to take 2 readings, the first with CTL low and the second with CTL high. If the readings change, then ~STAT must be floating.

Hope this helps everyone.

enter image description here