Better AC sensing circuit for ADC conversion

Thread Starter

Hasan2019

Joined Sep 5, 2019
199
I think I get you.
look at the output first. you have 250 volts AC.
what are the steps you have on the auto transformer ?
if you have say 10 volts between taps on the output , then the most you need is to resolve the input to say 5v.
The number of relays is irrelivant,

if you only need to detect within 5v , then the number of levels you need in the ADC is 250 / 5, i.e 50 levels.
a 6 bit ADC would give you the resolution you need , with spare.

hence the reason a few of us have been asking, but not getting answers to

a) what are the voltage steps on the auto transformer you want to use ? this sets the ADC resolution needed.

b) how often do you wish to switch the relays ?
this sets do you need relays or solid state solution

get on back to this please with clear answers .
You are bit on track now Dr. Smith.
The paper did not tell anything about it.
a) Did you see the transformer design that I showed in a post ? Let's say 10 step.
b It depends on the relay. But they usually take around 10ms (milliseconds) to switch on, or off. So about 100 flips per second (50 Hz).
 

Thread Starter

Hasan2019

Joined Sep 5, 2019
199
what do you mean by 100 bit resolution ?
do you mean the adc ?
100 bit resplution is 7 bits adc.
check, but most arduino has a 8 bit ADC ,
this is oversampled the input, adding an extra bit for each 4 times over sampling.
so your 50 Hz is sampled at 16 times, then you gain two extra bits .
Nope, I was kidding with @MrAl
 

Thread Starter

Hasan2019

Joined Sep 5, 2019
199
Looks like a bit of a hobbyist project disguised as a scientific paper. What’s this nonsense about the processor calibrating the voltage divider? And removing the harmonics from DC with a capacitor? It seems like he has seen the term “buck boost” transformer before but doesn’t quite know what it does, so decides not to use it even though it would be advantageous in this system.
But the main point is that there is no rms measurement whatsoever. It is just scaled from the peak. Waveform distortion will not be detected.
@lan0, you are contributing here I do agree. On the other forum most of the hobbyist care about harmonics and Waveform distortion. From your experience kindly check this link for measuring RMS values, I will again look your suggested technique in this thread.
Measure AC Voltage with Arduino – AC Voltmeter

See post #121, may be its 16 bits ADC, ADS1115
 
Last edited:

panic mode

Joined Oct 10, 2011
5,013
you are still giving assignments to others, telling them to read more and research more. you should stop that.
why don't you say what exactly you wish to improve and why?
 

Ian0

Joined Aug 7, 2020
13,158
@lan0, you are contributing here I do agree. On the other forum most of the hobbyist care about harmonics and Waveform distortion. From your experience kindly check this link for measuring RMS values, I will again look your suggested technique in this thread.
Measure AC Voltage with Arduino – AC Voltmeter

See post #121, may be its 16 bits ADC, ADS1115
It says
"In this project the Arduino actually doesn’t give the True RMS of the input AC voltage because it uses the function: Vrms = Vmax/√2
That means the Arduino will give a correct measurement for a sine wave AC voltage input only!
"
Need I say more?

Also, anything with a diode in it will lose accuracy at low voltages due to the unknown volt drop of the diode, and the circuit provides no isolation from the AC supply.
 

drjohsmith

Joined Dec 13, 2021
1,614
actually i did... but i should not have to - why would anyone bother reading 87 posts to finally get to important tidbit. this should have been mentioned in posts 1-3.



i have no doubt. device is rather simple. the biggest problem was winding that custom transformer. i have done that twice in my life and that was enough for me. so i would rather use variac - you get smooth transition just by rotating knob. and a servo can do that.



lol....not this again... :D

what is it that you are trying to do? if you want to build it - circuit is shown.

the thread name suggests that you are looking for "better AC sensing" but part that is not clear is - better how. speed? resolution? noise? linearity? what version of Arduino UNO you have? i have several, R4 has 14-bit ADCs if i remember correctly.

if you have 16 relays, 4 bits are enough.

voltage sensing in original circuit was this. what is it that you need to improve?
View attachment 362044
Does the op need to rectify ?
They are going into a processor , so using that to calculate the RMS straight off the AC of the transformer seems simpler and cheaper .
 

drjohsmith

Joined Dec 13, 2021
1,614
@lan0, you are contributing here I do agree. On the other forum most of the hobbyist care about harmonics and Waveform distortion. From your experience kindly check this link for measuring RMS values, I will again look your suggested technique in this thread.
Measure AC Voltage with Arduino – AC Voltmeter

See post #121, may be its 16 bits ADC, ADS1115
That circuit is lethal .
Direct connection to mains
Is that what you want to do ?
 

drjohsmith

Joined Dec 13, 2021
1,614
You are bit on track now Dr. Smith.
The paper did not tell anything about it.
a) Did you see the transformer design that I showed in a post ? Let's say 10 step.
b It depends on the relay. But they usually take around 10ms (milliseconds) to switch on, or off. So about 100 flips per second (50 Hz).
Are you suggesting you want to switch the relay 100 times per second ?
How many switches life does your relay have ?

You have shown various drawings of transformers ,
What do you understand is the voltage between each tap ?
 

Thread Starter

Hasan2019

Joined Sep 5, 2019
199
It says
"In this project the Arduino actually doesn’t give the True RMS of the input AC voltage because it uses the function: Vrms = Vmax/√2
That means the Arduino will give a correct measurement for a sine wave AC voltage input only!
"
Need I say more?

Also, anything with a diode in it will lose accuracy at low voltages due to the unknown volt drop of the diode, and the circuit provides no isolation from the AC supply.
Ok, if it does nothing I will avoid it. Is there anything like you want to conclude here with Hardware? May be from your previous post.
 

Thread Starter

Hasan2019

Joined Sep 5, 2019
199
Are you suggesting you want to switch the relay 100 times per second ?
How many switches life does your relay have ?

You have shown various drawings of transformers ,
What do you understand is the voltage between each tap ?
I have no numbers in mind now. But not in 100 times per second. I said for normal case.
 

drjohsmith

Joined Dec 13, 2021
1,614
I have no numbers in mind now. But not in 100 times per second. I said for normal case.
How often you want to switch is a critical design decision you need to make .
It affects how fast you need to sample input , the type and quality of the relay / SSR .
Calculate how long a relay designed for say 10000 switches would last at say 1 per second switching .
 

drjohsmith

Joined Dec 13, 2021
1,614
@Hasan2019
You have not answered on the critical design decision re what voltage is between each tap on the auto transformer , have you calculated that yet ! If not strongly suggest you need to.

When you do , you will notice that one of the variables in the calculation is the input !

So your massuring input voltage .
Say at 250 volts in , each tap is 10v
Voltage in drops to say 180 volts .
How many taps up would you move ?
What is the voltage on each tap now at 180 volts in ?
 

drjohsmith

Joined Dec 13, 2021
1,614
It says
"In this project the Arduino actually doesn’t give the True RMS of the input AC voltage because it uses the function: Vrms = Vmax/√2
That means the Arduino will give a correct measurement for a sine wave AC voltage input only!
"
Need I say more?

Also, anything with a diode in it will lose accuracy at low voltages due to the unknown volt drop of the diode, and the circuit provides no isolation from the AC supply.
Re the diode , voltage drop @Ian0
Agree with you that it happens
But not certain it's very critical to the OP project because.
They are driving a fairly high impedance load , when the mains in is say high at 300v AC, they are drawing around 1mA at 5v
Less as input voltage changes
So if they do use diodes , seems like the voltage change will be measured in mV at most. Don't know as they have not made decisions.
But compared to the voltage difference they are looking at resolving , the diode voltage change would seem to me in consequential.

Personal , I'd not be rectifying anyway externally , just feed the low voltage AC into the Arduino , let the software work out the numberes,
They are not going to want to switch faster than once per second at absolute most , so even if the use an original 16 MHz Arduino, they have plenty of time .
If they use say a teensy Arduino at 100 MHz with dsp capability , they are laughing .
 

Ian0

Joined Aug 7, 2020
13,158
You could always measure the output voltage. The acceptable limits for a 230V supply are 208V and 253V. All 230V equipment is designed to work within these voltages. So if the output is >245V go down a tap, or if it is <215V go up a tap.
As the acceptable working band is 46V, it is clear that not many taps are actually required.
 

Thread Starter

Hasan2019

Joined Sep 5, 2019
199
@drjohsmith keep your feedback slow please, the thread moving rapidly. Others are complaining me a lot. I will answer one by one to your feedback. Need some time to react, slow and dull brain are my asset.
 

drjohsmith

Joined Dec 13, 2021
1,614
@drjohsmith keep your feedback slow please, the thread moving rapidly. Others are complaining me a lot. I will answer one by one to your feedback. Need some time to react, slow and dull brain are my asset.
Your far from slow @Hasan2019
I need to answer when things pop up , trying to guide you here, trying to keep your distractions down , it's what happens when you have many forums / posts

Assuming you want to make a working real system , then I'd be first looking at understanding the auto transformer you have chosen , the voltages on the taps and how the output voltage changes with input voltage.

Can you get on back with what voltages you understand each tap on your transformer will give out at 250 v AC in
 
Top