A rubber roller is “rolling” on the motor hub. Seems very easy to reproduce, the roller can even be printed using TPU for a good smoothness and adhesion to the wheel.
The question that I have is if simplefoc will cope with multiple rotations of the encoder for a single turn of the motor shaft ?
I mean that if I use a 4096 values magnetic encoder, and as it is an absolute encoder, I will get N zero resets after each turn. Does simplefoc handle this ?
No it currently doesn’t handle this. On the one hand I don’t think the adaptation would be such a problem because SimpleFOC cares about electrical angle primarily for the commutation, and there are many electrical revolutions per full turn.
However I think you gave a different problem. For the electrical revolutions the physical Setup of how a motor works guarantees that there is always an integer number of electrical revolutions per full turn. For your setup, what guarantees this? Even if the rubber wheel size is chosen to be an integer multiple of the shaft circumference, it won’t be that precise, and you‘ll have small amounts of slip, meaning you’d lose the motors electrical zero… over Time the errors will add up and the commutation will become increasingly inefficient and eventually stop working.
There was another thread recently discussing a similar idea, and the consensus there was also that it’s not a good idea to separate the FOC sensor from the motor shaft…
I think it would work if you just multiply the reduction ratio with the 4096, so if you have a reduction of 1 to 6.6 you just multiply 4096 times 6.6.
In this setup I would worry about the rubber wheel slipping. I disassembled the motor and in the housing with the magnets I drilled a hole trough the middle off the housing where the bearing is, now you can mount a magnet to the shaft and attach the encoder to the housing.
What he is talking about on the odrive Forum isn’t about accuracy, it’s about the index pulses, Wich aren’t really that important if you calibrate the wheel on startup.
So the magnet ring changes from north to south 64 times and each change is a index, because the encoder chip doesn’t know where it’s on the ring, it only knows knows the magnet field that’s above it and thus give a for count out I think.
Ok so if it changes North/South 60 times per turn, then the encoder will read 60 times 4096 values… which is what SimpleFoc does not handle (if I am right ?).
I have just started to design a timing belt rig to rotate the magnet for an external encoder.
My idea is to glue a timing belt on the cylinder and use it to make the teeth of the gear.
I will have to be acurate when gluing the belt… I will see if it works ! It should as almost no effort is needed on these gears…Only rotate the magnet !
And as the two gears will have exactly the same number of teeth it must work with simpleFoc !
My integration of this magnetic sensor works but is a little “too big”… So starting from @Franz_Schmidt’s idea I have tried something else reverse the idea to glue the sensor on the bub --> glue it on the shaft
drill the motor shaft so that you get a “pipe” into which can go the motors wires as well as the sensor’s ones (6 wires for AMS sensor)