# MCU PIN Open Drain Protection

I am trying to control a PC fan using a micro-controller(STM32F0)

According Intel's PWM fan spec, the fan will pull up the PWM signal to up to 5.25V.

This signal must be pulled up to a maximum of 5.25V within the fan.


The pin I am using is only speced to 3.3V.

How do I protect it?

Edit:

Clarification, I am talking about the PWM signal send from MCU to the fan. The one on pin 4. Not the feedback signal.

• What PWM signal? A speed control signal for the fan? Or a speed feedback signal from the fan? – DKNguyen Mar 1 '20 at 7:01
• @DKNguyen The speed control signal. At pin 4. The other one(feedback) is not PWM. – LD1117 Mar 1 '20 at 7:03
• Is the signal sent from the MCU to the fan to control its speed? Or is the signal sent from the fan to the MCU to tell the MCU what speed the fan is spinning at? – DKNguyen Mar 1 '20 at 7:04
• @DKNguyen Yes, the signal send from the MCU to the fan to control its speed. – LD1117 Mar 1 '20 at 7:05
• Oh, what if the fan pull it up to 5.25V. I would be ok? Cool, thanks a lot! Sorry for the misunderstanding :D – LD1117 Mar 1 '20 at 7:07

Do note that the wording is actually pretty strange. If the fan is acting as an input, I don't see any reason why the fan would drive the line to 5V and endagnger the 3.3V pin on the MCU. The fan pin might require 5V to respond but that is different than the fan applying 5V to its input line (which doesn't make too much sense) and damaging the MCU. You might be able to just drive the fan directly without concern as long as the fan responds to 3.3V logic thresholds. I think it should say the fan can only be driven to a maximum of 5V.

This signal SHALL be pulled up to a maximum of 5.25V within the fan.

But there is a chance that the fan is expecting the driver to be open-drain, and if so then the pull-up resistor may have been integrated into the fan itself so the external circuit does not need one. In that case you need the circuit below.

simulate this circuit – Schematic created using CircuitLab

If the fan is not open-drain input but requires 5V logic thresholds then you need to use a 3.3V to 5V push-pull level translator.

• Awesome. Thanks a lot! – LD1117 Mar 1 '20 at 7:11
• @LD1117 Or you could just use a 3.3V to 5V level converter or logic translator IC. – DKNguyen Mar 1 '20 at 7:11
• I wasn't sure about the wording too, so I used my multimeter and indeed the PIN on the fan measures around 4V. – LD1117 Mar 1 '20 at 7:15
• @LD1117 There is a chance that the fan is expecting the driver to be open-drain, and the pull-up resistor has been integrated into the fan itself so the external circuit does not need one. In that case you do need the circuit above. – DKNguyen Mar 1 '20 at 7:17
• You are awesome. Thanks so much! – LD1117 Mar 1 '20 at 7:18