I'm using a Mikroe - AC Current click for the first time. I have bought the bundle with a 30A/1V AC Current sensor.
I have everything connected to a Arduino Uno and I can read the raw value that it sends though SPI.
I have used the last 2 days to figure out how to turn the raw value into actual readings. but I'm no engineer and I can't find any examples of how it works.
Is there anyone smart enough to take me through calculation that needs to be done?
(The board has an Analog read out, which I can convert to the exact numbers I read with a multimeter)
I have used three SCT_013 100amp current sensors to measure the three phase house supply current. It is a question of kowing the voltages/amp and how the ADC converts voltages to 10 or 12 bit values.
post #1 states you are measuring up to 30 A / 1 V, using a sensor that outputs 1 V for the full-scale reading of 30 A. if you read half a volt you have 15 amp flowing.
are you using the ADC of the click or reading the sensor directly from the AN pin?
there is sample C/C++ code on the Mikro LibStock page - download the 3362_ac_current_click.zip file
are you planning to read the current via the the ADC of the click using the SPI interface or reading the sensor directly from the AN pin? it would be worth putting a voltmeter on the AN pin check what voltage reading you get for specific currents.
although the SCT_013 type current sensors are none invasive still be very careful if working around high voltages
Every time members give that reply I wonder why they buy stuff like that. It 's like buying Chinese stuff having neither support nor spare parts are available...
Luckily @ horace has experience and showed up.
My goal is to buy a SCT_013 100amp current sensors to measure. But I thought that starting with this kit was easier...
Side question: Could you maybe share your setup on this SCT_013 100amp if you still have it? - i'm thinkin of wiring and code?
But to answer your question, i was planning on using the ADC on the click, which is a 12 bit.
I get the part with 30A/1V equals 15A/0.5V, that makes sens.
I think my problem maybe is that I dont understand how this 12-bit thing works.
post#5 I have also found that sample code, but it just calls for a current and no raw value as I understand it.
I have also check the AN pin with a voltmeter, and it measures correct.
It appears not to be filtered and it might be biased.
If it's biased, zero-current will read some (approximately) constant value which can be subtracted-out to get the actual reading.
So, first-off, I'd measure with no current, and again with current to see if there's any difference.
If it's not rectified & filtered you are "sampling" a sine wave and the readings will "look random" but you should be able to pick-out the peaks and you should get small numbers with little or no current (after subtracting the bias, if it's biased) and with higher current you should see some bigger numbers. But it's a waveform with two zero-crossings per cycle so you'll still get some small numbers and you might even "catch" a zero.
It that appears to be working you can find the peak in software. Or, you can calculate the average or the RMS. But if you calculate the average it has be the average of the absolute values because an AC waveform is negative half the time and the average is zero.
Once you get a raw number that seems to correlate with current you can calibrate it with a known load (like 100W light bulb, or something.)
P.S.
Be sure to clamp around only one wire. If you clamp around both wires the magnetic fields will cancel.
do a web search for arduino SCT_013 you will get plenty of links
I seem to remember I offset the AC signal from the sensor by 2.5 volts DC to give me positive voltages for the ADC - I would read the 10 bit ADC, subtract 512 and calculate the RMS value of the current from the samples over a few seconds