Hey @Adam_Donovan and @blackblue007 I am not sure what is the best solution in your situation.
So in my opinion I would start with the i2c multiplexer and see how easy/complicated it is. It should work reliably enough in my opinion. I am not really sure how well do they perform from the price standpoint.
But I would certainly recommend SPI is possible, as discussed in previous posts about the I2C sensors.
Regarding the analog output, I have gone through the datasheet and you are right is has a dead-band making it unusable.
The PWM output however is maybe a better solution. From what I was able to see it uses a pretty simple protocol. The thing I am concerned about is reading the PWM signals. The reading is very time sensitive and there we would need to be very careful. Also most of the Arduino built in functions dealing with PWM reading use the blocking functions that would produce a lot of problems in execution. Functions like
pulseIn. Especially with the PWM frequency of <1Khz.
If it would be implemented in the interrupt manner that would maybe work, it would depend on time measurement function, i am not sure that
micros() would be precise enough. I have not spent too much time passing through the datasheet but that is something you can try to see. If we can precisely measure time in between two interrupts then it would probably work.
@Adam_Donovan, regarding the crunchiness of the motor movements, can you tell me what is the your average loop time and which control loop do you use?
If it is longer than 2 ms that would maybe be too much (depends of application).
Have you tried to change filtering values
SimpleFOClibrary is intended to be run in stm32duino not the Roger Clarks version. But the conversion should not be too complicated. On the other hand, in terms of the communication interface support I am not really sure which one is “better”.