Hi,
I have been trying to get an EMC2301 to work with a Noctua NF-8A PWM Fan (fan specs).
Using a Raspberry PI over i2c, I can control the speed the fan using the EMC2301 using the following two commands:
i2cset -y 1 0x2f 0x30 0xff
i2cset -y 1 0x2f 0x30 0x00
However, I am unable to reliably read the fan RPM. I have used the open source test script (Test Script) and pasted its output below.
As you can see below, the RPM values being printed are not sane. I am assuming its a configuration issue and would love guidance to that effect. Thank you so much.
Regards,
S.
pi@raspberrypi:~/fan/emc2301 $ sudo python3 emc2301_i2c_test.py
3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
ecomet.emc2301: INFO Start logging ...
:TEST_PASSED:
ecomet.emc2301: INFO PRODUCT Read correct
ecomet.emc2301: INFO PRODUCT ID: 37
ecomet.emc2301: INFO MANUFACTURER Read correct
ecomet.emc2301: INFO MANUF ID: 5D
ecomet.emc2301: INFO REVISION Read correct
ecomet.emc2301: INFO REVISION ID: 80
{'CONF': {'MASK': 'UNMASKED', 'DIS_TO': 'DISABLED', 'WD_EN': 'DISABLED', 'DR_EXT_CLK': 'CLK_INPUT', 'USE_EXT_CLK': 'INTERNAL', 'EN_ALGO': 'DISABLED', 'RANGE': '500>1', 'EDGES': '5>2POLE>1', 'UPDATE': '100ms', 'EN_RRC': 'ENABLED', 'GLITCH_EN': 'DISABLED', 'DER_OPT': 'BASIC_DERIVATE', 'ERR_RNG': '0RPM', 'GAIND': '4x', 'GAINI': '4x', 'GAINP': '4x'}, 'FAN_STAT': {'WATCH': 'NOT_SET', 'DRIVE_FAIL': 'REACH', 'FAN_SPIN': 'SPIN', 'FAN_STALL': 'STALL', 'FAN_INT': 'NO_ALERT', 'FAN_SETTING': 0.0}, 'SPIN': {'FAN_SPIN_UP_DRIVE_FAIL_CNT': 'DISABLE', 'FAN_SPIN_UP_NOKICK': 'SPIN', 'FAN_SPIN_UP_LVL': '60%', 'FAN_SPIN_UP_TIME': '500ms', 'FAN_MAX_STEP': 16, 'FAN_MIN_DRIVE': 40.0}, 'PWM': {'PWM_POLARITY': 'NORMAL', 'PWM_OUTPUT': 'OPEN-DRAIN', 'PWM_BASE': '26.00kHz', 'PWM_DIVIDE': 1}, 'TACH': {'TACH_COUNT': 7840, 'FAN_FAIL_BAND': 0, 'TACH_TARGET': 8191, 'TACH_READ': 5647}, 'ID': {'PRODUCT_ID': '37', 'MANUF_ID': '5D', 'REVISION_ID': '80'}, 'LOCK': 'UNLOCKED'}
********* Changing Speed To: 0 **********
computing speed
res: 4022
poles: 2
edges: 5
mul: 1
tach: 32768
output: 977
977 RPM
computing speed
res: 6890
poles: 2
edges: 5
mul: 1
tach: 32768
output: 570
570 RPM
computing speed
res: 3949
poles: 2
edges: 5
mul: 1
tach: 32768
output: 995
995 RPM
computing speed
res: 3981
poles: 2
edges: 5
mul: 1
tach: 32768
output: 987
987 RPM
computing speed
res: 3962
poles: 2
edges: 5
mul: 1
tach: 32768
output: 992
992 RPM
********* Changing Speed To: 50 **********
computing speed
res: 3804
poles: 2
edges: 5
mul: 1
tach: 32768
output: 1033
1033 RPM
computing speed
res: 9
poles: 2
edges: 5
mul: 1
tach: 32768
output: 436906
436906 RPM
computing speed
res: 14
poles: 2
edges: 5
mul: 1
tach: 32768
output: 280868
280868 RPM
computing speed
res: 9
poles: 2
edges: 5
mul: 1
tach: 32768
output: 436906
436906 RPM
computing speed
res: 9
poles: 2
edges: 5
mul: 1
tach: 32768
output: 436906
436906 RPM
********* Changing Speed To: 100 **********
computing speed
res: 9
poles: 2
edges: 5
mul: 1
tach: 32768
output: 436906
436906 RPM
computing speed
res: 4
poles: 2
edges: 5
mul: 1
tach: 32768
output: 983040
983040 RPM
computing speed
res: 4
poles: 2
edges: 5
mul: 1
tach: 32768
output: 983040
983040 RPM
computing speed
res: 4
poles: 2
edges: 5
mul: 1
tach: 32768
output: 983040
983040 RPM
computing speed
res: 7
poles: 2
edges: 5
mul: 1
tach: 32768
output: 561737
561737 RPM
********* Changing Speed To: 160 **********
computing speed
res: 4
poles: 2
edges: 5
mul: 1
tach: 32768
output: 983040
983040 RPM
computing speed
res: 4
poles: 2
edges: 5
mul: 1
tach: 32768
output: 983040
983040 RPM
computing speed
res: 4
poles: 2
edges: 5
mul: 1
tach: 32768
output: 983040
983040 RPM
computing speed
res: 4
poles: 2
edges: 5
mul: 1
tach: 32768
output: 983040
983040 RPM
computing speed
res: 4
poles: 2
edges: 5
mul: 1
tach: 32768
output: 983040
983040 RPM
Speed: 200
computing speed
res: 4
poles: 2
edges: 5
mul: 1
tach: 32768
output: 983040
983040 RPM
computing speed
res: 4
poles: 2
edges: 5
mul: 1
tach: 32768
output: 983040
983040 RPM
********* Changing Speed To: 255 **********
computing speed
res: 8191
poles: 2
edges: 5
mul: 1
tach: 32768
output: 480
480 RPM
computing speed
res: 2658
poles: 2
edges: 5
mul: 1
tach: 32768
output: 1479
1479 RPM
computing speed
res: 8191
poles: 2
edges: 5
mul: 1
tach: 32768
output: 480
480 RPM
computing speed
res: 8191
poles: 2
edges: 5
mul: 1
tach: 32768
output: 480
480 RPM
computing speed
res: 6217
poles: 2
edges: 5
mul: 1
tach: 32768
output: 632
632 RPM