Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to convert A.C voltage to D.C

Status
Not open for further replies.

veerubiji

Member
I have two signals one is sine wave, other one is square wave. I am giving it to one demodulator (nothing but switch). square wave is a switching signal so the output of switch is only positive sine wave. which is, I am passing it through the resister(12kohms) and then a parallel resistor and capacitor. I have attached circuit diagram as shown below.![circuit diagram][1]
I have checked output at node out1 (after switch), which will be like this. In the image positive cycles of both blue and yellow signals are override.
![signal][2] The positive cycle is there but negative cycle has to clip totally but i have some D.C voltage at negative cycle of sine wave. I don't know why i am getting that?

After that I am passing that signal through one resistor as well as parallel resistor and capacitor. Finally at the input of ADC i am getting D.C signal. But i am not sure the circuit i have added after switch is converting existing positive cycle of sinewave into D.C voltage or what I have some D.C signal at negative cycle of sine wave.

The main concept is, Here the sine wave signal is in phase with switching signal but normally there will be some phase shift in sine signal because it is the output of Capacitive sensor. So to get maximum voltage of sine signal I am varying phase from 0 to 360 degree of sine signal, here switching signal phase is constant. both are at same frequency. If i change phase from 0 to 360 of sine signal i will get maximum voltage at some phase then I want to convert that max voltage into D.C before giving to ADC. How to do that.

Normally I have done simulation in circuit lab for the above circuit, I am getting Zero D.C voltage at the input of ADC. But I want to get maximum peak of positive cycle of existing sinewave after switch as D.C voltage at the input of ADC. What changes i have to make?
View attachment 68616
 
First of all, what is SW4 ?

If it is some kind of FET switch like a 4066, what are its supply voltages?

Show us ALL the circuit, not just a simplified representation.

JimB
 
It sounds like what you want is a peak detector. Do you want to be able to control when the sample is taken or is continious ok?
 
It sounds like what you want is a peak detector. Do you want to be able to control when the sample is taken or is continious ok?
I need continious. Can you suggest best way to get that existing positive cycle peak at all time.
 
First of all, what is SW4 ?

If it is some kind of FET switch like a 4066, what are its supply voltages?

Show us ALL the circuit, not just a simplified representation.

JimB
I am giving switching signal as square wave to the switch, the operation is when i have positive cycle in square wave it allows the sine signal at that time. When we have zero signal or below 2.5 then it will block the negative cycle of sinewave.
 
I am giving switching signal as square wave to the switch, the operation is when i have positive cycle in square wave it allows the sine signal at that time. When we have zero signal or below 2.5 then it will block the negative cycle of sinewave.

Yes, I understand that concept.
You have obviously built some physical form of this circuit as you have a trace from what looks like a real oscilloscope, but the thing does not work correctly.

So, WHAT ARE YOU USING TO PHYSICALLY IMPLEMENT THE FUNCTION OF SWITCH SW4 ?

JimB
 
It looks like your intent is just to rectify the AC signal to DC. The simplest way to do that is with a diode. But they won't work with the low voltage that you're using. At least, not directly.

The way around that problem is to make a precision rectifier by wraping the diode up with an op-amp to offset the diode drop voltage. Google "precision rectifier circuit" for lots of example circuits. You can choose from half wave or full wave versions.

Feed that into the RC circuit you already have and you should be done.
 
Last edited:
Peak Detector

Here is one using a comparitor.
Input voltage 1 volt peak to peak @ 125Khz. 0.5 volts peak.
Output 2.5 volts to DAC.
Notice the time to settle and to discharge. Is this OK?
 
I have checked output at node out1 (after switch), which will be like this. In the image positive cycles of both blue and yellow signals are override.
![signal][2] The positive cycle is there but negative cycle has to clip totally but i have some D.C voltage at negative cycle of sine wave. I don't know why i am getting that?

The DC voltage (blue trace) you see during the negative cycle at the out1 node is likely due to the charge on capacitor C7 because the switch is open during that time.

You actually should be seeing a DC voltage (with small amount of ripple) at the input to the ADC proportional to the phase difference, with your circuit, but it won't vary from +Peak to +Peak (-700 mV to +700mV), but more like from -300 mV to +300 mV, except the ADC might be clamping the negative swing and/or your switch might not allow bidirectional current flow. If you can place a fixed, positive DC offset voltage of 700 mV, or more, on the sinusoidal source then it cannot go negative, and you will not have to be concerned with those issues.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top