This is my project for my nephew.
Now we are looking forward for the hoverboard motor support:)
I have built in the AS5311 encoder into the wheels using “heat resistant” 3D printed nylon.
I tried first to use the cables already available for the hall sensor, but experienced a bit of noise when I tried to run the motor. I then swapped them for a 4 wire cable with screen, and got much better result.
And here is a video of the tractor I’m making.
The throttle is connected to a DC vibration motor though a Teensy 3.2. The motor also has magnets attached to simulate compression in the motor.
An AS5048 magnetic encoder is connected to the motor and is generating a sinus as the motor is rotating. The sinus is then used to make the engine sound. Vibration and sound will always be in sync.
Do you know the make/model of the shielded cable you ended up using? There are so many types out there it is difficult to know which will work with the type of interference seen in this applications. Also, nice solution for mounting the encoder.
I think any thin screened cable will do. But the one I use and recommend is a TPU jacket cable, which makes it very flexible and durable.
I use this: https://www.digikey.com/product-detail/en/tensility-international-corp/30-00490/T1318-5-ND/5819489
This is one is 32 AWG and very thin, they also have 28, 26, 24 etc.
Remember to only connect the shield to GND at the odrive end, and leave it unconnected at the sensor/motor.
I still need to take apart one of my hoverboard motors. I can’t quite see where you encoder magnet ring is in this configuration? This looks like a real nice way to mount this up though.
And it also looks like you have a radial ring installed, while the readhead is an axial sensor. Or perhaps AMS just magnetizes differently than Renishaw/RLS.
AMS calls the ring AS5000-MR10-128.
Any ring with pole pairs of the right size placed 0.3mm from the top of the chip will work. Magnets are magnets. Check the encoder specifications…
I am going through a similar setup and found increasing the motor.config.resistance_calib_max_voltage to 10.0 made the calibration work properly with my motor (hoverboard wheel).