Hi,The fact, w/o Arduino, the sensor is not behaving sounds like a defective part.
Eg. your multimeter measurements.
Note is your multimeter response extend down to 50/60 Hz ?
Its not clear to me, is the output a DC voltage or amplified ac voltage ?
Regards, Dana.
As response to AC input current: for sure, with Vcc/2 superimposed DC. But it doesn't sound like you are measuring in ACV range. 2.7 V AC exceeds the possible output voltage with 5V Vcc.I think the output of the sensor is an ac voltage signal.
Thank you for your response. Yes the output is an ac signal. I am thinking about taking the peak value of the reading. Do I need to clamp the output to a zero level before connecting it to the adc or can I correct it in the code?As response to AC input current: for sure, with Vcc/2 superimposed DC. But it doesn't sound like you are measuring in ACV range. 2.7 V AC exceeds the possible output voltage with 5V Vcc.
Thank you. I am using a wemos D1 mini board and and ADS1115 adc module for reliability and accuracy. The adc module is powered from the 3.3v and the input is fed through a potential divider. The adc value is fluctuating too much and when the load current is increased, the ac output voltage of the sensor is increasing, which is measured using a multimeter, but the adc reading is decreasing.If the Arduino and sensor powered by 5V a direct connection to ADC input is
fine.
Keep in mind the response of the sensor looks like
View attachment 177248
The sensitivity is 66 mV /A nominal from the Vdd / 2 bias point.
Regards, Dana.
Thank you very much for your reply. I tried using a variance equation to find out the current and that way we dont't need to cosider the offset DC voltage.Hi,
AC measurement is not the same as DC measurement.
Some informations about AC measurement, if you are interested in details:
AC means continously changing the instantaneous current value.
A simple ADC measures the instantaneous value. Thus the ADC reading of a 1A RMS sine waveform gives (all) values from -1.414A to +1.414A.
In most cases one wants to know the RMS value.
Thus one needs to do the conversion from the instantaneous values to the RMS values.
Clean solutuions can be:
* AC_in --> RMS_to_DC conversion (hardware) --> ADC --> digital processing (microcontroller)
* AC_in --> ADC -->RMS_to_DC conversion (software) --> further digital processing (microcontroller)
The RMS_to_DC conversion (hardware or software) needs to be defined:
* lower input frequency of interest (like: including_DC or excluding_DC)
* upper input frequency of interest
* squaring circuit performance
* averaging time / filtering of squared values (how long may it take to get to 99% of end value, how much ripple is allowed)
* square root performance. (sw: how often do you need an output value)
Not that clean solutions are
* rectified average method (analog or digital)
* peak method
As already mentioned they are not that accurate and gernerate (huge) errors when the waveform (overtones, duty cycle) changes.
You talk about accuracy: I guess you know that there are also "precision" and "resolution". All three of them don´t neccessary relate to each other.
Talking about "accuracy" without giving a value is useless. Every one has a different definition of "accuracy".
For the one t´s good if it´s within 1% of error tolerance, the other at 0.1% and the next at 0.01%.
Good accuracy at AC measurement is more difficult than on DC measurement. Often there is an uncertainty because of noise. For DC measurements you can simply do averaging to cancle out noise.
But with noise (or overtones) at AC measurement the RMS value always becomes positive. Thus you can´t cancel it out with the averaging method.
And timing behaviour has big influence on design complexity. I´ve designed an RMS meter that is fast and has less than 1% error rising and falling within 30ms. (falling in most cases is much slower than rising because of average at the squared side and then square_root).
For industrial measurement devices a rising delay of 2000ms and more is not unusual.
There´s alot more to consider to really get accurate AC measurement results.
Klaus
Thank you for your help. I have managed to get a pretty consistent reading out of the sensor by adjusting the sampling frequency of adc. I hope I can get an accurate measuremet by calculating using that value. I am yet to find out an equation to calculate that. Thank you so much. Will let you know the status after that is done.Hi,
your math seems to calculte "RMS value excluding DC" over n samples.
So far so good.
I´m worried, because you talk about 150 samples ... but nothing about sampling frequency.
With your math it is very important that
* your measurement window: n / sampling_frequency
* is an exact integer multiple of your mains period time.
Else your RMS values may be not precise (while still being accurate). It will ripple around the expected value.
But also the samples need to be in equal distance. Very equal. So if the sampling timing is controlled by the microcontroller, best method is to use the microcontroller´s hardware (periferal) to generate the timing, independent of the executed code.
Next best is to control the timing with an ISR. But mind that an ISR may be delayed (unequally) depending on the code in the main loop. So it will be more jittery than the solution above.
Avoid to generate the tim ing by using delay functions like "delay_us()". You won´t get good results this way.
So your code has big impact on the RMS result.
Klaus
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?