Тёмный

Arduino Brushless DC Motor (BLDC) FOC Control Part 2 - Closed Loop Control Servomotor 

Random Access Projects
Подписаться 3,4 тыс.
Просмотров 25 тыс.
50% 1

Hello! This is Part 2.
In this video I show you how to run a brushless (BLDC) motor with an Arduino in closed loop.
The motor is driven with vector control or some basic type of field oriented control (FOC) and a Proportional control. We go into details for Syncing the motor, Modulating Torque, Limiting Torque, etc.
Here are some useful links:
-Link to Part 1: • Brushless Motor Contro...
-Link to Part 2: this video
-Link to Part 3: • Arduino Brushless DC M...
-Link to Part 4: • Arduino Brushless DC M...
-Link to Part 5: • Arduino Brushless DC M...
-For an introduction to Electric Motors: • Types Of Electric Moto...
-For the L6234D brushless motor driver I used: www.st.com/res...
Instructions to make your own Brushless Motor Power stage controller available for my patrons:
/ randomaccessprojects
Code libraries available for my patrons:
/ randomaccessprojects
Thank you for your support, stay tuned for the next video, coming soon!

Опубликовано:

 

16 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 79   
@superdogmeatmeat
@superdogmeatmeat 3 года назад
Man, this is the tutorial I needed years ago. Finally someone explaining ALL the magic behind BLDC servo control in a clear manner.
@alexanderlumsden4937
@alexanderlumsden4937 4 года назад
Still remember your first robot in Melbourne Oz 1999 - the prophecy of the one who will bring balance to the force, The passion grows and the love is strong with this one. Keep sharing!
@juanpablocanguro
@juanpablocanguro 4 года назад
Alexander Lumsden hahaha thanks Alex, those sure were very fun times, I remember enjoying hanging out with you, hope you are very well and we can hang out again soon :)
@jonathanr4242
@jonathanr4242 Год назад
Best bldc controller series ever.
@Bigman74066
@Bigman74066 4 года назад
You are doing a very good job explaining this stuff. Well done! I would love to see more videos like this.
@juanpablocanguro
@juanpablocanguro 4 года назад
Bigman74066 thank you! Theres a few more videos in the channel, checked them out, hope you like them too!
@reptiloidx8942
@reptiloidx8942 3 года назад
@@juanpablocanguro HEY MATE CAN YOU PLEASE TELL ME IF THERE IS A BLDC CIRCUIT FOR SKATEBOARD MOTORS LIKE FORWARD SOFT START AND REVERSE SOFT START AND SOFT BRAKING ??? BIG THANK YOU
@thanasisathanasi4965
@thanasisathanasi4965 4 года назад
This deserves a like. Best video ever !
@joseangulo9648
@joseangulo9648 3 года назад
Congratulations! Loved the video. And loved the old videocam! Keep up the good work.
@Enigma758
@Enigma758 4 месяца назад
I like your live steam engine collection!
@daichitamai5825
@daichitamai5825 3 года назад
Hi! Did you purchase the servo motor with the hall effect from somewhere? Or did you attach the hall effect onto the motor yourself?
@juanpablocanguro
@juanpablocanguro 3 года назад
You can do both! eBay can help ;)
@daichitamai5825
@daichitamai5825 3 года назад
@@juanpablocanguro Great thank you! Do you happen to have a link from where you bought it?
@juanpablocanguro
@juanpablocanguro 3 года назад
@@daichitamai5825 its similar to this one: www.ebay.com/itm/PM3505-Brushless-Cloud-Table-Motor-Microstrip-Single-band-AS5048A-Encoder-Motor/312718764443?_trkparms=ispr%3D1&hash=item48cf7da99b:g:ImAAAOSwcFhfUenq&amdata=enc%3AAQAFAAACgBaobrjLl8XobRIiIML1V4Imu%252Fn%252BzU5L90Z278x5ickkRjLZq23gAR%252BKma9gM2Z1htqvcotPQ7oFpu6nlMx%252FmrQppD%252FSA79MLnrDp6o7i7bJ4AB21wCvjrSLijM6beYVFnqTZn5XAFI8YDfa4HlZOBc2nbaHaXjDh9%252BXfHv7AhnephzW646Ys2uzD%252BGWN7QNxOC9fGGwA7vIeJt2Ob%252BluDxcsHo9kv6flufE%252By9wRUIoOtM8RGx6499uqEOyMZ7bCAj5mPRFH8af2wpx3l%252BljTvtq0PjBknDxOdIBZFrNm59Sj9vxXOBLfCuP99gG2zJgo5bqvWy1ftYX6sohONfAwl9b3kZH2AG9PJAGN%252BDKHoy8XRBT%252BPOJmbm7CI94DOPaSluozgcMbIej6o7uAM%252F7x8YhTN%252FqCx6OIfSLzw%252B264CCuZaCuO%252Bh0ydtP1eFc1O7rQ%252FKR9lbJV9qyg3WoSVvYOcvj%252FrMToK%252BdcM6V2TJIByybr4zZFhJ6co1G1ge2WkbLpcP34T%252FEZPDpdN%252FtPo9QKtJeEXWY1DkmzuhIx%252FPGQMSgC63DCXTSxUj7zqyX7p7HEXoqwBiGNPJ4ySmrhmyP3qDLai4UHAMeux13zHbZ60S3xZj7U0hjzL63RuAiS5mX5Yhci6KPehmcy%252Fb0u%252BOxLjse2sYlwyPm7BJrByxM0cpNkwPa%252BFzrb8NqKXMBbmB1VQV%252FFvn6nPZccWnRp19ORwXOmwQoPkR6K7NkoBp%252F8eBPO5Gi0q0vxueSRfP0ka6YD0fVvBE9LC419cRLiRXn1qUZDHCNbNZc2MpYZP%252BqKsp3J2x8Z4O0fu5I04Gg0SLI53RBF1SXsJOwX%252BMNEshYk%253D%7Ccksum%3A312718764443e330ee931b1b4377ae59b7d93eef00b1%7Campid%3APL_CLK%7Cclp%3A2334524
@PhG1961
@PhG1961 4 года назад
Excellent !! Great video !!
@benjaminwalker5949
@benjaminwalker5949 3 года назад
I'd be super grateful if you could tell me where you got the driver or an alternative single driver. Thanks again, this series really helped me understand this setup really clearly.
@juanpablocanguro
@juanpablocanguro 3 года назад
Hi Benjamin, the driver can be purchased through the link on the description:)
@benjaminwalker5949
@benjaminwalker5949 3 года назад
@@juanpablocanguro Thanks! Apologies if I'm missing something but that link is for the pdf of the chip. I was wondering if I could find somewhere that sells the chip on a board already. Thanks again
@juanpablocanguro
@juanpablocanguro 3 года назад
@@benjaminwalker5949 try this link: www.ebay.com/itm/Arduino-Pro-based-Brushless-motor-controller-driver-board-FOC-BLDC-servo-/124316900944?pageci=c8af1610-e306-4507-9ce8-eada0014e765
@benjaminwalker5949
@benjaminwalker5949 3 года назад
@@juanpablocanguro thanks!
@TheEduardoafd
@TheEduardoafd 3 года назад
Congratulations on your tutorial, it cleared my mind! Could you help me with the encoders? WHat are the most commonly uused boards for such magnetic encoders? And what other types/circuits could be used?
@juanpablocanguro
@juanpablocanguro 3 года назад
There is a board for sale in the description and the encoders/motors can also be found around :) ebay search: brushless gimbal motor or bldc motor
@hassanportal5865
@hassanportal5865 3 года назад
Best tutorial on RU-vid for FOC! Can I ask where you got the L6234 breakout board from as online I only see people selling the individual chips? Thanks
@juanpablocanguro
@juanpablocanguro 3 года назад
Thank you sir!!!! You can get the board integrated with better drivers from the link in the description! Good day!!!
@hassanportal5865
@hassanportal5865 3 года назад
@@juanpablocanguro thanks for the reply but the board in the description is the pcb you manufactured. I was wondering about the black pcb that has just 1 L6234 chip which I would need for basic prototyping. I am thinking of using the L6234 to build a 4 actuator controller which uses I2C protocol rather than PWM but works similar to yours. Other boards which can do this are too expensive or too big and bulky. I like your design as it is compact however I would prefer to make my own :) Thanks
@juanpablocanguro
@juanpablocanguro 3 года назад
@@hassanportal5865 I understand now :) but unfortunately I got that board off ebay, made by a french company but they dont sell it anymore, it was around 29Euros, and only controls 1 bldc motor. The max you can control from one arduino UNO or Pro is 2 motors as they both only have 6 ports capable of pwm. The link is for a board that uses an Arduino pro and has power stages for 2 motors. Watch my “drive by wire” videos ;) good day!
@hassanportal5865
@hassanportal5865 3 года назад
@@juanpablocanguro I see, thanks for the quick reply. I think my best choice if to buy the DIP version of the L6234. Regarding the microcontroller, I think I will go for an ESP32 as it has 16 PWM pins so can drive up to 5 motors. Thanks again !
@alexiahernandez3271
@alexiahernandez3271 4 года назад
Thank you !! Nice
@pedropauloparaizomatos2705
@pedropauloparaizomatos2705 2 года назад
É o melhor !
@Ting3624
@Ting3624 4 года назад
nice video!
@Bigman74066
@Bigman74066 4 года назад
Maybe you can add the links for buying the encoders and the motors
@juanpablocanguro
@juanpablocanguro 4 года назад
Bigman74066 a quick eBay search for “brushless motor AS5048” will get you on the right track :)
@thanasisathanasi4965
@thanasisathanasi4965 4 года назад
You asked, you got an answer and NO THANK YOU ! Wooowww.
@Bigman74066
@Bigman74066 4 года назад
Eh, thank you?
@Bigman74066
@Bigman74066 4 года назад
I found some on Ali as well...
@juanpablocanguro
@juanpablocanguro 4 года назад
Bigman74066 you are very welcome ;)
@shivitkumar4642
@shivitkumar4642 4 года назад
Thanks for this amazing video Pablo. I have a few doubts; if I attach a gearbox with the motor and suppose I need the motor to rotate 870 degrees (2 rev and 150 deg) and hold that position, will it be possible ?
@juanpablocanguro
@juanpablocanguro 4 года назад
Shivit Kumar absolutely... use the code from the ball and beam video as I believe that one allows for more than 360’degrees, if not, i will make a video of that soon ;)
@larsandersen5505
@larsandersen5505 4 года назад
Super video!
@juanpablocanguro
@juanpablocanguro 4 года назад
Lars Andersen thanks man!
@juanpablocanguro
@juanpablocanguro 4 года назад
Lars Andersen got two more videos coming up soon
@reptiloidx8942
@reptiloidx8942 3 года назад
HEY MATE CAN YOU PLEASE TELL ME IF THERE IS A BLDC CIRCUIT FOR SKATEBOARD MOTORS LIKE FORWARD SOFT START AND REVERSE SOFT START AND SOFT BRAKING ??? BIG THANK YOU
@juanpablocanguro
@juanpablocanguro 3 года назад
Well ive used Vedder ESC or VESC, its pretty cool, powerful and reliable, good luck!
@reptiloidx8942
@reptiloidx8942 3 года назад
@@juanpablocanguro WELL IM MAKING WIRED CONTROLLER SOS I NEED A TOTALLY DIFFERENT CIRCUIT .... HELP PLEASE .....
@juanpablocanguro
@juanpablocanguro 3 года назад
You can try our board (link in description) and learn to program it yourself ;)
@clickle23
@clickle23 3 года назад
Hi Pablo, does the AS5048 encoder only record 0 ~360 degrees (as opposed to the some digital Incremental encoder (Omron for example) for examples gives you 200 pulses per revolution and will keep adding up after being rotated more than one full revolution) in the form of analogue voltage? I am asking this because if the set mechanical rotational angle is 720 degrees or two revolutions, how does the sensor-AS5048 output not mix it up other degrees say 360 or 1080 degrees, etc. As they will all give the same sensor Voltage output? Thank you!
@juanpablocanguro
@juanpablocanguro 3 года назад
You can keep track of the 359 to zero (and viceversa) transitions and thus, get more than one rotation. Watch my othe videos, specially the Drive by Wire and the one about Haptic feedback and you will see this implementation. Thanks for the support!
@Telectronics
@Telectronics 2 года назад
Hi your demos are great and understandable. Just a question though. How would you implement speed and torque in closed loop together. Just an example you have a cnc spindle that you want to spin at certain RPM but when you cut something you don´t want to worry about the motors current jumping into sky. With a torque limit the current should stay at some pre defined level right?
@mertcapkin7263
@mertcapkin7263 3 года назад
could you please share links for all the different PCB's you show in the video?
@thanasisathanasi4965
@thanasisathanasi4965 4 года назад
Hi again. Can I ask you where you found that L6234D board?
@juanpablocanguro
@juanpablocanguro 4 года назад
Thanasis Athanasi hi again! Looks like you have been busy! I recommend you buy this one instead, has the latest generation MOSFETs: www.ebay.com/itm/124127740844 the L6234 appears to be scarce and haven’t found where to get it.
@juanpablocanguro
@juanpablocanguro 4 года назад
Thanasis Athanasi yes, that one works!
@thanasisathanasi4965
@thanasisathanasi4965 4 года назад
@@juanpablocanguro Ok friend. Your replies are simple, but greatly helped me. I know I will have to really strangle with the board as I want to write my own programs on its ATMEGA328P. Life will be a bit hard but rewarding...Take care....
@juanpablocanguro
@juanpablocanguro 4 года назад
Thanasis Athanasi yout too take care!!!
@thanasisathanasi4965
@thanasisathanasi4965 4 года назад
Hello again. Thanks for your suggestion on AS5048. Looking to buy these with the magnets so I attach them to motor. 14bit is not too bad. 2^14 is 16384 steps per round which can be pretty smooth for cameras. I really experiment hard on this staff. I plan to experiment on putting 2 cheap brushless in parallel and control a full camcorder with smooth movemnts. My problem are the magnets. Hard to find. Even the knob you presented with the holder and the magnet is not that easy to find. I am looking on ebay and aliexpress.
@juanpablocanguro
@juanpablocanguro 4 года назад
Thanasis Athanasi the ones I bought were from ebay, and included the magnet, even though the description didn’t mention it... maybe try that? They are around 10 usd ea.
@thanasisathanasi4965
@thanasisathanasi4965 4 года назад
@@juanpablocanguro Thanks. They probably include the magnets you are right ! I will take a closer look.
@thanasisathanasi4965
@thanasisathanasi4965 4 года назад
@@juanpablocanguro Hello I order many of them from ebay together with 2 dozens of the cheapest Gimbal motors I would find. I will experiment with them. If the magnet does not come with the package I will try to fix 2 regular magnets in series like this: Let each magnet = O.... I will mount them in the plastic like: OO
@Thomas-ij7ki
@Thomas-ij7ki 2 года назад
Hi, the ebay link in the description doesn't work. Any update?
@yardov
@yardov 4 года назад
Felicidades! Los motores de Lego no son brushless hehe. Congratulations good video
@juanpablocanguro
@juanpablocanguro 4 года назад
Gerardo Orozco muy buena observación ¯\_(ツ)_/¯
@abetusk
@abetusk 4 года назад
Do you buy the motors with the 'backpacks' already installed? If so, can you provide a link? And how do you install a magnet onto the motor? Do you superglue it on? Are there other attachments that you can buy to secure the magnet onto the motor shaft?
@juanpablocanguro
@juanpablocanguro 4 года назад
abetusk theres some other videos in the channel so you can see other variations of the AS5048 sensor, but to answer your question: I did buy these motors with the “backpack” but you can also buy it separately, a quick search on eBay for AS5048 sensor should give you an idea. Some of these sensors come with the special radial magnet which you can fix to the shaft using epoxy, super glue or even double sided tape ;) regards!
@thanasisathanasi4965
@thanasisathanasi4965 4 года назад
@@juanpablocanguro Thank you my friend for your wonderful videos. From what I see, the chip is broadly available in quantities in case you want to make a commercial product. You can design your own pcb and solder them on it ! I speak about commercial projects. Last resort are those electronic parts stores such as digikey.com, mouser.com, etc. But i find searching through these stores pain in the ass!
@ashkananali8571
@ashkananali8571 6 месяцев назад
Thank you very much.Possible code
@vatsalkhalasi2915
@vatsalkhalasi2915 3 года назад
Hey sir i am an engineering student can you please tell me the cost of the project? Btw awesome project 😀
@juanpablocanguro
@juanpablocanguro 3 года назад
Check out the rest of the videos and the links, you would need the board and a motor, can be with or without feedback sensor, you’ll probably spend between 50 and 80 USD.
@epiicSpooky
@epiicSpooky 3 года назад
wow. I have a BASIC Stamp w/ DB9 serial port somewhere - it was also my first microcontroller. I'm surprised to see one still in use.
@vorapurvesh3678
@vorapurvesh3678 3 года назад
Sir.. Please provide a circuit diagram for Closed loop control of BLDC motor 🙏
@juanpablocanguro
@juanpablocanguro 3 года назад
I believe in my “ball and beam “ video there is a diagram, please check that one :)
@thanasisathanasi4965
@thanasisathanasi4965 4 года назад
Want to ask the sensor's resolution. Looking for 16bit !
@juanpablocanguro
@juanpablocanguro 4 года назад
Thanasis Athanasi the AS5048 has 14-bit resolution ;)
@thanasisathanasi4965
@thanasisathanasi4965 4 года назад
@@juanpablocanguro Thanks brother. I think this is the best I can find ! I am researching on this whole thing right now. I have found some brushless motors from ebay for €2 each but they don't have the AS5048. I will try and modify them !
@juanpablocanguro
@juanpablocanguro 4 года назад
Thanasis Athanasi did you watch all videos on my channel? Theres some as5048 in different boards that I showed. You can buy some off ebay
@mbunds
@mbunds 2 года назад
I was trying to find the boring parts...guess I'll have to watch a fourth time...
@vatsalkhalasi2915
@vatsalkhalasi2915 3 года назад
Can you please provide circuit diagram .It will be more helpfull!
@nou5440
@nou5440 2 года назад
W
Далее
УГОСТИЛ БЕЛКУ МОРОЖЕНЫМ#cat #cats
00:14
Brushless DC Speed Controller
15:11
Просмотров 365 тыс.
FOC Driver Controller PCB - Slow Brushless Control
14:19
Electromagnetic Aircraft Launcher
15:09
Просмотров 1,4 млн
How to rewind a BLDC Motor (as a Generator)
11:00
Просмотров 333 тыс.
I Built The First LAMINAR FLOW ROCKET ENGINE
15:51
FOC Driver + Feedback Magnetic Sensor - Arduino
14:34
Why the brushless controllers are awesome for robotics
20:25
УГОСТИЛ БЕЛКУ МОРОЖЕНЫМ#cat #cats
00:14