![]() ![]() The only complication in driving a motor comes from the motor itself, as mentioned: there is no ideal motor. Therefor a sensor device is needed, in the case of a sensorless drive, the motor is the sensor. The position of the rotor must be known to drive the current to the coil that creates this non uniform magnetic field. But this is not the case at all! The point is that in a 3-phase AC system the energy flows continously like this is the case in DC-system.Īs mentioned: the current has to flow in a manner that torque is created. One could think, that an alternating current and voltage leads to torque ripple. There is no constant current as the current changes sinoidal and all three phases carry current at every moment. In an AC motor the communtation is not "switched", but continously. There is nothing "trapezoidal" The current is constant (there is a dip to discharge and recharge the inductance, the voltage applied is always constant and proportional to the speed of rotation. 6 steps do one electrical rotation of the motor. Those windings are commutated +A>B-BA-AC-CB- etc. For a BLDC motor there are normaly three windings A-B, B-C, C-A. A DC motor always runs current into one single winding and this current creates constant torque. ![]() ![]() ![]() Now: what is the difference between an AC and DC motor? It is NOT the direction of the current flow in the windings, there will always by an alternation. This commutation can be done internaly by the brushed motor or externaly by switching the current to the appropriate wires. For this reason there are different windings or taps at one winding and the current is commutated always this way, that the field stays non uniform. If there is current and a nonuniform field, torque is created and the motor moves, the field becomes uniform and there is no torque even if there is current. To keep the current constant the battery has to overcome this voltage and so energy is continuously fed to the motor and transfered to the wheel. But when the magnetic field in the motor winding changes, a voltage is created that can be measured at the wires. So if the motor can move and in doing this, the field becomes more uniform, the energy stored in the field is transfered to the wheel. Why does a motor create torque? The answer: because a current flowing through the motor creates a non uniform magnetic field that carries more energy at a given current then a uniform field. If there is no current (no torque) or if there is no rotation (no voltage), then there is no power transfered. The electrical power fed to a motor (aside of losses) goes to the wheel. Every motor creates a voltage when it moves. The point is: every motor creates a torque when there is current. Sounds familiar? Is generally not understood! The difference between an AC motor and a DC motor is just: a AC motor runs with alternating current, while a DC motor runs with direct current. The first you have to know: there is no existing ideal motor. Third long $FFFFFFFF +/ 3 '120-degree phase stepīias long FRAME / 2 'bias to make positive PWM values Pwmn long %001_000000_01_01000_0 'negative PWM outputįram long FRAME << 16 + BASE 'frame and base time wait testp #PWM_U_L wc 'wait for next PWM frame Sub power_u,x 'subtract difference from powers Qrotate power_,angle_ 'feed three CORDIC operationsĪdd x,y 'sum smallest and largest, then divide by 2 PWM_U_L = 0 'PWM pins that drive MOSFET driversĭriver wrpin pwmn,#PWM_U_L addpins 5 'set up PWM pinsĭrvl #PWM_U_L addpins 5 'start all PWMs on same clock Here is the code: ' 3-phase motor control codeīASE = _clkfreq / 1_000_000 'PWM base time unitįRAME = 1000 'PWM frame in base time units Here is the special algorithm added (not skipped over) that is supposed to work better for controlling motors between pole positions: Now, he's going to try it on a hoverboard motor. He had an algorithm he wanted to implement, aside from the regular 3-phase PWM, but I don't remember what it was called. Today, Doug Pientak stopped by and I helped him with some code to drive a brushless DC motor. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |