Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] AC Voltage sensing - Adding DC bias

Status
Not open for further replies.

vishweshgm

Member level 4
Member level 4
Joined
Dec 17, 2021
Messages
74
Helped
5
Reputation
10
Reaction score
7
Trophy points
8
Activity points
952
Hello,

I want to do a simple task. Sense 230V50Hz input via micrcontroller ADC. First I will use step-down transformer to get corresponding 5Vpk-pk.
Now I want to sens this 5V sine in range 0 to 3.3V. I understand I have to have DC bias at 0V (1.5V) . To achieve this, I found 2 circuits online

1st One:

1651297102641.png


2nd One:
1651297152478.png


I need your help to understand how the above circuits work. I understand that the voltage divider decides DC bias 1.5V. But what determines the peakvalue?
Which is the better circuit
 

Solution
Hi,

to post#3:

lowest circuit = my recommendation. Correct.

****
Upper circuit: There is no voltage divider to step down transformer voltage.
Big transformer node is high impedance for low frequencies, thus prone to pick up low frequency noise.

****
Middle circuit:
May work. 100k is for analog range adujst.
Big transformer node is high impedance for low frequencies, thus prone to pick up low frequency noise.

***
My circuit uses less parts while I expect it to be less prone for errors / noise.

Klaus
What is your output node?

How I'd do it:
* [GND] --> transformer --> C1 --> R1 --> [ADC]
* also: [3V3] --> R2 --> [ADC] --> R3 --> [GND]
(All three resistors are connected at the ADC node.)

You use a small transformer, maybe just 1W (short circuit proof) to step down voltage.
Mind that the 5V are for full load. Unloaded they may go up to 8V RMS, meaning about 23Vpp

How the circuit works .. and values:
R2 = R3 = 10k, they generate a voltage divider, making 3.3V/2 = 1.65V to center the ADC values.
R1 = 30k, act as the input part of a voltage divider to step down 23Vpp to 3.3Vpp. (The "GND part" of the voltage divider is R2||R3 = 5k Ohms)
C1 = 4u7, acts as 1Hz high pass filter to enable DC offset at the ADC

I recommend to add [ADC]--> 33nF --> [GND] to suppress high frequency noise and transient signals
Also: [3V3] --> (K) D1 --> [ADC] --> (K) D2 --> [GND] as overvoltage protection. Use schottky diodes like BAT85

Please check that there is enough headroom at the ADC input. (Avoid clipping). Adjust R1.

Klaus
 

What is your output node?
Oh Sorry, I forgot to mark it. Here I update it.
1651302237559.png


1651304493332.png


So from your suggestion, circuit would be like this, Am I right?


1. If I am right, The function of C1 is just for the purpose of filtering. say, If I used 1uF, It's High Pass filter with fo = 5Hz.
2. R1 decides headroom for AC and if I want to calculate Maximum Voltage that adc point in circuit can reach for 15VPk (30Vpk-pk) transformer output:

Voutadcmax = vpkmax*(R2||R3)/(R1+(R2||R3))+1.65V



1651302916702.png


Also It would be great if you can help me understand the other 2 circuits as well, as to see which components decide the headroom
 

Hi,

to post#3:

lowest circuit = my recommendation. Correct.

****
Upper circuit: There is no voltage divider to step down transformer voltage.
Big transformer node is high impedance for low frequencies, thus prone to pick up low frequency noise.

****
Middle circuit:
May work. 100k is for analog range adujst.
Big transformer node is high impedance for low frequencies, thus prone to pick up low frequency noise.

***
My circuit uses less parts while I expect it to be less prone for errors / noise.

Klaus
 

    vishweshgm

    Points: 2
    Helpful Answer Positive Rating
Solution
There is a previous thread about using small mains transformer.......it could well be inaccurate.....the thread is from approx somewhere 2018 to 2019 on edaboard

The attached is an accurate way to measure mains voltage......using an InAmp....or you can use a diff amp if you want instead if you want cheaper.
 

Attachments

  • Mains voltage logger.zip
    16.3 KB · Views: 146

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top