# Need help with current sensing circuits

P

#### Patrick

Jan 1, 1970
0
Hello!

I was wondering if anyone has or knows where I can find a simple, cheap
current sensing circuit that I could use to sense AC currents. I am
currently working on a power control project that will monitor 120 VAC
outlets with a total maximum current of 15 amps. We are currently
working with a current sensor that outputs an AC voltage (actually a
varying DC voltage since it does not drop below zero) from an AC input
current from 0-50A. When the input current is zero the output is about
2.5V. At the full rated input current of 50 amps the sensor output has
a peak voltage swing of about 2.5V which ranges from zero to 5V at the
full 50 amps (swings around the 2.5V q-point).

The current sensor works great, but the problem is that we need to find
out what the actual current is and this poses somewhat of a challenge
since the output of the sensor is a varying DC (sinusoidal) voltage.
We've tried some software techniques to capture the peaks, but it takes
up too much processor time and is therefore not feasible.

Anyone have any ideas or circuits I might be able to try? Any help
will be greatly appreciated.

Patrick

P

#### petrus bitbyter

Jan 1, 1970
0
Patrick said:
Hello!

I was wondering if anyone has or knows where I can find a simple, cheap
current sensing circuit that I could use to sense AC currents. I am
currently working on a power control project that will monitor 120 VAC
outlets with a total maximum current of 15 amps. We are currently
working with a current sensor that outputs an AC voltage (actually a
varying DC voltage since it does not drop below zero) from an AC input
current from 0-50A. When the input current is zero the output is about
2.5V. At the full rated input current of 50 amps the sensor output has
a peak voltage swing of about 2.5V which ranges from zero to 5V at the
full 50 amps (swings around the 2.5V q-point).

The current sensor works great, but the problem is that we need to find
out what the actual current is and this poses somewhat of a challenge
since the output of the sensor is a varying DC (sinusoidal) voltage.
We've tried some software techniques to capture the peaks, but it takes
up too much processor time and is therefore not feasible.

Anyone have any ideas or circuits I might be able to try? Any help
will be greatly appreciated.

Patrick

Patrick,

What about the electronic skills of your team? A capacitor is enough to
separate DC from AC although it might be a huge one for 50/60Hz. If that's
not applicable a simple opamp suffices to subtract the 2.5VDC from the
signal leaving the AC-part for further processing. Of course you can find
complete measuring systems on the net. Tektronix sells some great ones but I
bet they are pretty expensive in relation to your budget. Current sensing
devices with Hall effect sensors often has a half Vs offset. So if you buy
one you will have the same problem. AMPLOC makes them for instance. Some of
them however have integrated electronics to remove the offset.

petrus bitbyter

N

#### neil

Jan 1, 1970
0
petrus bitbyter said:
Patrick,

What about the electronic skills of your team? A capacitor is enough to
separate DC from AC although it might be a huge one for 50/60Hz. If that's
not applicable a simple opamp suffices to subtract the 2.5VDC from the
signal leaving the AC-part for further processing. Of course you can find
complete measuring systems on the net. Tektronix sells some great ones but
I bet they are pretty expensive in relation to your budget. Current
sensing devices with Hall effect sensors often has a half Vs offset. So if
you buy one you will have the same problem. AMPLOC makes them for
instance. Some of them however have integrated electronics to remove the
offset.

petrus bitbyter
dragging up my limited analog knowledge ...
how about demodulating the signal, and smoothing/processing the resultant dc
level ?
- use a second ac signal as a reference, using it to control a two-way
analog mux, using that to route either the true or inverse (via inverting
opamp) ac signal.
No doubt there are suitable circuits available on web.
hth
Neil

K

#### kinyo

Jan 1, 1970
0
There's an opamp circuit called precision rectifier. Use the rectified
voltage to charge a capacitor to read a DC voltage instead of AC. You
will need of course a resistor across the capacitor to discharge it to
a lower DC voltage when the current being measured drops.

B

#### Bob Monsen

Jan 1, 1970
0
Patrick said:
Hello!

I was wondering if anyone has or knows where I can find a simple, cheap
current sensing circuit that I could use to sense AC currents. I am
currently working on a power control project that will monitor 120 VAC
outlets with a total maximum current of 15 amps. We are currently
working with a current sensor that outputs an AC voltage (actually a
varying DC voltage since it does not drop below zero) from an AC input
current from 0-50A. When the input current is zero the output is about
2.5V. At the full rated input current of 50 amps the sensor output has
a peak voltage swing of about 2.5V which ranges from zero to 5V at the
full 50 amps (swings around the 2.5V q-point).

The current sensor works great, but the problem is that we need to find
out what the actual current is and this poses somewhat of a challenge
since the output of the sensor is a varying DC (sinusoidal) voltage.
We've tried some software techniques to capture the peaks, but it takes
up too much processor time and is therefore not feasible.

Anyone have any ideas or circuits I might be able to try? Any help
will be greatly appreciated.

Patrick

I'm not sure I understand your problem. However, take a look at the
AD636. It is a device which will give you a DC output equal to the RMS
value of a waveform. Thus, pass the 2.5V through a capacitor, then run
it into this thingy. You'll need to calibrate it, but it should give you
a good view of the current when coupled with your current sensor.

C

#### Chris

Jan 1, 1970
0
Patrick said:
Hello!

I was wondering if anyone has or knows where I can find a simple, cheap
current sensing circuit that I could use to sense AC currents. I am
currently working on a power control project that will monitor 120 VAC
outlets with a total maximum current of 15 amps. We are currently
working with a current sensor that outputs an AC voltage (actually a
varying DC voltage since it does not drop below zero) from an AC input
current from 0-50A. When the input current is zero the output is about
2.5V. At the full rated input current of 50 amps the sensor output has
a peak voltage swing of about 2.5V which ranges from zero to 5V at the
full 50 amps (swings around the 2.5V q-point).

The current sensor works great, but the problem is that we need to find
out what the actual current is and this poses somewhat of a challenge
since the output of the sensor is a varying DC (sinusoidal) voltage.
We've tried some software techniques to capture the peaks, but it takes
up too much processor time and is therefore not feasible.

Anyone have any ideas or circuits I might be able to try? Any help
will be greatly appreciated.

Patrick

Hi, Patrick. From your description, I would guess you might have an
Allegro ACS750SCA-050, which has a zero ohm current shunt and attached
Hall effect circuit to detect current going through the shunt. When no
current is going through the shunt, its output is Vcc/2, or 2.5V. When
current is going through the shunt, a voltage is superimposed on this
DC level of +/-40 mV per amp up to +/-50 amps (which gives an amplifier
output of 0.5V to 4.5V). It has a -3dB response at AC current up to
13KHz, and a combined guaranteed accuracy of +/-2% at room temperature.

You have been very unclear on exactly what you want. You've said
you're using some kind of PC, SBC or uC to read the voltage, but the
repetitive readings are taking up too much processor time. You'd like
a simple, inexpensive means to do what you're doing now, but you
haven't been clear on just what you're doing now, how simple, and how
inexpensive. "Measuring current" can mean just measuring peak current,
measuring average current or RMS current. You haven't indicated
exactly what information you need, or in what time frame you need it.
Do you need information every half cycle, every cycle, a certain number
of times a second? Oh, and by the way, what kind of accuracy do you
need? Your error budget is already over 2%. Do you need a combined
accuracy of 2.1%, 3%, or 12%? The key to a good answer is a well-asked
question.

Your lowest cost solution for doing just what you're doing now would be
using a PIC with built-in ADC. You can read the voltage output off the
ACS750 many times for every AC cycle (generate an interrupt off the
power supply transformer secondary?), and then either figure out the
peak current (if that's your pleasure) or add 'em up to integrate total
current. There are many ways to communicate that information to
whatever you've got as a processor. And there's no law against having
two processors in a piece of electronics.

If you only need information on peak current on only half the cycle,
you're only taking a few readings a second, and you can live with
several percent accuracy, the simple and cheap answer is to use a
schottky diode feeding a cap with a bleeder resistor, like this (view
in fixed font or M\$ Notepad):

.--------------.
| ACS750 |
| |
| |
| |
| |
| | 1N5817 To high Z-in uC ADC
| |\ |
| -| >---o----->|-o----o--->
| |/ | | |
| | --- .-.
| | --- | |
| | 0.1uF | | |1M
| | | '-'
'--------------' | |
| |
=== ===
GND GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

By using software compensation for the diode drop, you can achieve
accuracy within several percent. The obvious flaw here is that when
the current decreases, it will take half a second to get an accurate
reading. If that's OK with you, that's the simplest. You can juggle
settling time and decay time by changing resistors to get something
closer to what you want.

There are a lot of solutions to your problem. The Analog Devices chip
mentioned in another post being an elegant one chip solution, and while
not the least expensive, will give you the best, most accurate answer.
The precision rectifier is a good answer which solves the issue with
the voltage drop of the diode above. There are many other answers.
But you could give a little more information if you want to get the

Good luck
Chris

C

#### Chris

Jan 1, 1970
0
Chris said:
<snip>

.--------------.
| ACS750 |
| |
| |
| |
| |
| | 1N5817 To high Z-in uC ADC
| |\ |
| -| >---o----->|-o----o--->
| |/ | | |
| | --- .-.
| | --- | |
| | 0.1uF | | |1M
| | | '-'
'--------------' | |
| |
=== ===
GND GND
<snip>

Small error. Try this:


 1N5817
>--->|-o-----o--------->
 | |
--- .-. VCC
 0.1uF--- | | +
| | |1M |
 | '-' .-.
=== | | |1K
 GND | | |
| '-'
 | |
'------o 2.5V
 |
.-.
 | |1K
| |
 '-'
|
 ===
GND


created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

Sorry. Less haste, more speed.

Chris

C

#### Chris

Jan 1, 1970
0
Sorry-- the first circuit is the one you should use. The multitasking
threader is defective tonight -- long week.

Chris

J

#### Jonathan Westhues

Jan 1, 1970
0
Chris said:
.--------------.
| ACS750 |
| |
| |
| |
| |
| | 1N5817 To high Z-in uC ADC
| |\ |
| -| >---o----->|-o----o--->
| |/ | | |
| | --- .-.
| | --- | |
| | 0.1uF | | |1M
| | | '-'
'--------------' | |
| |
=== ===
GND GND

Will the leakage through the big power Schottky be a problem here? The
current through the diode is going to be very small, microamps. The
datasheet for the 1N5817 says that the reverse leakage current is around 100
uA at 4 V though. My simulation doesn't rectify; the diode drop is
negligible, in both directions... (but of course it works fine with a 1N4148
or something, or I guess you could make C bigger and R smaller).

I think R*C should be bigger anyways, because with a not-leaky diode there's
still about 0.3 V of ripple on the output for a 1 V amplitude input. I think
the ripple is roughly given by

dV/dT*T = (I/C)/f
= ((Vout/R)/C)/f
= Vout/(R*C*f)
= 3/(1meg*0.1u*60) = 0.5 V which is kind of close

(assuming that the current through R is constant, and assuming that the
capacitor spends almost all the cycle discharging and hardly any time
charging)

Jonathan

M

#### mike

Jan 1, 1970
0
Patrick said:
Hello!

I was wondering if anyone has or knows where I can find a simple, cheap
current sensing circuit that I could use to sense AC currents. I am
currently working on a power control project that will monitor 120 VAC
outlets with a total maximum current of 15 amps. We are currently
working with a current sensor that outputs an AC voltage (actually a
varying DC voltage since it does not drop below zero) from an AC input
current from 0-50A. When the input current is zero the output is about
2.5V. At the full rated input current of 50 amps the sensor output has
a peak voltage swing of about 2.5V which ranges from zero to 5V at the
full 50 amps (swings around the 2.5V q-point).

The current sensor works great, but the problem is that we need to find
out what the actual current is and this poses somewhat of a challenge
since the output of the sensor is a varying DC (sinusoidal) voltage.
We've tried some software techniques to capture the peaks, but it takes
up too much processor time and is therefore not feasible.

Anyone have any ideas or circuits I might be able to try? Any help
will be greatly appreciated.

Patrick

I know people are tired of hearing me ask, but "What are you trying to
accomplish?"
If you have a purely resistive load and a pure voltage sinewave, you can
measure about any parameter of the current waveform and know all the rest.

Problem is that most applications are not even close to that ideal.
In most cases, you have to actually measure the parameter of interest.
Some typical parameters might be peak, average, RMS values. Phase
may or may not be important.

If it's a current sine wave and you can determine the zero crossing
with a comparator and you know the frequency, you know exactly were
the peaks are and you can sample there.

If it's not a current sine wave, you can peak detect and subtract off
the 2.5V either with an op-amp or software.

What do you want to do about noise?
How fast do you need your loop response?

waveform?"
mike

--
Return address is VALID but some sites block emails
..
Wanted, PCMCIA SCSI Card for HP m820 CDRW.
FS 500MHz Tek DSOscilloscope TDS540 Make Offer
Wanted 12" LCD for Compaq Armada 7770MT.
Bunch of stuff For Sale and Wanted at the link below.
MAKE THE OBVIOUS CHANGES TO THE LINK
ht<removethis>tp://www.geocities.com/SiliconValley/Monitor/4710/

B

#### Bob Monsen

Jan 1, 1970
0
Chris said:
Hi, Patrick. From your description, I would guess you might have an
Allegro ACS750SCA-050, which has a zero ohm current shunt and attached
Hall effect circuit to detect current going through the shunt. When no
current is going through the shunt, its output is Vcc/2, or 2.5V. When
current is going through the shunt, a voltage is superimposed on this
DC level of +/-40 mV per amp up to +/-50 amps (which gives an amplifier
output of 0.5V to 4.5V). It has a -3dB response at AC current up to
13KHz, and a combined guaranteed accuracy of +/-2% at room temperature.

<snip suggestion>

I agree that a simple scheme may work properly. One thing to factor into
the discussion is that a microprocessor pin is a good way to zero a peak
detector. He can use a shottky diode and cap, like you suggest, but skip
the drain resistor. Before each sample, just use another pin to drain
the cap. Then, make the pin an input, wait a few cycles, and take the

Another thing to consider is that some micro ADCs want fairly low input
impedance; the PIC 12 and 16 series, for example, want 10k.

Yet another issue is that this won't get him the right value if that
2.5V center voltage drifts around. He can fix that by using a big cap to
make the 5VAC signal be centered at zero. Then, his answer will be
between 0 and 2.5V, minus the drop of the diode.

If he wants to add a couple of cheap opamps, he can eliminate that diode
drop as well by building a simple peak detector. However, that will
involve more external hardware.

None of this really works, however, if the current isn't a sine wave.

W

#### William

Jan 1, 1970
0
make a drawing at www.yahoo.com ( 100 dpi will do fine with a scanner)
; go to the mailbox the ID is
'schetsen' and the password is 'diverse'. send the drawing to the same
mailbox 'schetsenATyahoo.com'
and I'll see what I can do for you ( for free of course )

Replies
4
Views
456
Replies
1
Views
524
Replies
7
Views
605
Replies
10
Views
846
Replies
6
Views
1K