Most Basic Brushless Motor Control

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i hope you all remember my open source esc design that i've made last year and the other versions as well that one is based on a full triple bridge of mosfets and the back emf closed loop control but this one here for today video is based on a half bridge control so basically have the amount of mosfets and have the complexity this type of escs only work with those four wire brushless motors meaning that we need the face a b and c but also the common point of the star configuration since i already have so many ess designs and videos about this topic along these last few years i've created a playlist so you could learn how to design one step by step the concepts and the mathematics involved and all the interesting information in this video i'll show this half bridge esc what's the deal with the common point on some brushes motors the components that i use will make the circuit on a pcb and give it a few tests and i hope that you'll learn something new please have in mind that this circuit has no feedback and is not even close to the results of the full bridge ese from my previous video i'm showing you this circuit just for learning purposes so guys let's get started [Music] video sponsored by pcbway if you have a pcb project you must check their services for example try the pcb prototype service for boards from one layer up to 14 layers the pcb quality is amazing nice finish good silk layer and exact sizes and the production time is measured in hours so all you have to do is to upload the gerber files of your pcb select the settings such as the color of the board the size the thickness and so on and order the pcbs for only five dollars for 10 pcbs of 10 by 10 centimeters in just a few days you receive the pcbs so you could finish your amazing project in time and with the professional look pcb what's up my friends welcome back this here is a hard drive from an old pc and i will use its motor for our today's project and i bet that a lot of you guys already opened one of these at least once this usually work with a brushless motor one like this one this motor is actually very quiet and low power since all it has to do is to spin a metal disc at high speeds ok ok so i know that this has nothing to do with the esc that we will build today but i just wanted to show you inside of a basic hard drive so when you open the metal case you will notice it is water sealed with some sort of glue or maybe a rubber gasket this is the hard disk made out of a metal and actually this has a few different disks for more memory this actuator here is the one that moves the needle and that reads the bits from the disk and is based on some neodymium permanent magnets and some coils actually we could use this actuator for a future project based on the laser and galvano actuators so stay tuned for that ok so if i take out the disk we can see the brushless motor so what's special with this motor well as you can see it has 4 inputs instead of 3 as the common brushless motor for drones for example it has the basic face a b and c but also the common point of the star configuration and that's the key for this project in order to be able to use a half bridge esc we need to have a connection to the middle common point of the motor at the same time these here are brushless motors from all dvd readers and if i open them as you can see they also have four connections that are marked with a1 a2 a3 and the com point so what if your motor doesn't have a common connection actually if your motor has a star configuration it will definitely have a common point but it might not be connected on the exterior of the motor or is very hard to get to it if you remember from the video where i was building a 3d printed brushless motor i've ended up with three connections for the faces and one connection with all the wires merged together and that is the common point so why is this fourth connection so important for the half bridge controller from my previous esc videos you know that with the full bridge control we have three mosfets connected to the high side or positive and reconnected to the low side or to ground on each step of the rotation we apply positive to one face of the motor with the high side of the mosfets and we connect another face to ground with the low side of the mosfets but using the half bridge configuration we only have the low side of the mosfets so what we do goes something like this we take the common connection which is the middle point between the three faces we directly apply positive to the common point then we connect each face to one of the mosfets if you want to energize phase a for example just turn on the first mosfet and off the other two so the current could flow from the middle point to ground only through phase a then on the next step we turn off the first mosfet and we turn on the second one for example and now we energize phase b so that's how we control the rotation and for more information about this brushless control you can see my previous videos on this topic i actually have a few videos already so you'll understand everything okay so the circuit that i propose for today is this one it's very simple and basic we have just three n-channel mosfets connected to ground each one has a diode from its drain back to the battery so the current spikes from the motor could have a pad to flow through and not damage it also each mosfet has a pull down so it will be turned off by default i also add the ms-1117 regulator for 5 volts and to control the poles we could use an arduino for example but since this is a very simple design we can go directly with a small 80 tiny 85 to control the speed we can use a potentiometer for this example but with a more complex code we could also control the speed with a pwm input so i've made all the connections on a prototyping pcb starting with the three mosfets i've then placed the ams-1117 and also made sure that with the 12 volts input we have 5 volts at the output and then i can add the 80 tiny the connections are made with some copper wires on the front and the back side we also have connections with the small resistors and diodes i've soldered a potentiometer external to the pcb and i will use this to adjust the speed i've used some screw terminals for the battery input and the four outputs that go to the motor ok so now i connect the motor to my board with connections for the three phases and the common point i supplied the pcb with 12 volts for my power supply and the pcb automatically starts because it has the voltage regulator for 5 volts and by the way i upload the code to my attorney 85 using my shield that i've made in a previous tutorial and i will show this code in a moment if you want to know how to make this shield for the arduino uno how to manage the boards in the arduino ide and how to upload the code to the 80 tiny see my video on this topic below in the description ok so as you can see when i increase the potentiometer the motor starts rotating let me glue this tape so you can see better the rotation also i can increase the speed with the potentiometer here i also have some slow motion of the rotation and these are the signals from each face on the oscilloscope in case that you want to see them we have three faces and when one is pulsating the other two are off and here i've stopped the oscilloscope so you can better see each face at the same time as you can see the faster the motor spins the smaller is the delay between the pulses okay so let's take a quick look at the code and then i will tell you why this is not the best solution for controlling brushless motors and the downsides compared with the full bridge configuration ok so first i define all the variables that i will use in the code then we set the pins for the mosfet control as output and set them to low at the beginning with these registers then in the void loop we read the voltage from the potentiometer and if this value is over a certain threshold we activate the rotating sequence and in this sequence because this is made in an open loop control so we don't have a feedback all we do is to switch to high one of the faces one by one with a small delay in between and that delay is created with this while statement but then i make another while and that will chop the pulses into smaller pulses so we can also control the power and basically that's it i'll try to post a different code below that will use a pwm input to control the speed and also interruptions to read the pwm signal okay so now why is this half bridge worse than the full bridge controller well first of all remember that with the full bridge control we energize two faces at the same time one coil has the current going in and the other one has the current going out like this and in this way is creating two different magnetic fields one pushing and the other one pulling but with the half bridge we can only energize one phase so that means less power and less torque the good thing is that this circuit is way simpler we don't have the high side mosfets anymore which usually is the one that gives problems and should be made with p-type mosfets we have less components and less signals to control from the microcontroller but other bad thing about this half bridge configuration is that we can't implement the back emf feedback anymore remember that for the virtual zero cross we need two calls energized and one floating and the sum of all three signals is the virtual zero so this time we can't do that anymore so the feedback must be made with hall sensors for example the small brushless motors that we have seen before have these three small components here with the same phase difference in between these components are host sensors and as we have seen in the sensor esc tutorial this could create hyposis while the magnets are rotating around and by reading those pulses we can know it precision the position of the motor without the back emf feedback or the sensors the motor will be rotating in an open loop so that means that if i stop the motor with my hand it won't start again because it has no feedback and it can start again by its own we need to lower the speed and increase it back again slowly so guys that's how the half bridge controller should work with a more powerful microcontroller and sensors we could control the rotation even better but trust me the full bridge design is a lot better i do have quite some experience with eses over the last few years i've tested many configurations and improved my design more and more from my first pcb that was open loop had many fails and rotated at very low speeds and then i had the second attempt for my prototype for the sensorate esc and a closed loop control and after a lot of back emf testing and code improving i was able to make my first open source esc that was working pretty close to a commercial one so guys if you want to learn more about the esc principles please watch the full playlist on this topic and all the links that you need are below in the description and if you learned something new give me a like or comment below thanks again and see you later guys hey guys thanks for staying with me till the end of this video i hope that you like it and the most important part for me i hope that you learned something new also i would really like to thank to all those who are supporting this channel on patreon that help is very important for me and at the same time you have more links below if you want to check my facebook page my instagram or my shop where you could buy my pcbs or maybe some t-shirts and more stuff and with that also support my channel so thanks again and i'll see you in the next video
Info
Channel: Electronoobs
Views: 103,579
Rating: undefined out of 5
Keywords: brushless, ESC, homemade, circuit, half bridge, commont point, phase, electronic speed controller, schematic, Arduino, ATtiny, hard disc, HDD, controller, driver, DIY
Id: urQEdGjK7Xg
Channel Id: undefined
Length: 13min 18sec (798 seconds)
Published: Sun May 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.