Skip to content

Vesc BISSC encoder on HWSPI

Vincent Manoukian edited this page Feb 13, 2022 · 2 revisions

Goal of interface

I implemented a new interface encoder : BISSC to be compatible with a lot of industrial encoder. It uses COMM port to wires the encoder.

This encoder uses RS422, so it has be connected to the COMM port for high speed communication. A RS422-transceiver such as the MAX490 is required, where CLK and MISO are used as click and data input lines. To use this encoder, you have to make sure that no app uses UART or ADC1. The ABI resolution field is used to setted the BISSC encoder accuracy : 2^(BissC Resolution)

Hardware

BOM

  • 1 Vesc -> 4.12 or a vesc 4.20 are tested (from flipky) but others hardware would works
  • 1 MAX490 -> Level converter and rs multiplexer

Wiring the VESC, MAX490 and Mige Encoder

VESC MAX490 Mige BissC
5V VCC VCC (red)
GND GND GND (black)
ADC (CLK) TXD
ADC2 (MISO) RSD
A SLO+ (green)
B SLO- (green/black)
Z MA- (blue/black)
Y MA+ (blue)

Software

First setup the vesc to drive the motor

Flash the firmware

You can get my release "BISSC" Desktop and FW. I push my update in vesc official repository, but integration is pending. Take a look here to download it: Vesc BissC dev release

You can upgrade the firmware of the vesc with the vesc tools connected in USB: vesc power supply is mandatory and motor connected on the Vesc.

!!!! NEVER turn on a vesc without a motor wired : you will burn vesc !!!!

Setup vesc

A quick video here to explain how to : https://youtu.be/G4rkW7bhovg This is not a tuto on how to setup a vesc, but in few word:

  1. Wire vesc, motor and encoder: all of them before power on the vesc.
  2. Start vesctools to setup
  3. In general/motor setup you motor in FOC, select the encoder "BISSC" and is resolution (Mige are 22bits)
  4. In FOC/Encoder tab do a calibration and save
  5. In the RT/graph go to position tab, click on encoder and turn the motor shaft, graph must move when you turn, else you have an encoder setup issue

Setup the OpenFFBoard to drive the motor

In the OpenFFBoard Configurator, choose the VESC as driver, the bissC encoder send position without any configuration

When you move the wheel, the bargraph have to move.

If you need, you can center it in the Axis tab: the VescDriver store the center position to keep it. If you want to erase the stored position, you have a button to reset it.