I'm planning a circuit to measure the current in mains. all tips and feedback is welcome. The circuit makes the stepped down current into a voltage drop with a burden resistor. If i havent messed up this circuit should give the ADC a voltage between 0 and 3.3 volt where 3.3 volt would indicate 20 amps running through the mains wire.
The 3.3v voltage follower is there to take waveform from ac to alternating dc
In the final design I'll be using a different microcontroller so the attiny is just a placeholder.
You've connected Rf to the non-inverting input instead of the inverting input.
Your circuit is confusing as you appear to connect the CT secondary to both inputs of the opamp,
when in fact you are connecting one side to virtual ground and have drawn it oddly.
The 100 ohm resistor on the output of the follower serves no purpose as you aren't decoupling
the virtual ground rail with any capacitance - such a resistor serves to preserve stability for an
opamp with a large capacitive load.
"2K2pf" is the most contorted description of a capacitance I've ever seen. 2.2nF or 2n2 is the usual
way to notate this. the symbol for farad is F, not f, f is the femto prefix.
C4 is doing nothing. C1 is also irrelevant. I think you might be trying to add EMI suppression, but that would be best done with a few 100pF ceramic on the input to the opamp.