bassigia
Posts: 14
Joined: Sun Jul 05, 2020 2:19 pm

Control fan speed Raspberry Pi 3B+

Fri Nov 06, 2020 3:29 pm

Hi all,
I have build recently a streamer based on the Raspberry Pi 3B+ and Volumio 2.7 in a case made of aluminum and wood;
Image

I use the RemotePi for control power with this board:
https://www.msldigital.com/collections/ ... ir-and-led

So I add external Ir sensor, led, power button and a Fan:
https://www.msldigital.com/collections/ ... -for-pi-4b

The problem is the fan is very noisy (i suspect is at full speed)
Any way to slow down the fan? Where do I have to look? Software problem or hardware?

Thanks

Gian

pcmanbob
Posts: 13713
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Control fan speed Raspberry Pi 3B+

Fri Nov 06, 2020 3:38 pm

If you just connected the fan to physical pins 4 & 6 then you cant control the speed ,

You need to connect the fan using a transistor circuit like this,

Image

Then either write your own code to control its speed or use the new fan option in raspi-config to just switch it on or off at a set temp.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bassigia
Posts: 14
Joined: Sun Jul 05, 2020 2:19 pm

Re: Control fan speed Raspberry Pi 3B+

Fri Nov 06, 2020 4:02 pm

pcmanbob wrote:
Fri Nov 06, 2020 3:38 pm
If you just connected the fan to physical pins 4 & 6 then you cant control the speed ,

You need to connect the fan using a transistor circuit like this,

Image

Then either write your own code to control its speed or use the new fan option in raspi-config to just switch it on or off at a set temp.
Hi bob, thanks for your reply.
No, I connect the fan to RemotePi board that is connected with the adapter below to the RPI (look at third photo)
https://www.msldigital.com/products/gpio-adapter

So, the transistor circuit should be placed between remotepi and RPI? How? Sorry I'm a basic user

pcmanbob
Posts: 13713
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Control fan speed Raspberry Pi 3B+

Fri Nov 06, 2020 4:18 pm

Your link does not show were the fan is connected ,

for fan speed control you need to add the transistor circuit I posted , its connected to the gpio as shown , in your case you will probably want to connect it to the ribbon cable,

I might help if you post a picture showing what is connected to the ribbon cable I might then be able to suggest better howe to make the circuit connection between the fan and the pi gpio,

it might also help explain how the fan is connected now.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bassigia
Posts: 14
Joined: Sun Jul 05, 2020 2:19 pm

Re: Control fan speed Raspberry Pi 3B+

Fri Nov 06, 2020 5:43 pm

pcmanbob wrote:
Fri Nov 06, 2020 4:18 pm
Your link does not show were the fan is connected ,

for fan speed control you need to add the transistor circuit I posted , its connected to the gpio as shown , in your case you will probably want to connect it to the ribbon cable,

I might help if you post a picture showing what is connected to the ribbon cable I might then be able to suggest better howe to make the circuit connection between the fan and the pi gpio,

it might also help explain how the fan is connected now.
You have right!
Image Image Image
The fan is connected to the remotepi with the 2 pin PH2.0 connector on the board
You can see that all the pin of the RPI are occupied with the ribbon cable
It's more clear now?

Many thanks

Gian

pcmanbob
Posts: 13713
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Control fan speed Raspberry Pi 3B+

Fri Nov 06, 2020 8:59 pm

So you can use the existing 5V and ground pins that your fan is plugged in to ,

all you need is a free gpio pin, so you need to list all the gpio pins that you are using already.

You will be able to connect to the gpio pin at the middle socket on you ribbon cable.

You will need to make up the transistor circuit on some strip board and then connect the various cables from the fan , supply & gpio to it.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bassigia
Posts: 14
Joined: Sun Jul 05, 2020 2:19 pm

Re: Control fan speed Raspberry Pi 3B+

Sat Nov 07, 2020 3:28 pm

pcmanbob wrote:
Fri Nov 06, 2020 8:59 pm
So you can use the existing 5V and ground pins that your fan is plugged in to ,

all you need is a free gpio pin, so you need to list all the gpio pins that you are using already.

You will be able to connect to the gpio pin at the middle socket on you ribbon cable.

You will need to make up the transistor circuit on some strip board and then connect the various cables from the fan , supply & gpio to it.
I'm not so sure to make up a transistor on a strip board (even know what those things are and how they work).
Instead, maybe there is a modification via software in Volumio? Volumio is based on Raspbian

Or, try with a quieter fan? Do you know any of it? Maybe this?
https://www.amazon.it/Noctua-NF-A4X10-F ... 832&sr=8-5

(there is a 3 to 2 pin adapter)

There is also a PWM version (if I understand correctlly with PWM I can control fan speed?)
https://www.amazon.it/Noctua-NF-A4x10-5 ... cs&sr=1-10

Or maybe this HAT that has a speed control:
https://www.amazon.it/Argon-Raspberry-P ... 691&sr=8-1

but I should extent the GPIO pin from the middle socket....I'm bit confused

For the GPIO Pins that I'm using:
RemotePI:
Pin 2 and Pin 4 + 5V
Pin 6 and Pin 9 GND
Pin 8 GPIO 14 for the shutdown signal and TxD for the serial communication
Pin 10 GPIO 15 for the shutdown signal and RxD for the serial communication
Pin 11 GPIO 17 for the IR receiver.
Pin 12 GPIO 18 for audio signal to Audiophonics digi+ hat you can see in the photos
Last edited by bassigia on Sat Nov 07, 2020 3:59 pm, edited 1 time in total.

pcmanbob
Posts: 13713
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Control fan speed Raspberry Pi 3B+

Sat Nov 07, 2020 3:53 pm

No matter what software you use , you need the hardware ( transistor circuit ) to allow your pi gpio to control the fan.

if you attempt to use the fan hat linked you need to make sure its using gpio pins that you are not using for the other devices/boards connected to your gpio.

The items I mentioned

Image

you will also need to be able to solder.

if you want some thing ready made then you could use one of these , its way over specified for your fan but it should work,

https://www.ebay.co.uk/itm/IRF520-MOSFE ... SweKJbuKmn

You will still need to connect it to the pi gpio pin, the fan and the existing fan supply pins.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

stuartiannaylor
Posts: 154
Joined: Thu Feb 27, 2020 10:56 pm

Re: Control fan speed Raspberry Pi 3B+

Sat Nov 07, 2020 3:57 pm

I don't even bother get a 12v fan run it at 5v and they are practically silent and often more than efficient enough.
Saves extra wiring and pwm control code.

bassigia
Posts: 14
Joined: Sun Jul 05, 2020 2:19 pm

Re: Control fan speed Raspberry Pi 3B+

Sat Nov 07, 2020 4:09 pm

pcmanbob wrote:
Sat Nov 07, 2020 3:53 pm
No matter what software you use , you need the hardware ( transistor circuit ) to allow your pi gpio to control the fan.

if you attempt to use the fan hat linked you need to make sure its using gpio pins that you are not using for the other devices/boards connected to your gpio.

The items I mentioned

Image

you will also need to be able to solder.

if you want some thing ready made then you could use one of these , its way over specified for your fan but it should work,

https://www.ebay.co.uk/itm/IRF520-MOSFE ... SweKJbuKmn

You will still need to connect it to the pi gpio pin, the fan and the existing fan supply pins.
Too way hard for me (I don't have equipment and knowledge for soldering)

Those are the pins I'm using:

RemotePI:
Pin 2 and Pin 4 + 5V
Pin 6 and Pin 9 GND
Pin 8 GPIO 14 for the shutdown signal and TxD for the serial communication
Pin 10 GPIO 15 for the shutdown signal and RxD for the serial communication
Pin 11 GPIO 17 for the IR receiver.
Pin 12 GPIO 18 for audio signal to Audiophonics digi+ hat you can see in the photos

Okay, I see the board you link to me. How does it work? What pin I have to use? Thanks for you precious info anyway!
"I don't even bother get a 12v fan run it at 5v and they are practically silent and often more than efficient enough.
Saves extra wiring and pwm control code."
Interesting, so let's say I can buy one of these:
https://www.amazon.it/Noctua-NF-A4X10-V ... r=1-1&th=1

How can I made it run at 5V?

Thanks

pcmanbob
Posts: 13713
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Control fan speed Raspberry Pi 3B+

Sat Nov 07, 2020 4:38 pm

So if you just want to use the 12V fan then you would just need to connect the red cable to the 5V pin and the black cable to the ground on your existing board were you have the 5V fan connected to.

If you wan to use the link transistor board to control your existing fan you would connect the existing output pins on your add on board to the transistor board and the fan to the output of the transistor board, then connect the selected gpio pin ( you have lots to choose from ) and a ground to the transistor board as well for the control.

I can provide a diagram if you decided to go down this route, no soldering required you could just use dupont cables to connect it all together.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bassigia
Posts: 14
Joined: Sun Jul 05, 2020 2:19 pm

Re: Control fan speed Raspberry Pi 3B+

Sat Nov 07, 2020 6:03 pm

pcmanbob wrote:
Sat Nov 07, 2020 4:38 pm
So if you just want to use the 12V fan then you would just need to connect the red cable to the 5V pin and the black cable to the ground on your existing board were you have the 5V fan connected to.

If you wan to use the link transistor board to control your existing fan you would connect the existing output pins on your add on board to the transistor board and the fan to the output of the transistor board, then connect the selected gpio pin ( you have lots to choose from ) and a ground to the transistor board as well for the control.

I can provide a diagram if you decided to go down this route, no soldering required you could just use dupont cables to connect it all together.
The route with 12v Fan seems to me the easiest way!

I see that the 40x20mm of the noctua model seems quieter than the 40x10, so let'say I buy this:
https://noctua.at/en/products/fan/nf-a4 ... cification

I should connect everything like this:

Noctua 12V fan ---> 3 to 2 pin adapter ----> RemotePi 2 pin PH2.0 connector 5V

In this way the fan will start? Also with only 5V?
And if it should start, will it run quieter because operates at 5V?

Many thanks

pcmanbob
Posts: 13713
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Control fan speed Raspberry Pi 3B+

Sat Nov 07, 2020 6:30 pm

The Noctua 12V fan should start ok at only 5V, because it is being supplied with less than half it's normal voltage it will spin at a much slower speed and so be much quieter.

Before buying a 3 to 2 pin adaptor check it will fit your existing fan connection .
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bassigia
Posts: 14
Joined: Sun Jul 05, 2020 2:19 pm

Re: Control fan speed Raspberry Pi 3B+

Sun Nov 08, 2020 12:27 pm

pcmanbob wrote:
Sat Nov 07, 2020 6:30 pm
The Noctua 12V fan should start ok at only 5V, because it is being supplied with less than half it's normal voltage it will spin at a much slower speed and so be much quieter.
Wonderful!
pcmanbob wrote:
Sat Nov 07, 2020 6:30 pm
Before buying a 3 to 2 pin adaptor check it will fit your existing fan connection .
I cannot understand from Amazon neither from official Noctua site if there is a 3-to 2 pin adapter, it should be included.
My existing connection is the 2 pin PH2.0 connector, I don't have any info about that, maybe I contact Noctua support!

Thanks

Gian

pcmanbob
Posts: 13713
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Control fan speed Raspberry Pi 3B+

Sun Nov 08, 2020 12:39 pm

There will be no 3pin to 2pin adaptor as 2pin is not normally used in PC's which is what this fan is meant for,

So your options are cut the existing fan cable and the new fan cable and connect your existing 2 pin plug to the new fan, matching the cable colours,

or you might be able to use 2 male to female dupont cables to connect the new fan to your existing board.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bassigia
Posts: 14
Joined: Sun Jul 05, 2020 2:19 pm

Re: Control fan speed Raspberry Pi 3B+

Sun Nov 08, 2020 12:52 pm

pcmanbob wrote:
Sun Nov 08, 2020 12:39 pm
There will be no 3pin to 2pin adaptor as 2pin is not normally used in PC's which is what this fan is meant for,

So your options are cut the existing fan cable and the new fan cable and connect your existing 2 pin plug to the new fan, matching the cable colours,

or you might be able to use 2 male to female dupont cables to connect the new fan to your existing board.
Something like this?
https://cdn.shopify.com/s/files/1/0073/ ... 1571751047
Do I have to solder the joint or electric tape is enough?
Sorry, I have never done it before!

But, this adapter should be the same?
https://www.amazon.com/coolerguys-43307 ... B002FR84FY

Thanks

GIan

pcmanbob
Posts: 13713
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Control fan speed Raspberry Pi 3B+

Sun Nov 08, 2020 1:01 pm

Your second option looks the better one it should be plug and play , not cutting or soldering required ,

you plug the fan in to one end and the other end in to your existing board.

This is based on the picture only so your need to compare your existing 2 pin plug to the one on the adaptor to check its the same.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bassigia
Posts: 14
Joined: Sun Jul 05, 2020 2:19 pm

Re: Control fan speed Raspberry Pi 3B+

Sun Nov 08, 2020 6:18 pm

pcmanbob wrote:
Sun Nov 08, 2020 1:01 pm
Your second option looks the better one it should be plug and play , not cutting or soldering required ,

you plug the fan in to one end and the other end in to your existing board.

This is based on the picture only so your need to compare your existing 2 pin plug to the one on the adaptor to check its the same.
Thank you bob, I'll try in the next days and I'll come back here to update!

Good evening!

Gian

Return to “HATs and other add-ons”