Frequency Sensor - heliflight3d/heliflight GitHub Wiki

The Frequency Sensor is a feature for acquiring the motor RPM. Typically it is used when the ESC does not support bidirectional Dshot telemetry, and thus can't provide the RPM information directly. Only BLHeli_32 and some BLHeli_S ESCs support Dshot telemetry, so this feature is needed with a wide range of traditional ESCs.

The RPM signal is used by the governor and the RPM-filter. If these features are not needed, then there is no need for the frequency sensor either.

An electrical frequency signal is provided by some ESCs, e.g. Hobbywing with the "yellow" wire. Or it can come from an RPM sensor, which is converting the motor three-phase voltages into a frequency signal - e.g. Hobbywing RPM sensor. Please refer to your ESC's or sensor's manuals how to connect them correctly.

Up to two frequency sensors are supported. The numbering must match the motor numbering.

If both Freq Sensor and D-shot RPM signals are available, the Freq Sensor has precedence.

Configuration

First, a pin must be configured for frequency sensor use. The pin must be connected to a timer with exclusive access. In other words, there must be a free timer, not used by anything else, and one of its channels must be available on a pin that is connected to the FC's solder pads. Once we know which timer and pin we can use, it can be configured for frequency sensor use.

In this example, we have identified Timer9 to be free, with Channel2 connected to an usable pad. We also know that the timer function is called AF3 on pin A03. Knowing this requires reading the STM32 manuals...

resource FREQ 1 A03
timer A03 AF3

Then the frequency sensor can be turned ON with the feature flag: feature FREQ_SENSOR

Help is available in HF3D discord chat: HF3D chatroom