Skip to main content
Firmware Stable

OPHION: set up the potentiometer range

Applies to​

A motor controller running OPHION (swid contains _OPHION_) with a potentiometer on its analog input, after the motor identification playbook has finished with its power cycle. At the end the user spins the motor with the potentiometer.

Before you start​

  • The rules of the general method and the setup rules of the motor identification playbook ("Before you start") apply: propose each step, run it after the user's yes, check every result.
  • Levels: writes, stop and save -y need Allow writes; run needs Allow dangerous commands (it lets the potentiometer drive the motor).
  • Vehicle or machine secured, the motor free to turn.

Steps​

1. State​

/driver/error and /common/error 0; /driver/motor/Rt not 0 (identified; otherwise the motor identification playbook first). /mode and its meaning: OPHION mode.

2. Potentiometer input​

The potentiometer is read on GPIO0: /io/level_INPUT 8,0 (the default), /common/ioconf0 0 (no pull resistor), /sig_path 1 (inputs, signal flow). Different values: ask whether the input is wired elsewhere. Tell the user what the potentiometer will do: with the default control mode it sets the speed, and zero lets the motor freewheel.

3. Potentiometer range​

Tell the user: we measure the zero and the full position so that OPHION knows the range (how to tune).

  1. stop - the motor stays still while the potentiometer moves.
  2. Potentiometer at 0: read /asc1/in (mV) two or three times; propose it for /asc1/min (a negative reading counts as 0).
  3. Potentiometer at maximum: read /asc1/in; propose it for /asc1/max.
  4. The two must be clearly apart. Equal or nearly equal values mean the potentiometer does not reach the input (wiring, its +5 V supply, /common/gpio0 not changing): never write them, because an invalid input signal disarms OPHION until the next power cycle (safety). A potentiometer wired the other way round is fine (min above max).
  5. Potentiometer back to 0, then run, which releases the stop. OPHION arms once the potentiometer has stayed at zero for a moment: /disarm_reason 0. Ask the user to turn the potentiometer slowly: the motor speeds up with it.
  6. save -y.

Hand back​

The calibration is saved. Optionally the user switches the controller off and on (battery first, USB second) and checks the potentiometer again: it must be at 0 at power-up before the motor responds.

Report​

  1. Device: name, serial number, swid.
  2. /asc1/min and /asc1/max; what was saved.
  3. The user's confirmation that the motor follows the potentiometer.

Escalate​

The potentiometer does not drive the motor after run: check /mode, /disarm_reason and the error words with the general method, then the motor driver playbook.