Skip to content

EMC2301: Better Fan Detection #4

@TheGuyDanish

Description

@TheGuyDanish

The EMC2301 requires the use of a fairly complex equation to work out the RPM of a fan based on several factors including the number of poles in the fan, the number of edges measured (which should be reflected in the controller with EMC2301.set_fan_edges) and a multiplier based on the minimum RPM.

image

This is currently represented in the EMC2301 driver code as: rpm = 1/poles * ((edges - 1) / tach_count * (1/m)) * f_tach * 60, where poles defaults to 2, edges to 5, f_tach to 32768 and m to 1.

In order to use this correctly with a Noctua NF-F12 (the fan I have been testing with) the settings preferred for this are to run:

EMC2301.set_fan_edges(3)
EMC2301.get_fan_speed(edges=3, poles=1)

However, especially for smaller fans with higher RPMs, this does not provide an accurate reading. There needs to be a better way to detect a fan's ability and set these variables if possible. There exists a driver in hwmon in Linux (so written in C) for the EMC2305, which is the same basic software as the 2301 (and actually also supports it) which may shed some light on it.

In the meantime, there needs to be a better way to configure the edge bits for accurate tachometer readings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions