I've been working on this circuit, posting about my progress on a different thread, but what I'm about to describe is so unusual (at least for me) that I thought it deserved its own thread.
The circuit in question is designed to allow connecting a bank of batteries (bank B) to a circuit and when that happens, a second bank of batteries (Bank A) is disengaged. An auxiliary circuit comprised of Q7 and Q8 is there to enable Battery bank A even when Bank B is connected.
I also need to be able to measure the voltages of both battery banks every once in a while so as to know when it's time to replace them. The late and extremely generous (and dearly missed) OBW0549 showed me how to accomplish this using two transistors and a voltage divider.
So to measure battery Bank B's voltage (when said bank is connected to the circuit), the gate of nFet Q3 is pulled high. This in effect pulls the gate of Q2 low and lets current flow through R3 and R4, which work as voltage dividers. This brings down the voltage to a workable level so that the MCU is able to read it at the node labeled ADC2.
The problem is that when battery Bank B is disconnected, the MCU is still sensing a voltage level at ADC2 (about 0.96V) and that's not supposed to happen. So I took my MM, and measured the voltage between ground and TEST POINT and lo and behold! ... my MM read 6.3V at said node even though battery Bank B was disconnected! ... the only explanation I can find is that somehow D4 is leaking reverse current that's flowing from battery Bank a through D2, and then back into Q2 and R3 and R4.
The values of R3 and R4 are 1k and 470 ohms, respectively. The diodes being used are PMEG4050EP,115
What gives? How can I get a reading of 0V at ADC2 when battery Bank B is disonnected?
The circuit in question is designed to allow connecting a bank of batteries (bank B) to a circuit and when that happens, a second bank of batteries (Bank A) is disengaged. An auxiliary circuit comprised of Q7 and Q8 is there to enable Battery bank A even when Bank B is connected.
I also need to be able to measure the voltages of both battery banks every once in a while so as to know when it's time to replace them. The late and extremely generous (and dearly missed) OBW0549 showed me how to accomplish this using two transistors and a voltage divider.
So to measure battery Bank B's voltage (when said bank is connected to the circuit), the gate of nFet Q3 is pulled high. This in effect pulls the gate of Q2 low and lets current flow through R3 and R4, which work as voltage dividers. This brings down the voltage to a workable level so that the MCU is able to read it at the node labeled ADC2.
The problem is that when battery Bank B is disconnected, the MCU is still sensing a voltage level at ADC2 (about 0.96V) and that's not supposed to happen. So I took my MM, and measured the voltage between ground and TEST POINT and lo and behold! ... my MM read 6.3V at said node even though battery Bank B was disconnected! ... the only explanation I can find is that somehow D4 is leaking reverse current that's flowing from battery Bank a through D2, and then back into Q2 and R3 and R4.
The values of R3 and R4 are 1k and 470 ohms, respectively. The diodes being used are PMEG4050EP,115
What gives? How can I get a reading of 0V at ADC2 when battery Bank B is disonnected?