# Arduino Forum

## Using Arduino => Sensors => Topic started by: Nunov on Oct 06, 2012, 03:47 am

Title: Using CST-1020
Post by: Nunov on Oct 06, 2012, 03:47 am
Hi Everyone,

I'm Nuno from Portugal and I have started to use the arduino quite ago.

Now I decided to build an energy meter for the plugs at home.
I want to measure the current so I bought the CST-1020 current sense transf. ( Datasheet: http://triadmagnetics.com/pdf/Page%2013-14.pdf (http://triadmagnetics.com/pdf/Page%2013-14.pdf) check on the bottom of the document)
I don't really understand this sensor. How do i compute the current on the primary? Does it has a burden resistor already? My guess is no...
How the the hell do I compute the ratio from the voltage on the secondary winding and the current on the primary changes for a burden resistor that is not listed?

Title: Re: Using CST-1020
Post by: RIDDICK on Oct 06, 2012, 08:28 am
Hi Nuno!

RL seems to be outside of the CST1020 according to the picture...
Let RL=100, then appr. 100mV on RL translate to 1A... 200mV to 2A...

I hope u took sufficient care to uphold proper insulation...
How did u do it?

Bye
Title: Re: Using CST-1020
Post by: Nunov on Oct 06, 2012, 12:51 pm
I didn't used any insulkation so far. I am still at the begining of the project. Should I use it?

That's exactly the maths i did, but if you took a RL=500 you should get 500mV on RL to 1A, but acoording to the datasheet you get 394mV....
And if you choose the 5kohm for the RL you should get 5V for each amp, but according to the datasheet you get 766mV.

How is that possible? Shouldn't that be approximate linear?
Title: Re: Using CST-1020
Post by: RIDDICK on Oct 06, 2012, 02:26 pm
1.
coils/capacitors have logarithmic/exponential curves...
http://en.wikipedia.org/wiki/Inductor#Inductance_formulae

2.
how do u plan to make the primary side of that sensor?
it seems to b a little bit dangerous for my taste...
do u know an electrician?
Title: Re: Using CST-1020
Post by: Nunov on Oct 06, 2012, 06:58 pm

1.
coils/capacitors have logarithmic/exponential curves...
http://en.wikipedia.org/wiki/Inductor#Inductance_formulae

2.
how do u plan to make the primary side of that sensor?
it seems to b a little bit dangerous for my taste...
do u know an electrician?

The primary side of the sensor is the wire through the hole of the sensor. Not big deal ( http://pt.farnell.com/jsp/search/browse.jsp?N=203280+110189363+110424331+110159113+110137763+110424915+110169757&No=0&getResults=true&appliedparametrics=true&locale=pt_PT&divisionLocale=pt_PT&catalogId=&skipManufacturer=false&skipParametricAttributeId=&prevNValues=203280+110189363+110424331+110159113+110137763+110424915&mm=1001733||,1003481||,&filtersHidden=false&appliedHidden=false&autoApply=false&originalQueryURL=%2Fjsp%2Fsearch%2Fbrowse.jsp%3FN%3D203280%26No%3D0%26getResults%3Dtrue%26appliedparametrics%3Dtrue%26locale%3Dpt_PT%26divisionLocale%3Dpt_PT%26catalogId%3D%26skipManufacturer%3Dfalse%26skipParametricAttributeId%3D%26prevNValues%3D203280 (http://pt.farnell.com/jsp/search/browse.jsp?N=203280+110189363+110424331+110159113+110137763+110424915+110169757&No=0&getResults=true&appliedparametrics=true&locale=pt_PT&divisionLocale=pt_PT&catalogId=&skipManufacturer=false&skipParametricAttributeId=&prevNValues=203280+110189363+110424331+110159113+110137763+110424915&mm=1001733||,1003481||,&filtersHidden=false&appliedHidden=false&autoApply=false&originalQueryURL=%2Fjsp%2Fsearch%2Fbrowse.jsp%3FN%3D203280%26No%3D0%26getResults%3Dtrue%26appliedparametrics%3Dtrue%26locale%3Dpt_PT%26divisionLocale%3Dpt_PT%26catalogId%3D%26skipManufacturer%3Dfalse%26skipParametricAttributeId%3D%26prevNValues%3D203280) )

What's the diference from the one I'm using (CST-1020) and this one? ( https://www.sparkfun.com/products/11005? (https://www.sparkfun.com/products/11005?) )
Title: Re: Using CST-1020
Post by: Nunov on Oct 07, 2012, 12:04 am
I've looking for more sensors like the one i'm using and i found tihis on: http://www.soselectronic.com/a_info/resource/a/pdf/AC1050.pdf (http://www.soselectronic.com/a_info/resource/a/pdf/AC1050.pdf).
It looks its almost the same and has a more detailed datasheet.

I have had a burden resistor at the output of the sensor to measure current, but if i use the value given for 100 ohm at the output it doesn't give even close to the right result. (I am measuring the current with another equipment.)
Does anyone have used this type of sensors?
Title: Re: Using CST-1020
Post by: RIDDICK on Oct 07, 2012, 12:12 am
1.
how do u get a mainspower plug through that tiny hole?

2.
that sparkfun sensor can b integrated easier, i guess...
one just snaps it on the mains power line...

3.
possibly u just measure the reactive power?
i have no idea how that sensor works, when there r 2 wires with the same current (just the direction is the oposite)...
i think u should wait for the high voltage experts... they should b here within a day... :)
Title: Re: Using CST-1020
Post by: Nunov on Oct 07, 2012, 12:29 am

1.
how do u get a mainspower plug through that tiny hole?

2.
that sparkfun sensor can b integrated easier, i guess...
one just snaps it on the mains power line...

3.
possibly u just measure the reactive power?
i have no idea how that sensor works, when there r 2 wires with the same current (just the direction is the oposite)...
i think u should wait for the high voltage experts... they should b here within a day... :)

1.
I have a cable with a plug i can easily remove. I don't need the plug to go through the hole. I only attach it after the cable passing the hole.

2.
I think the basis of work are the same, but i have this one and it was rather expensive. I want to see if i understand it...

3.
I'm not measuring power. I'm just looking for the current. Only one of the cable go in the hole, otherwise the sensor would give zero Volts at the output.
Title: Re: Using CST-1020
Post by: RIDDICK on Oct 07, 2012, 01:08 am
1.
ok - that sounds safe...

2.
i c

3.
ok - then it should work... how many measurements do u take? since it is AC, the voltage changes quite rapidly and strongly, i guess...
Title: Re: Using CST-1020
Post by: Nunov on Oct 07, 2012, 01:29 am

1.
ok - that sounds safe...

2.
i c

3.
ok - then it should work... how many measurements do u take? since it is AC, the voltage changes quite rapidly and strongly, i guess...

I'm looking to the current wave in an osciloscope at the current transformer terminals. I have 100 ohms conected to that terminals too (the burden resistance).
Then i take the rms value of the wave and after dividing by 0.097 (according to the datasheet) I should get the current value. It happens to give a greater value than it should.

In the osciloscope I get 0.42 V (rms at the burden resistance terminal) and after dividing by 0.097 i get  4.3 Amps, when i should get something like 2.63 Amps (a resistance with 1 kW )

I can't find any example on the web with this sensors. This is driving me crazy!!!!
Title: Re: Using CST-1020
Post by: RIDDICK on Oct 07, 2012, 03:09 am
uhm
why do u take the RMS value (it contains square values)?
http://en.wikipedia.org/wiki/Root_mean_square

i think the arithmetic mean would b the right value...
http://en.wikipedia.org/wiki/Arithmetic_average#Arithmetic_mean

have u seen this:
http://arduino.cc/forum/index.php/topic,125952.0.html  ?
Title: Re: Using CST-1020
Post by: Nunov on Oct 07, 2012, 03:05 pm

uhm
why do u take the RMS value (it contains square values)?
http://en.wikipedia.org/wiki/Root_mean_square

i think the arithmetic mean would b the right value...
http://en.wikipedia.org/wiki/Arithmetic_average#Arithmetic_mean

have u seen this:
http://arduino.cc/forum/index.php/topic,125952.0.html  ?

I'm working in AC. If I use the aritmetic mean i get zero or something near zero...

I have just found that topic. I will try ti find something there too.

Thanks
Title: Re: Using CST-1020
Post by: dhenry on Oct 07, 2012, 03:51 pm
Quote
Let RL=100, then appr. 100mV on RL translate to 1A... 200mV to 2A...

That "sensitivity" figure is specified at the rated current (of 25amp). So running 25amp Ip, you should expect about 2.5v (=100mv * 25amp) on the secondary. All rms of course. The datasheet doesn't say if that relationship holds if Ip is other than 25amp.
Title: Re: Using CST-1020
Post by: Nunov on Oct 07, 2012, 04:03 pm

Quote
Let RL=100, then appr. 100mV on RL translate to 1A... 200mV to 2A...

That "sensitivity" figure is specified at the rated current (of 25amp). So running 25amp Ip, you should expect about 2.5v (=100mv * 25amp) on the secondary. All rms of course. The datasheet doesn't say if that relationship holds if Ip is other than 25amp.

But check this data sheet http://www.soselectronic.com/a_info/resource/a/pdf/AC1050.pdf (http://www.soselectronic.com/a_info/resource/a/pdf/AC1050.pdf).
It gives you all the information we need. We can see it is approximate linear. So it should be the same value used to calculate the current, for a given burden...
Title: Re: Using CST-1020
Post by: RIDDICK on Oct 07, 2012, 04:19 pm
what if u use a variation of "average mean", that uses absolute values?
sumi=1n  (ai)/n
that would almost give u the wanted result...  :)

EDIT: oops - that would not really help (just 10%)... lol - sorry - i have no idea anymore what could cause that error...

r u sure ur oscilloscope is sufficiently accurate?
although errors of 60% would b funny...  XD
Title: Re: Using CST-1020
Post by: Nunov on Oct 07, 2012, 09:29 pm
I found the error.
The datasheet is right. I have to divide the voltage by 0.98 for a burden resistor of 100 ohm.
My mistake was calculating the current for the load. I was adding a sqrt(3) on a monophasic load..  :smiley-red:
Title: Re: Using CST-1020
Post by: RIDDICK on Oct 07, 2012, 09:42 pm
yay!  :)
Title: Re: Using CST-1020
Post by: mauried on Oct 07, 2012, 11:27 pm
What sort of accuracy are you expecting with this energy meter?
Current only sensing energy meters can be highly inaccurate as they dont measure the voltage.
So with loads that have a power factor of less than 1 , the meter will read incorrectly.
Loads that have switch mode power supplies in them , like computers or plug packs will read even more
innacurately, due to the current waveform not being sinusoidal.
Title: Re: Using CST-1020
Post by: Nunov on Oct 08, 2012, 12:45 am

What sort of accuracy are you expecting with this energy meter?
Current only sensing energy meters can be highly inaccurate as they dont measure the voltage.
So with loads that have a power factor of less than 1 , the meter will read incorrectly.
Loads that have switch mode power supplies in them , like computers or plug packs will read even more
innacurately, due to the current waveform not being sinusoidal.

I'm starting by the current. The next step is to measure the voltage. How do you recomend to measure the voltage?
Title: Re: Using CST-1020
Post by: mauried on Oct 08, 2012, 01:05 am
If you really want to measure energy accurately, you are far better off using a device specifically
for this purpose like a ADE5569.

It does all the hard work for you.
Title: Re: Using CST-1020
Post by: RIDDICK on Oct 08, 2012, 08:07 am
for the voltage i saw a transformer here, i think...
http://arduino.cc/forum/index.php/topic,93779.0.html
http://openenergymonitor.org/emon/
Title: Re: Using CST-1020
Post by: Nunov on Oct 21, 2012, 04:00 pm

If you really want to measure energy accurately, you are far better off using a device specifically
for this purpose like a ADE5569.

It does all the hard work for you.

Hi.
I got and ADE7763 ( http://www.analog.com/static/imported-files/data_sheets/ADE7763.pdf (http://www.analog.com/static/imported-files/data_sheets/ADE7763.pdf) ) to help me out to compute the power and energy, but this chip is supposed to receive a voltage between 0.5v and -0.5v.
How am I supposed to reduced a 230V RMS to 0.5 V? Using a voltage divisor? Am I getting any good resolution with such low voltage?
Title: Re: Using CST-1020
Post by: RIDDICK on Oct 21, 2012, 09:37 pm
welcome back Nuno!  :)

According to the datasheet (page 12 of 56, figure 22) a voltage divider is a good idea...
but use sufficiently big resistors, so that u dont waste more energy than necessary...
they say 600kR+1kR is good for 110V...
for 240V u can use 1MR+1kR, i guess...
maybe u need to adapt the capacitor?
maybe u can just omit the capacitor (just in case ur load distorts the voltage...)?  ;)

i dont know why they use transformers so often in this forum...
a voltage divider seems to more natural and easier...
maybe it is about isolation... if u use a voltage divider the meter has to share the ground/neutral line...