Pwm fan on zynthian

Ah !!
A good old’men recommandation

Yep! Any BC108 or BC547 will do and 1N4001 for the reverse bias protection. 1N4148 doesn’t have the power rating to sick the high ENF induced current.

1 Like

By chance, I also came across a variant with a MOSFET that should be able to drive also 12V fans.

Apparently, the software PWM control of a fan is as annoying as the backlight. I found another article explaining the troubles (more noise, of course!). The article is rather verbose and also explains in detail how everything works (practical for beginners & forever-beginners! :)) and the difference between using a BJT and MOSFET transistor (and why the latter might be preferred).

2 Likes

Thks, interesting lecture, they are there a couple of good posts :+1:

Hm. Looks like my cheapy creepy little fan is not really PWM friendly. It does not turn unless I set 100% duty cycle. If I set the frequency up to 1MHz, I can go some way down from 100%, but it makes an annoying high frequency sound/noise.

Or may it be a problem of the wiring? I used a BS170 mosfet. When connected directly to constant 3.3V instead of 5V, it turns well and more slowly.

Just updated the zynthian-pwm-fan.py to reflect python3

So @wileu do I have the possibility to use PWM on this fan that I received for the Raspberry P5?

Well I do have a Pull Request outstanding on updating the zynthian-pwm-fan.py on zynthian-sys to make this work…

It’s merged! :wink:

That worked well!!!

Course if we could play the Boars Head Carol on the Fan by PWM mod we will know we have it sorted…

We can do it on church bells for instance…

boars-head-carol.pdf (49.0 KB)

1 Like

… the legendary bells of @wileu !!! :wink: :wink: :wink: :wink: :wink:

The fan that I have to receive has 4 wires… I imagine two are the power supply, where can I find the pins to use for the PWM? Thanks

a life time job :wink:

@wileu should change his nickname to Quasimodo… the bell ringer of Notre Dame de Paris… :rofl: :rofl: :rofl: :rofl:

I see the similarities… :smile:

@wileu has a hunchback? :crazy_face: :crazy_face: :crazy_face: :crazy_face:

You realise this means I have to, once more, link to this

It’s very French apparently . . .

…you will be the Quasimodo of Big Ben… :rofl: :rofl:

Now THAT is ventilation…

2 Likes

A question for @jofemodo and @riban… I just received the fan and I saw that it has the right connector to go on the Raspberry P5 FAN socket… The question:
Is the PWM already working on Zynthian? Because when I start the fan it starts at max, then drops and I feel that it varies every now and then… Thanks