PWM to Linear
Archiver
Posts: 46,084
I have seen circuit designs for converting a PWM signal coming out of a stamp to
a linear voltage. The problem is I'm not sure how to go about adapting the
design to do what I want. Further more I'm not sure which parts would be best
suited for the job.
What I want to do is linearly control the input voltage to 12V DC fan that uses
around 4 Watts of power. Like I said I'm not totally clear on how to adapt the
conversion circuit design for this job. Also if you could recommend parts that
would be up to this task? As I'm not sure if a MOSFET, Transistor, etc. would
be best suited for this.
The reason I need to use linear instead of direct PWM is that the fans on tach
feed back on them and the tach sensors share common power and ground with the
fan's motor. When I use PWM and try to read the tach I end up reading the PWM
instead of the tach. It might be worth noting I'm using one of Al Williams's
excellent PWM coprocessors to do the PWM work for the stamp.
Any help is appreciated!
Thanks,
Chris Shuster
[noparse][[/noparse]Non-text portions of this message have been removed]
a linear voltage. The problem is I'm not sure how to go about adapting the
design to do what I want. Further more I'm not sure which parts would be best
suited for the job.
What I want to do is linearly control the input voltage to 12V DC fan that uses
around 4 Watts of power. Like I said I'm not totally clear on how to adapt the
conversion circuit design for this job. Also if you could recommend parts that
would be up to this task? As I'm not sure if a MOSFET, Transistor, etc. would
be best suited for this.
The reason I need to use linear instead of direct PWM is that the fans on tach
feed back on them and the tach sensors share common power and ground with the
fan's motor. When I use PWM and try to read the tach I end up reading the PWM
instead of the tach. It might be worth noting I'm using one of Al Williams's
excellent PWM coprocessors to do the PWM work for the stamp.
Any help is appreciated!
Thanks,
Chris Shuster
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
it... weird... anyone have any idea why? Anyway here's my question...
I have seen circuit designs for converting a PWM signal coming out of a stamp to
a linear voltage. The problem is I'm not sure how to go about adapting the
design to do what I want. Further more I'm not sure which parts would be best
suited for the job.
What I want to do is linearly control the input voltage to 12V DC fan that uses
around 4 Watts of power. Like I said I'm not totally clear on how to adapt the
conversion circuit design for this job. Also if you could recommend parts that
would be up to this task? As I'm not sure if a MOSFET, Transistor, etc. would
be best suited for this.
The reason I need to use linear instead of direct PWM is that the fans on tach
feed back on them and the tach sensors share common power and ground with the
fan's motor. When I use PWM and try to read the tach I end up reading the PWM
instead of the tach. It might be worth noting I'm using one of Al Williams's
excellent PWM coprocessors to do the PWM work for the stamp.
Any help is appreciated!
Thanks,
Chris Shuster
[noparse][[/noparse]Non-text portions of this message have been removed]
it to a voltage. Perhaps you could use that voltage to control a MOSFET
... but I'm not very experienced in those things. The original Stamp
App Notes show how to buffer the voltage from the RC with an op-amp to
"stiffen" in, but that will still be in the 0 - 5V range. If the op-amp
could handle the power, you could use it to multiply as well, perhaps.
-- Jon Williams
-- Parallax
Original Message
From: Chris Shuster [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=d_S7TvISuAKheFYXMqOl6PiWUaBf3shSRdE1C26mIal4Qnb6WNSc4icCCNzxlht8j47NoE0_9Z_NJvw]cpuman3@h...[/url
Sent: Saturday, January 10, 2004 3:54 PM
To: Stamp Mailing List
Subject: [noparse][[/noparse]basicstamps] PWM to Linear
For some reason this e-mail never made it to the list the first time I
sent it... weird... anyone have any idea why? Anyway here's my
question...
I have seen circuit designs for converting a PWM signal coming out of a
stamp to a linear voltage. The problem is I'm not sure how to go about
adapting the design to do what I want. Further more I'm not sure which
parts would be best suited for the job.
What I want to do is linearly control the input voltage to 12V DC fan
that uses around 4 Watts of power. Like I said I'm not totally clear on
how to adapt the conversion circuit design for this job. Also if you
could recommend parts that would be up to this task? As I'm not sure if
a MOSFET, Transistor, etc. would be best suited for this.
The reason I need to use linear instead of direct PWM is that the fans
on tach feed back on them and the tach sensors share common power and
ground with the fan's motor. When I use PWM and try to read the tach I
end up reading the PWM instead of the tach. It might be worth noting
I'm using one of Al Williams's excellent PWM coprocessors to do the PWM
work for the stamp. Any help is appreciated!
Thanks,
Chris Shuster
[noparse][[/noparse]Non-text portions of this message have been removed]
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
bottom :-)
An RC network will create the voltage. The PAK-V won't stop making PWM, so
the response does not droop and the C value is not critical. BUT, you still
only have 0-5V and no where near 4W.
So... you need an op amp. There are a few problems with that, though. Let's
say you decide to run your PWM from 0 to 4V and X3 to get 0 to 12V. Great
idea! But the op amp will need more than 12V unless it is a special "rail
to rail" op amp. The more current you draw from an op amp, the harder time
it has approaching the supply rail. Many op amps can go to the "low rail" so
you can use ground as V-, but fewer can hit the +rail. So you either need a
higher supply (15V? 24?) or you need a real rail to rail op amp. I don't
have a specific suggestion, but something off of this page would probably be
appropriate: http://www.linear.com/pdf/rr_inputoutput.pdf
Now, you still don't have your 4W. Well, that's another problem. I would
lean towards an emitter follower here. Essentially, you'd take a transistor,
put a higher voltage on the collector, the op amp output on the base, and
connect the fan as the emitter load. But as you expected, there are some
issues here too. First, there is some Vce drop, so the collector still has
to be above 12V (therefore, maybe you don't need a rail to rail op amp).
Second, the Vbe drop will be about .7V. If you aren't very critical, you can
just jump the gain of the op amp up so that you get 0-12.7V and live with
the .7V drop (this means you will generate .7 to 12.7 to get 0 to 12).
An even better idea is to put the transistor in the op amp's feedback loop.
Look at the schematic on page 9 of
http://cache.national.com/ds/LM/LM124.pdf.
That amp has a gain of 10 but you could adjust it by changing the resistors.
Obviously, the transistor has to be big enough and maybe even heat sinked.
Putting the transistor in the loop takes care of the offset problems
assuming the op amp has enough "overhead" to comply. In other words, the op
amp won't be happy until the output is at 12V (assuming a 4V input and X3
gain). So the op amp will have to put 12.7V on the base of Q1. Since the op
amp can't reach the top of the rail, if you had, say, a 12V supply going to,
it will just be unhappy and won't do what you wanted. Even a 13V supply
would probably be too little. Why? Because the more current you draw from
the emitter, the more the collector current and the base current will be
proportional (but smaller) than the collector current (by beta). So if you
are drawing 1A and the beta is 100, then you are still drawing 10mA and with
a 13V supply you might achieve a 10V output.
Which brings up another point. 4W @12V is around 333mA. Remember that beta
mentioned in the transistor's data is at DC with nothing changing. You will
be turning the thing on and off at a pretty good clip, so I would expect
beta to be effectively reduced. Let's say the transistor has a minimum beta
of 100. I'd guess as we put PWM through it that could drop to 50 or 60. Now
with a beta of 50 a 333mA Ic will give an Ib of 6.6mA, so that's probably
within the output range of the op amp. Of course, if beta reduced more...
And some power transistors have pretty low betas to begin with.
If this were a problem (and I suspect it isn't), you could use a darlington
in the loop. Now you lose 1.4V, but since you are in the loop you don't care
(as long as that +rail is high enough). The betas of the pair of transistors
inside the darlington multiply. So even if both had a B of 10, you'd get an
effective Beta of 100!
My practical suggestion: an RC, an LM324, a 24V supply, and a power
transistor. Your mileage may vary.
Oh well, I've gone on too long as usual. Hope that helps.
Regards,
Al Williams
AWC
*NEW: Universal PCB for Stamp, SX, or practically any processor
http://www.al-williams.com/gpmpu40.htm
Original Message
From: Chris Shuster [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=WClKg9CUEyow-vTxXstpYlMOaOiMxzbRmFv7WX8UEnegkPVhW1eLJOOoGjNNb8t5u5IQkuRoU5I_]cpuman3@h...[/url
Sent: Saturday, January 10, 2004 3:54 PM
To: Stamp Mailing List
Subject: [noparse][[/noparse]basicstamps] PWM to Linear
For some reason this e-mail never made it to the list the first time I sent
it... weird... anyone have any idea why? Anyway here's my question...
I have seen circuit designs for converting a PWM signal coming out of a
stamp to a linear voltage. The problem is I'm not sure how to go about
adapting the design to do what I want. Further more I'm not sure which
parts would be best suited for the job.
What I want to do is linearly control the input voltage to 12V DC fan that
uses around 4 Watts of power. Like I said I'm not totally clear on how to
adapt the conversion circuit design for this job. Also if you could
recommend parts that would be up to this task? As I'm not sure if a MOSFET,
Transistor, etc. would be best suited for this.
The reason I need to use linear instead of direct PWM is that the fans on
tach feed back on them and the tach sensors share common power and ground
with the fan's motor. When I use PWM and try to read the tach I end up
reading the PWM instead of the tach. It might be worth noting I'm using one
of Al Williams's excellent PWM coprocessors to do the PWM work for the
stamp. Any help is appreciated!
Thanks,
Chris Shuster
[noparse][[/noparse]Non-text portions of this message have been removed]
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
An RC network will create the voltage. The PAK-V won't stop making PWM,
so
the response does not droop and the C value is not critical. BUT, you
still
-snip
say you decide to run your PWM from 0 to 4V and X3 to get 0 to 12V.
Great
idea! But the op amp will need more than 12V unless it is a special
"rail
to rail" op amp. The more current you draw from an op amp, the harder
time
-snip
connect the fan as the emitter load. But as you expected, there are some
issues here too. First, there is some Vce drop, so the collector still
has
to be above 12V (therefore, maybe you don't need a rail to rail op amp).
-snip
Putting the transistor in the loop takes care of the offset problems
assuming the op amp has enough "overhead" to comply. In other words, the
op
amp won't be happy until the output is at 12V (assuming a 4V input and
X3
-snip
beta to be effectively reduced. Let's say the transistor has a minimum
beta
of 100. I'd guess as we put PWM through it that could drop to 50 or 60.
Now
-snip
Man, when I see a post like that do I feel stupid! You guys are
unbelievable. What seems 'obvious' to you couldn't be further from the
truth. If I read this list, every day, for the next 10 years, will I
begin to understand posts like this?
Humbly,
-John
Did you read my earlier reply at
http://groups.yahoo.com/group/basicstamps/message/39364?
Al Williams
AWC
* NEW: Universal PCB mounts Basic Stamp, SX, more...
http://www.al-williams.com/gpmpu40.htm
Original Message
From: Chris Shuster [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=sVEqyz44xDHEUfxh9UrvegVQDRwmmSlB5PY5DuEEcTh1eSZqQSUqWrbJNDYd7CC0-2YyM_npKDEBplc]cpuman3@h...[/url
Sent: Tuesday, January 06, 2004 6:43 PM
To: Stamp Mailing List
Subject: [noparse][[/noparse]basicstamps] PWM to Linear
I have seen circuit designs for converting a PWM signal coming out of a
stamp to a linear voltage. The problem is I'm not sure how to go about
adapting the design to do what I want. Further more I'm not sure which
parts would be best suited for the job.
What I want to do is linearly control the input voltage to 12V DC fan that
uses around 4 Watts of power. Like I said I'm not totally clear on how to
adapt the conversion circuit design for this job. Also if you could
recommend parts that would be up to this task? As I'm not sure if a MOSFET,
Transistor, etc. would be best suited for this.
The reason I need to use linear instead of direct PWM is that the fans on
tach feed back on them and the tach sensors share common power and ground
with the fan's motor. When I use PWM and try to read the tach I end up
reading the PWM instead of the tach. It might be worth noting I'm using one
of Al Williams's excellent PWM coprocessors to do the PWM work for the
stamp. Any help is appreciated!
Thanks,
Chris Shuster
[noparse][[/noparse]Non-text portions of this message have been removed]
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
If you want a great education on electronics, read the Art of Electronics by
Horowitz and Hill. Big book and you do need a little math. But if you really
read it you'll wind up knowing more about electronic design than you need to
know :-)
Read my review: http://www.wd5gnr.com/books.htm
I will say that I have spent 2/3 of my life working in electronics (I'll
have been a ham for 26 years in July -- a notable date since I passed my
first ham exams on 26 July which happens to be my birthday). It is easier to
learn now then it ever has been before. Why? First, of course, the Internet.
Forums like this are great. Web pages are around for everything (good
tutorials, for example at
http://www.meridianelectronics.ca/circ/circuits.htm and
http://tutor.al-williams.com). Google for "electronics tutorial" and you'll
find the Navy's NEETS course online along with details of anything you want.
One of the advantages of doing this professionally used to be being able to
get your distributor to give you data sheets. Now they are all online in PDF
format!
Another reason is the widespread availability of SPICE and other circuit
simulation tools. I did an article on Switcher CAD (a Spice program) for
Nuts and Volts. Want to know if my circuit will work? Instead of building a
copy, just simulate it in Switcher Cad! Even Eagle can be made to use Spice
(I use it with WinSpice 3). Unless you are very handy with a soldering iron,
learn Spice. You can do in an afternoon the experiments it took me 3 weeks
to do as a kid. SwitcherCAD is free and http://www.linear.com/software/. Of
course, it won't simulate a Stamp, but it will simulate the stuff around the
Stamp nicely. I've often wanted to do a book on electronic basics using
Spice. You know, talk about a voltage divider and simulate it. Talk about an
opamp circuit, simulate it. You get the idea.
Hope that helps.
Al Williams
AWC
* New Kits:
http://www.al-williams.com/kits.htm
>If I read this list, every day, for the next 10 years, will I begin to
>understand posts like this?
>Humbly,
>-John
answer. that makes me ask more about the tach. Any transistors you
use will have filtered DC power, so the tach should be able to be run
off the non-pulsing power in the circuit.
If the tach is just monitoring voltage, then it is actually easier to
offer a smooth low current voltage for the tach and run the motor on
pwm.
As I see it, you can create a clean high amp power for the motor or
you can create clean low amp power for the sensor.
Dave
Yah I read your post earlier. Very strange that the original e-mail shows
up after the e-mail I sent the second time.
What you have suggested would work but there is one problem. This fan
control system is for a PC, so I'm pretty well restricted to 12V.
BTW John: Don't worry I'm an engineering student and some of the stuff Al
talked about gave me a headache. [noparse]:)[/noparse]
Thanks,
Chris Shuster
Original Message
From: "Al Williams" <alw@a...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, January 13, 2004 6:31 AM
Subject: RE: [noparse][[/noparse]basicstamps] PWM to Linear
> I've noticed I'm not getting all the posts in my e-mail (Yahoo problem?).
> Did you read my earlier reply at
> http://groups.yahoo.com/group/basicstamps/message/39364?
>
>
> Al Williams
> AWC
> * NEW: Universal PCB mounts Basic Stamp, SX, more...
> http://www.al-williams.com/gpmpu40.htm
>
>
>
Original Message
> From: Chris Shuster [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=EDob6wu3D1J_PG9AKEQyPgNRQ60ZoCPe0YOO5r66NpOQvC-FfXXqfO-yCi4oRhxOgwjx9xJInA_eHw]cpuman3@h...[/url
> Sent: Tuesday, January 06, 2004 6:43 PM
> To: Stamp Mailing List
> Subject: [noparse][[/noparse]basicstamps] PWM to Linear
>
>
> I have seen circuit designs for converting a PWM signal coming out of a
> stamp to a linear voltage. The problem is I'm not sure how to go about
> adapting the design to do what I want. Further more I'm not sure which
> parts would be best suited for the job.
>
>
> What I want to do is linearly control the input voltage to 12V DC fan that
> uses around 4 Watts of power. Like I said I'm not totally clear on how to
> adapt the conversion circuit design for this job. Also if you could
> recommend parts that would be up to this task? As I'm not sure if a
MOSFET,
> Transistor, etc. would be best suited for this.
>
> The reason I need to use linear instead of direct PWM is that the fans on
> tach feed back on them and the tach sensors share common power and ground
> with the fan's motor. When I use PWM and try to read the tach I end up
> reading the PWM instead of the tach. It might be worth noting I'm using
one
> of Al Williams's excellent PWM coprocessors to do the PWM work for the
> stamp. Any help is appreciated!
>
> Thanks,
> Chris Shuster
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
> Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
>
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
And it's not that simple. I'm dealing with standard PC case fans. The tach
sensor and the motor share the same power supply on a circuit board that I'd
have to physically break the fan to get to, which makes it fairly impossible
to modify the fan. They sell fans that have little pots attached to them
for speed control w/o affecting tach I'm sure I could chop the pot off and
use the connections for PWM to make it work but that would require buying
all new specialized fans. I'd prefer to be able to just use standard 3 wire
fans.
As an added note I did not mention earlier the fans mainly need to be
operated in this fashion... Off or 7 to 12 volts.
Chris Shuster
Original Message
From: "Dave Mucha" <davemucha@j...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, January 13, 2004 8:59 AM
Subject: [noparse][[/noparse]basicstamps] Re: PWM to Linear
>
>
> AS you can see from Al's excelent write-up, there is no simple
> answer. that makes me ask more about the tach. Any transistors you
> use will have filtered DC power, so the tach should be able to be run
> off the non-pulsing power in the circuit.
>
> If the tach is just monitoring voltage, then it is actually easier to
> offer a smooth low current voltage for the tach and run the motor on
> pwm.
>
> As I see it, you can create a clean high amp power for the motor or
> you can create clean low amp power for the sensor.
>
> Dave
>
>
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>