AS5048A through FOC Shield wiring

Hey there,

I got a Simple FOC Shield v1.3 a couple days ago and just got around playing around with it.
When I hook up an AS5048A directly on an Arduino UNO (SPI, 5v, CS at pin 10) I can run the magnetic_sensor_example util example and get some angles just fine.

When I try to hook it up through the FOC Shield I’m not seeing anything.
I’ve cleaned the original shorts (what’s the black thing that is used for shorting btw? graphite?) and moved the BLDC configuration pins to 5/6/7/9 so they don’t fall onto the SPI interface but no luck.

My construction of the encoder is the same as the test.
MagneticSensor AS5x4x = MagneticSensor(10, 16384, 0x3FFF);

I do apologise if there is something very straightforward that I’m missing.
Thank you very much in advance.

Regards,
George

Hey George!
I’m happy to see that you’ve received your boards!
The black stuff connecting the shorts is the conductive ink. It is very nice for testing and it can be easily removed :smiley:

Regarding the SPI communication problem. I am actually not sure why you don’t have an output.
The pins of the Arduino and the shield are connected directly and there should not be any problems there.

The thing that I did not make clear maybe is that you need to connect magnetic sensor to the same pins on the shield as on the Arduino. You should not use the Encoder header P_ENC.
But otherwise it should work exactly the same as for the Arduino alone.

All the boards have been tested before sending so there should not be errors in hardware (although I test mostly with encoders).

Do you have any SPI communication and you are receiving the angle 0.0 or you receive some nonsense values or the program is blocked completely on sensor.init()

Let me know how it goes!

Hey Antun,

Yeah I’m connecting them to the exact same place.


vs


I’ve also tried the CS on a couple of other unused pins without luck.

I’ll try re-soldering the header pins on the FOC Shield and I’ll try assembling the second one to see if it behaves differently.

~George

I’ve also got AS5048A and have no idea how to connect it.
My setup is SimpleFOC and ESP32.
Specifically, I’ve got https://aliexpress.ru/item/4001293470232.html
It has strange 6pin connector. I didn’t find any pinout diagram for this specific connector. Then I took bare AS5048A wiring diagram, probed the connectors with multimeter and figured out that GND and 5Vin connectors are blue and green (not the red and black as you can think).
I’ve connected these to pins to ESP32 and it can no longer be flashed (seems that I’ve burned ESP32).
Do anyoune have experience connecting this AS5048A to arduino or ESP32?

Hey agt,

Take a look at this thread: iPower Motor and SPI Wiring
I think it might be the same model of AS5048 encoder.

thanks! I asked there

Hi, Did you try Bitbang SPI connection?