Logout
Sine Cosine Encoder
Introduction
Support for Single-ended Sine/Cosine encoder Motor position sensor type added in 6.024. The feature may work satisfactorily with a differential Sine/Cosine encoder with Cos- and Sin- tied to signal ground.
Encoder sensor motor sensor setup
- NOTE: This feature is not capable of running at switching frequencies higher than 12kHz. It is recommended to change the controller switching frequency to 10kHz, save, and power cycle the controller prior to performing this process. Switching frequencies below 13kHz will cause you to lose BT connectivity. Perform this action over TTL or CAN.
- Enter Parameter access code: 15350 (or for newer dictionaries, enter Parameter access code 1: 3BF6, which is 15350 in HEX) to get user access level 1 to be able to change the Switching frequency. Note that you can potentially brick the controller if switching is set too high, and must be returned to ASI to unlock. After you configure your encoder, you can change the Switching frequency back to 13kHz and Baud rate port2 back to 115200 to recover BT if applicable.
- Ensure that the Encoder Cos V Source (parameter 1961) and Encoder Sin V Source (parameter 1960) are configured to match the two analog sinusoidal controller inputs of the encoder (autotune will detect and correct if they are swapped, but both sources must be mapped to these parameters).
- Allowed sources are all analog inputs as long as they are pulled down. E.g. Throttle, ABMS, Brake 1 with Features2 bit 6 disabled or Brake 2 with Features2 bit 7 disabled.
- Features2 bit 6 disabled or Brake 2 with Features2 bit 7 disabled only works on TTL-CAN and CAN-BT controllers.
- Allowed sources are all analog inputs as long as they are pulled down. E.g. Throttle, ABMS, Brake 1 with Features2 bit 6 disabled or Brake 2 with Features2 bit 7 disabled.
- Ensure that the motor parameters are configured to values close enough to actual values for controller to run in sensorless mode (same as performing hall discovery).
- Perform any required preparations to allow the motor and output to spin freely and safely (e.g. ensuring the vehicle is lifted in the air securely, any brake solenoid is disengaged, any remote command source is not sending conflicting commands, etc…). We cannot ensure safety for you.
- Set the Motor discover mode parameter to ‘5’ for “Encoder”.
- Wait for the motor to stop spinning (should be around 30 or 40 seconds, depending on whether the sin/cos sources were swapped).
- Read the encoder angle parameters and confirm that the autotune was successful. A successful autotune will have an autotune offset error (parameter 357) of less than 3 degrees and update the following parameters:
- Encoder Sine/Cos High/Low Voltage (parameters 1956-1959)
- Encoder offset (parameter 1962)
- # of motor pole pairs & Encoder Sine/Cos V Source (parameters 78, 1960/1961) – These values will only be updated if the encoder autotune detects a different value than previously entered.
- Save the autotuned parameters to flash and power cycle.
- Note: If the switching frequency was lowered to perform this process, raising the switching frequency again might require power cycling to reset the calculated “runtime max switching frequency” parameter.
Low-speed noise threshold
Low-speed noise threshold for encoder inputs to allow reducing encoder angle fluctuations due to analog input noise below a configurable motor speed.
- Setup:
- Configure the Encoder Noise Frequency Threshold (parameter 1989) to the desired electrical frequency below which the Encoder analog noise threshold (parameter 1867) will be utilized/active.
- To convert an rpm value into electrical Hz, divide by 60 and multiply by the number of pole pairs.
- e.g. For a threshold of 50RPM, with 6 electrical pole pairs, the Encoder Noise Frequency would be 5Hz (50 divided by 60, then multiplied by 6).
- Configure the Encoder analog noise threshold (parameter 1867) to a value in volts that will an encoder input value to change by, before updating.
- Configure the Encoder Noise Frequency Threshold (parameter 1989) to the desired electrical frequency below which the Encoder analog noise threshold (parameter 1867) will be utilized/active.
- Behaviour:
- Above the Encoder Noise Frequency Threshold, the encoder angle will update every PWM loop, regardless of how much or little the encoder analog inputs have changed.
- Below the Encoder Noise Frequency Threshold, the encoder angle will only update when either of the analog input voltages has changed by at least the voltage defined by the Encoder analog noise threshold since the last encoder angle update.
Fault range
Exposed fault range parameters, added in 6.025. Fault ranges are the range above and below Encoder Sine/Cos High/Low Voltage that will trigger a fault. Measured values within this range are considered as the min/max voltage for that input and exist to allow tolerance for system-level measurement errors.
- Encoder Sin Fault Range (Address 1803)
- Encoder Cos Fault Range (Address 1815)