How to control fan speed of nas perk?


#1

Hi there.

I just received my omnia and mounted it in the nas perk with 2 disks right away.
I also installed a fan using the cable that was par of the NAS perk.
Now the fan runns full speed from the moment i turn on the router.
This is far too loud.
So first thing I like to do is to reduce the fan speed.
Unfortunately I have no idea how and my my google skills dont seem to be good enough :confused:

Can anyone please give me a hint or better a link to a how to?
Thanks!

What I did till now: just googling g
So I found something about a package fancontrol but its not available and maybe is just for pcs anyway…
searching for “fan” in the packagesearch of luci gives me the two packages
"kmod-hwmon-pwmfan" which is discribed as “Kernel module for PWM controlled FANs"
and
” kmod-hwmon-gpiofan" which is described as "Kernel module for PWM controlled FANs"
I guess we have a pwm-fan here?

well. this is where I am right now.

Thanks in advance!
Guess I will dig deeper in the divice the comming weekend. But first i need it to be more quiete XD.

Edit: found /sbin/fan_ctrl.sh (mentioned in https://plus.google.com/+ChristopherGaul/posts/bBmivGyJSW8 )
but ther is no “/sys/devices/platform/pwm_fan” nor “/sys/devices/platform/pwm_fan” mentioned in the script. even thogh i installed kmod-hwmon-pwmfan in the meantime.


#2

Based on the following picture I doubt you can control the fan speed on NAS perk without building custom solution. The power cable is connected to pins that are normal voltage sources or grounds.


#3

Yeah u r right.
looks like a costum solution is needed :smiley:
THX!


#4


You could try to use a temp controlled fan instead to save youself the hassle…


#5

You need to use PWM fan according to this: https://www.turris.cz/forum/topic_show.pl?tid=1446l
what I saw earlier.

I would rather know where I can buy customized SATA cable with fan header, which was in NAS perk.


#6

You can use low noise adapter between power cable and fan if nose is the only problem. It basically reduces voltage and thus rpm and noise.


#7

I too have the same problem. This is absurd, it’s way too loud and completely unnecessary.

Does somebody know if we have independent control over the fan connectors voltage? I believe this is the only way we can hope to control the speed.


#8

Hello,
Do you have PWM fan or not?
Because as I said in previous comment PWM fan should be controlled by SW.


#9

Hi, thanks for the feedback.

The connector for the fan located at the end of the power cable included in the NAS perk only comes with 2 pins. I assume, based on what you’re saying, that it won’t be possible to control the speed? Am I correct?

I just looked at the power cable again and it looks like the fan has its own 2 cables coming from the board.

Thanks for your help


#10

Hello,
Because I don’t have the customized cable I can’t tell you more, sorry and I don’t even know, where can I buy it…

As you said, if they’re only 2 pins, then it is impossible to control the speed by HW. It’s same also for motherboards, when they’re 2/3 pins, you can’t use automatic PWM by HW. You need control it by SW for example is SpeedFan for Windows (or you can use other programs).
So I assume that’s why there is written script, which you can control fan, but if it works. I don’t know. I just wrote what I saw.


#11

Script for fan control is in Turris Omnia (fan_ctrl.sh), but in my opinion it is impossible in this case to use power cable that comes with the NAS perk.
Look at Fan_ctrl.sh - using for cooler control


#12

/sbin/fan_ctrl.sh

#!/bin/sh

CPU_TEMP=cut -c1-2 /sys/class/hwmon/hwmon2/temp1_input
DDR_TEMP=cut -c1-2 /sys/class/hwmon/hwmon1/temp1_input
WIFI_TEMP=cut -c1-2 /sys/class/hwmon/hwmon1/temp2_input

CPU_LOW=85
CPU_HIGH=95
DDR_LOW=65
DDR_HIGH=75
WIFI_LOW=100
WIFI_HIGH=115

if [ -d /sys/devices/pwm_fan ];then
FAN_CTRL=/sys/devices/pwm_fan/hwmon/hwmon0/pwm1
elif [ -d /sys/devices/platform/pwm_fan ];then
FAN_CTRL=/sys/devices/platform/pwm_fan/hwmon/hwmon0/pwm1
else
exit 0
fi

if [ “$CPU_TEMP” -ge “$CPU_HIGH” -o “$DDR_TEMP” -ge “$DDR_HIGH” -o “$WIFI_TEMP” -ge “$WIFI_HIGH” ];then
echo “255” > $FAN_CTRL
elif [ “$CPU_TEMP” -ge “$CPU_LOW” -o “$DDR_TEMP” -ge “$DDR_LOW” -o “$WIFI_TEMP” -ge “$WIFI_LOW” ];then
echo “100” > $FAN_CTRL
else
echo “0” > $FAN_CTRL
fi


#13

Did you read what I wrote? I wrote that this script is located in Turris Omnia in my previous posts and even it is in this thread. And when you use translate Google you will find there that there someone said that script is useless? Can’t confirm ir or help you, because I can’t test/use it, because I don’t have customized sata cable which was provided in NAS perk.

If you don’t want to have fan running non-stop you can edit that script, which is provided. I don’t know why you don’t do it. :slight_smile:

There wasnt any reason to create another thread for fan or fan speed.
Also you could point us for their gitlab/github where there should be this script also.
Discourse is already confusing.


#14

The problem is neither the script nor the cable, but where the cables connect.
NAS perk cable is primarily used to power an external disc (and also to power the fan) is connected to the supply voltage 12V, 5V and 3.3V (https://www.turris.cz/doc/_media/omnia-pinout.png - right, top corner), which can not be controlled through any script.


#15

Why then do I see this in LuCI > System > Scheduled Tasks

*/5 * * * * /sbin/fan_ctrl.sh

Even if I didn’t install anything related to fan control…! [confused]

Could someone from NIC.CZ please confirm or infirm that we can control through SW the speed of a fan in the NAs box? And possibly indicate a way we could do just that? Thanks


#16

BTW I installed Noctua NF-A8 ULN 80 mm (http://noctua.at/en/nf-a8-uln) to the NAS box. I enabled the 1100rpm mode and installed it with vibration-compensators. It has a low noise level 6,5 dB(A) according to the spec so it can be a good alternative for active fan speed control.


#17

Is the 4-pin fan would not be better to use a GPIO control using programmable PWM?


#18

Hi.

As Turris Omnia does not support hardware PWM, and software, I was looking for other options to control the 4-pin fan.
And I found - the DS1050 this integrated circuit generates a PWM of congested frequencies 1, 5, 10, 25kHz on the I2C interface.
In my case I applied 25kHz, because in this range the PWM fan works.
The chip is best purchased with an adapter on SOIC8 and soldered on a universal board and output the PWM signal to the 4 pin connector.
DS1050 is 5 bit, meaning it has 32 levels of fill expressed in percent, where 1 level is 3,125%.
The service is trivial enough to read in the datasheet. In the OpenWRT we can use the i2cset i2cget as a simple control.
For example:

where:
-y 7 is the bus number i2c
0x28 is the adress DS1050 ( in this case A0, A1 and A2 is connect to GND) - to find what address DS1050 has to use command i2cdetect -y 7
0x50 is the control byte - in this case is write mode
0x10 is the PWM databyte example: 0x10 is 50% of duty, 0x1F is 96,88%

Later, I will post some photos and videos from the action.