S1 with 2x AMS SPI encoders?

I’ve been unsuccessful trying to get 2x AMS 5047 SPI encoders working with the S1. I’ve been powering both off of the S1’s 5V pin. Either encoder works in isolation using G12 as the CSn pin. I’ve been unsuccessful using another pin for the CSn pin on the second encoder. Has anyone succuesfully used 2x external AMS encoders with the S1? If so, would you please share your configuration.

Hi!

Thanks for sharing this, I can look into it. However, I don’t believe that dual SPI on the ODrive S1 is currently possible – I assume you’re using one for commutation and one for load pos/vel sensing? Would it be possible to use the S1’s onboard encoder as well as 1x external SPI encoder? Alternatively, if you don’t need absolute position sensing on the load, you could consider using the load encoder in quadrature mode.

Solomon - Thanks for the response, sorry for my delay getting back to you.

Correct, hoping to use one for commutation, one for load position sensing/control. Our mechanics do not allow mounting the S1 such that its onboard encoder can be used.

Per the documentation, you can set the GPIO used for the SPI chip select. Is G12 the only valid GPIO for chip select? The behavior I’ve been getting is indicative of a SPI bus collision, so it seems like either the FW does not actually support a different CS line, or I’ve misconfigured the second GPIO for use as CS.

We are building in an optical quadrature encoder as a fallback, but our there is a large advantage to having and absolute position measurement in our application.

Thanks!

Hey Doug,

Apologies for the delay in my reply. Unfortunately G12 is the only valid GPIO – on the S1 the SPI is mux’d with RS485, with the switching set by G12.

Would it work to use a combination of an OA1 and a SPI encoder, OA1+AMT21 (note not the -OD version), or dual OA1? We have (very) experimental support for the latter, but it may be the best for your application here.

Solomon - Thank you for the update. We can use an optical quadrature encoder as a fallback. I’ve already verified that I can get that working with the S1.

As a confused user, PLEASE update the documentation to make it clear that 2x SPI encoders are not supported with the S1. The FW reports that you can configure 2x SPI encoders, and you can specify the SPI enable GPIO, and the documentation covers all of this. It is extremely misleading to have those configuration variables, but to not actually support the configuration. That should be clearly stated in the documentation. Ideally, the configurations should be removed from the firmware also.

Thanks,

  • Doug