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.

ramp generator

Status
Not open for further replies.

Thunderchild

New Member
I wish to make a generic Pulse Width Modulator, if you know of an ic that is not a class D amplifier because that is not what I want then please do tel else tell me how I can make a ramp generator. I am begining to think it would be easier with a pic so If you know how I can do it with a 16F88 then please enlighten me
Thank you
 
I think I posted this diagram a while ago for you. On the left is a ramp generator, its output is connected to a schmitt trigger and they together form the triangle wave generator. I've imroved this design since, most notably adding a driver for faster switching of the power mosfet. A general use PWM is exactly what i'm making when I get parts. Seems like inductive loads are the only big issue i've yet to deal with, my current design is operating 4 amp heaters with no problems and virtually no heat dissapation.
 

Attachments

  • Voltage controlled PWM.gif
    Voltage controlled PWM.gif
    14.9 KB · Views: 615
Thunderchild said:
I wish to make a generic Pulse Width Modulator, if you know of an ic that is not a class D amplifier because that is not what I want then please do tel else tell me how I can make a ramp generator. I am begining to think it would be easier with a pic so If you know how I can do it with a 16F88 then please enlighten me

There's not really any such thing as a 'generic' Pulse Width Modulator, they really need to be specific for what you're using them for. As I said in your previous thread!, you can convert an analogue signal to PWM with a comparator and a triangle generator (usually NOT just a ramp generator). The triangle generators are usually made with a pair of opamps, with a third used as the comparator.

A quick google soon finds **broken link removed**, and also this http://www.4qdtec.com/pwmmod.html amongst many others!
 
but is a triangle generator going to give the same result ? I don't understand. the problem has always been the ramp generator but if it can be done with a triangle wave then it is much easier as you sure the result is the same ?
 
Last edited:
Thunderchild said:
but is a triangle generator going to give the same result ? I don't understand. the problem has always been the ramp generator but if it can be done with a triangle wave then it is much easier as you sure the result is the same ?

Again, it depends what you want to do with it, it's why generic isn't really possible - if you want audio you would use a triangle generator, for speed control probably a ramp (although they are essentially similar anyway).

Try reading the URL's I posted, and checking google!.
 
I made a motor speed controller for a 3A to 8A DC motor almost exactly the same as Dr. EM's. My frequency was about 3kHz, about 20 times higher than his and I used an MC34074 high speed low voltage quad opamp.
The resistor connected to the gate is only 100 ohms for high switching speed.
The Mosfet has a big zener diode across it so I didn't use any other protection.
 
But with a triangle wave form won't the maximum period be 50 % ? I checked out those links thanks. I'm a bit confused here when I was taught the basics of PWM it was a sawtooth signal and quite logically so.
 
When the pot changes the DC reference voltage to the comparator, its other input detects more (or less) of the triangle wave as being higher for a longer (or shorter) amount of time. Therefore the comparator's output is high for a longer (or shorter) amount of time for each triangle wave. It doesn't need a sawtooth wave.
 
Thunderchild said:
But with a triangle wave form won't the maximum period be 50 % ? I checked out those links thanks. I'm a bit confused here when I was taught the basics of PWM it was a sawtooth signal and quite logically so.

But WHAT are you wanting to do with it?, 'generic' is meaningless, you really need a specific purpose. For audio you need a triangle waveform, for PWM speed control either a triangle or a sawtooth is fine.
 
Can't go wrong with triangle then. It does provide 0-100% control.

I think i'll buy some zener diodes for protection, seems the easiest way. My PWM runs at only 125Hz, seems to work well at that frequency, did try it at 20Khz for an amplifier attempt, but it didn't work well, and ruined the speaker even with my lowpass filter after it.
 
Dr.EM said:
Can't go wrong with triangle then. It does provide 0-100% control.

I think i'll buy some zener diodes for protection, seems the easiest way. My PWM runs at only 125Hz, seems to work well at that frequency, did try it at 20Khz for an amplifier attempt, but it didn't work well, and ruined the speaker even with my lowpass filter after it.

20KHz is FAR too low for audio PWM, it's still within the audio range, I bet it really killed your tweeters? :D
 
It did really kill my speaker yeah, it was just an old car speaker though, I won't use my B&W speakers for experiments. Smoke came out and it smelt really bad, still works though interestingly, but the cone seems to rub as it moves so it sounds pretty terrible now.
 
ok thanks, basically I want a general thing to the develop for audio speed control and power supplies (not necedsarily stabilized but efficient) as here (italy) I find it real hard to get parts and so a general thing to fall back on is handy and a good starter point knowing I'll get the bits. after 2 months of waiting perhap I'll remember where on my pc the pic programmer diagram is lol
 
I Thought the subject here was a Ramp Generator

From what I see here, they are Sawtooth and Triangle Generators.
 
chemelec said:
I Thought the subject here was a Ramp Generator

From what I see here, they are Sawtooth and Triangle Generators.

uh my lack of memory due to a long laps of time since I read any theory I actually wanted a saw tooth generator, I think that must of been obvious to you by the end of the thread
 
You know that a capacitor charges at an rc time constant and it is not linear why because the voltage is steady at whatever value it is. to make linear all you have to do is make yourself a current source and the voltage across the cap will be linear. you can use amp to do that. not much help but that is the basic i am not going to sugest how to do that right now.
 
yes I know that and although have not had that much lluck ith current sources the main problem is commanding the discharge. I need a short pullse that will discharge it and am not sure how to go about that
 
Thunderchild said:
yes I know that and although have not had that much lluck ith current sources the main problem is commanding the discharge. I need a short pullse that will discharge it and am not sure how to go about that

You've had various circuits and links posted, what was wrong with all those?.
 
If the capacitor is not huge you may try putting a pnp in the reverse direction to discharge the cap to mv but you must saturate the ******* otherwise it will not work.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top