Searching \ for '[PIC] analog input from current sense transformer' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=analog

Exact match. Not showing close matches.
2005\03\22@191949 by

Hello.
I'm building a power meter to measure how much AC current some electronic equipment is drawing (from 0 to 17 Amps).
I'm using a Triad Magnetics CSE187 current sense transformer.
This current sense transformer rates primary 0-240V 0-30 AMPs and secondary outputs 0-3.5V proportional to the current.
I have a 56 ohm resistor between the 2 transformer secondary pins, with one secondary pin (pin 5) to ground, and the other secondary pin (pin 8) routed to the analog input of a PIC18F242.
I'm using the PIC to perform the RMS current (IRMS) algorithm.
Here are my 3 questions:
Is there any circuit needed between the output of the transformer and the PIC analog input?
It seems to me that nothing additional is needed because the transformer secondary is 0-3.5V and the PIC analog is 0-5V.
Is this method accurate?
Is any calibration needed or possible?
Thank you,
Lou

---------------------------------
Do you Yahoo!?
The transformer output is AC and the PIC analog input only accepts voltages
between Vcc and Vss (typically 0-5VDC). What I've done in the past with current
sense transformers is to put a diode bridge between the transformer and the
"burden resistor." Putting the resistor after the bridge will reduce the effects
of the diode drop (the transformer will output whatever voltage is required to
force the desired current through the resistor, so it gets over the diode drops).

You may also want to put a resistor between the top of the 56 ohm resistor and
the analog input of the PIC to limit current should the voltage go above 5V (when
the clamp diodes start to conduct). I'd make it as big as possible while still
meeting your accuracy requirements (maybe 5k or so).

For RMS calculations, I've squared the A/D output and added it to a 24 bit sum (I
was using 8 bit A/D). I accumulated 256 samples, then threw away the lower 8 bits
(divided by 256). I then did a square root of the remaining 16 bits giving an 8
bit RMS result.

Good luck!

Harold

On Tue Mar 22 16:19 , Lou Tiberia <loutiberiayahoo.com> sent:

>Hello.
>I'm building a power meter to measure how much AC current some electronic
equipment is drawing (from 0 to 17 Amps).
>I'm using a Triad Magnetics CSE187 current sense transformer.
>This current sense transformer rates primary 0-240V 0-30 AMPs and secondary
outputs 0-3.5V proportional to the current.
>I have a 56 ohm resistor between the 2 transformer secondary pins, with one
secondary pin (pin 5) to ground, and the other secondary pin (pin 8) routed to
>I'm using the PIC to perform the RMS current (IRMS) algorithm.
>Here are my 3 questions:
>Is there any circuit needed between the output of the transformer and the PIC
>It seems to me that nothing additional is needed because the transformer
secondary is 0-3.5V and the PIC analog is 0-5V.
{Quote hidden}

>-

Lou,
Then for 17Amps of load (sinusiodal ?) you will get 1.983Vrms accross the
56 ohm resistor.
Provided this is a sine wave, the peak voltage will be 1.414 times this or
2.8V - or 5.6V pk-pk.

So you need to organise a 2.5V offset  and some sort of voltage divider so
that the input to the ADC stays inside the 0-5V range - with a bit of
margin and protection  against turn-on transients etc.
If the waveform is not a sinewave you may  need a significant margin. I'd
plan on an input range of no more than 3V pk-pk.

And ensure the 56ohm load resistor is secured and of adequate rating. (3.5
x 3.5 / 56 = 220mW  - Use at least a 1 watt resistor. If it goes open
circuit the voltages will get very high.

Probably easiest to calibrate in software but the voltage divider could
include a pot..

Richard P

Hello.
I'm building a power meter to measure how much AC current some electronic
equipment is drawing (from 0 to 17 Amps).
I'm using a Triad Magnetics CSE187 current sense transformer.
This current sense transformer rates primary 0-240V 0-30 AMPs and secondary
outputs 0-3.5V proportional to the current.
I have a 56 ohm resistor between the 2 transformer secondary pins, with one
secondary pin (pin 5) to ground, and the other secondary pin (pin 8) routed
I'm using the PIC to perform the RMS current (IRMS) algorithm.
Here are my 3 questions:
Is there any circuit needed between the output of the transformer and the
It seems to me that nothing additional is needed because the transformer
secondary is 0-3.5V and the PIC analog is 0-5V.
Is this method accurate?
Is any calibration needed or possible?
Thank you,
Lou

Another possibility....

Use a power meter chip like from ADI or Cirrus that do
all the calculations and use a PIC to read it via the
SPI port, and the PIC then displays or whatever...

I was just quoted the other day on the Cirrus chip of
around \$1.80 ea

--- Richard.Prosserpowerware.com wrote:
{Quote hidden}

> --
>I was just quoted the other day on the Cirrus chip of around \$1.80 ea

Was that for the CS5461? Quantity?

/Ake

alan smith wrote:

{Quote hidden}

>>-
Not sure...they are supposed to email me an official
quote. It was the single phase part, the current
offering of the 3phase only gives the instantanous I
and V data, not the real power numbers.

Qty was 1K (smaller volumes for this project) but they
know they are going up against ADI who's 3phase part
is around \$7.  Potential problem is that I would have
to use 3 of the chips so not sure about room on the
board.

I am however looking for a current transfomer, for up
to 65A.  Any suggestions?

--- Ake Hedman <akheeurosource.se> wrote:
{Quote hidden}

> >>--
I am also looking for a good source of CT's. Preferably the type that could be opened and attached to already installed cables. Just 20A in my case.

/Ake

alan smith wrote:

{Quote hidden}

>>>>--
I like the current transformers from Toroid Corporation of Maryland. They
do not have a core you can open; you have to pass the wire through the
core, but they work very well for me.

Harold

> I am also looking for a good source of CT's. Preferably the type that
> could be opened and attached to already installed cables. Just 20A in my
> case.
>
> /Ake

--
FCC Rules Updated Daily at http://www.hallikainen.com
alan smith 16:39 2005-03-23:
>I am however looking for a current transfomer, for up
>to 65A.  Any suggestions?

I have seen some at http://www.farnell.com

/Morgan
--
Morgan Olsson, Kivik, Sweden

2005\04\26@212749 by
Hello.
Thanks to everybody for the help with this power meter.
I've built up a system, using a diode bridge before the burden resistor, as suggested by Harold H.
The output voltage goes to AN3 on a PIC18F242.
The system is running, however the voltage read at AN3 is strange.
The current sense transformer spec says that it will track current at 100 mV AC per 1 AMP AC.
I do not see this occuring.
For example, I have these measurements:
(I used a handheld clamp meter to read these AMPs, the voltage is read using my system)
2.2 AMP = .13 V, 4.7 AMP = .26 V, 12 AMP = .57 V.
So I measure anywhere from 100 mV AC per 1.69 AMP  to 100 mV per 2.1 AMP.
This also does not seem to be a linear mapping.
I have double-checked my RMS firmware with some test data, and the algorithm implementation seems correct.
Reading the output voltage with a volt meter produces different values, these values also do not correlate with 100 mV AC per 1 AMP AC.
Does anyone have any ideas what I have done wrong?
Thank you,
Lou

{Quote hidden}

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
> 2.2 AMP = .13 V, 4.7 AMP = .26 V, 12 AMP = .57 V.
> So I measure anywhere from 100 mV AC per 1.69 AMP  to
> 100 mV per 2.1 AMP.
<snip>
> Does anyone have any ideas what I have done wrong?
> Thank you,
> Lou

This may or may not help you (might be something to discuss though),
but there are some lengthy letters about current transformers in this
month's Silicon Chip mailbag

http://www.siliconchip.com.au/cms/A_104162/article.html

>For example, I have these measurements:
>(I used a handheld clamp meter to read these AMPs,
>the voltage is read using my system)
>2.2 AMP = .13 V, 4.7 AMP = .26 V, 12 AMP = .57 V.
>So I measure anywhere from 100 mV AC per 1.69 AMP
>to 100 mV per 2.1 AMP.
>This also does not seem to be a linear mapping.

I would suggest you enter these into a spreadsheet, and get a graph of the
v/A. I suspect the line will cross the appropriate axis at a voltage that
represents the diode drop of the bridge rectifier. Just remember that the
way you are rectifying the voltage is not a "perfect" rectifier.

>>For example, I have these measurements:
>>(I used a handheld clamp meter to read these AMPs,
>>the voltage is read using my system)
>>2.2 AMP = .13 V, 4.7 AMP = .26 V, 12 AMP = .57 V.
>>So I measure anywhere from 100 mV AC per 1.69 AMP
>>to 100 mV per 2.1 AMP.
>>This also does not seem to be a linear mapping.
>
> I would suggest you enter these into a spreadsheet, and get a graph of the
> v/A. I suspect the line will cross the appropriate axis at a voltage that
> represents the diode drop of the bridge rectifier. Just remember that the
> way you are rectifying the voltage is not a "perfect" rectifier.

Though the rectifier is not perfect, placing the burden resistor after the
rectifier should minimize this problem since the secondary of the current
sense transformer is (ideally) a current source. It will create (ideally)
whatever voltage is necessary to force the appropriate current through the
burden resistor, getting over the diode drops. However, current
transformer secondaries are not ideal current sources in that they have a
voltage limit (due to core saturation). It looks like the V/A is dropping
off as the current increases, which is what I'd expect with core
saturation. That's why I like the current sense transformers from Toroid
Corporation of Maryland. They seem to be able to put out a fair amount of
voltage. If you're stuck with a particular transformer, you can run the
secondary into an op-amp based current to voltage converter (assuming it
can handle the secondary current), which is nice because the current sense
transformer secondary voltage is zero. Since the output of the current to
voltage converter is AC, you then have to deal with that! An idea I
haven't tried, but might be interesting, would be to put a current limit
resistor between the AC and a PIC analog input. On positive half cycles,
the PIC A/D reads the voltage. On negative half cycles, the PIC clamp
diode limits the voltage on the PIC pin (you may want to add an external
clamp diode as well). You then double the RMS you calculate in software to
account for the missing half cycle.

Another approach to dealing with the AC, if you can't get the burden
resistor after the bridge rectifier to work, would be to use an op-amp
based ideal rectifier. This runs the parts count up considerably, though,
running against my idea that the ideal design has zero parts.

Another approach I have not tried, but seems workable, would be to do the
rectification in software. Bias the AC up to 2.5VDC (assuming a 5V PIC
supply) and just run the AC into the PIC analog input (Vpp max = 5V). In
software, establish the DC component of the incoming AC by taking the
average of a large number of samples. Subtract the DC value from all the
samples to get the pure AC sample level (using signed arithmetic, since
half the values will be negative). When you square the samples in the RMS
calculation, the negative signs will go away. Another way to do it with
unsigned arithmetic would be to compare the sample to the DC level. If
it's greater, use Vsample-Vdc in the squaring for the RMS calculation. If
the sample is less than Vdc, use Vdc-Vsample, then square. No signed
arithmertic required, getting you another bit of resolution.

Good luck!

Harold

--
FCC Rules Updated Daily at http://www.hallikainen.com

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...