Hi folks! I’m a newcomer to Simplefoc and Arduino. There is something wrong with my experiment, which is just to let the motor to rotate at a given speed by PID. Senor is AS5600 .But what I received from COM3 is :
MOT: Failed to notice movement
MOT: Init FOC failed.
So the motor didn’t rotate at all. I use this example, veloctiy_control, from simple foc but I didn’t know what the problem is. Did anyone met this problem before? Is there something wrong with my hardware connecting? I would appreciate if u could help me!
Here is my code:
Could you give some details of your hardware setup, perhaps a wiring diagram or photo so we can see how things are connected? Which driver and which MCU are you using?
Can you try our “open loop” examples? These will let check whether the motor is connected and the PWM is working correctly. They don’t need a sensor to work.
Next, we have an example to test just the sensor - you can adapt it to your pins and make sure the sensor is working just by itself (for example when you turn the motor by hand, it should return ±6.28 = ±2*PI for one full rotation of the motor (+ or - depending on which way you turn).
Once these are working as expected, I think velocity mode will work for you too!
I tried “open loop” examples and found that the motor worked correctly. Then I tried "magnetic sensor i2c " example and found datas ,always the same figure ,didn’t change when I rotated the motor. So I think maybe the unchanged dates from AS5600 led the motor didn’t work .But I can’t find the solution
Some information about my hardware :
BLCD driver board designed by someone I don’t know