Frequency Input

Applies to: IOcan · Standalone controller. What this means

Overview

A Frequency Input reads a pulse train on a hardware pin and reports one property of it, chosen by the mode:

  • Frequency — scaled by the tooth count into speed or RPM.
  • Duty — the on/off ratio.
  • Time — the pulse or period time.

Use it for crank and shaft speed sensors including missing-tooth wheels, wheel speed sensors, flow meters, and any sensor whose output is a frequency or a duty cycle.

It also covers what older configurations called separate Frequency and Duty input types. They are modes here.

⚠️ The signal-mode setting currently has no effect. The firmware reads your selection and then unconditionally overrides it with Legacy before creating the input. Every frequency input runs in Legacy mode whatever the configuration says — including the quadrature modes, so direction is not available. This looks like debug code that was left in; it is flagged here rather than left for you to discover with a two-channel sensor fitted.

A wheel or driveshaft speed sensor is the common source. The IOcan pinout lists its frequency inputs, and the standalone controller pinout its own.

Prerequisites & hardware

  • A sensor producing a pulse train on the pin — Hall, optical, or a VR sensor through a conditioner — with its ground on sGND.
  • For speed or RPM, the tooth count, and the missing tooth count if the wheel has a gap.
  • Pull-up support is hardware dependent and present on only some pins. Where a pin has none, condition the signal externally.

Add it in the app

  1. Add a new input and choose Frequency Input as the type.
  2. Select the pin and give it a clear name (e.g. Crank Speed).
  3. Choose the mode.
  4. For Frequency mode, set the tooth count and missing tooth count.
  5. Set the detection thresholds, in volts — see below.
  6. Confirm the reading against a known reference before anything depends on it.

Settings reference

Setting Meaning Unit Range / values Notes
Mode What the input reports Frequency, Duty, Time Determines which of the settings below apply.
Tooth count Pulses per revolution teeth uint32 Frequency mode only. Duty and Time ignore it.
Missing tooth count Gap size on the wheel teeth uint32 Frequency mode only. 2 for a 60-2 wheel, 0 for an even wheel.
Signal mode How pulse edges are interpreted Legacy, Positive pulse, Negative pulse, Quadrature, … Inert. Overridden with Legacy — see above.
Median filter length Median filter window samples int Frequency mode only, and only when greater than zero. Clamped to a maximum of 10.
Pull mode Direction of the pin pull Up, Down Sets the idle level for the detection comparator.
Enable pull-ups Which pin pull-ups to switch on list A list of pull-up outputs, not a single on/off — a pin may have more than one. Hardware dependent.
Pull-up voltage Adjustable pull-up rail V uint32 Zero is treated as full scale. Adjustable-pull-up hardware only.
Reference voltage / Hi / Lo Detection comparator thresholds V uint32 Hi and Lo give the comparator its hysteresis — see below.
Fault voltage Hi / Lo Fault thresholds on the pin's DC level V uint32 Raise 0x0111 / 0x0112. These watch the voltage, not the frequency.
Input config Whether to configure the pin hardware Configure, Skip configuration Skip configuration leaves the pin as it is. Advanced.
Decode SENT Decode a SENT-protocol sensor on / off Duty mode only. Ignored in every other mode.

The threshold fields

Reference and fault voltages are entered in volts, like the analog input's thresholds. Internally the device works in a 0–1024 scale across the channel's 0–5 V range, and the app converts for you — you never enter or read a raw count.

Reference Hi and Lo are the hysteresis, and the gap between them is what stops a noisy edge being counted twice. A gap that is too small counts noise; too large and the comparator misses real edges as they get faster with speed.

The fault thresholds watch the DC level on the pin, not the signal frequency. A sensor that has gone open circuit or shorted shows up as a voltage outside the window, which is why these are separate from anything to do with speed. See 0x0111 and 0x0112 on Fault codes.

Common settings

Frequency Input also uses the shared Name and Pin settings. See Common IO settings.

Example — crank speed from a 60-2 wheel

  1. Type Frequency Input, name Crank Speed, on the sensor's pin.
  2. Mode Frequency, Tooth count 60, Missing tooth count 2.
  3. Pull mode to match the sensor; enable the pin's pull-up if it has one and the sensor needs it.
  4. Set Reference Hi and Reference Lo with a clear gap between them — the hysteresis is what keeps a noisy edge from being counted twice.
  5. Median filter length 3 to suppress spikes without adding much lag. Anything above 10 is clamped to 10.
  6. Compare the reading against a known engine speed before trusting it.

Troubleshooting

  • Reads nothing: the thresholds do not straddle the signal. Measure the actual high and low levels on the pin and set Reference Hi and Lo inside them, with a clear gap.
  • Drops out as speed rises: the comparator is missing edges. Widen the gap between Reference Hi and Lo, and check the sensor's amplitude at speed — a VR sensor's output grows with speed but its edges get faster.
  • Speed is wrong by a constant factor: tooth count, or missing tooth count on a wheel that has a gap.
  • Direction is not detected: quadrature is not currently available — the signal mode is overridden. See the warning above.
  • Median filter seems to do nothing: it applies only in Frequency mode, and only when set above zero.
  • Fault 0x0111 or 0x0112: the DC level on the pin is outside the fault window. Check the sensor supply, the pull-up setting, and the wiring — this is a voltage fault, not a speed one.