# Current sensing circuit help

#### Yuda

Dec 25, 2017
51
Are you reffering to the resistor they have soldered on to the board that the acs712 comes with?

#### (*steve*)

##### ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,508
No, I'm referring to R3 and R7 in my circuit in post #23

#### Yuda

Dec 25, 2017
51
Ok I am I am working on the circuit in about 10 minutes I will let you know how it goes.

#### Yuda

Dec 25, 2017
51
What resistor values do you think I should start at when I change R3 and R7?

#### (*steve*)

##### ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,508
You need values which will give you the same voltage the acs712 gives you when it has zero current through it.

I don't know how you're powering it, it what it's rails are referenced to, so that bit is up to you.

If you connect the voltage divider up to the power supply for the acs712, you can probably use the same resistor values, since you are again just referencing the mid supply.

Previously you had to null out only the input offset of the op amp. You may need more adjustment range for the acs712. I'm not familiar off the top of my head how much the zero voltage can differ from the actual mid rail.

#### hevans1944

##### Hop - AC8NS
Jun 21, 2012
4,792
The ACS712 (obsolete part, replaced by SMD ACS723) with a 5 V supply rail, produces exactly half the supply voltage on its output pin when zero current is flowing between the input pins. With AC current applied, the output will therefore vary (sinusoidally) about a "zero" output of 2.5 V DC, going more positive than 2.5 V during the positive excursions of the AC wave form, and going less positive than 2.5 V during the negative excursions of the AC wave form.

Since all you want to do is sense small changes in AC current, you need to capacitively couple the output of the ACS712 to eliminate its DC component and rectify the result. Your two-diode, single op-amp circuit will do this nicely. Use a 0.1 μF blocking capacitor and a 1 KΩ input resistor to the op-amp. Adjust the feedback resistor upwards from 10 KΩ to as high as 1 MΩ to vary the sensitivity. I would start at the low end of that range. You may also need to add a low-pass filter RC network (series resistor, shunt capacitor) to the op-amp output to "smooth" the rectified AC signal and obtain a noise-free signal suitable for subsequent digital signal processing.

Retain the original offset nulling circuit to produce a nearly zero output with zero current input. Make sure the adjustment pot is much smaller in value than the two fixed resistors on either end of it. You will only need to vary the offset voltage by a few millivolts at the most. Measure the offset nulling voltage with your multimeter between the wiper arm of the pot and circuit common. When making the offset adjustment, there will be a range of adjustment where the output varies, followed by a range where adjustment produces NO change in output. Start with the pot in a position where a slight rotation does produce a change in output, then continue in the direction that changes the output toward zero. Stop adjusting when zero is reached or the output quits changing, then reverse the pot rotation slightly to verify that the minimum output voltage has been achieved. Return the pot rotation to its previously determined minimum output voltage position.

You may be able to get by without any offset adjustment at all, in which case just connect the non-inverting input of the op-amp to circuit common. Circuit common with your potentially lethal mains power supply circuit, is the common connection of the two zener diodes. DO NOT CONNECT CIRCUIT COMMON TO ANY MAINS WIRES OR TO "EARTH" GROUND.

Where are you getting the 5 V necessary to operate the ACS712? You could use two 5 V zener diodes instead of 7 V zener diodes and operate the ACS712 from the resulting +5 V DC rail. The op-amp should work fine with ±5 V DC rails, although its output swing will be less than it would be if ±7 V DC rails are used.

Why is it taking so long to complete such a simple project?

#### Yuda

Dec 25, 2017
51
The ACS712 (obsolete part, replaced by SMD ACS723) with a 5 V supply rail, produces exactly half the supply voltage on its output pin when zero current is flowing between the input pins. With AC current applied, the output will therefore vary (sinusoidally) about a "zero" output of 2.5 V DC, going more positive than 2.5 V during the positive excursions of the AC wave form, and going less positive than 2.5 V during the negative excursions of the AC wave form.

Since all you want to do is sense small changes in AC current, you need to capacitively couple the output of the ACS712 to eliminate its DC component and rectify the result. Your two-diode, single op-amp circuit will do this nicely. Use a 0.1 μF blocking capacitor and a 1 KΩ input resistor to the op-amp. Adjust the feedback resistor upwards from 10 KΩ to as high as 1 MΩ to vary the sensitivity. I would start at the low end of that range. You may also need to add a low-pass filter RC network (series resistor, shunt capacitor) to the op-amp output to "smooth" the rectified AC signal and obtain a noise-free signal suitable for subsequent digital signal processing.

Retain the original offset nulling circuit to produce a nearly zero output with zero current input. Make sure the adjustment pot is much smaller in value than the two fixed resistors on either end of it. You will only need to vary the offset voltage by a few millivolts at the most. Measure the offset nulling voltage with your multimeter between the wiper arm of the pot and circuit common. When making the offset adjustment, there will be a range of adjustment where the output varies, followed by a range where adjustment produces NO change in output. Start with the pot in a position where a slight rotation does produce a change in output, then continue in the direction that changes the output toward zero. Stop adjusting when zero is reached or the output quits changing, then reverse the pot rotation slightly to verify that the minimum output voltage has been achieved. Return the pot rotation to its previously determined minimum output voltage position.

You may be able to get by without any offset adjustment at all, in which case just connect the non-inverting input of the op-amp to circuit common. Circuit common with your potentially lethal mains power supply circuit, is the common connection of the two zener diodes. DO NOT CONNECT CIRCUIT COMMON TO ANY MAINS WIRES OR TO "EARTH" GROUND.

Where are you getting the 5 V necessary to operate the ACS712? You could use two 5 V zener diodes instead of 7 V zener diodes and operate the ACS712 from the resulting +5 V DC rail. The op-amp should work fine with ±5 V DC rails, although its output swing will be less than it would be if ±7 V DC rails are used.

Why is it taking so long to complete such a simple project?

It has been taking me a while for a few reasons, I am new to designing and building circuits, I have school everyday so I don't always have time to work on this project, and lastly since I am new to all of this, unless I have a schematic in front of me I get lost when the time comes to build the circuit. I tried using the precision rectifier circuit that Steve has been helping me with but even with the new CT I purchased from CT magnetics I am unable to sense a phone charger plugged in to mains when it is not actively charging a phone. If I charge my phone with it I get about .5vdc but once the charger switches to trickle charging my CT just can't see it because of the small current draw on my primary. I also tried using the acs712 but I again got lost in translation. I thank you for the time you spent writing exactly what I need to do to use the acs712 but it would really help me out if you could post a schematic so that way I can just finish this project already. I again thank you all for your time, I very much appreciate all of your help.

#### Alec_t

Jul 7, 2015
3,330
If I charge my phone with it I get about .5vdc but once the charger switches to trickle charging my CT just can't see it because of the small current draw on my primary.
You won't get good measurements of current which has such a large change in value unless you have a current meter with a range-changing feature, e.g the ability to switch in different burden resistors across the CT secondary, or switch in different CT turns ratios.

Replies
6
Views
1K
Replies
6
Views
5K
P
Replies
2
Views
2K
JeffM
J
Replies
14
Views
1K
Replies
9
Views
1K