Arduino PWM amplifier to drive 10 mini PWM fans - Page 1
Forum section: electronics / beginners

author: josr
author_rank: Contributor
timestamp: August 23, 2020, 06:57:31 pm
content: Hi,I am working on a project to drive 10 mini 25 kHz PWM fans from 1 arduino. Everything works fine for 1 fan where I connect the PWM output of the arduino directly to the PWM fan.For driving 10 fans I want to add an "amplifier". I came up with 2 ideas (see below, here represented by 2 fans). Which one is the best to pick (or is there a third better option)? Which values for the resistors can I use?Is the pull down resistor (R1 or R3) really needed? Pull down resistors only matters at input!?The most often I see schematics like design 2. Why is that because this seems to reverse the PWM signal (which of course does not matter!?).Thanks,

author: ledtester
author_rank: Super Contributor
timestamp: August 23, 2020, 07:43:02 pm
content: Design 1 might work, but it depends a lot on the how the PWM mechanism in the fans work. Design 2 is much less dependant on the fans themselves - especially if the fan PWM signal uses an appreciable amount of current.If you are using a BJT I wouldn't think you need the pull-down. BJTs are current driven -- if the GPIO is low or high-impedance (disconnected or configured to be an input) no current flows through the base of the transistor and the transistor is off. It can only turn on if the GPIO is high and supplying current.If you use a MOSFET a pull-down resistor is usually used so ensure that the transistor doesn't accidently turn on power up when the GPIO pin driving it is configured as an input.

author: ledtester
author_rank: Super Contributor
timestamp: August 23, 2020, 08:31:48 pm
content: Quote from: ledtester on August 23, 2020, 07:43:02 pmUpon further reflection my guess is that design 1 might work but not by utilizing the transistor. The PWM inputs on the fans are likely to be high impedance inputs, so the base current from the transistors wouldn't have a path to ground. It would be practically the same as connecting the GPIO pin directly to each of the PWM inputs -- which might actually work.

author: Renate
author_rank: Super Contributor
timestamp: August 24, 2020, 01:25:51 am
content: If we are talking bog standard ATX 4 wire PWM fans you're a bit off track.The PWM input has its own internal pullup to its own internal 5 V supply.If the pin is open, the fan runs at full speed (fail-safe and comaptibility with 2 wire usage).You want to feed the PWM inputs with an open collector (no pullup) output.I'd use a boring 2N7000 myself.I hate mini fans, they whine and they are annoying.Throw a single 140 mm fan on the whole lot instead.

author: SilverSolder
author_rank: Super Contributor
timestamp: August 24, 2020, 04:45:57 pm
content: One might consider a variation of Design1 around a PNP transistor instead of an NPN for this application.

author: Renate
author_rank: Super Contributor
timestamp: August 24, 2020, 06:34:51 pm
content: Quote from: SilverSolder on August 24, 2020, 04:45:57 pmHuh?If these are ATX style 4 wire PWM fans there is no guarantee that the PWM input is 3.3 V or 5 V.All you are guaranteed is that 5.25 V is the maximum (non-destructive) voltage and 0.8 V is logic zero.What the voltage supply to the internal pullup is could be 3.3 V or 5 V or whatever the fan manufacturer felt like.So, don't feed voltage to a PWM pin, feed it only (switched) ground.

author: Ian.M
author_rank: Super Contributor
timestamp: August 24, 2020, 07:07:11 pm
content: TheIntel 4-Wire PWM Controlled Fanspec. calls for a PWM low level of under 0.8V. and specifies that the fan's PWM input shall source no more than 5mA when shorted to ground, and shall have an open circuit voltage of 5.25V or less. That implies a TTL compatible input (some fans may pull up to only 3.3V) with a pullup resistance >1K for a 5V pullup fan.Design 1 is incapable of pulling the PWM input down, let alone below 0.8V. SilverSolder's proposed PNP mirror of design 1 will do better, but due to its Vbe drop will have great difficulty reliably getting below 0.8V when sinking 50mA, the worst case current for ten fans.Design 2 will work satisfactorily (given suitable choice of resistors) and should have no problems achieving a 0.3V low level even driving ten fans. The only (mild) annoyance is that because it inverts, the effect of the PWM duty cycle is also inverted so 100% duty cycle PWM will turn the fans off and 0% duty cycle will give full speed.Quote from: Renate on August 24, 2020, 06:34:51 pmSome fan manufacturers strongly recommend push-pull drive, e.g. Noctura (page 8).Driving the PWM wire from a push-pull 3.3V CMOS output should be acceptable for all fans, provided your driver can sink the pullup current from 5V pullup fans without your 3.3V rail rising. OTOH if you aren't in the motherboard manufacture business and can limit your choice of fans to the vast majority that don't misbehave when driven from an open collector/drain output, its much simpler to do it that way.

author: Renate
author_rank: Super Contributor
timestamp: August 25, 2020, 01:05:06 pm
content: Quote from: Ian.M on August 24, 2020, 07:07:11 pmHa, ha, I don't think much of their circuit.

author: SilverSolder
author_rank: Super Contributor
timestamp: August 25, 2020, 02:47:40 pm
content: Quote from: Renate on August 25, 2020, 01:05:06 pmWhat's wrong with it? Simple, although still uses one more transistor than strictly necessary!

author: SilverSolder
author_rank: Super Contributor
timestamp: August 25, 2020, 03:07:44 pm
content: Quote from: Ian.M on August 24, 2020, 07:07:11 pmShouldn't drop more than a couple of hundred mV if saturated?This circuit inverts the signal, which may or may not be an issue.

author: Renate
author_rank: Super Contributor
timestamp: August 25, 2020, 03:16:24 pm
content: Quote from: SilverSolder on August 25, 2020, 02:47:40 pmM2 must be a very special MOSFET, look again.

author: Ian.M
author_rank: Super Contributor
timestamp: August 25, 2020, 03:21:45 pm
content: Quote from: SilverSolder on August 24, 2020, 04:45:57 pmQuote from: SilverSolder on August 25, 2020, 03:07:44 pmThat's not design 1, its the PNP mirror of design 2. It isn't a good solution either: Each fan 'looks' like a 1K resistor pulling up to +5V. Ten in parallel is 100 ohms. They need a <0.8V low level so R2 in your circuit must be under 19 ohms (and well under for sufficient noise margin).

author: SilverSolder
author_rank: Super Contributor
timestamp: August 25, 2020, 03:54:45 pm
content: Quote from: Ian.M on August 25, 2020, 03:21:45 pmAh, I thought the fans pulled down, I get it... and understand why you "liked" design 2, seems straightforward enough.

author: SilverSolder
author_rank: Super Contributor
timestamp: August 25, 2020, 03:59:03 pm
content: Quote from: Renate on August 25, 2020, 03:16:24 pmBody diode always conducts? oops...I clearly need more coffee today.