FOC Driver Controller PCB - Slow Brushless Control

preview_player
Показать описание

🔥Tutorial on how to make a homemade FOC controller PCB with L6234PD driver for brushless triple phase motors BLDC with closed loop control and AS5048A magnetic encoder.

🔀LINKS
-------------------------------------

🤝SUPPORT
-------------------------------------

00:00 Intro
01:45
04:50
07:08
08:05
10:08
11:18
12:58 Thank you

Like share and subscribe to motivate me. Thank you

#arduino
#FOC
#robotics
Рекомендации по теме
Комментарии
Автор

The way this works (open loop) is the rotor basically snaps so that the permanent field from the magnets aligns with the generated magnetic field and in this state there is zero toque despite a high current. It is not efficient. This is simple though, and pretty stable. As you bump the motor out of alignment it naturally wants to snap back, and if you plot the torque vs angle you get a sinusoidal torque and when allowed to rotate freely it will snap to any of the points that cross zero.

In a real FOC controller, the position is detected and the current in the stator is generated to always be 90 degrees ahead or behind where the rotor is. Since at these points you get the most "bang for your buck" and the most torque for the given current. Assume the controller is working, and always generates a field exactly 90 degrees. When the rotor is where it is supposed to be, the field flux vector stays at 90 degrees but the current is decreased basically to zero so the rotor does not rotate. As the rotor is displaced from where it is supposed to be according to the FOC controller, the magnitude of the flux vector is increased to provide a corrective torque and oppose the offset. A PI controller is what is often used.

Another small nit-pick detail is that you are providing a VOLTAGE to the coils and not a CURRENT. The magnetic field depends on CURRENT not VOLTAGE. This can very approximately be estimated by understanding the relationship between voltage from the FOC controller, the inductance of the coils, the back EMF that works against the supplied voltage when the motor is rotating, etc. I think this problem is also solved by that same PI loop. Essentially it does technically control the voltage to the phases but due to PI loop action it is the current that is being controlled.

You used SPWM. Which is OK, it is the most naive way to do it. The maximum phase-to-phase voltage (this is what matters, not phase to neutral) is limited to I think about 86% of the DC supply voltage. It is fine, but you can do better if you throw out the need for phase-neutral voltage needing to be AC sine wave centered at half the DC supply voltage and optimize by maximizing the phase-phase voltage (which does need to be sinusoidal or trapezoidal... a whole other can of worms)

Finally, the long debate of PMSMs vs BLDCs and the back EMF and how they are supposed to be driven with either trapezoidal SVM or sinusoidal SVM... most motors kinda fall somewhere in between in practice so really it is never going to be a perfect match.

power-max
Автор

Very nice. Great explanation. I watched some videos about it before but i had not understand how this FOC worked. But now i get it. We don't need servo motors for robotics anymore.

marciogomesdossantos
Автор

Nice video, but for sake of accuracy:
The described method in this video is basic sinusoidal commutation. On the other hand FOC includes relatively complex current transformations, rotor flux linkage vector calculation, multiple other complex transformations and is a closed loop control scheme.

diduable
Автор

To make it work in closed loop, you must consider the number of poles of the motor. I used svpwm in a 4-pole bldc motor once and got a behavior similar to yours, where the rotor is locked in specific positions. In my case, I noticed that the motor was always stuck in 4 specific positions, so I soon made the association with the number of poles of the motor. That said, I could observe that a full cycle of the svpwm was equivalent to only a quarter of the full rotation of the rotor. To solve this problem I made this consideration and the motor ran in closed loop.
Consider the number of poles in your motor and do the math, one full rotation of the motor should be equivalent to the number of poles * spwm cycle.

leonk.b.fernandes
Автор

Great work! Could you make a higher current version? It would be super useful, as commercial controllers are quite expensive. This could be used with the SimpleFOC arduino library which is free and easy to use

stefanguiton
Автор

Cool project! If you add encoder support, you could change code to create magnetic field 90 degrees from rotor magnetic field. It will apply magnetic field in Q Axis and creates much better torque and higher efficiency. Currently motor is using only D Axis, D Axis is usually used only for field weakening and it doesn't make torque.

simplecad
Автор

This is the best intro to FOC I have seen.. Thank you..

mvadu
Автор

Thanks for such a clear demystificaion of FOC while I just sit and watch

ziad_jkhan
Автор

You can make a nice analogue clock that shows several time zones with this project. Nice video.

Hackinside
Автор

Hello sir thanks for your information and many times i don't understand how bldc motor in gimbals and robot dogs etc get such presize angle control and speed, but now i able to understand how they work.
I am from india and i am studying electronics and communication engineering in govt polytechnic and I am very much interested in electronics.
Thanks for your information and teaching us in practical way and all the best for your future projects .

sandeepbabbu
Автор

What a phenomenal video! You have explained the full workings of an industrial servo motor. The industrial ones use a quadrature encoder but otherwise are identical

bikefarmtaiwan
Автор

Muy bien explicado, como todos tus vídeos. Me he aguantado 2 anuncios para compensar 👏

papablopapapablo
Автор

Thank you for teaching me something new about stepper motors!

DanChase
Автор

Thanks for code explanation, it's simple and clear as well as the code. Good job!

dmitrytyugin
Автор

thank you very much. I love your videos and I've learned a lot.

mecatronicsforeveryone
Автор

Hi electronoobs, thank you for this wonderful topic. I am curious about the black motor with hollow shaft used in the video. Can you share it's make and other relevant information?
Also, I request you to add a few points for your next video on closed loop control.
1. Use the encoder in all modes, i.e. ABI, SPI and pwm.
2. Using a lookup table for sinewave generation, as the signals are repeating with an phase shift of 120 deg. This would lead to lesser computation load for microcontroller.
3. Use a smart driver like ti's DRV8353 for fault protection for larger version.
4. I have worked with AS5048A, they are somewhat prone to get damaged (I don't know how). Always keep spare.
Wish you all the best for your upcoming videos.

souravghosh
Автор

Great work. So as such the bldc will have a static tork as well. Just like stepper motors.

sidamarali
Автор

Best video that I have seen. I was having lot of trouble understanding how this worked. This video made it clear. So you can do open loop control just by creating three PWM signals 120degrees apart. I had a question. We can do all the clarks/parks transforms to figure out how the pwm have to be modulated but what if we have a look-up-table instead with the rotor positions specifed and the pwm values for those positions so the field is always 90 degrees to the rotor? Is that a viable option?

raysful
Автор

Awesome project! Thanks!
I hope you get the encoder part sorted out.

MartinBgelund
Автор

a great example. Can I change the direction of rotation of the rotor in speed mode?

Bondarev-Y