Arduino Nano SPI pins: 10 (SS) Chip Select or any pin, 11 (MOSI), 12 (MISO), 13 (SCK)
Arduino Uno SPI pins: 10 (SS) Chip Select or any pin, 11 (MOSI), 12 (MISO), 13 (SCK)
Check wiring, crossed wires, wrong wires go to the wrong pins.
Check bad / cold connections (pins connected but wire connector is bad).
Check code for separate boards is using the correct pin assignment in the code.
Check target MCU in Arduino IDE/GUI is building for correct target MCU.
Check AS5048A sensor is using correct voltage (3v vs 5v), nano and mega use 5v, but if you select 3v for the sensor, sometimes it works intermittently even though it should not, so you get funny half-assed readings.
Most of the times it’s a combination of some of the aforementioned problems so you got to have extreme patience and trace the problem. Most importantly, the problem is simple so don’t get frustrated and throw the board on the floor and jump on top if it. It doesn’t help. I’ve tried.
Hi, I connected the AS5047P magnetic sensor to an Arduino UNO (SPI). It is no problem. The BLDC can work well.
But I changed to Arduino Mega 2560 (SPI). Why the BLDC cannot work? Please refer to the picture. Thanks.