first time using simplefoc. Trying to use 3pwm mode for bldc motor a cubmars gl40 on a simplefoc shield v2 with a teensy 4.1 as driver.
Problem is when I use the motor in open loop control, it locks up/ will not move and heats up very quickly. When calibrating closed loop control with simpleFOC init it fails the FOCinit() sensor alignment step. It moves a few degrees when using a high sensor_align_voltage (14V) but i get feedback saying that no movement was detected. The encoder reads well on its own, but while using motor.monitor() the shaft angle is always 0.00. Anyone have an idea what is going on?
I have been using code from the getting started guide on the simplefoc website (with proper adjustments) and have a picture of my setup if it is any help. Thanks!
I’ll leave the diagnostic to the experts, but I strongly recommend two things:
Instead of starting right away with a lipo battery, use a bench power supply. I promise it will make your understanding of events much clearer, while improving safety and reducing likelihood of electronics/motor damage.
Just a minor nit, but it is best to remove the packaging foam off the shield completely. It is meant for storage and transport, not during operation. You will of course have to solve the problem of how to house the shield so the pins are not exposed.
Thanks for the tips. I will try the power supply. And yeah, kept the shield in the foam because it wont fit into a breadboard or anything. Will take it out.
If the motor locks up in the open loop it will most probably not work in the closed loop
Looking up in the open loop cam suggest that one of the motor phases does not receive pwm signal. Maybe one of the cables is not well connected, either from the shield to the motor or from the teensy to the shield.
What is the shield configuration that you’re using (the soldering connectors underneath the board), does it correspond to the pins you connected?
Ah! I just checked the shield configuration and I was using the wrong pins. Thanks so much!
Hi Heyo I have exactly the same FOC shield. Managed to spin the motor in open loop using arduino uno but having issues with Teensy 4.1. Can you tell me how you solved the problem with PWM pins as I have the same issue? What pins are you usinon the teensy 4.1 and what pins are you using on the shield? Thanks for your patience
Thanks for the tips. I will try the power supply. And yeah, kept the shield in the foam because it wont fit into a breadboard or anything. Will take it out.
– heyo