four-wire fan - tach/sense level shift? - Page 1
Forum section: electronics / general

author: julian1
author_rank: Frequent Contributor
timestamp: June 04, 2023, 05:01:10 am
content: I want to identify the simplest way to read the tach/rpm sense pin of a four-wire fan.It is common (when googling) to see a pullup to the fan +ve voltage rail, and a voltage-divider to level shift to the mcu voltage domain.This implies an open-drain/open-collector arrangement at the fan.But why not skip the divider, and just use a pullup to the mcu/controller supply rail used instead? Or just an internal gpio pullup?Is there some corner-case, or convention to explain the more complex circuit?

author: julian1
author_rank: Frequent Contributor
timestamp: June 04, 2023, 05:07:18 am
content: A macbook pro fan controller header does it the obvious way, will a pullup to 3v3, but the header may not be standard four wire.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 04, 2023, 03:38:24 pm
content: Quote from: julian1 on June 04, 2023, 05:01:10 amTL;DR: Because historical baggage, and because the voltage divider is more robust and only costs an extra standard resistor pair._ _ _ _ _The old Intel standard from 2006 promised that the motherboard will pull it up to 12V (12.6V max), and that it must be an open collector (open drain) output. (The PWM input, however, is pulled up to 5V (recommended 3.3V already then) within the fan; the controller only pulls it to ground.)This means that the fan electronics should use an NPN transistor or a MOSFET to pull Tach signal to ground.If so, using a pull-up to the logic level supply would work absolutely fine.Question is, is your fan "standards-compliant", or does it do some strange shenanigans, saving that single transistor, and somehow connect it to 12V internally? Or just because the designer didn't bother to read the standard, and internally pulls it up to the 12V rail?Mass-produced cheap electronics tend to cut the costs down to absolute minimum, including designer pay.My electronics-fu is too weak to say how to check this reliably, but I suspect all good 12V PWM fans – Pabst, Noctua, all "name brands" – do it "right", so pulling to 3.3V will work just fine.. but I would check each particular fan I use does not pull Tach output above 3.3V at any point, before trusting them. If the fan isn't expensive, I'd just pull the circuit board out, and check it; I probably wouldn't be able to stuff it back (but others might).Compare to pulling Tach to 12V and dividing it to about 3V using R2 = 3 R1 voltage divider. You save all that headache, and any even close to "standard"-compliant fan will work. By making R1 and R2 sufficiently large, say 22k and 68k, you can even limit the current to low enough that if an occasional spike were to happen, your input ESD diodes will handle it (if even necessary). Since typical 3.3V logic level inputs treat anything above 2V as high, the 22k:68k voltage divider only requires about 8.2V on the Tach to detect highs; this means this way there is ample "room" for all kinds of noise to occur without any negative effects.

author: julian1
author_rank: Frequent Contributor
timestamp: June 04, 2023, 06:36:25 pm
content: Thanks Nominal Animal.This is the kind of answer I was hoping for.It makes sense to follow the convention.The pullup+current-limit approach, is in the same configuration as pullup+divider.So the decision to actually fit the extra resistor, could be deferred to assembly, if that was important.