Effect of capacitor in this circuit

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
crazycanuck
 
Posts: 19
Joined: Tue Nov 07, 2017 12:44 pm

Effect of capacitor in this circuit

Post by crazycanuck »

Hi,

I've been looking at https://openenergymonitor.org as I'm interested in monitoring my energy consumption at home for some large appliance. They explain how to use a CT sensor with an Arduino to monitor a circuit (see below).
CT.PNG
CT.PNG (53.93 KiB) Viewed 242 times
My question has to do with the C1 cap in the diagram. My understanding is that its purpose is to filter out noise from the 5V DC supply to get a steady mid-point voltage of 2.5 V to bias the signal coming from CT sensor. Someone told me that in fact it does do this, but that it also filters the 60Hz from the CT sensor so that the midpoint is DC and doesn't have any 60 HZ Riding on it. I guess my question is why is that so? Having a hard time in visualizing that second purpose.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Effect of capacitor in this circuit

Post by adafruit_support_mike »

The capacitor does work as a filter, but the other half of the filter isn't shown in that diagram.

If you break the connections from the 33-ohm resistor to C1 and the Arduino's ADC, no point in the circuit containing that half of the transformer and the 33-ohm resistor is connected to any voltage the Arduino knows about.

That sounds like a trivial observation: "if we break all the connections to the Arduino, there will be no connection to the Arduino," but the details are important: we broke two connections, and there is no third connection.

That makes the transformer coil and 33-ohm resistor a 'floating' circuit as far as the Arduino is concerned. No part of that circuit has any specific voltage as far as the Arduino is concerned, so we can connect any part of that circuit to any voltage the Arduino knows about. Doing that is called 'referring' the floating signal to a voltage in the Arduino circuit.

In this case, the floating signal is referred to the 2.5v node at the center of the voltage divider that's stabilized by C1.

If we only make that one connection, it's impossible for the current flowing through the transformer coil and 33-ohm resistor to have any effect on any voltage in the Arduino circuit. You only get voltage by sending current through something, and current can only flow in a loop. If there's only one point of connection between two circuits, you can't make a loop where current can flow, so the voltages on either side of the connection point are completely independent of each other.

If we want the Arduino to measure the voltage across the 33-ohm resistor, we have to make another connection so current can flow and create voltage. That's the connection between the top of the 33-ohm resistor and the Arduino's ADC pin.

The current still has to flow in a loop though. Any current that flows from the top of the 33-ohm resistor to the ADC pin has to flow back to the bottom of the 33-ohm resistor through the 2.5v reference connection. The amount of current flowing through that loop will depend on the resistances around the loop.

The effective resistance of an Arduino's ADC pin is about 50k, and to the current flowing through the measurement loop, the resistors in the 2.5v divider look like they're in parallel (you have to run the math to see how various currents displace each other, but it works). For the sake of putting numbers on things, let's say the divider uses 20k resistors, and their parallel resistance looks like 10k. As far as the transformer coil is concerned, everything past the two connection points looks like a 60k resistor sitting in parallel with the 33-ohm resistor.

60k is about 1800 times larger than 33 ohms, so the current flowing through the measurment loop will be about 0.56% of the current through the 33-ohm resistor.. about 78uA based on the figures in the drawing.

As far as that 78uA is concerned, the voltages at the ends of the 33-ohm resistor move symmetrically. If one rises, the other falls by the same amount, and they meet at 0v. As far as the 2.5v voltage divider is concerned, 78uA pushing the ADC pin up means 78uA pushing the voltage at the center of the divider down. Taking the 10k parallel resistance of the voltage divider into account, that comes to about 780mV.

Without C1, the nominally-2.5v reference point would swing +/-780mV in response to the current flowing through the measurement loop.

A large capacitor acts like a rechargeable battery that can provide current without much change in voltage (another way of saying the same thing is, "a capacitor has low effective resistance to AC signals"). If we set C1 at 100uF, the 78uApp (microamps peak-to-peak) flowing through the measurement loop at 60Hz only produces about 4mVpp of ripple in the 2.5v reference voltage. If we take C1 up to 1000uF, the ripple drops to about 0.4mVpp.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”