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.

sine wave amplitude to control pwm

Status
Not open for further replies.

harps

Member
hello : )

I am trying to design a circuit that will allow me to use the amplitude of a sine wave as a control signal (10khz from a sound card) to control the duty cycle of a PWM generator.

The idea I have so far, is sort of like this:

Sine wave AC (control signal) > full wave rectify to DC > to vary pwm generator duty cycle.

ive done some measurements of the voltages and I've added them to a draft schematic below.

Im not sure what I can do to connect this together to make it work, any ideas would be great, as im a bit stuck.

heres a pic:

In the end I used 1N4148 diodes to rectify the AC signal to DC. (when i took voltage measurments)

thanks for any help : )

UPDATED PICTURE* PWM-IDEAPICupdate.jpg
cant seem to delete the old attachment below
 

Attachments

  • PWM IDEA.png
    PWM IDEA.png
    47.6 KB · Views: 191
Last edited:
that PWM circuit is not easily converted to do what you expect. this is simpler:
http://www.solorb.com/elect/solarcirc/pwm2/

you can simply get rid of potentiometer and the two resistors around it and bring DC control signal directly to pin6.

you will need to scale your DC signal to get proper range (we could add another opamp to get that gain, or repurpose one used as virtual ground).

your rectifier is not good. lower side of your AC input is on wrong terminal.
 
Last edited:
Thanks panic mode for your reply .

is this a high frequency PWM circuit? As i need it to be well above human hearing range.

i think it may be 400hz ? not 100 percent sure. : /
 
Last edited:
you can make it anything you like, the key is how the PWM is obtained. with circuit like this you get separate oscillator and comparator so hacking is easier (you can modify one part without affecting rest of the circuit). beside oscillator has single capacitor, you can easily replace it to get it into particular range...
 
...........
is this a high frequency PWM circuit? As i need it to be well above human hearing range.

i think it may be 400hz ? not 100 percent sure. : /
You need to be >20kHz to be above the human hearing range.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top