weigon

  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

weigon's Achievements

  1. With nightly (4.20.0) I can't get my NVMe SSD mounted on the T4 anymore. It works with stable (4.4) http://ix.io/1z5S Any hints?
  2. Just for reference, a simplified version that works with both linux 4.4 and the linux 4.20 kernel: # make the PWM port available to sysfs $ echo 0 | sudo tee /sys/class/pwm/pwmchip1/export 0 # set the PWM-freq to 25kHz (=40000ns) $ echo 40000 | sudo tee /sys/class/pwm/pwmchip1/pwm0/period 40000 # enable the PWM $ echo 1 | sudo tee /sys/class/pwm/pwmchip1/pwm0/enable 1 It starts the fan at fullspeed as by default the polarity of the PWM is inversed: duty_cycle of "0" == "always on". $ cat /sys/class/pwm/pwmchip1/pwm0/polarity inversed $ cat /sys/class/pwm/pwmchip1/pwm0/duty_cycle 0 To slow the fan down with inversed polarity one needs to bring the duty_cycle close to the "period" set before $ echo 35000 | sudo tee /sys/class/pwm/pwmchip1/pwm0/duty_cycle 35000
  3. After removing the noise from the input-data, I now got quite reasonable RPM values for the Noctua NF A14: RPM per duty_cycle [ns] duty_cycle RPM 180 158 200 476 250 637 300 938 400 1111 500 1200 2000 1251 Below 180ns the fan stops, above 500ns it doesn't really increase anymore. fan.svg
  4. I just found out that the PWM freq should be 25kHz and that the TACH signal gives 2 ticks per round. That means: In the script I pasted earlier "rounds/s" were just ticks and the "RPM" were "twice the RPM". After adjusting the PWM freq the corrected measurements for the Noctua NF A14: duty_cycle: 170ns, stops duty_cycle: 180ns, ticks: ~3, RPM: 90 duty_cycle: 190ns, ticks: ~4, RPM: 120 duty_cycle: 200ns, ticks: 8, RPM: 240 duty_cycle: 250ns, ticks: 16, RPM: 480 duty_cycle: 300ns, ticks: 22, RPM: 660 duty_cycle: 350ns, ticks: 34, RPM: 1020 duty_cycle: 400ns, ticks: 40, RPM: 1200 duty_cycle: 500ns, ticks: 47, RPM: 1400 duty_cycle: 800ns, ticks: 36, RPM: 990 [*] duty_cycle: 2000ns, ticks: 24, RPM: 720 [*] duty_cycle: 2000ns, ticks: 26, RPM: 780 [*] duty_cycle: 4000ns, ticks: 40, RPM: 1200 [*] [*] fan is faster, but ticks aren't consistent.
  5. Yep, gpio70 does the trick. Use the below python script to print the current measured rounds: #!/usr/bin/env python ## $ pip install python-periphery from periphery import GPIO import datetime def fan_rpm(): with GPIO(70) as rpm_gpio: rpm_gpio = GPIO(70) assert rpm_gpio.supports_interrupts rpm_gpio.edge = "rising" while True: cur = datetime.datetime.now() start = cur end = cur + datetime.timedelta(seconds=1) time_left = end - cur rounds = 0 while time_left.total_seconds() > 0: if rpm_gpio.poll(time_left.total_seconds()): cur_val = rpm_gpio.read() if cur_val == True: rounds += 1 cur = datetime.datetime.now() time_left = end - cur print("rounds={:3}, RPM={:4.0f}".format( rounds, rounds * 60 / (cur - start).total_seconds())) if __name__ == "__main__": fan_rpm() A few measurements for different fans: For a Noctua NF A14 (1400x1400mm, max 1400 RPM): With period: 1000ns duty_cycle: 20ns, rounds/s: 0 duty_cycle: 50ns, rounds/s: 20 (1200 RPM) duty_cycle: 52ns, rounds/s: 40 (2400 RPM) duty_cycle: 900ns, rounds/s: 45 For NoiseBlocker XM1 (40x40mm, max 2800 RPM): With period: 1000ns duty_cycle: 20ns, rounds/s: 0 duty_cycle: 50ns, rounds/s: 45 (2700 RPM) duty_cycle: 52ns, rounds/s: 105 (6300 RPM) duty_cycle: 900ns, rounds/s: 110 1. using PWM to drive a DC fan leaves only a very small range that allows to control the fan-speed 2. the reported RPMs don't match the max-RPMs one would expect from the fan.
  6. I run 3-pin fan (Noise Blocker XM-1) connected to the FAN port of the T4. It is mounted on top of a "AAB Cooling NB Cooler 1" heatsink. GPIO4_C6 is exported as "pwm1" and can be used directly via sysfs: # export the PWM1-pin $ echo 0 > /sys/class/pwm/pwmchip1/export # setup PWM (5% duty-cycle) $ echo normal > /sys/class/pwm/pwmchip1/pwm0/polarity $ echo 100000 > /sys/class/pwm/pwmchip1/pwm0/period $ echo 5000 > /sys/class/pwm/pwmchip1/pwm0/duty_cycle # enable the PWM output $ echo 1 > /sys/class/pwm/pwmchip1/pwm0/enable (The 5% duty cycle works for this small, light fan. For larger fans a higher duty cycle is need to get the fan started). At 100% duty-cycle the temperature of the T4 stays at 43C max under full load. I havn't found a way to read back the TACH signal that's available as GPIO2_A6_FAN_TACH yet to feed the information into fancontrol later.