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.

Create PWM with comparator

Status
Not open for further replies.

efrenreyes

New Member
Hello everyone this is my first post. Nice to meet you. I am trying to create a pwm(pulse width modulation) signal with a comparator. I tried it in Multisim with virtual comparator and it worked pretty well but i want to built it on a raster with real components. What do you suggest me of comparators ? At simulation i used 50 Hz. I am newbie with electronics. Thanks a lot for any suggestion.
 
Just go to National Semiconductor, Linear Technology, Texas Instruments, or other manf. web site that make linear IC's and search for comparitor.

Your speed and slew rate requirements are dependent on your PWM speed (sawtooth) not the 50 Hz sinewave stencil you are are using. Some have open collector or drain output that require a pullup resistor. These are usually slower types.
 
Here is a link to one using a 555 to generate the frequency and a 339 to make the duty cycle(pulse width). Its a circuit whats simple and works. Fig. # 4.3 is what you want. All About Circuits Forum - View Single Post - LEDs, 555s, Flashers, and Light Chasers

I am very thankful and happy for respond. On the diagram there is a lm339 comparator, in Multisim there are lm339 with 5 pins not 3 wich is the difference ? What i need to connect to other 2 pins above and below ?
 
I am trying with the following circuit and the output is a pwm signal. How can i create it with real components ? Thanks.
**broken link removed**
 
Last edited:
Hello there,


All you need is a triangle generator connected to one input of the comparator, but you dont even need that really. All you need is a cap and resistor and something to discharge the cap at the end of the PWM period. That will give you a pseudo ramp that will work almost as well as a true ramp for generating PWM.

So it would be a cap in series with a resistor with the resistor to +Vcc and the cap bottom connected to ground, and possibly an NPN transistor to discharge the cap at the end of the period, or another comparator with open collector output if the cap is small. I used this in a commercial battery charger long time ago.

**broken link removed**
 
Last edited:
Hello again,


I sent you a schematic via your email. Check it out and get back here when you're ready.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top