I was wondering if with the help of a low value resistor and a peak detector attached in parallel with the resisto i can measure the current peak of the charging capacitor, and then maybe send that value to a uC
Attachments
-
4.1 MB Views: 17
I was already planning to use an op amp peak detector to eliminate the diode voltage drop.. but i didn't understood very well the first point, can u please explain it in a simplified way1. You might be better connecting the sense resistor in the ground leg of the capacitor so the uC is measuring the voltage between the output of the peak detector and ground.
2. Also using the circuit you show the first 200mV or so fo the voltage across the shunt will produce no output because of the forward voltage needed by the diode. To solve that you can use an op-amp peak detector circuit as shown here: https://sound-au.com/appnotes/an014.htm
3. Having the sense resistor in series with the capacitor will raise its ESR and may affect the operation of whatever is inside the box labelled power supply.
So you are saying that the other lead of C1 must be connected to the gnd? Should I also unify the power supply gnd with the uC gnd?The output of your circuit is across C1. The bottom of C1 is at the power supply voltage and the top is a little bit more than that. Grenerally an ADC measures the voltage between 0V and its input so here you would be using only a small part of the ADC input range and so losing a lot of resolution.
Thanks for the help, I understand nowThe components from your original diagram should be arranged as below.
View attachment 215671
For your further edification, you should also be aware of 2 other things about your original circuit:Thanks for the help, I understand now
So to fix that the schematic Albert hall posted is enough?For your further edification, you should also be aware of 2 other things about your original circuit:
View attachment 215673
1. The resistor & capacitor in series form a voltage divider.
2. The capacitor at the bottom is between ground and the rest of the circuit, so ground is elevated to the circuit. This is okay so long as nothing is then attached from the circuit to the bottom of the capacitor at ground. If you were to have connections from elsewhere in the circuit on both sides of the bottom capacitor, it would form a ground loop.
by Jake Hertz
by Jake Hertz
by Aaron Carman