i want to charge two 25F Supercaps (in series) in two stages: while their total voltage is under 5v, i want to charge them slowly via a resistor R3 of around 100 Ohm. After they reach the desired Voltage (2.5v each) i want to bypass R3 with 1 Ohm, effectively shorting out R3. I thought i could use a Logic Level Mosfet (irlz34n) for that, creating the gate voltage (around 2.5V) with a Voltage divider (R1 and R2). However, this seems impossible. While the Vcc of 5v is present, the gate voltage is higher then the expected voltage for each Supercap (caused by the voltage dropped over R3). Only if i disconnect vcc, the circuit works as i intend... Is there any way to short out R3, when the caps have reached 5v? Thank you for your help.
Your circuit is "strange".
Your gate voltage = V_C2 + V_C1/2 ~= 3.75V when the capacitors are charged.
R1 + R2 act as an ongoing load on C1 when charged. .
One solution is to sense the voltage at C2-R3 junction and use it to operate Q1 when this voltage FALLS to almost zero (as current in R3 falls to almost zero
Saying what you are trying to achieve and NOT how you think it can be done is liable to get you better quicker answers. eg if you intend the 5v point to be a bidirectional charge-in/battery backup-out point?
If so, what is meant to happen when Vcaps falls substantially? As shown, R3 will switch back in again - you need hysteresis if you want Vcap to fall very far without R3 switching back in.
Tell us what you want and we'll give you what you need :-)
This circuit shows the principle.
It would be better to use an opamp or comparator as you can then control the shorting-FET starting voltage and hysteresis voltage far more easily.
5V power on. C3 holds gate low briefly (important).
Without C3 the FET turns on at power up, clamps Q1 base low and the circuit fails to provide the desired slow charge.
Caps charge via R1.
V_R1 > 0.6V turns on Q1.
Q1 on holds FET off.
When V_R1 falls to under ABOUT 0.6V Q1 turns off.
Q1 turning off allows R3 to turn FET on.
FET on shorts caps AND (important) clamps V_R1 low so Q1 cannot turn on again as cap voltage falls.
Circuit does not "reset" unti Vcaps is very low. If you want some intermediate voltage reset point (so caps can be recharged) it could be done with this circuit but using an opamp will make it far easier and better defined.
Here V_R1 must be > 0.6V to keep R1 in circuit. With an opamp this voltage can be set by design.