Weird fan behavior

Post Reply
strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Weird fan behavior

Post by strange_v »

Hi.
I'm using Noctua NF-F12 5V PWM 120mm fan with ODROID H2+.

The bios configuration:
Low 30°C - RPM 1000
Middle 40°C - RPM 1250
High 47°C - RPM 1500

The first issue that after the system starts sensors command shows: fan1: FAULT, but the fan spins.
cat /sys/class/hwmon/hwmon1/fan1_input shows 480
cat /sys/class/hwmon/hwmon1/fan1_target shows something near 1000
The fan doesn't show any reaction to increasing the temperature.

To make everything work properly I have to either stop the fan with a finger, then release it or disconnect then connect the PWM wire. After that sensors show the correct RPM and it follows the temperature. Everything works after the reboot, but not after disconnecting/connecting the power.

Any ideas?
Last edited by strange_v on Mon Jan 18, 2021 9:16 pm, edited 1 time in total.

strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Weird fan behavior

Post by strange_v »

Attached logic analyzer to PWM output.

When everything wrong I see this
Screenshot 2021-01-18 133118.jpg
Screenshot 2021-01-18 133118.jpg (70.8 KiB) Viewed 771 times
Screenshot 2021-01-18 133403.jpg
Screenshot 2021-01-18 133403.jpg (66.46 KiB) Viewed 771 times
PWM isn't stable, it has long ON periods and then 21% PWM. It looks like trying to start the fan.

When everything works I see
Screenshot 2021-01-18 133726.jpg
Screenshot 2021-01-18 133726.jpg (54.58 KiB) Viewed 771 times
Screenshot 2021-01-18 133744.jpg
Screenshot 2021-01-18 133744.jpg (68.05 KiB) Viewed 771 times
Continious PWM signal, ~86% (in the current case)

The fan tacho is always correct.

PS
Stopping the fan with a finger not always helps.

L67GS
Posts: 457
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 135 times
Been thanked: 66 times
Contact:

Re: Weird fan behavior

Post by L67GS »

That's the first time I have seen a logic analyzer on this forum.
Being a pretty big fan I wonder if the pwn sees a voltage drop at startup and faults to 480 as a default just to keep cooling. It might be interesting to see what a scope shows, or try different fan.

strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Weird fan behavior

Post by strange_v »

@L67GS, it was the easiest way to see what happens here.

Here are the measurements during the start, nothing new (it starts from that weird 21% mode with 61ms HIGH)
Screenshot 2021-01-18 220433.jpg
Screenshot 2021-01-18 220433.jpg (44.34 KiB) Viewed 739 times
Screenshot 2021-01-18 220611.jpg
Screenshot 2021-01-18 220611.jpg (55.69 KiB) Viewed 739 times
Maybe it is a Spin Up Routine (page 32 from the emc2103 datashet). Probably it'll work okay with not so low RPM fan but... I'd like to use this one (5V 4-pin fan isn't something really popular).
I might end up using a tiny MCU to control the fan from the OS via i2c, but I'd prefer to use built-in capabilities if it is possible.

L67GS
Posts: 457
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 135 times
Been thanked: 66 times
Contact:

Re: Weird fan behavior

Post by L67GS »

It would be best to wait for a Hardkernal representative to chime in first but if it's a hardware/voltage drop issue a simple bjt circuit would probably be fine to drive it from the pwm pin.

User avatar
odroid
Site Admin
Posts: 37281
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1747 times
Been thanked: 1127 times
Contact:

Re: Weird fan behavior

Post by odroid »

I think the tachometer output signal characteristics of your fan might be different from our fan.
https://wiki.odroid.com/odroid-h2/appli ... _fan_speed

Can you capture the tacho output signal with your logic analyzer?

strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Weird fan behavior

Post by strange_v »

odroid wrote:
Tue Jan 19, 2021 10:29 am
I think the tachometer output signal characteristics of your fan might be different from our fan.
I thought it is something more or less standard. Here is the Noctua PWM specifications white paper.

Tacho output closer to start (1000/134.98*60 = 444 RPM)
Screenshot 2021-01-19 072154.jpg
Screenshot 2021-01-19 072154.jpg (88.08 KiB) Viewed 713 times
and when it stabilize (1000/160.06*60 = 374 RPM)
Screenshot 2021-01-19 073200.jpg
Screenshot 2021-01-19 073200.jpg (53.74 KiB) Viewed 711 times
UPD
Replaced the last screen and calculation due to a mistake.

User avatar
odroid
Site Admin
Posts: 37281
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1747 times
Been thanked: 1127 times
Contact:

Re: Weird fan behavior

Post by odroid »

It seems that the tacho output has two pulses per rotation while ours has one pulse per rotation.
Can you check the emc2103 RPM value on the command line with "sensors"?

strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Weird fan behavior

Post by strange_v »

Oh, yes, two pulses per rotation in the Noctua fan.

I can check current values
# cat /sys/class/hwmon/hwmon1/fan1_input
480
# cat /sys/class/hwmon/hwmon1/fan1_target
1007

User avatar
odroid
Site Admin
Posts: 37281
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1747 times
Been thanked: 1127 times
Contact:

Re: Weird fan behavior

Post by odroid »

Right. I think you need to use a small MCU to control your fan. :(

strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Weird fan behavior

Post by strange_v »

With the information, you provided in the previous post (that your fan sends one pulse per rotation), I can create a much simpler adapter, that converts two pulses per rotation into one. It should work theoretically.
Thank you.

User avatar
odroid
Site Admin
Posts: 37281
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1747 times
Been thanked: 1127 times
Contact:

Re: Weird fan behavior

Post by odroid »

Hold on.
We will double check our fan specification tomorrow.
One of our engineers is telling me our fan also has two pulses per rotation. :o

strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Weird fan behavior

Post by strange_v »

Oops, okay, I'll wait.

UPD
I've just reread the datasheet and here are my thoughts.
1. The minimum RPM that can be detected by the chip is 500 (Table 6.31 Range Decode, page 58)
2. Register Fan Valid TACH Count holds the minimum tachometer reading that indicates the fan is spinning properly (page 40). Due to the previous statement, probably, the value is 500 or more.
3. During the Spin Up Routine it runs the fan at 100% for 60ms and ~20% for~185ms.
20% of 1500 is 300, so probably the average RPM is below the min value (500).

lsc1117
Posts: 219
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 3 times
Been thanked: 27 times
Contact:

Re: Weird fan behavior

Post by lsc1117 »

Hi,

The 92x92 Fan sold in the Hardkernel also has two pulses per rotation.
I tried to run the command you did with my H2+ after disconnecting/connecting the power.
And the results are following picture.
fan_rpm.png
fan_rpm.png (129.93 KiB) Viewed 648 times
I think there's a difference in fan characteristics but I don't have the Noctua Fan for the test.

strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Weird fan behavior

Post by strange_v »

Thanx, lsc1117.
I believe it has a bigger max speed - 2000 RPM (1500 RPM for Noctua).

strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Weird fan behavior

Post by strange_v »

It seems I was right about the min RPM.
Yesterday, I prototyped an adapter with the following logic:
  • if the fan spins, but RPM < 510 - emulate 510 RPM signal
  • if the fan's RPM >= 510 - emulate signal for the actual speed
  • if the fan doesn't spin at all - do nothing (no signal)
With this adapter, my Noctua fan works as expected.
adapter.jpg
adapter.jpg (102.79 KiB) Viewed 604 times
These users thanked the author strange_v for the post:
odroid (Thu Jan 21, 2021 5:45 pm)

L67GS
Posts: 457
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 135 times
Been thanked: 66 times
Contact:

Re: Weird fan behavior

Post by L67GS »

strange_v wrote:
Thu Jan 21, 2021 4:25 pm
It seems I was right about the min RPM.
Yesterday, I prototyped an adapter with the following logic:
  • if the fan spins, but RPM < 510 - emulate 510 RPM signal
  • if the fan's RPM >= 510 - emulate signal for the actual speed
  • if the fan doesn't spin at all - do nothing (no signal)
With this adapter, my Noctua fan works as expected.
adapter.jpg
Atiny? Cool stuff...

strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Weird fan behavior

Post by strange_v »

@L67GS, yes ATtiny85. I have to tune the code a bit, but it works and solves the problem.
These users thanked the author strange_v for the post:
L67GS (Thu Jan 21, 2021 5:15 pm)

L67GS
Posts: 457
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 135 times
Been thanked: 66 times
Contact:

Re: Weird fan behavior

Post by L67GS »

I love microcontrollers, but I'm primarily into pic12 & pic16 at work, though I have a pretty fair AVR collection for r&d.
I may toy with the pic32 stuff in the future, mplab will compile C++ for them.

potentialdiffer
Posts: 1
Joined: Thu Apr 15, 2021 1:07 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Weird fan behavior

Post by potentialdiffer »

I ran into the same problem, also using a Noctua 5 V PWM fan. I found the issue was with the pre-configured spin up routine:

Code: Select all

# sudo i2cget 0 0x2e 0x46
0x00
This means spin up time of 250 ms and drive level of 30 % which results in RPM below 500: 1500x30% = 450

I programmed the default configuration by writing 0x19 to the emc2103:

Code: Select all

# sudo i2cset 0 0x2e 0x46 0x19
This sets the device to its default spin up routine which is a spin up time of 500 ms and sets drive level to 60%. Eventually the developers could set a higher default spin up drive level?

User avatar
odroid
Site Admin
Posts: 37281
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1747 times
Been thanked: 1127 times
Contact:

Re: Weird fan behavior

Post by odroid »

Since the Noctua 5 V PWM Fan spin-up characteristics and the range of RPM is different from our stock cooling fan, it seems to be very hard to make a common default level in the BIOS.
You probably need to add your own default value setting command to /etc/rc.local file or something like that.

strange_v
Posts: 12
Joined: Mon Jan 18, 2021 6:29 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Weird fan behavior

Post by strange_v »

potentialdiffer, wow, cool! I definitely prefer a software fix instead of a hardware one.

odroid, probably, the ideal solution is to add this setting to the BIOS (I mean the possibility to specify %).

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 0 guests