(urgent) AS5048A daisy chain

Hello, does anyone know how would i implement two AS5048A sensor using daisy chain? here is the schematic:

Do you have a pin that you are not using (doesn’t have to be connected)?

If so, then I was thinking that perhaps you could have a second sensor instance that uses this ‘ghost pin’.
You then ensure that real sensor and ghost sensor are called alternatively.
This will have the effect of requesting with ss high and low alternatively.

Might need to look at magneticspi cpp too. I have a feeling it (wastefully) calls write16 twice once with command and once with 0x00. I suspect this will mess daisy chaining up.

Hi Skarrob,

The standard SimpleFOC code will not support it. It will require its own sensor class, at the very least. Ideally it should have a hardware-spi (interrupt-based) implementation, so the sensors can be read asynchronously to the FOC and move() loops. Otherwise David’s suggestion sounds pretty good.

It’s something I am actually working on also, but I have to finish up other things (SAMD support) first, or nothing will ever get completed!

But yes, the daisy chain configuration is pretty attractive. If I read the specs correctly, it should be possible to get angles for all the sensors at the rate of about 10KHz, with no lost time for transactions and switching CS lines, all on one SPI port.

Unless you want to develop the driver code I would hook them up with separate CS lines. Then it should work out of the box.

Sorry to wake up this corpse, but is daisy chaining possible now?
I want to drive three BLDCs from one ESP32 and I’m afraid to get out of pins if I add SPI sensors to it.
It’s just an idea with low prio. The whole project would have 18 BLDCs on 6 ESP32 and one master-commander.
(I hate the noise of the servos. Imagine a silent spider crawling around…)
https://eu.robotshop.com/cdn/shop/products/lynxmotion-phoenix-3dof-hexapod-robot-kit-no-electronics_1b3f6109-b8e0-4f70-a90b-441ede578b52_600x.png?v=1681781988

Hey,

No I didn’t really work on the software for this, although I did make some adapter pcbs to link my sensor in a daisy chain…
I might pick it up at some point, but it’s not a clear win to me, as you can also connect the sensors to the same SPI bus, using separate nCS lines. That’s already possible with the software, and presumably will be what most people want…