what are the safety/protection I will have to take when converting 0 to 240V to 0 to 1V , feeding to adc pin of microcontroller

Thread Starter

ashokraj

Joined Feb 1, 2018
137
Hi, I want to measure the voltage of the fan regulator and feed into ADC pin of ESP 8266, The range of ADC is 0 to 1V, theoretically I can use the below circuit. VG1 being the load voltage taken from the fan regulator, VF1 will be driven into my ADC pin , My doubt is, can i go with this circuit or is there a better way to convert 0 to 240V to 0 to 1V? please provide me insights.

Here I have considered peak voltage(340) not rms.
1619155988493.png
 

ericgibbs

Joined Jan 29, 2010
18,766
hi ash,
I would advise that you use a small mains step down transformer.
Say 240Vac down to 6Vac, remove some of the secondary windings in order to give 1Vac output.
Note: Your resistive divider or the transformer method will give a voltage which swings +/-1Vac about zero volts.
Don't apply a negative voltage to the ADC input.

I would suggest you use a a half or full wave rectifier, this means a higher than 1Vac will be be required to drive the rectifier in order to get +1Vdc at the ADC.

A simpler way would be to use the 6Vac , rectify and the use a resistive divider.
Using a transformer will give the safety isolation from the mains supply, which your original circuit does not cover.

E
 

Deleted member 115935

Joined Dec 31, 1969
0
Like @ericgibbs solution
would suggest , don't remove windings,
but use the resistor divider idea on the 6v AC output

We are assuming input is AC though,
 

Ian0

Joined Aug 7, 2020
9,667
If your microcontroller is on the live side of the supply, then you can use the resistive divider, like you have drawn, but with another 1k resistor to the 3.3V supply. That biases the A/D's input in the middle, so that negative voltages will not damage it.

If the microcontroller is on the earth-side of the power supply (which it will be if there are any external connections to it), then isolation is mandatory, and a 6V transformer is perfect. Don't use EI transformers rated lower than 3VA as the really tiny ones have distorted output waveforms. I like to use this toroid.
https://uk.rs-online.com/web/p/toroidal-transformers/1730113/
A 6V transformer will probably be 8V off load. This attenuator circuit gets it to 1V rms, centred on half supply and only uses two values of resistor
Screenshot at 2021-04-23 09-29-55.pngR1=R2 and R3=R4
 

Thread Starter

ashokraj

Joined Feb 1, 2018
137
hi ash,
I would advise that you use a small mains step down transformer.
Say 240Vac down to 6Vac, remove some of the secondary windings in order to give 1Vac output.
Note: Your resistive divider or the transformer method will give a voltage which swings +/-1Vac about zero volts.
Don't apply a negative voltage to the ADC input.

I would suggest you use a a half or full wave rectifier, this means a higher than 1Vac will be be required to drive the rectifier in order to get +1Vdc at the ADC.

A simpler way would be to use the 6Vac , rectify and the use a resistive divider.
Using a transformer will give the safety isolation from the mains supply, which your original circuit does not cover.

E
ok thank you, I would like to gain some knowledge excluding the 240V AC,

How can i convert a simple +/-1 v to 0 to 1V using opamps?please tell me
 

ericgibbs

Joined Jan 29, 2010
18,766
hi ash,
Do want 0V to 1V DC or AC,
I would suggest 1V DC, use a simple precision OPA rectifier circuit after the step down transformer.
E
 

Ian0

Joined Aug 7, 2020
9,667
If you're connecting to a microcontroller, then sampling and calculating RMS isn't difficult, and needs fewer external components.
 
Top