PWM questions from n00b

SinnerG

n00b
Joined
Jul 13, 2010
Messages
52
So I went and bought a pair of San Ace 120 finger blenders and have been contemplating building my own PWM controller rather than running the PWM from a motherboard 4-pin fan header to them.

In fact, I bought a Magnum soldering station for the hell of it and just dying to melt some metal glue. :p

The idea is to run it off the more common 3-pin 12V headers. The 12V signal will be used to generate a PWM signal (0-5V).

Anyway, some thoughts and questions ...

Q1: should I bugger off and go ask on an electronics forum instead? :D

Q2: if the accepted norm for PWM for PC fan control is using a 25kHz frequency to avoid audible switching noise, could one perhaps achieve the same by using a very low switching frequency?

Q3: I decided against the 555/556 approach and want to use opamps instead. Most circuits I've seen don't seem to be designed for as high a frequency as 25kHz with their selected components. However, theory of operation is the same amongst all of them. The question is: how can tell if an opamp will be able to generate a PWM signal of 25kHz, or rather be able to generate the required triangle waveform of 25kHz? Should I be looking at the gain-bandwidth figure?

Q4: If my opamp is running off a 0-Vcc voltage, would the resulting PWM signal be 0-Vcc or is it usually the case that it is slightly off those figures (eg. with 0-5V I'd see 0.5-45V swing)?

Q5: should I return the soldering station and SanAce fans and take up baking instead?

And, yes, opamp operational theory is well beyond me. I'm just starting to mess with the electronics a bit, even at my "rapidly advancing" age.
 
Honestly, to figure this out you are going to have to get REALLY famililar with concepts like slew rates, self oscillators and things like that.

In stead, you could achieve this function much more easily with something like an Arduino PIC (programmable interrupt controller). In fact, you could likely independently control multiple fans (not sure but can't see in my head why you couldn't). Additionally, if you have any coding ability you could hook it up so that you could control them from within windows.

Another option is to go with a preset fan controller IC such as the Microchip TC64x family of chips.
 
This is probably exactly what you're looking for. I like to go with a higher-than-human-hearing frequency, personally. 25kHz is high enough to avoid the audible range but still be low enough to avoid transition losses in the drive transistor.

The MIC502 (PDF of datasheet) or MIC5021 can make life even easier for you, by removing or simplifying a lot of the calculations you'd otherwise have to make, at the cost of a couple extra bucks for the chip.
 
Thanks guys!

I was initially looking at a 556 to handle the PWM signal, but to me it looks like there can be a synchronising issue when reaching 100% duty cycle. That 555 circuit looks worth a try though, maybe just to try the effect of running at a low frequency to see what sort of noise will be produced. There's enough momentum in the SanAce blades, but at the same time the motor is so huge it brakes it quite hard. The author of that article mentions the fan blades not having enough momentum to continue spinning between pulses, but I suspect the motor is braking it as well.

I think I did look at the MIC502, but wasn't able to source it locally without a very long waiting period. Since I don't need a temp sensor, I suppose I could simply replace the section with a fixed resistor value to fool it. I'm going to have another look for some of these.

Using a PIC would be awesome ... but how much am I looking at spending to just get a setup going? Would prefer this simple controller to be just analogue ICs and relatively cheap. I'll get to the PICs later on. I do software dev, so that's not an issue. It's the hardware bits that get me. :-D

Still curious as to how one figures out if a given opamp would handle the high frequency. I suppose I could look at slew rates and calculate how fast they can go.

Lotsa learning to be done ... time to buy that old copy of "The Electronics Bible". :) I think I'm getting too old to start learning electronics. :-D
 
Pretty much any general purpose op-amp will do 25khz, but always look at the data sheet to be sure, Then look for a rail to rail output if you need it go all the way to the supply voltages.Go here and get a copy of LTSpice. It will help you brush up on circuit theory for free.
 
Thank you! I'll check that out. I recall the rail-to-rail mention now from when I was looking at audio grade opamps some time back.

Was just looking at some maxim products. They have a quad opamp IC which has an adjustable output voltage.
 
Soooo... instead of doing my day job for the past few hours, I decided to have a peak around for an op amp to use. Something that someone might have used to do PWM. To tell the truth, the amount of op amps out there are just daunting.

I honestly have no idea how you electronics guys manage to pick an IC to use. :-D My hat goes off to you. Total respect.

I'm going to just put using the op amp for PWM off until I do more reading/studying. This stuff is interesting indeed.

I found something interesting though: SG3525 PWM generator. Gonna look at it this evening.
 
SG3525 is commonly used in car audio amplifier to generate the PWM siginal used for voltage conversion. TI also makes some (TL494 and TL594)

By the way I just stumbled across something VERY relevant to your intrests while research an odd PWM controller. It is a PWM fan control using the TL594 (an alternate chip is the Estek KA7500). All of these chips main goal is to generate a PWM waveform commonly used in switchmode PSU (like those found in computers).

http://blog.savel.org/2005/12/14/pwm-fan-control/

It uses only the aforementioned IC, a 10K resistor, a .01uF capacitor and a 100K pot. Connect 12V and ground, the rest is up to you.

It is capable of driving between 200mA and 500ma (depending on manufacturer of the chip). These are easily enough to drive a MOSFET for larger currents.
 
I wouldn't bother playing with the PWM frequency. The spec is 21-28KHz and there's really not much reason to deviate from that.

Just go with the 555 circuit. It's cheap, readily available and simple. PWM controllers are going to be much more complicated with feedback, current limit and a bunch of other features you don't need. Really all you need to generate is an ~25KHz square wave with variable duty cycle, and that's trivial with a 555. No, you can't get quite to 100% (or 0%) duty cycle, but close enough. The opamp circuit is pretty simple too, but there's more opportunity for things to go wrong.

Also the spec requires an open-drain output, so you don't need to worry about the 5V supply. As long as you provide an open-drain output, the fan will pull it up to 5V.
 
I might be real silly when reading the SG352x datasheets, but all I can see in there is a max duty cycle of 50%. Works off an internal 5V reference so you give it 0-5V input but the sheet indicates 50% duty when input is reach 5V.

I spent some more time last night looking through rs-online for an opamp, trying to figure out what is what. Eventually found TLC2274 and the TLV2374. Did the follow-up google search and found a site giving a rundown of them with others and basically wound up indicating the common and much cheaper LM324 would do the same thing.

Thanks for the link. That TL594 looks dead simple. I'll dig up some detail on it. The SanAce I have is the PWM version so it simply needs a signal on the one wire. I'm sure that TL594 can do the job, just don't need to hook the fan up directly.

I should simply run a PWM signal from a 4-pin header, but that's just not much fun. :)
 
I wouldn't bother playing with the PWM frequency. The spec is 21-28KHz and there's really not much reason to deviate from that...

Think I'll grab some 555 or 556 as well. Wouldn't mind trying a few methods in order to learn something.

Fired up the SanAce last night again direct off a spare PSU. Apart from looking for op amps and other stuff, perhaps I should first focus on getting some good hearing protection. :-D
 
Grab some cheap MOSFET switches too if you're just going with standard push-pull output parts so you can provide the open-drain output. 2N7000 is pretty popular for this and should be easy to get.

LM324 is ubiquitous and a good place to start for this kind of thing.
 
Will do. Might as well have some for messing around. Since I'm not handling the switching of the power though, perhaps I don't need them with this PWM fan. Simply need to provide the PWM signal on the correct wire, the SanAce is hooked up to the PSU directly

So, so far going to get some 555/556, some LM324, maybe TLV2374 as they're all pretty cheap. I actually have an old Zalman fan controller somewhere with a single PWM output, but it doesn't have enough capacity to run the 48W fan. I'll see what is uses and perhaps salvage a part or 2.
 
Use LTSpice to simulate your designs, it will save you time. If it doesn't have models for your parts it probably has something very close. Or you can add models to it if want to do that. Then get a bread board to build it up quickly for test. There are simple ones like this or more complete ones like this. Of course there are even more expensive options.
 
As an Amazon Associate, HardForum may earn from qualifying purchases.
Wow! That complete one is cheap as chips compared to local pricing. Will be trying LTSpice this evening.

Problem where I am seems to be getting hold of stuff. Was just about to order a TLV2374 only to see I can't get it as a DIP package.
 
I might be real silly when reading the SG352x datasheets, but all I can see in there is a max duty cycle of 50%. Works off an internal 5V reference so you give it 0-5V input but the sheet indicates 50% duty when input is reach 5V.

I spent some more time last night looking through rs-online for an opamp, trying to figure out what is what. Eventually found TLC2274 and the TLV2374. Did the follow-up google search and found a site giving a rundown of them with others and basically wound up indicating the common and much cheaper LM324 would do the same thing.

Thanks for the link. That TL594 looks dead simple. I'll dig up some detail on it. The SanAce I have is the PWM version so it simply needs a signal on the one wire. I'm sure that TL594 can do the job, just don't need to hook the fan up directly.

I should simply run a PWM signal from a 4-pin header, but that's just not much fun. :)


I think you may be running into a design limitation of these chips. Many of these chips are intended for use in PWM in switchmode psus to convert a dc voltage into a psuedo-ac voltage in order to use a transformer to either step-up or step-down the voltage. My guess is that above a certain duty cycle you begin saturating the core of the transformer with DC reducing effectiveness as it is no longer behaving as true AC system.
 
I think you may be running into a design limitation of these chips. Many of these chips are intended for use in PWM in switchmode psus to convert a dc voltage into a psuedo-ac voltage in order to use a transformer to either step-up or step-down the voltage. My guess is that above a certain duty cycle you begin saturating the core of the transformer with DC reducing effectiveness as it is no longer behaving as true AC system.

Could be true enough. If it's intended for SMPS applications it may not allow extremely high duty cycles.
 
Yeah, I've decided as cool as they might seem, for someone who hasn't got a clue (i.e. me!) I'm going to simply try the op-amp route. Should really go 555, but not keen. Think I've settled on using the TLV2374 quad op-amp provided I can get the darn thing in DIP form.

Once I've got this out the way, I'm pulling out the copy of "Art of Electronics" and starting on page 1.
 
Will do. Might as well have some for messing around. Since I'm not handling the switching of the power though, perhaps I don't need them with this PWM fan. Simply need to provide the PWM signal on the correct wire, the SanAce is hooked up to the PSU directly
The PWM signal is specified as open-drain, with a pull-up in the fan itself. Driving it directly from a standard push-pull output is at best a bad idea, and potentially far worse, especially since your circuit will probably be putting 12V on a line that's supposed to be open-drain with a maximum pull-up voltage (provided by the fan) of 5.25V.

Unless you use an IC with open-drain/open-collector outputs (almost all op-amps and most logic uses push-pull outputs) already you'll need the extra switch. If you're not already aware basically this means that the output is only pulled to ground, in the high state it's left floating. A push-pull output will drive a voltage both at high and low states.

The opamp you choose shouldn't be at all critical in such a circuit; even the 40 year old uA741 should work, so get what's available and cheap. Just avoid ones with a GBW greater than 10MHz or so and you probably won't have trouble with (well, unintended) oscillation. Fast ones tend to be more expensive anyway.
 
Use that fan controller to drive a beefier FET to power the motor.

So, so far going to get some 555/556, some LM324, maybe TLV2374 as they're all pretty cheap. I actually have an old Zalman fan controller somewhere with a single PWM output, but it doesn't have enough capacity to run the 48W fan. I'll see what is uses and perhaps salvage a part or 2.
 
Back
Top