AS5311 Encoder integration

Hi @benedictdied ,
We were wondering how’s the current state of the enconders integration to the latest cube design. Is there a new PCB that includes the pins for the enconders, or how were they tested? We just received the parts and would like to have an idea on how to test them ourselves.

Please let us know if there’s some documentation I missed. I only found the UC2-REST/ESP32/AS5311 at master · openUC2/UC2-REST · GitHub folder, but no documentation around it.

Best regards!

Matías Stingl,
LABMaiTE GmbH.

1 Like

Hey @mstingl, thanks for reaching out. We were experimenting with possible interface of the AS5311 a lot. The code you are referring to is outdated and was mostly there for testing different interrupts on the ESP32. The UC2-ESP firmware has its own encoder module. The UC2 AS5311 board interfaces directly with the UC2 v3 board using the encoder connectors.
I have started putting up some documentation here: AS 5311 linear encoder for real-time feedback loop | openUC2 Documentation

Let me know if this resolves the situation. Right now, it’s mostly experimental but should work reliably more-less. I have not yet included it in the python interface - but this is a matter of 5 lines of code.

Thanks @benedictdied !!
Some small feedback and questions on the documentation:

  • […] We use the encoder ports on the ESP32 v3 board to ensure the usage of interrupts to count the position changes in time.Maybe show a diagram or picture of these encoder ports
  • I’ve seen some calibration pins in the UC2 v3 board. There’s no practical information on how to actually connect and calibrate the system. We would need to know if there are some pins from the AS5311 that we don’t need to wire to the UC2v3 board. I wasn’t able to find the encoder pinout in PinConfig | openUC2 Documentation .
  • Is the encoder code already in the firmware v3? Does the flashing tool have the latest version with the enconders?

Agree! How about this for the interface:

and the schematics

We do have the AS5311 boards that connect to the UC2_v3 board, I just did not have the time to actually test all that.

All the documentation you find on the openuc2.github.io website that describe the encoder is already in the firmware :slight_smile:

So, if we would want to integrate the AS5311 (we have the board in the picture) with this board, we would only need the 4 pins that go into the CAL pins of the v3 board? Am I right? As you mentioned the A/B incremental mode, I assumed this needed the A and B pins of the board we have with us (the one in the following picture).
Please confirm that we only need to solder and connect those 4 pins (GND, 5V, CSn, and CLK) to the v3 board. :slight_smile:

image

Yes. This looks good. Use 3V3 and you’ll be good to go :slight_smile: