PWM generator

Thread Starter

ub baker

Joined Apr 11, 2005
1
What's the simplest (smallest footprint) way to generate a PWM signal from an analog signal?

I have a circuit that works fine with a 555 and a comparator. However, I need absolutely minimal footprint, and there must be small, dedicated chips out there.

The analog input is 1~4V. The output is approx 50kHz. Preferably the duty cycle goes from 0% to 100%.
 

hgmjr

Joined Jan 28, 2005
9,027
Originally posted by ub baker@Apr 11 2005, 02:41 PM
What's the simplest (smallest footprint) way to generate a PWM signal from an analog signal?

I have a circuit that works fine with a 555 and a comparator. However, I need absolutely minimal footprint, and there must be small, dedicated chips out there.

The analog input is 1~4V. The output is approx 50kHz. Preferably the duty cycle goes from 0% to 100%.
[post=6860]Quoted post[/post]​
Based on a recent posting on this website, I think that you can get away with using a single dual comparator such as the LM393 as the basis for a PWM generator.

One of the comparators would be configured as a triangle wave generator (taking the place of the 555 you are now using) and the other would be used to compare your incoming control signal with the triangle wave from the first device.

You would need about 7 or 8 discreet components (resistors and capacitors) to pull it off.

You can obtain the LM393 in a surface mount package if you want to go very small footprint.

I will provide more circuit details if you are interested.
 

johnfoody

Joined Apr 26, 2005
11
Hi, I know I didn't start this topic, but I was wondering if you could reply with further construction details?

I have an analog signal between -5 and +5 and I was wondering if I can convert it to a pwm signal (1Khz).

Is there a really small footprint hybrid chip out there to do the job???

Thanks very much in advance.
 

hgmjr

Joined Jan 28, 2005
9,027
Originally posted by johnfoody@Apr 26 2005, 06:22 AM
Hi, I know I didn't start this topic, but I was wondering if you could reply with further construction details?

I have an analog signal between -5 and +5 and I was wondering if I can convert it to a pwm signal (1Khz).

Is there a really small footprint hybrid chip out there to do the job???

Thanks very much in advance.
[post=7269]Quoted post[/post]​
I'll sketch something quick and post it here by this evening.

hgmjr
 

hgmjr

Joined Jan 28, 2005
9,027
Sorry! Time got away from me late yesterday and I was unable to fulfill my promised delivery. I did get most of the way through the schematic and so I should be able to put the finishing touches on the circuit and get it posted late today.
 

johnfoody

Joined Apr 26, 2005
11
Originally posted by hgmjr@Apr 28 2005, 11:51 AM
Sorry! Time got away from me late yesterday and I was unable to fulfill my promised delivery. I did get most of the way through the schematic and so I should be able to put the finishing touches on the circuit and get it posted late today.
[post=7338]Quoted post[/post]​
No need for apologies! you're doing me a big favour.
 

hgmjr

Joined Jan 28, 2005
9,027
Johnfoody,

Here is the first circuit diagram. Its design parameters are the ones originally sought by ub baker. He has gone quiet for some time so it is possible that he found a solution elsewhere.

[attachmentid=611]

The actual control range is between 1.6V and 3.4V rather than 1V and 4V.

I plan to use this same circuitry to implement the parameters that you are looking for.

You are looking for -5 to +5 volt control input with an output frequency of 1Khz. I am assuming that you will have access to a dual 5 volt power supply source.

In the meantime take a look at this circuit and see if it is going to result in a small enough footprint for your application.

I'll try to provide a few governing design equations with the next post in a day or two.

hgmjr
 

johnfoody

Joined Apr 26, 2005
11
Originally posted by hgmjr@Apr 29 2005, 01:30 AM
Johnfoody,

Here is the first circuit diagram. Its design parameters are the ones originally sought by ub baker. He has gone quiet for some time so it is possible that he found a solution elsewhere.

[attachmentid=611]

The actual control range is between 1.6V and 3.6V rather than 1V and 4V.

I plan to use this same circuitry to implement the parameters that you are looking for.

You are looking for -5 to +5 volt control input with an output frequency of 1Khz. I am assuming that you will have access to a dual 5 volt power supply source.

In the meantime take a look at this circuit and see if it is going to result in a small enough footprint for your application.

I'll try to provide a few governing design equations with the next post in a day or two.

hgmjr
[post=7362]Quoted post[/post]​

Yes I do indeed have access to a dual 5 volt supply. Once again thanks for your help.
 

hgmjr

Joined Jan 28, 2005
9,027
johnfoody,

Here is a PWM designed around the parameters that you requested.

The control voltage range is approximately -5V to +5V with an output frequency of 1KHz. The output from this PWM will be a square wave that swings between
-5V and +5V.

Please take a look at the design and let me know if there are changes you need.

To keep the footprint as small as possible you need to use surface-mount components for the comparator as well as the passive components. I have omitted the filter capacitors but you will need to uses several quality capacitors to filter the power supply rails as well as good layout practices to minimize the potential for oscillations on the output of the PWM.

Good Luck,
hgmjr

[attachmentid=617]
 

johnfoody

Joined Apr 26, 2005
11
Originally posted by hgmjr@Apr 30 2005, 02:56 PM
johnfoody,

Here is a PWM designed around the parameters that you requested.

The control voltage range is approximately -5V to +5V with an output frequency of 1KHz. The output from this PWM will be a square wave that swings between
-5V and +5V.

Please take a look at the design and let me know if there are changes you need.

To keep the footprint as small as possible you need to use surface-mount components for the comparator as well as the passive components. I have omitted the filter capacitors but you will need to uses several quality capacitors to filter the power supply rails as well as good layout practices to minimize the potential for oscillations on the output of the PWM.

Good Luck,
hgmjr

[attachmentid=617]
[post=7390]Quoted post[/post]​

CHEERS! If you get the time, just two questions is it possible to get an output pk to pk of 0-5v while maintaining all other spec? and do you have some cicuit formulae just in case i need to change anything.
 

hgmjr

Joined Jan 28, 2005
9,027
Originally posted by johnfoody@May 3 2005, 05:23 AM
CHEERS! If you get the time, just two questions is it possible to get an output pk to pk of 0-5v while maintaining all other spec? and do you have some cicuit formulae just in case i need to change anything.
[post=7430]Quoted post[/post]​
Hi johnfoody,

I see at least three options to achieve the 0V to +5V output signal:

1. Revamp the circuit to run off single +5V supply
2. Add a single comparator stage on the output of the circuit as it stands and power the added comparator off a single supply.
3. Add a single PNP transistor referenced to +5V and ground on the output of the circuit as it stands.

The first approach would be a bit of a challenge but certainly feasible. real drawback to this appraoch would be the reduced sensitivity of the PWM to your control. As it stands, the PWM has a gain of 11.1 %/V. If the circuit is modified to run off of +5 volt only then that would be closer to 22.2 %/V.

The second solution is very straightforward to implement but it runs counter to your requirement for a small footprint as it would introduce another 8 pin device into the design.

The third solution is a bit more palatible since it retains the circuit design as it stands while introducing only a few resistors and a TO-92 or SOT-23 package to the overall design footprint.

I recommend approach #3 but I will be more than happy to implement any of the other approaches I have outlined.

As for design equations, those that were included in with the document containing the schematic are pretty much it. I will be sure to add any new design equations that arise out of the modification to change the output signal level once I get your feedback.

I will do my best to answer any questions you have regarding the design equations contained in the dual supply PWM schematic attachment.

I admit that I am a Millman's theorem fanatic as you will see from the design equations I used. There is a pretty good presentation of the theorem in the tutorial section of this website.

Good Luck,
hgmjr
 

johnfoody

Joined Apr 26, 2005
11
Many apologies I didn't realise they're were included in the document. Thanks very much again! I'll try to get my head around them and hopefully wont need to bother you with any more questions.
 

johnfoody

Joined Apr 26, 2005
11
Originally posted by hgmjr@May 3 2005, 12:18 PM
Hi johnfoody,

I see at least three options to achieve the 0V to +5V output signal:

1. Revamp the circuit to run off single +5V supply
2. Add a single comparator stage on the output of the circuit as it stands and power the added comparator off a single supply.
3. Add a single PNP transistor referenced to +5V and ground on the output of the circuit as it stands.

The first approach would be a bit of a challenge but certainly feasible. real drawback to this appraoch would be the reduced sensitivity of the PWM to your control. As it stands, the PWM has a gain of 11.1 %/V. If the circuit is modified to run off of +5 volt only then that would be closer to 22.2 %/V.

The second solution is very straightforward to implement but it runs counter to your requirement for a small footprint as it would introduce another 8 pin device into the design.

The third solution is a bit more palatible since it retains the circuit design as it stands while introducing only a few resistors and a TO-92 or SOT-23 package to the overall design footprint.

I recommend approach #3 but I will be more than happy to implement any of the other approaches I have outlined.

As for design equations, those that were included in with the document containing the schematic are pretty much it. I will be sure to add any new design equations that arise out of the modification to change the output signal level once I get your feedback.

I will do my best to answer any questions you have regarding the design equations contained in the dual supply PWM schematic attachment.

I admit that I am a Millman's theorem fanatic as you will see from the design equations I used. There is a pretty good presentation of the theorem in the tutorial section of this website.

Good Luck,
hgmjr
[post=7431]Quoted post[/post]​
Was just wondering in your opinion would a si type diode and a resistor, if placed on vout have the desired effect of reducing the output to between 0 and 5???
 

hgmjr

Joined Jan 28, 2005
9,027
Originally posted by johnfoody@May 3 2005, 09:27 AM
Was just wondering in your opinion would a si type diode and a resistor, if placed on vout have the desired effect of reducing the output to between 0 and 5???
[post=7434]Quoted post[/post]​
A diode and a resistor would reduce the output so that is would swing between +5V and a diode drop below ground.

Whether this is appropriate depends on the input requirements of the device(s) to which the PWM output will be connected. Since you need the output to swing between 0V and +5V, I imagine you are planning to use the output of the PWM to feed a TTL or CMOS input. Feeding a CMOS or TTL gate that is power by +5V and ground with an input signal that goes a diode drop below ground would tend to cause problems with the typical CMOS or TTl gate.

If the device being fed by the output of the PWM allows for its inputs to go more negative than ground then the diode is a viable solution.

For the time being, I think I'll just update the schematic to show the transistor solution. I can always amend it to use the diode if the input requirements of the next stage in the design are tolerant of signals that go more negative than ground.

hgmjr.
 

hgmjr

Joined Jan 28, 2005
9,027
johnfoody,

Here is the dual supply PWM design with a PNP transistor added to the output of the previous version to provide an output that swings between 0V and +5V.

hgmjr

[attachmentid=625]
 

johnfoody

Joined Apr 26, 2005
11
Originally posted by hgmjr@May 6 2005, 12:52 AM
johnfoody,

Here is the dual supply PWM design with a PNP transistor added to the output of the previous version to provide an output that swings between 0V and +5V.

hgmjr

[attachmentid=625]
[post=7465]Quoted post[/post]​
hgmjr

Apologies for the lateness of my reply I've been on holidays. Once again this is extremely helpfull, and you are correct it's a cmos device I'm putting my signal into, a pic16C745. On which I've already used up the analog inputs. I may try the transistor and diode solutions. What transistor would you recommend, considering smd is essential.
Once again thank you for your time

johnfoody
 

hgmjr

Joined Jan 28, 2005
9,027
A low-power general purpose silicon PNP transistor should do the job nicely.

I went to www.digikey.com and looked at what they have. A good choice would be the MMBT4126LT10SCT-ND made by ON SEMICONDUCTOR. It comes in a SOT-23 package. You can use this device or an equivalent device.

If you have access to a particular PNP and you can provide a part number, I will be more than happy to check the specs for you.

hgmjr
 

johnfoody

Joined Apr 26, 2005
11
Originally posted by hgmjr@May 11 2005, 11:34 AM
A low-power general purpose silicon PNP transistor should do the job nicely.

I went to www.digikey.com and looked at what they have. A good choice would be the MMBT4126LT10SCT-ND made by ON SEMICONDUCTOR. It comes in a SOT-23 package. You can use this device or an equivalent device.

If you have access to a particular PNP and you can provide a part number, I will be more than happy to check the specs for you.

hgmjr
[post=7618]Quoted post[/post]​
I have access to a medium powered PNP FZT705, its a darlington. Will the high current gain have any adverse affects?
 
Top