Can you please finish this with the encoder working? I had the pcbs made. I soldered everything up and it all looks fine. But I'm ready to integrate the positioning......
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.
Yes, the video does NOT show FOC, it simply uses a brushless motor as a poor man permanent magnet stepper motor (with 60° per step). Totally misleading title. Of course a true NEMA 17 hybrid stepper motor would perform much better and cost much less. And, if driven with FOC, would be also much more efficient than this BLDC motor operated at short circuit current.
I agree with Power Max. You already have in part, accomplish a FOC, or a very simplified FOC with your ESC projects using the 6-step commutation scheme for a BLDC. Now you need to identify the rotor position (estimator or sensored) to apply a voltage 90° in advance of the rotor position. This can only be performed unsign the PARK and CLARK Transformers and in inverse form also. FOC can be performed using SPWM but you loose in voltage, does in current. You are better of with a Space Vector PWM (SVPWM). Can't wait to see the rest of your video(s).😉
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.
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.
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
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.
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.
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 .
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
Hi and thanks for the video! 10:0810:48 These moments show that the rotor shaft rotates irregularly, accelerating and decelerating. What can be the reason for this?
that's called cogging, as it moves between being oriented to each permanent magnet inside the stator in turn. its possible to compensate for it in software (anti-cogging).
Hello friend, I have a cuestion, the signal you measure in min 10:54 is in the input of the motor, or in the output of arduino? I have doubt if the driver you used also has the function of transforming the pwm signal into a real sinosoidal wave. Thank you. Great video.
I'm thinking of 2804 BLDC motor. I understand that I need to supply 3 wires (phases) to it from the miniFOC driver and nothing else. My q. is : how long can these wires be? I need some 2 meters. thanx
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?
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.
The controller really has nothing else to do so it does not matter at all, yet still the first think i thought was that he should use a lookup. But also the "analogRead" and "analogWrite" as well as "delay". The inbuild-functions are nice and simple to use, but knowing what they actually do can be very important as "delay" can royally mess with the analog-functions, even worse if you use anything else that uses the timers. And the difference can be astonishingly gigantic: A friend and me tried creating a sender/receiver for audio-encoded data (to be hooked up to walkietalkies) using the good old dual tone multi frequency (old phone-number encoding). Turns out that is not possible with "normal" inbuild arduino functions - it is too slow - but using the ADC and timers directly it was no problem. Here we are dealing with a very simple sin-wave - they are great for lookups as the computation is a lot more complex than the result, and due to the nice symetrical nature only a small part needs to be actually stored. For bonus-points you could go way deeper than needed, storing the PWM-wave as a bit-pattern. For this simple motor-control a 64-entry lookup should be plenty (~1.5° resolution).
@@ABaumstumpf you are absolutely right. If anyone wants efficient way to control, have to get hands "dirty" with register and asm codes. Similarly ADC could be freerunning. Just collect the data whenever needed. Lookup table is a must to reduce computation time. Makes dramatic change in time.
Hey does any one know what a practical RPM limitation is when using the Open Loop Code "Speed Control" method? Obviously this controller is designed for slow and precise rotation which is largely why I want to use it but I am very curious to know the practical upper limit? Of course it will also depend on how many poles the motor has so maybe a more appropriate question is how many full phase changes per minute is this capable of?
Acabo de encontrar este increíble artículo en AliExpress. ¡Échale un vistazo! 33,37€ | Tarot-Motor sin escobillas 4006 620KV, Motor Multiaxial TL68P02 para cuadricóptero multicóptero teledirigido a.aliexpress.com/_Ez1p84r
I had a question regarding the logic for the MOSFET switching so as a sine wave is applied to all 3 phases at the same time is the signal provided to the two MOSFETs for the same phase the same or inverted.
could you show us plots of the threephase voltages and currents ? idk without proper feedback for the phase currents, it is hard to maximise the quadature component of the resulting phasor sum to maximize the torque. I dont think arduino's pwm has enough resolution to create a decent enough sinusoidal phase currents. Could you tell us what is the switching frequency ? This is a good project for beginners but might have issues when you scale it up for larger applications...
I'm interested in this to control a car speedometer, only thing I'm not sure of is while this obviously allows for low RPM would it allow the motor to spin at high RPM? I need to be able to spin from 150-3000RPM, torque loading would be negligible. Being car based I need to be able to run from 12V supply.
in future projects could you break out the ICSP pins? they aren't connected to anything and this makes the controller nigh impossible to bootload. If you have any tips on bootloading the chip, please tell me because i've found it impossible to connect anything to the tiny ICSP connections.
@@grantkeefe9866 I had to create a separate PCB to burn a bootloader to the chip. Only then could I solder that chip to the main board and have it work.
Can't this be combined with regular speed controllers so that you can have smoother motion at low speed but high torque and efficiency at higher speed?
@@arcmchair_roboticist Okay, makes sense if it's with feedback. But without feedback it would be simple to implement in software without hardware changes
Very cool and minimalistic project! If the sensorless implementation without motor current sensing can be classified as FOC or just a sine wave inverter is questionable. But as soon as you wire up the encoder and can identify q and d axis a little better, then it's more like it
Hi Andrei , thank you for making these very interesting videos. I recently watched your video on “FOC Driver Controller”. FOC is new to me but it looks like what I need for a robot project. In your video you pointed out that in V1.0 you had missed 2 connections on D9 & D10, has this now been corrected? Also I have not used PCBWAY before, I created an account on PCBWAY from your link and noticed 2 options, “Only PCB” and “PCB+Assembly”, if I opt “PCB+Assembly” and select a quantity of upto 20 it quotes $35 including shipping. This seems very cheap, what does it mean by assembly? How much of the board is populated? Do I need to add any other components when I receive the board? Thank you for a very informative video. Ernie
Thanks for posting a well explained video and tutorial. With the motor you have used, how do we calculate the maximum resolution of control in degrees? Ie, what would be the maximum number of steps per revolution? Thanks again and nice PCB by the way! Simon
The resolution is given actually by the PWM resolution witch is quite low for Arduino, only 8 bits. The sine signal repeates every 360 degrees so it goes from 0 to 359. But for a full rotation we need repeat the 360 degree sine wave "X" times where X is affected by the amount of poles the motor has.
@@ELECTRONOOBS for example variables, variables should be written in lowercase snake_case or camelCase but not uppercase style in which are constants written.
Consistency. Below //Inputs and outputs you have some constants, but naming and style is very poor. Is variable int poles = 11 even used? You are mixing int and int16_t typedefs. Setup and loop functions have opening braces in the same line as function declaration, but function moving has it on the next line. The function moving itself is redundant. Consider making function of converting degrees to radians "SINE_A*PI/180" -> double toRadians(double degrees) { return degrees * PI / 180.0; }.
Hey man, great video! Would it be possible to drive a 22V BLDC motor from a much higher voltage source by simply controlling the voltage going into the motor via the PWM signal? Or is this too much to ask? This would save me on having to get a VERY powerful DC to DC converter, 3kW or so... In reality I just need very high speeds, so FOC might be overkill. Thanks!
your video really helped me learn, I watched all your videos especially about ESC, I hope you can make a detailed explanation video about VESC - Open Source ESC from vesc benjamin vedder, I want to make something like that because if you buy it from abroad the shipping costs very expensive, I know there are other people who have explained it about vesc, I think if you explain it, it will be easier to understand, thank you
IDK why you need power resistors to limit current, haven't read the datasheet of your 3phase H bridge driver chip. But I have used DRV8313 in past when i was working on a gimbal. It did not require a power resistor and it is available in smaller package, and goes up to 60V VIN, I guess. Also you can check ST's STSPIN series of H bridge drivers, they come in QFN package but have low input voltage. For the board design, you can make it in a circle shape and give all the mounting holes and place the encoder right at the center and mount the PCB with some spacer depending on the clearance available between magnet and encoder, 1mm is a sweet spot, anything above 2mm will give errors/glitches in the PWM signal, this was true when I ran the tests, yours might differ.
Some sort of current limiting is required, because he's not adjusting the PWM duty cycle to limit that. Just connecting the motor to Vbus with a random duty cycle would lead to uncontrolled current through the motor windings due to the extremely low winding resistance and inductance
Hola, Excelente proyecto. Tengo una consulta, Deseo trabajar con un motor Brushless DJI E200 - 6010, 130 Kv, los componentes utilizados en la placa que mostraste en el video, ¿Cuanto es lo maximo de voltaje y corriente que puede soportar ? ¿Podría funcionar con el motor que te comente?
The applied pulse is not "real SINE" is just followig sine values all the time for all 3 phases so the current passing through the coils will also follow a sine value so the rotro will follow the magnetic field created.
I WONDER HOW CAN I CONNECT MY Globisens LabDisc TO ARDUINO VIA USB CABLE? ARDUINO HAS TX AND RX PINS, LabDisc SUPPORTS UART PROTOCOL. BUT I DON'T KNOW HOW TO READ SIGNALS FROM LabDisc OUTPUT CABLE WHICH IS FOR CONNECTING TO LAPTOP. IT WOULD BE FANTASTIC IF YOU SHARE A VIDEO ABOUT IT. THANKS IN ADVANCE.
@@ArnaudMEURET You could save even more money by not having the holes drilled or by not having Silk Screening. You could even save additional cost by Hand wiring on a breadboard without buying the PCB....
@@lasersbee Hand drilling the holes is notoriously error prone. I don’t think most people would choose this trade-off. Resorting to a fully manual wiring approach based on prototyping boards would ruin the non-functional performance and characteristics that most people seek by having PCB made industrially.
@@ArnaudMEURET I’m sure most people would rather pay the few cents more to have the PCBs Scored professionally rather than waste their time scoring and severing manually making for an unprofessional hack job.... Walking away shaking head....🙄
I'm learning so much from your channel. I want to create a arduino robot which drives around, but the motors are too loud and annoying. So I was thinking, drone motors? but holy shit it would disintegrate into the nearest wall if they span that fast, but this actually looks like a really great way to rotate the wheels with a quiet motor with great precision. Amazing!
I would get further away from your motor to only pick up that magnetic field from your magnet otherwise it´s possible that your hall effect sensor could pick up the motor stray fields and this could get a irregular response like you see in your video.
Would anyone like to share the Arduino IDE configuration that allowed them to successfully upload code, I am receiving the: programmer not responding error and have tried a couple of different Board/programmer configurations
1. couldnt you just omit the sensor and if the motor gets out of sync then do a 360 spin to re orient the motor? it is like in the old days when you would turn on dot matrix printers the print head would move over and back and todays computer optical drives do the same thing when turned on. 2. use the motor windings to detect position via the kickback that makes sensorless escs and ebike controllers work.
Join my Arduino Course (Spanish): bit.ly/2JY8icE
My Tools: bit.ly/3uv8bc3
Help me on Patreon: www.patreon.com/ELECTRONOOBS
Can you please finish this with the encoder working? I had the pcbs made. I soldered everything up and it all looks fine. But I'm ready to integrate the positioning......
ممكن المساعده بمقابل مادي لو سمحت
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.
Yes, the video does NOT show FOC, it simply uses a brushless motor as a poor man permanent magnet stepper motor (with 60° per step). Totally misleading title. Of course a true NEMA 17 hybrid stepper motor would perform much better and cost much less.
And, if driven with FOC, would be also much more efficient than this BLDC motor operated at short circuit current.
Exactly, very misleading title, it is not FOC control
I agree with Power Max. You already have in part, accomplish a FOC, or a very simplified FOC with your ESC projects using the 6-step commutation scheme for a BLDC. Now you need to identify the rotor position (estimator or sensored) to apply a voltage 90° in advance of the rotor position.
This can only be performed unsign the PARK and CLARK Transformers and in inverse form also. FOC can be performed using SPWM but you loose in voltage, does in current. You are better of with a Space Vector PWM (SVPWM).
Can't wait to see the rest of your video(s).😉
VESC 4,12 is grabage specialy. never working FOC:. no way to determine coorect POLE numbers etc.. BS:.. BLDC SW carry ebetr than vieder..
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.
excactly. *commutation
I was about to comment about this too. This not FOC if the algorithm is not using d and q field components
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.
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
This is EXACTLY what I've been looking for, I'd love to see this integrated with SimpleFOC
Ditto on this request for simplefoc and high power compatible design!
@Electronoobs Is anything like this planned? :)
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.
This is the best intro to FOC I have seen.. Thank you..
Because it's not FOC lol
Thanks for knowledge!
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.
a great example. Can I change the direction of rotation of the rotor in speed mode?
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 .
I don't know either but I know one magnetic field doesn't overlap another.
Thanks for such a clear demystificaion of FOC while I just sit and watch
Thank you! There is still a lot more about FOC for future episodes :)
Muy bien explicado, como todos tus vídeos. Me he aguantado 2 anuncios para compensar 👏
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
You can make a nice analogue clock that shows several time zones with this project. Nice video.
7:04 -> not sigle one driver in your video is 3 channel...or am i wrong? i see DRV8833 , LN298N and its mini version.
Hi and thanks for the video! 10:08 10:48 These moments show that the rotor shaft rotates irregularly, accelerating and decelerating. What can be the reason for this?
that's called cogging, as it moves between being oriented to each permanent magnet inside the stator in turn. its possible to compensate for it in software (anti-cogging).
Great work. So as such the bldc will have a static tork as well. Just like stepper motors.
Hello friend, I have a cuestion, the signal you measure in min 10:54 is in the input of the motor, or in the output of arduino?
I have doubt if the driver you used also has the function of transforming the pwm signal into a real sinosoidal wave. Thank you. Great video.
I'm thinking of 2804 BLDC motor. I understand that I need to supply 3 wires (phases) to it from the miniFOC driver and nothing else. My q. is : how long can these wires be? I need some 2 meters. thanx
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?
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.
I will add more details in the description in a few hours. I'm working on the tutorial website. I will share everything!
@@ELECTRONOOBS I have also requested to add a few points in the closed loop control, please take a look at the suggestions.
The controller really has nothing else to do so it does not matter at all, yet still the first think i thought was that he should use a lookup.
But also the "analogRead" and "analogWrite" as well as "delay". The inbuild-functions are nice and simple to use, but knowing what they actually do can be very important as "delay" can royally mess with the analog-functions, even worse if you use anything else that uses the timers.
And the difference can be astonishingly gigantic:
A friend and me tried creating a sender/receiver for audio-encoded data (to be hooked up to walkietalkies) using the good old dual tone multi frequency (old phone-number encoding). Turns out that is not possible with "normal" inbuild arduino functions - it is too slow - but using the ADC and timers directly it was no problem.
Here we are dealing with a very simple sin-wave - they are great for lookups as the computation is a lot more complex than the result, and due to the nice symetrical nature only a small part needs to be actually stored. For bonus-points you could go way deeper than needed, storing the PWM-wave as a bit-pattern. For this simple motor-control a 64-entry lookup should be plenty (~1.5° resolution).
@@ABaumstumpf you are absolutely right. If anyone wants efficient way to control, have to get hands "dirty" with register and asm codes.
Similarly ADC could be freerunning. Just collect the data whenever needed.
Lookup table is a must to reduce computation time. Makes dramatic change in time.
Hey does any one know what a practical RPM limitation is when using the Open Loop Code "Speed Control" method? Obviously this controller is designed for slow and precise rotation which is largely why I want to use it but I am very curious to know the practical upper limit? Of course it will also depend on how many poles the motor has so maybe a more appropriate question is how many full phase changes per minute is this capable of?
Hello, is the L6234PD driver only used to add the radial magnet sensor ? If we don't need this option, can we ignore it ? Thank you for your video.
Hi. Do you have a link to the 20(or whatever) pole motor shown at 9:17? The links to motors on your site don't have that many poles. Thanks :)
Acabo de encontrar este increíble artículo en AliExpress. ¡Échale un vistazo!
33,37€ | Tarot-Motor sin escobillas 4006 620KV, Motor Multiaxial TL68P02 para cuadricóptero multicóptero teledirigido
a.aliexpress.com/_Ez1p84r
This is really very VERY awesome !
I had a question regarding the logic for the MOSFET switching so as a sine wave is applied to all 3 phases at the same time is the signal provided to the two MOSFETs for the same phase the same or inverted.
could you show us plots of the threephase voltages and currents ? idk without proper feedback for the phase currents, it is hard to maximise the quadature component of the resulting phasor sum to maximize the torque. I dont think arduino's pwm has enough resolution to create a decent enough sinusoidal phase currents. Could you tell us what is the switching frequency ?
This is a good project for beginners but might have issues when you scale it up for larger applications...
You deserve 100 million sub
I'm interested in this to control a car speedometer, only thing I'm not sure of is while this obviously allows for low RPM would it allow the motor to spin at high RPM? I need to be able to spin from 150-3000RPM, torque loading would be negligible. Being car based I need to be able to run from 12V supply.
in future projects could you break out the ICSP pins? they aren't connected to anything and this makes the controller nigh impossible to bootload. If you have any tips on bootloading the chip, please tell me because i've found it impossible to connect anything to the tiny ICSP connections.
I am having a similar issue, how did you resolve
@@grantkeefe9866 I had to create a separate PCB to burn a bootloader to the chip. Only then could I solder that chip to the main board and have it work.
Excellent project and very well explained
Thank you for teaching me something new about stepper motors!
you can make the pulse vector modulation FOC based on the open source simpleFOC group from MIT
Any links?
Sir you are using SimpleFoc?
Can't this be combined with regular speed controllers so that you can have smoother motion at low speed but high torque and efficiency at higher speed?
yes, but it's more expensive. A fancy motor controller usually will do this for exactly that reason.
@@arcmchair_roboticist Okay, makes sense if it's with feedback. But without feedback it would be simple to implement in software without hardware changes
Would it be sufficient if I take an axial magnet and rotate it so the poles are parallel with the encoder? Or is the radial magnet truly required?
Thanks for code explanation, it's simple and clear as well as the code. Good job!
Very cool and minimalistic project!
If the sensorless implementation without motor current sensing can be classified as FOC or just a sine wave inverter is questionable.
But as soon as you wire up the encoder and can identify q and d axis a little better, then it's more like it
Excellent💯👍 explanation
when ordering the board Will they populate with all parts?
Hi I think it would be really cool if you took of the bldc rotor off, then use the field visualizer to show the actual change in real time
Did yoy ever make a follow up video with closed loop?
Is this the same technology ODrive boards use for control?
Hi Andrei , thank you for making these very interesting videos. I recently watched your video on “FOC Driver Controller”. FOC is new to me but it looks like what I need for a robot project. In your video you pointed out that in V1.0 you had missed 2 connections on D9 & D10, has this now been corrected? Also I have not used PCBWAY before, I created an account on PCBWAY from your link and noticed 2 options, “Only PCB” and “PCB+Assembly”, if I opt “PCB+Assembly” and select a quantity of upto 20 it quotes $35 including shipping. This seems very cheap, what does it mean by assembly? How much of the board is populated? Do I need to add any other components when I receive the board? Thank you for a very informative video.
Ernie
thank you very much. I love your videos and I've learned a lot.
Thanks for posting a well explained video and tutorial. With the motor you have used, how do we calculate the maximum resolution of control in degrees? Ie, what would be the maximum number of steps per revolution?
Thanks again and nice PCB by the way!
Simon
The resolution is given actually by the PWM resolution witch is quite low for Arduino, only 8 bits. The sine signal repeates every 360 degrees so it goes from 0 to 359. But for a full rotation we need repeat the 360 degree sine wave "X" times where X is affected by the amount of poles the motor has.
hi. I would like to know if you can customize a FOC controller but with high voltage and high amperage? Thank you!
Nice! What kind of torque are you getting from this with no gear box?
Thank for the great video.
Is there any benefit of using FOC over using a stepper motor?
Does this controller allow you to stop the motor at the right place?
is there a cheaper L6234PD alternative?
Hi ! Like your vides and open source stuff, good job. Just so you know the magnet in NOT radially polarized, its DIAMETRICLY polarized.
Awesome project! Thanks!
I hope you get the encoder part sorted out.
Very cool 😎 👌
8:20 Maybe you should look at style of your code.
In what sense?
What do you mean?
@@ELECTRONOOBS for example variables, variables should be written in lowercase snake_case or camelCase but not uppercase style in which are constants written.
Consistency. Below //Inputs and outputs you have some constants, but naming and style is very poor. Is variable int poles = 11 even used? You are mixing int and int16_t typedefs. Setup and loop functions have opening braces in the same line as function declaration, but function moving has it on the next line. The function moving itself is redundant. Consider making function of converting degrees to radians "SINE_A*PI/180" -> double toRadians(double degrees) { return degrees * PI / 180.0; }.
What is the relation between this foc controller to a stepper motor driver like the ones that are used in 3d printers? Is it the same thing?
They are different. Stepper motors don't have magnets
Hey man, great video!
Would it be possible to drive a 22V BLDC motor from a much higher voltage source by simply controlling the voltage going into the motor via the PWM signal? Or is this too much to ask? This would save me on having to get a VERY powerful DC to DC converter, 3kW or so...
In reality I just need very high speeds, so FOC might be overkill.
Thanks!
Closed loop with hall sensor and with BEMF also please. Very nice explanation.
if my motor want high A like 30A So I must do what?
Maybe the next step on from this would be a DSLR gimbal?
Like a micro VFD. Sweet!
that's sooooooooo great. thanks for your best Expression
your video really helped me learn, I watched all your videos especially about ESC, I hope you can make a detailed explanation video about VESC - Open Source ESC from vesc benjamin vedder, I want to make something like that because if you buy it from abroad the shipping costs very expensive, I know there are other people who have explained it about vesc, I think if you explain it, it will be easier to understand, thank you
IDK why you need power resistors to limit current, haven't read the datasheet of your 3phase H bridge driver chip. But I have used DRV8313 in past when i was working on a gimbal. It did not require a power resistor and it is available in smaller package, and goes up to 60V VIN, I guess. Also you can check ST's STSPIN series of H bridge drivers, they come in QFN package but have low input voltage. For the board design, you can make it in a circle shape and give all the mounting holes and place the encoder right at the center and mount the PCB with some spacer depending on the clearance available between magnet and encoder, 1mm is a sweet spot, anything above 2mm will give errors/glitches in the PWM signal, this was true when I ran the tests, yours might differ.
Thank you so much for your feedback :))))
Some sort of current limiting is required, because he's not adjusting the PWM duty cycle to limit that. Just connecting the motor to Vbus with a random duty cycle would lead to uncontrolled current through the motor windings due to the extremely low winding resistance and inductance
dont think it is so easy to solder an QFN package at home without using hot air and with less soldering experience by someone...
This is super nice and great video!
Hola, Excelente proyecto. Tengo una consulta, Deseo trabajar con un motor Brushless DJI E200 - 6010, 130 Kv, los componentes utilizados en la placa que mostraste en el video, ¿Cuanto es lo maximo de voltaje y corriente que puede soportar ? ¿Podría funcionar con el motor que te comente?
Where I can buy those modules? Your shop doesnt work
how can you use it with mosfets?
You have something I can use with a 2 phase motor?
Are you using any analog filtering? I don’t see how the PWM turns into a sine wave.
The applied pulse is not "real SINE" is just followig sine values all the time for all 3 phases so the current passing through the coils will also follow a sine value so the rotro will follow the magnetic field created.
Closed loop with hall sensor and with BEMF also please.
Motor inductance and resistance filter to sine wave somewhat depending upon pwm frequency
I WONDER HOW CAN I CONNECT MY Globisens LabDisc TO ARDUINO VIA USB CABLE? ARDUINO HAS TX AND RX PINS, LabDisc SUPPORTS UART PROTOCOL. BUT I DON'T KNOW HOW TO READ SIGNALS FROM LabDisc OUTPUT CABLE WHICH IS FOR CONNECTING TO LAPTOP.
IT WOULD BE FANTASTIC IF YOU SHARE A VIDEO ABOUT IT.
THANKS IN ADVANCE.
12:34... You could have asked the PCB supplier to score the joint between the 2 PCBs for easier/cleaner snapping off.
I hear that each additional manufacturing step is paid for. I’m sure most people would rather pay with their time scoring and severing manually.
@@ArnaudMEURET You could save even more money by not having the holes drilled or by not having Silk Screening. You could even save additional cost by Hand wiring on a breadboard without buying the PCB....
@@lasersbee Hand drilling the holes is notoriously error prone. I don’t think most people would choose this trade-off. Resorting to a fully manual wiring approach based on prototyping boards would ruin the non-functional performance and characteristics that most people seek by having PCB made industrially.
@@ArnaudMEURET I’m sure most people would rather pay the few cents more to have the PCBs Scored professionally rather than waste their time scoring and severing manually making for an unprofessional hack job.... Walking away shaking head....🙄
@@lasersbee Our host has been using their service for many years. Why do you think he chose to do it himself ? Ignorance ?! 😂
Sir how to connect multiple MOSFET in dc to dc boost converter
This is frickin awesome!
Please never stop
Gosh, I didn't watch this video cause I have no idea what it's about! Btw, what's foc?
THX A LOT,. already looking for..
This is awesome thanks for sharing!
Great work!
Amazing channel!!
That's Great 😍😍😍😍
it looks like your encoder does work but you apply a constant torque
We are still waiting the closed loop. Thanks a lot it is good video
I'm learning so much from your channel. I want to create a arduino robot which drives around, but the motors are too loud and annoying. So I was thinking, drone motors? but holy shit it would disintegrate into the nearest wall if they span that fast, but this actually looks like a really great way to rotate the wheels with a quiet motor with great precision. Amazing!
i love it very useful
I would get further away from your motor to only pick up that magnetic field from your magnet otherwise it´s possible that your hall effect sensor could pick up the motor stray fields and this could get a irregular response like you see in your video.
Great work
It is príncipe gimbal great!!
Would anyone like to share the Arduino IDE configuration that allowed them to successfully upload code, I am receiving the: programmer not responding error and have tried a couple of different Board/programmer configurations
muchas gracias
Brilliant bro
I challenge you to make a Odrive killer, that would be over the top (even if I have to pay a dollar or two to get the design)
may you please link some texts on where to read the theory on this?
1. couldnt you just omit the sensor and if the motor gets out of sync then do a 360 spin to re orient the motor?
it is like in the old days when you would turn on dot matrix printers the print head would move over and back and todays computer optical drives do the same thing when turned on.
2. use the motor windings to detect position via the kickback that makes sensorless escs and ebike controllers work.
great video
ممكن المساعده بمقابل مادي لو سمحت
أنت الاذكى
Teşekkür
Can u teach pcb design from scratch
Saludos desde chile
Wow great