jabberwocky_one
Newbie level 6
Topic put on hold, I think the simulation had a short.
I have a circuit that is powered by a 12V or 4.2V battery source, for versatility reasons.
This circuit will be used to monitor either batteries. If they fall below a range, LED(not in pic) lights up.
The circuit should be designed to work with 2 types of batteries, 12V and 4.2V.
The mode is selected using a SPDT switch.
Because there are 2 types of input, the VDD of PIC would be connected to both input lines. (diagram)
Problem is, one of the lines(4.2V line) is connected to a LM317 regulator(used for 12V not 4.2V) and dc would flow back into it. How do I solve this? Adding a diode would ... 'break' the circuit.
Probe1 was showing 3.20V(correct value) before adding the diode. After adding the diode at the voltage divider, 685mA is obtained. I need at (~3.2V)
Probe2 was showing 4.0V without voltage drop across diode. (pic was taken without diode consideration)
Sorry totally forgot to mention other problems and info.
The diode, D2 totally wrecks the voltage divider part as seen in the picture 685mV instead of a 3.20V.
The 12V can be swapped with 4.2V but it has to be on the other switch pos.
I have no hardware to test with at the moment, just simulating for the time being.
I have a circuit that is powered by a 12V or 4.2V battery source, for versatility reasons.
This circuit will be used to monitor either batteries. If they fall below a range, LED(not in pic) lights up.
The circuit should be designed to work with 2 types of batteries, 12V and 4.2V.
The mode is selected using a SPDT switch.
Because there are 2 types of input, the VDD of PIC would be connected to both input lines. (diagram)
Problem is, one of the lines(4.2V line) is connected to a LM317 regulator(used for 12V not 4.2V) and dc would flow back into it. How do I solve this? Adding a diode would ... 'break' the circuit.
Probe1 was showing 3.20V(correct value) before adding the diode. After adding the diode at the voltage divider, 685mA is obtained. I need at (~3.2V)
Probe2 was showing 4.0V without voltage drop across diode. (pic was taken without diode consideration)
Sorry totally forgot to mention other problems and info.
The diode, D2 totally wrecks the voltage divider part as seen in the picture 685mV instead of a 3.20V.
The 12V can be swapped with 4.2V but it has to be on the other switch pos.
I have no hardware to test with at the moment, just simulating for the time being.