![]() Sensorless BLDC motor control with Arduino code: The Arduino UNO can generate PWM signals on that pins where only high side mosfets are PWMed. The HIN lines of the three IR2101 are connected to pins 11, 10 and 9 respectively for phase A, phase B and phase C. The figure below shows input and output timing diagram: The IR2101 chips are used to control high side and low side mosfets of each phase. The switching between the high side and the low side is done according to the control lines HIN and LIN. This minimizes the hardware needed and simplifies the circuit. Each time the comparator compares the virtual point with the BEMF of one phase (this is done in the software). So I connected the virtual natural point to the positive pin of the analog comparator (pin 6), phase A BEMF to pin 7 (AIN1), phase B BEMF to pin A2 and phase C BEMF to pin A3. The positive input of this comparator is on Arduino uno pin 6 (AIN0) and the negative input can be pin 7 (AIN1), A0 (ADC0), A1 (ADC1), A2 (ADC2), A3 (ADC3), A4 (ADC4) or A5 (ADC5). The Arduino UNO board is based on the ATmega328P microcontroller which has one analog comparator. The virtual natural point is connected to Arduino pin 6. ![]() The first three 33k (connected to motor phases) and the three 10k resistors are used as voltage dividers, because we can not supply the microcontroller with 12V, the other three 33k resistors generate the virtual natural point. You can download the gerber files from below.In the circuit there are 2 pushbuttons, one is used to increase BLDC motor speed and the 2nd one is used to decrease it. For version V2.0 now all the problems are fixed and the big tracks are exposed so I could fill those with solder for more current. The V1.0 had some errors such as some bad GND connections, wrong pin for the Buzzer and also the power tracks were covered by the soldermask. In the photo below you can see the first version of the PCB in red but also the final version with black soldermask. ![]() We also have the ATmega328 microcontroller, the CH340 programmer so we could upload codes with the USB connector and a few more extra components such as buzzer, LEDs and pads. This inputs will be used to detect the position of the rotor and know when to switch to next step of the rotating sequence. So for that, using some resistors of 10K and 33K we lower the voltage so the analog input of the ATmega328 could read that. The voltage from the motor will be higher than the maximum voltage that the ATmega328 could tahe as input, in this case 5V. Each of these MOSFETs has a driver control with the IR2101 which is a dual driver so it could control both the high and low sides of the bridge. These are 6 MOSFETs in a bridge configurations that are used to energise the coils of the motor. The next block is the triple phase bridge. The main input could be from 11 to 18V but this block will aloways give 5V. This is a buck converter circuit that will give 5V for all the digital parts. First things first, we have a power block. Now the schematic might look complicated but is not. Interrumprions and internal comparator of ATMEGA328 The schematic and why we need each part So this is a sensorless brushless motor speed controller since it uses no sensor to detect the rotor position. ![]() In this tutorial we will see how to control the rotation, the speed, detect the BEMF and by that know when to make the switch to the next step of the sequence. It has to conmutate very fast and by taht rotate the rotor of the motor. To control this input, the ESC must apply a special sequence of LOWs and HIGHs signals in a predefined order. So what is an ESC? Well, electronic speed controllers are used to control brushless motors, in thisc ase the motor has a triple phase input. ![]()
0 Comments
Leave a Reply. |