News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Current measure

Started by Giuseppe MPO, May 31, 2021, 02:43 PM

Previous topic - Next topic

Giuseppe MPO


Hi all,
any way to measure an alternating voltage? I have to measure the current of a 220V load.
I want to insert an ACS758 sensor, at the output I have an alternating signal that reflects the current in the load.
In your opinion, using a PIC which then has to process data, which is the best method to measure it?

keytapper

I think you should take a set of samples and make an average, excluding the negative sign of the wave.
Considering that the zero Amps is set a VCC/2.
Ignorance comes with a cost

Giuseppe MPO


Maybe I should find the peak value of the half wave and then divide it by the square root of two to find the rms value. Or rectify it and measure the peak voltage across the output capacitor, in this way the PIC would have less work

trastikata

#3
Quote from: MPO on May 31, 2021, 02:43 PMIn your opinion, using a PIC which then has to process data, which is the best method to measure it?

Depends on the current and the size of the PCB. Can you use a CT? After the CT place a Schottky rectifier bridge with the burden load on the output and LP filter to smooth the rectifier's output. Then measure the DC voltage which will be proportional to the current.

If you want to measure directly the peak of the sine wave from the CT, use peak detector - requires some additional components.

TimB

In the long distant past I developed a speed controller for brushed mixer. I also added a current display along with speed etc. It may well have been a ACS758 as it sure looked like it.

Now what I found
1 The current will vary depending on where you are in the AC cycle. And if you are chopping it.
2 What I ended up doing was use an interrupt to time when I was going to sample the ADC that was connected to current sensor. I sampled it many times to get a reasonably true value.
3 The maths you do to get the amps is not true current. It will vary based on how the voltage is being sliced up if you are doing any speed control

In my case I "pretended" I was doing it properly as I was at the time (and now) just not bright enough to do it properly
My result matched industrial meters if you compared it. But in reality it was more like a look up table

In case its of use other people have the same questions. Here is a good answer

https://www.physicsforums.com/threads/how-to-calculate-rms-voltage-from-triac-phase-angle.572668/



okmn

i can advice lem la series  current transducer
https://www.lem.com/en/product-list?measurement=52&nominal_val=90-180

 i used 5 year ago for5 pcs  dc magnet drive (dc24v 100 amper) load  for scrap yard cranes....they are is perfect

i did calibration with fluke processmeter and my system still working non stop 7/24(it is mean you can trust fully lem products)



rick.curl

I have used the ACS758 current sensors many times and they work great. If the waveform is always a sine wave, then averaging or peak reading using a PIC is fine, but if the waveform is changing or is non-sinusoidal, I recommend an RMS/DC converter between the hall effect current sensor and the PIC.  My favorite is the Analog devices AD8436.  VERY accurate!

-Rick

Giuseppe

There is also ACS712 in 3 different versions based on the maximum current you need to measure

Giuseppe MPO

Quote from: rick.curl on May 31, 2021, 11:54 PMI recommend an RMS/DC converter between the hall effect current sensor and the PIC.  My favorite is the Analog devices AD8436.  VERY accurate!

-Rick
Interesting, I have to try it.
thank you

Giuseppe MPO

Quote from: Giuseppe on Jun 01, 2021, 06:46 AMC'è anche ACS712 in 3 diverse versioni in base alla corrente massima che devi misurare

It is very similar to the ACS758, and of these I already have many in stock.