Controlling the uncoolette engine along the reverse EDC signals - understanding of the process. Brushless DC Motors Bodyless Motor Motor High Power

The operation of a brushless electric motor is based on electrical drives that create a magnetic rotating field. Currently, there are several types of devices that have different characteristics. With the development of technologies and the use of new materials that differ in high coercive strength and sufficient magnetic saturation level, it became possible to obtain a strong magnetic field and, as a result, the valve designs of the new type in which there is no winding on rotary elements or starter. The extensive distribution of semiconductor type switches with high power and an acceptable value accelerated the creation of such structures, facilitated the execution and relief from a plurality of commutation difficulties.

Principle of operation

Increasing reliability, reducing price and simpler manufacturing is ensured by the lack of mechanical switching elements, rotor winding and permanent magnets. At the same time, improving performance is possible due to a decrease in friction losses in the collector system. Brushless motor can function on a variable or continuous current. The latter option is characterized by a noticeable similarity with its characteristic feature is the formation of a magnetic rotating field and the use of pulsed current. It is based on an electronic switch, which is increasing the complexity of the design.

Calculating position

The generation of pulses occurs in the control system after the signal reflecting the position of the rotor. From the rapid rotation of the motor directly depends on the degree of voltage and feed. The sensor in the starter determines the position of the rotor and supplies an electrical signal. Together with the magnetic poles passing next to the sensor, the amplitude of the signal changes. There are also reasonless methods for establishing positions, these include current points and converters. PWM on incoming clamps ensure the preservation of the variable voltage level and power control.

For the rotor with unchanged magnets, current connection is optional, thanks to which there are no losses in the rotor winding. The brushless engine for the screwdrity is characterized by a low level of inertia, ensured by the lack of windings and a mechanized manifold. Thus, it was possible to use at high speeds without sparking and electromagnetic noise. High current and simplification of heat dissipation are achieved by placing heating chains on the stator. It is also worth noting the presence of an electronic built-in block on some models.

Magnetic elements

The location of the magnets may be different in accordance with the size of the engine, for example, on the poles or throughout the rotor. The creation of high-quality magnets with greater power is possible due to the use of neodymium in combination with boron and iron. Despite the high operating performance, the brushless engine for the screwtom is permanent magnets has some disadvantages, in their number the loss of magnetic characteristics at high temperatures. But they are distinguished by greater efficiency and lack of losses compared with machines, in the design of which there are windings.

Inverter pulses determine the mechanism. With an unchanged supply frequency, the engine operation is carried out at a constant speed in the open system. Accordingly, the rotational speed varies depending on the level of the supply frequency.

Characteristics

It works in the established modes and has a functional of a brush analogue, the speed of which depends on the applied voltage. The mechanism has many advantages:

  • lack of changes for magnetization and current leakage;
  • compliance with the speed of rotation and the torque itself;
  • speed \u200b\u200bis not limited to the collector affecting the collector and the rotor electrooper;
  • there is no need for a switcher and an excitation winding;
  • the magnets used are distinguished by slight weight and compact sizes;
  • high torque;
  • energy saturation and efficiency.

Using

DC with permanent magnets is found mainly in power devices within 5 kW. In more powerful equipment, their use is irrational. It is also worth noting that the magnets in the engines of this type are characterized by a special sensitivity to high temperatures and strong fields. Induction and brush options are deprived of such flaws. Engines are actively used in car drives due to the lack of friction in the collector. Among the features you need to highlight the uniformity of the torque and current, which provides a decrease in acoustic noise.

Incoletonal electric motors

Incoleton (Brushless English) The electric motors came to modelism relatively recently, in the last 5-7 years. Unlike collector motors, they feed on a three-phase alternating current. Bulk engines effectively work in a wider range of revolutions and have a higher efficiency. The engine design is easier, there is no brush node in it, and there is no need for maintenance. It can be said that the brushless motors are practically not wearing. The cost of bulk engines is slightly higher than collective. This is due to the fact that all the brushless motors are equipped with bearings and, as a rule, manufactured better. Although, the gap in prices between a good collector motor and an unbacked engine of a similar class is not so great.

According to the design, bialector motors are divided into two groups: Inrunner (pronounced "Inranner") and Outrunner (pronounced "Outranner"). Motors of the first group have the winding housing located along the inner surface, and rotating inside the magnetic rotor. The engines of the second group are "outransorted", have fixed windings, inside the engine, around which the housing is rotated with permanent magnets on its inner wall. The number of poles of the magnets used in the baseball motors can be different. By the number of poles, you can judge the torque and turnover and engine. Motors with bipolar rotors have the highest rotation speed with the smallest torque. These design motors can only be "inrans". Such engines are often sold already with planetary gearbox fixed on them, since their turns are too large for direct rotation of the propeller. Sometimes such motors are used without a gearbox - for example, put on racing aircraft models. Motors with a large number of poles have a smaller speed of rotation, but larger torque. Such engines allow the use of large-diameter propellers, without the need to apply gearboxes. In general, the propellers of a large diameter and a small step, with a relatively low speed of rotation, provide a large thrust, but inform the models of a small speed, while the propellers are small in diameter with a large step in high speed provide high speed, with a relatively small pull. Thus, multipole motors are ideally suited for models that need a high pull-up, and two-pole without a gearbox - for high-speed models. For a more accurate selection of the engine and propeller to a specific model, you can use the special Motocalc program.

Since the baseless motors feed on alternating current, they need a special controller (regulator) to work, which converts a constant current from the batteries to the variable. Regulators for bulk engines are a programmable device that allows you to monitor all the vital engine parameters. They allow not only to change the turnover and direction of operation of the motor, but also ensure the need for a smooth or sharp start, the maximum current limit, the "brake function" and a number of other thin engine settings for the needs of the modelist. To program the regulator, devices are used to connect it to a computer, or in the field it can be done using a transmitter and a special jumper.

Manufacturers of insane motors and regulators to them are a lot. Structurally and in size, unplanted engines are also very different. Moreover, the independent making of undercoltor engines based on parts from CD drives and other industrial bulk motors has become a very common phenomenon recently. Perhaps it is for this reason that there are no such approximate general classification among the collector fellow travelers. Let's bring a brief summary. To date, collector engines are mainly used in low-cost hobby models, or inner-level sports models. These engines are not expensive, easy to operate, and still constitute the most massive type of model electric motors. They are shifted by unbellets motors. The only deterrent is the price of their price. Together with the regulator, the uncoolette motor is 30-70% more expensive. However, the prices for electronics and motors fall, and the gradual displacement from the models of collector electric motors is only a matter of time.

AVR492: Control of DC Bear Motor Motor with AT90PWM3

Distinctive features:

  • BCEPT General Information
  • Uses the power cascade controller
  • Hardware implementation
  • Sample program code

Introduction

This application guidelines are described in these application recommendations, how to implement a control unit for controlling the DC control motor (BKEPT) using a position sensor based on AVR microcontroller AT90PWM3.

The high-performance microcontroller AVR core, which contains a power cascade controller, allows you to implement a controller for controlling a high-speed DC controller motor.

This document provides a short description of the principle of operation of the uncoolette motor DC motor, and the Details considers the BCEPT control in touch mode, and the description of the ATAVRMC100 reference development schema is described, which is based on these appointment recommendations.

Also discussed software implementation with a software-implemented control circuit based on the PID controller. To control the switching process, the use of only position sensors based on the Hall effect is implied.

Operating principle

The scope of BKEPT continuously increases, which is associated with a number of their advantages:

  1. The absence of a collector node, which simplifies or even excludes maintenance.
  2. Generate a lower level of acoustic and electrical noise compared to universal DC collector engines.
  3. Ability to work in hazardous environments (with flammable products).
  4. Good ratio of bulb characteristics and power ...

Engines of this type are characterized by a small inertia of the rotor, because Winding are located on the stator. Switching is controlled by electronics. Moments of switching are defined either according to information from position sensors, or by measuring the reverse e.d., generated by windings.

When operating using BKEPT sensors, it is usually of the three main parts: a stator, a rotor and linel sensors.

The stator of the classic three-phase BKEPT contains three windings. In many engines, the windings are divided into several sections, which reduces the rolling moment pulsations.

Figure 1 shows the electrical stator substitution scheme. It consists of three windings, each of which contains three consecutive elements included: inductance, resistance and reverse E.D.S.


Figure 1. Electrical stator replacement scheme (three phases, three windings)

The BKEPT rotor consists of an even number of permanent magnets. The amount of magnetic poles in the rotor also affects the size of the rotation and rolling momentum steps. The greater the number of poles, the smaller the size of the rotation step and less rolling momentum. Permanent magnets can be used with 1..5 pairs of poles. In some cases, the number of pairs of poles increases to 8 (Figure 2).



Figure 2. Stator and rotor of three-phase, three-winding BKEPT

The windings are installed stationary, and the magnet rotates. The BKEPT rotor is characterized by a lighter weight relative to the rotor of an ordinary universal DC motor, which is located on the rotor.

Hall Sensor

To estimate the position of the rotor, three Hall sensors are embedded in the engine housing. Sensors are installed at an angle of 120 ° in relation to each other. Using sensor data it is possible to perform 6 different switches.

Switching phases depends on the state of the hall sensors.

The supply of supply voltages on the winding changes after changing the states of the Hall sensor outputs. With the correct execution of synchronized switching, the torque remains approximately constant and high.



Figure 3. Hall sensor signals in the process of rotation

Switching phases

In order to simplify the description of the work of the three-phase BKEPT, we consider only its version with three windings. As previously shown, the switching phase depends on the output values \u200b\u200bof the Hall sensors. With the correct supply of voltage on the engine winding, a magnetic field is created and rotation is initiated. The most common and simple switching control method used to control the BCEPT is the turning on-shutdown scheme when the winding is either conducting current or not. At one point in time, only two windings can be seized, and the third remains disconnected. Connecting windings to power bus causes electric current. This method is called trapezoidal commutation or block switching.

A power cascade consisting of 3 half-liters is used to control BKEPT. The scheme of the power cascade is shown in Figure 4.



Figure 4. Power Cascade

According to the values \u200b\u200bof the Hall sensors, it is determined which keys must be closed.

Publisko 11.04.2013

General Device (Inrunner, Outrunner)

The base DC motor consists of a rotor with permanent magnets and stator with windings. Distinguish two types of engines: Inrunner.whose rotor magnets are inside the stator with windings and Outrunner.Which magnets are located outside and rotate around a fixed stator with windings.

Scheme Inrunner. Usually used for high-breasted engines with a small amount of poles. Outrunner. If necessary, get a high-generable engine with relatively small turns. Constructively Inrunners is simpler due to the fact that the fixed stator can serve as a body. It can be mounted mounting devices. In the case of Outrunners, the entire exterior rotates. The engine fastener is carried out for a fixed axis or a stator detail. In the case of a motor-wheel, the fastening is carried out for the fixed axis of the stator, the wires are rented to the stator through the hollow axis.

Magnets and poles

The number of poles on the rotor is even. The shape of the magnets used is usually rectangular. Cylindrical magnets are applied less often. They are installed with alternating poles.

The number of magnets does not always correspond to the number of poles. Several magnets can form one pole:

In this case, 8 magnets form 4 poles. The size of the magnets depends on the geometry of the engine and the characteristics of the motor. The stronger the magnets used, the higher the moment of force developed by the engine on the shaft.

Magnets on the rotor are fixed with a special glue. Less often designs with magnet holder. The rotor material can be magnetically conductive (steel), non-magnetically conductive (aluminum alloys, plastics, etc.) combined.

Winding and teeth

The winding of the three-phase uniform engine is performed by copper wire. The wire can be single-core or consist of several isolated lived. The stator is performed from several layers folded together of magnetically conductive steel.

The number of stator teeth should be divided by the number of phases. those. For a three-phase uniform engine, the number of stator teeth must share for 3. The number of stator teeth can be both more and less than the number of poles on the rotor. For example, there are motors with schemes: 9 teeth / 12 magnets; 51 Tooth / 46 magnets.

The engine with a 3 tooth stator is extremely rare. Since only two phases are operating at each time (when the star is turned on), the magnetic forces affect the rotor is not evenly throughout the circumference (see Fig.).

Forces acting on the rotor, try to plunge it, which leads to an increase in vibrations. To eliminate this effect, the stator is made with a large number of teeth, and the winding is distributed on the toys of the entire circumference of the stator as uniform.

In this case, the magnetic forces acting on the rotor compensate each other. The imbalance does not occur.

Variants of the distribution of windings of the phases of the stator teeth

Option of winding on 9 teeth


Option of winding on 12 teeth

In the diagrams of the teeth, the number of teeth is chosen so that it divided not only on 3. For example, for 36 Teeth have to 12 Teeth for one phase. 12 teeth can be distributed like this:

The most preferred scheme of 6 groups of 2 teeth.

Exists engine with 51 tooth in the stator! 17 teeth per phase. 17 is a simple number, It is found to be divided only to 1 and itself. How to distribute the winding on the teeth? Alas, but I could not find examples in the literature and techniques that would help solve this task. It turned out that the winding was distributed as follows:

Consider the real winding scheme.

Please note that the winding has different winding directions on different teeth. Different winding directions are indicated by capital and capital letters. In detail about the design of the windings, you can read in the literature proposed at the end of the article.

The classic winding is performed by one wire for one phase. Those. All windings on the teeth of the same phase are connected sequentially.

Teeth winding can be connected in parallel.

Can also be combined inclusions

Parallel and combined inclusion allows you to reduce the inductance of the winding, which leads to an increase in the current current (consequently, the power) and the rotational speed of the engine.

Electrical and real speed

If the engine rotor has two poles, then with one full turn of the magnetic field on the stator, the rotor makes one full turn. With 4 poles to rotate the motor shaft to one full turnover, two turns of the magnetic field will be required on the stator. The greater the number of poles of the rotor, the more electrical revolutions will be required to rotate the motor shaft by one turn. For example, we have 42 magnets on the rotor. In order to turn the rotor to one turn, it will take 42/2 \u003d 21 electrical turns. This property can be used as a kind of gearbox. Visitors the required number of poles, you can get an engine with the desired speed characteristics. In addition, the understanding of this process will we need in the future, when choosing the parameters of the regulator.

Position sensors

The engine without sensors differs from engines with sensors only in the absence of the latter. There are no other fundamental differences. The most common position sensors based on the Hall effect are most common. Sensors react to a magnetic field, they are placed, as a rule, in the stator in such a way that the rotor magnets affect them. The angle between the sensors should be 120 degrees.

This refers to the "electric" degrees. Those. For a multipole engine, the physical location of the sensors may be:


Sometimes sensors are located outside the engine. Here is one example of the location of the sensors. In fact, it was a motor without sensors. In such a simple way, it was equipped with Hall sensors.

On some engines, the sensors are installed on a special device that allows you to move sensors within certain limits. Using such a device, the advance angle is installed. However, if the engine requires a reverse (rotation in the opposite direction), the second set of sensors configured for the opposite move. Since Timing does not have a decisive value when starting and low revolutions, you can set the sensors to the zero point, and the advance angle can be corrected programmatically when the engine starts rotating.

The main characteristics of the engine

Each engine is calculated under certain requirements and has the following main characteristics:

  • Operating mode which engine is calculated: long or short-term. Long The mode of operation implies that the engine can work for hours. Such engines are calculated in such a way that the heat transfer into the environment was higher than the heat generation of the engine itself. In this case, it will not heal. Example: ventilation, escalator or conveyor drive. Short-term - It implies that the engine will turn on for a short period, which will not have time to warm up to the maximum temperature, after which the long period is followed, during which the engine has time to cool. Example: Lift Drive, Electric Shavers, Hair Dryers.
  • Engine winding resistance. The engine winding resistance affects the engine efficiency. The smaller the resistance, the higher the KPD. Having measured resistance, you can find out the presence of an interetic closure in the winding. Motor winding resistance is thousands of Ohm. It requires a special device or a special measurement technique.
  • Maximum operating voltage. Maximum voltage that is able to withstand the stator winding. The maximum voltage is interconnected with the following parameter.
  • Maximum revs. Sometimes indicate not maximum turnover, but KV - The number of engine revolutions per volt without load on the shaft. Multiplying this indicator on the maximum voltage, we get the maximum engine speed without load on the shaft.
  • Maximum current. The maximum allowable winding current. As a rule, the time is also indicated during which the engine can withstand the specified current. The limitation of the maximum current is associated with possible overheating of the winding. Therefore, at low ambient temperatures, the real time of operation with the maximum current will be greater, and in the heat the engine burns before.
  • Maximum engine power.Directly related to the previous parameter. This is a peak power that the engine can develop for a short period of time, usually for a few seconds. With long-term operation at maximum power, engine overheating is inevitable and its output is inevitable.
  • Rated power. The power that the engine can develop throughout the entire inclusion time.
  • Phase Angle Angle (Timing). The stator winding has some inductance that slows down the current increase in the winding. The current will reach the maximum after a while. In order to compensate for this delay, the switching of the phases is performed with a bit of ahead. Similarly, the ignition in the internal combustion engine, where the ignition advance angle is exhibited, taking into account the fuel ignition time.

It should also be paid to the fact that at rated loads you do not get maximum revolutions on the engine shaft. Kv. Indicated for not loaded engine. When powering the engine from batteries, it is necessary to take into account the "sediment" of the supply voltage under load, which in turn will also reduce the maximum engine speed.

Distinctive features:

  • BCEPT General Information
  • Uses the power cascade controller
  • Sample program code

Introduction

This application guidelines are described in these application recommendations, how to implement a control unit for controlling the DC control motor (BKEPT) using a position sensor based on AVR microcontroller AT90PWM3.

The high-performance microcontroller AVR core, which contains a power cascade controller, allows you to implement a controller for controlling a high-speed DC controller motor.

This document provides a short description of the principle of operation of the uncoolette motor DC motor, and the Details considers the BCEPT control in touch mode, and the description of the ATAVRMC100 reference development schema is described, which is based on these appointment recommendations.

Also discussed software implementation with a software-implemented control circuit based on the PID controller. To control the switching process, the use of only position sensors based on the Hall effect is implied.

Operating principle

The scope of BKEPT continuously increases, which is associated with a number of their advantages:

  1. The absence of a collector node, which simplifies or even excludes maintenance.
  2. Generate a lower level of acoustic and electrical noise compared to universal DC collector engines.
  3. Ability to work in hazardous environments (with flammable products).
  4. Good ratio of bulb characteristics and power ...

Engines of this type are characterized by a small inertia of the rotor, because Winding are located on the stator. Switching is controlled by electronics. Moments of switching are defined either according to information from position sensors, or by measuring the reverse e.d., generated by windings.

When operating using BKEPT sensors, it is usually of the three main parts: a stator, a rotor and linel sensors.

The stator of the classic three-phase BKEPT contains three windings. In many engines, the windings are divided into several sections, which reduces the rolling moment pulsations.

Figure 1 shows the electrical stator substitution scheme. It consists of three windings, each of which contains three consecutive elements included: inductance, resistance and reverse E.D.S.

Figure 1. Electrical stator replacement scheme (three phases, three windings)

The BKEPT rotor consists of an even number of permanent magnets. The amount of magnetic poles in the rotor also affects the size of the rotation and rolling momentum steps. The greater the number of poles, the smaller the size of the rotation step and less rolling momentum. Permanent magnets can be used with 1..5 pairs of poles. In some cases, the number of pairs of poles increases to 8 (Figure 2).


Figure 2. Stator and rotor of three-phase, three-winding BKEPT

The windings are installed stationary, and the magnet rotates. The BKEPT rotor is characterized by a lighter weight relative to the rotor of an ordinary universal DC motor, which is located on the rotor.

Hall Sensor

To estimate the position of the rotor, three Hall sensors are embedded in the engine housing. Sensors are installed at an angle of 120 ° in relation to each other. Using sensor data it is possible to perform 6 different switches.

Switching phases depends on the state of the hall sensors.

The supply of supply voltages on the winding changes after changing the states of the Hall sensor outputs. With the correct execution of synchronized switching, the torque remains approximately constant and high.


Figure 3. Hall sensor signals in the process of rotation

Switching phases

In order to simplify the description of the work of the three-phase BKEPT, we consider only its version with three windings. As previously shown, the switching phase depends on the output values \u200b\u200bof the Hall sensors. With the correct supply of voltage on the engine winding, a magnetic field is created and rotation is initiated. The most common and simple switching control method used to control the BCEPT is the turning on-shutdown scheme when the winding is either conducting current or not. At one point in time, only two windings can be seized, and the third remains disconnected. Connecting windings to power bus causes electric current. This method is called trapezoidal commutation or block switching.

A power cascade consisting of 3 half-liters is used to control BKEPT. The scheme of the power cascade is shown in Figure 4.


Figure 4. Power Cascade

According to the values \u200b\u200bof the Hall sensors, it is determined which keys must be closed.

Table 1. Switching the keys clockwise

In engines with several fields, electrical rotation does not correspond to mechanical rotation. For example, in four-polyvous BKEPT, four electrical rotation cycles correspond to one mechanical rotation.

The power and speed of the engine depends on the power of the magnetic field. You can adjust the speed of rotation and rotating the engine by changing the current through the winding. The most common way to control the current through the winding is the middle current. To do this, use latitude-pulse modulation (PWM), the operating cycle of which determines the average voltage value on the windings, and, therefore, the average current value and, as a result, the rotational speed. The speed can be adjusted at frequencies from 20 to 60 kHz.

The rotating field of three-phase, three-winding BKEPT is shown in Figure 5.


Figure 5. Switching steps and rotating field

The switching process creates a rotating field. On the stage 1 phase A, it connects to the positive feed bus of the SW1 key, the phase B is connected to a common with the SW4 key, and the phase C remains unconnected. Phases A and B are created two vector magnetic flux (shown in red and blue arrows, respectively), and the sum of these two vectors gives the vector of the magnetic stream of the stator (green arrow). After that, the rotor tries to follow the magnetic stream. As soon as the rotor reaches a certain position in which the state of the hall sensors is changed from the "010" value to "011", the switching of the engine windings is performed accordingly: the phase in remains uncasal, and the phase C is connected to the total. This leads to the generation of the new vector of the magnetic stream of the stator (stage 2).

If you follow the switching scheme shown in Figure 3 and in Table 1, we obtain six different magnetic flux vectors corresponding to six switching steps. Six steps correspond to one rotor turnover.

Starter set atavrmc100

The circuit diagram is presented in Figures 21, 22, 23 and 24 at the end of the document.

The program contains a speed control circuit with a PID controller. Such a regulator consists of three links, each of which is characterized by its own transmission ratio: KP, KI and KD.

KP is the transmission coefficient of the proportional link, Ki is the transmission coefficient of the integrating link and KD - the coefficient of transmission of the differentiating link. The deviation of the specified speed from the actual (in Figure 6 is called the "Missing" signal ") is processed by each of the links. The result of these operations is folded and fed to the engine to obtain the desired speed of rotation (see Figure 6).


Figure 6. Structural PID Regulator Scheme

The CP coefficient affects the duration of the transition process, the coefficient ki allows you to suppress static errors, and the CD is used, in particular, to stabilize the position (see the description of the control circuit in the software archive for changing coefficients).

Description of hardware

As shown in Figure 7, the microcontroller contains 3 power cascade controllers (PSC). Each PSC can be considered as a latitude-pulse modulator (PWM) with two output signals. To avoid the occurrence of through current, the PSC supports the ability to control the latency of the power of power keys (see the documentation for AT90PWM3 for a more detailed study of the PSC operation, as well as Figure 9).

Emergency input (over_current, current overload) is associated with PSCIN. Emergency input allows the microcontroller to disable all PSC outputs.


Figure 7. Hardware implementation

To measure the current, two differential channels with a programmable amplifier cascade can be used (ku \u003d 5, 10, 20 or 40). After selecting the gain coefficient, it is necessary to pick up the nominal sunting resistor for the most complete coverage of the conversion range.

The Over_Current signal is formed by an external comparator. The threshold voltage of the comparator can be adjusted using an internal DAC.

Switching the phases must be performed in accordance with the value at the outputs of the Hall sensors. DH_A, dh_b and dh_c are connected to the inputs of sources of external interrupts or to three internal comparators. Comparators generate the same type of interrupts as external interrupts. Figure 8 shows how the I / O ports are used in the starting set.


Figure 8. Using the microcontroller I / O ports (SO32 housing)

VMOT (VDV) and VMOT_HALF (1/2 VDV) are implemented, but not used. They can be used to obtain information about the power supply voltage.

Outputs H_x and L_X are used to control the power bridge. As mentioned above, they depend on the power cascade controller (PSC), which generates PWM signals. In this application, it is recommended to use control mode in the center (see Figure 9) when the OCR0RA register is used to synchronize the launch of the ADC transformation to measure the current.


Figure 9. Oscillograms of PSCN0 and PSCN1 signals in level alignment mode

  • Time incl. 0 \u003d 2 * OcrNSA * 1 / FCLKPSC
  • Time incl. 1 \u003d 2 * (OCRNRB - OCRNSB + 1) * 1 / FCLKPSC
  • PSC \u003d 2 * (OCRNRB + 1) * 1 / FCLKPSC

Non-defense pause between PSCN0 and PSCN1:

  • | OcrNSB - OcrNSA | * 1 / FCLKPSC

The PSC block is clocked by CLKPSC signals.

One of two methods can be used to feed the PWM signals in the power cascade. The first is the application of the PWM signals to the upper and lower parts of the power cascade, and the second - in the PWM signals application only to the upper parts.

Software description

Atmel has developed libraries to control BKEPT. The first step of their use is the configuration and initialization of the microcontroller.

Configuration and initialization of the microcontroller

To do this, use the MC_INIT_MOTOR () function. It causes the function of initializing the hardware and software part, as well as initializes all engine parameters (direction of rotation, speed and stop motor).

Software structure structure

After the configuration and initialization of the microcontroller can be launched the engine. Only several functions are needed to control the engine. All functions are defined in MC_LIB.H:

Void MC_MOTOR_RUN (Void) - Used to start the engine. The stabilization circuit function is called to install the PWM working cycle. After that, the first switching phase is performed. BOOL MC_MOTOR_IS_RUNNING (Void) - Determining the engine status. If "1", the engine works if "0", the engine is stopped. Void MC_Motor_Stop (Void) - Used to stop the engine. Void MC_SET_MOTOR_SPEED (U8 SPEED) - installation of a user-defined speed. U8 MC_GET_MOTOR_SPEED (Void) - Returns the user specified speed. Void MC_SET_MOTOR_DIRECTION (U8 Direction) - setting the direction of rotation "CW" (clockwise) or "CCW" (counterclockwise). U8 MC_GET_MOTOR_DIRECTION (Void) - Returns the current direction of rotation of the engine. U8 MC_SET_MOTOR_MEASURED_SPEED (U8 Measured_Speed) - Saving the measured speed in the MEASURED_SPEED variable. U8 MC_GET_MOTOR_MEASURED_SPEED (Void) - Returns the measured speed. Void MC_SET_CLOSE_LOOP (Void) void MC_SET_OPEN_LOOP (Void) - configuration of the stabilization circuit: closed circuit or open (see Figure 13).


Figure 10. AT90PWM3 configuration


Figure 11. Software structure

Figure 11 shows four variables MC_RUN_STOP (START / STOP), MC_Direction (Direction), MC_CMD_SPEED (specified speed) and MC_MEASURD_SPEED (measured speed). They are the main software variables, access to which can be performed by the previously described user functions.

Software implementation can be viewed as a black box with the name "Engine Management" (Figure 12) and multiple inputs (MC_RUN_STOP, MC_Direction, MC_CMD_SPEED, MC_MEASURD_SPEED) and outputs (all power bridge control signals).


Figure 12. Basic software variables

Most features are available in MC_DRV.H. Only some of them depend on the type of engine. Functions can be divided into four main classes:

  • Initialization of the hardware
  • void mc_init_hw (void); The initialization of the hardware is fully implemented in this function. Here are initialized ports, interrupts, timers and controllers of the power cascade.

    Void mc_init_sw (void); Used to initialize software. Allows all interrupts.

    Void MC_INIT_PORT (Void); Initialization of the I / O port by setting through the DDRX registers, which conclusions function as an input, and which output, as well as indicating which inputs it is necessary to enable pull-up resistors (through the portx register).

    Void mc_init_pwm (void); This feature starts the PLG and sets all PSC registers to its original state.

    Void mc_init_it (void); Modify this feature to resolve or prohibit interrupt types.

    Void PSC0_INIT (Unsigned int DT0, unsigned int ot0, unsigned int dt1, unsigned int ot1); Void PSC1_INIT (unsigned int dt0, unsigned int ot0, unsigned int dt1, unsigned int ot1); Void PSC2_INIT (unsigned int dt0, unsigned int ot0, unsigned int dt1, unsigned int ot1); PSCX_INIT allows the user to select the configuration of the power cascade controller (PSC) of the microcontroller.

  • Switching functions U8 MC_GET_HALL (Void); Reading the state of the hall sensors corresponding to six switching steps (HS_001, HS_010, HS_011, HS_100, HS_101, HS_110).

    Interrupt void MC_HALL_A (Void); _Interrupt void mc_hall_b (void); _Interrupt void mc_hall_c (void); These functions are executed if the external interruption is detected (changing the output of the Hall sensors). They allow you to switch the phases and calculate the speed.

    Void MC_DUTY_CYCLE (U8 LEVEL); This function sets the operating cycle of PWM in accordance with the PSC configuration.

    Void MC_SWITCH_COMMUTIATION (U8 Position); The switching of the phases is performed in accordance with the value at the outputs of the Hall sensors and only if the user starts the engine.

  • Configuration of the Time Conversion Void MC_CONFIG_SAMPLING_PERIOD (Void); Timer 1 initialization for interrupt generation every 250 μs. _interrupt void launch_sampling_period (void); After activating 250 μL interrupts sets the flag. It can be used to control the conversion time.
  • Void valuation Void MC_CONFIG_TIME_ESTIMATION_SPEED (Void); Configuration Timer 0 To perform the speed calculation function.

    Void MC_ESTIMATION_SPEED (Void); This function calculates the engine speed based on the principle of measuring the period of the liner sensor pulses.

    Interrupt void OVFL_TIMER (Void); If an interrupt occurs, an increment of an 8-bit variable is incremented for implementing a 16-bit timer using an 8-bit timer.

  • Current measurement _interrupt void ADC_EOC (Void); The ADC_EOC function is performed immediately after converting the amplifier to install the flag that the user can be used.

    Void MC_INIT_CURRENT_MEASURE (Void); This feature initializes amplifier 1 for current measurement.

    U8 MC_GET_CURRENT (Void); Read current value if the conversion is complete.

    BOOL MC_CONVERSION_IS_FINISHED (Void); Indicates conversion completion.

    Void mc_ack_eoc (void); Reset the conversion completion flag.

  • Detection of current overloading Void MC_SET_OVER_CURRENT (U8 LEVEL); Sets the threshold for determining the current overload. As a threshold, there is an exit of the DAC associated with the external comparator.

The stabilization circuit is selected using two functions: open (MC_SET_OPEN_LOOP ()) or closed circuit (MC_SET_CLOSE_LOOP ()). Figure 13 shows a software-implemented stabilization circuit.


Figure 13. Stabilization circuit

A closed circuit is a circuit of stabilization of the PID-regulator-based speed.

As shown earlier, the KP coefficient is used to stabilize the engine response time. At first, set the ki and kD equal to 0. To obtain the desired engine response time, you must select the value of the KP.

  • If the response time is too small, then increase the CP.
  • If the response time is fast, but not stable, then reduce the CP.


Figure 14. Setting up KP

The ki parameter is used to suppress the static error. Leave the CP coefficient unchanged and set the ki parameter.

  • If the error differs from zero, then increase the ki.
  • If the suppression of the error was preceded by an oscillatory process, then reduce the ki.


Figure 15. Custom

Figures 14 and 15 shows examples of selecting the correct parameters of the KP regulator \u003d 1, ki \u003d 0.5 and kd \u003d 0.

Setting the CD parameter:

  • If the speed is low, then increase the CD.
  • With instability of the CD, it is necessary to reduce.

Another essential parameter is the conversion time. It must be chosen regarding the system reacting time. The conversion time must be at least two times less than the response time of the system (according to the Cotelnikov rule).

To configure the conversion time, two functions are provided (discussed above).

Their result is displayed in the G_Tick global variable, which is installed every 250 μs. With this variable it is possible to configure the conversion time.

CPU and memory usage

All measurements are performed at a generator frequency of 8 MHz. They also depend on the type of engine (number of pairs of poles). When using the engine with 5 pairs of poles, the signal frequency at the output of the Hall sensor is 5 times lower than the engine speed.

All the results shown in Figure 16 were obtained using a three-phase BKEPT with five pairs of poles and the maximum rotation frequency of 14000 rpm.


Figure 16. Using the speed of the microcontroller

In the worst case, the microcontroller load level is about 18% with a transformation time of 80 ms and the rotational speed of 14000 rpm.

The first estimate can be performed for a faster engine and with the addition of the current stabilization function. The execution time of the MC_REGulation_loop () function is between 45 and 55msc (it is necessary to take into account the TSP conversion time of about 7 μs). A BCEPT was selected for the assessment with a current response time of about 2-3 ms, five pairs of poles and the maximum rotation frequency of about 2-3 ms.

The maximum engine speed is about 50,000 rpm. If the rotor uses 5 pairs of poles, the resulting frequency at the outlet of the Hall sensors will be equal to (50,000 rpm / 60) * 5 \u003d 4167 Hz. The MC_ESTIMATION_SPEED () function starts with each increasing front of the Hall sensor A, i.e. Every 240 ISS with the duration of the execution of 31 μs.

The MC_SWITCH_COMMUTIATION () function depends on the operation of the Hall sensors. It is performed when the fronts occur at the output of one of the three Hall sensors (increasing or falling front), thus, in one period of pulses at the output of the Hall sensor, six interrupts are generated, and the resulting frequency of the function call is 240/6 μs \u003d 40 μs.

Finally, the conversion time of the stabilization circuit should be at least two times less than the engine response time (about 1 ms).

The results are shown in Figure 17.


Figure 17. Assessment of the loading of the microcontroller

In this case, the level of loading the microcontroller is about 61%.

All measurements were performed using the same software. Communication resources are not used (WAPP, LIN ...).

Under such conditions, the following memory capacity is used:

  • 3175 program memory bytes (38.7% of the total flash memory).
  • 285 data memory bytes (55.7% of the total volume of static RAM).

Configuration and use of atavrmc100

Figure 18 presents a complete diagram of various operating modes of the ATAVRMC100 starting set.


Figure 18. Purpose of the I / O ports of the microcontroller and communication modes

Operating mode

Two different modes of operation are supported. Set jumpers JP1, JP2 and JP3 in accordance with Figure 19 to select one of these modes. In these application guidelines, only mode using sensors is used. A full description of the hardware is provided in the user manual for the ATAVRMC100 set.


Figure 19. Select control mode using sensors

Figure 19 shows the source settings of the jumpers that comply with the use of software associated with these application guidelines.

The program that comes with the ATAVRMC100 board supports two modes of operation:

  • running the engine at maximum speed without external components.
  • adjusting the engine speed using one external potentiometer.


Figure 20. Potentiometer connection

Conclusion

In these recommendations for use, a hardware and software solution for controlling the control unit of the DC is presented using sensors. In addition to this document, the full source code is available for download.

The program library includes starting and controlling the speed of any BCEPT with built-in sensors.

The schematic diagram contains a minimum of external components necessary for control of BKEPT with built-in sensors.

The capabilities of the CPU and the memory of the AT90PWM3 microcontroller will allow the developer to expand the functional solution.


Figure 21. Concept electrical circuit (part 1)


Figure 22. Concept electrical diagram (part 2)


Figure 23. Concept electrical circuit (part 3)


Figure 24. Concept electrical diagram (part 4)

Documentation:

Fantastic renovation of apartments and repair cottages for big money.

Badcontorous engines have improved power indicators per kilogram of weight (own) and a wide range of rotational speed; impressive efficiency of this power plant. It is important that radio intercoms are practically not emitted from the installation. This allows you to accommodate the equipment sensitive to interference without fears for the correctness of the operation of the entire system.

It is possible to place and use the brushless engine in the water, it will not affect it a negative way. Also, its design provides for the location in aggressive environments. However, in this case, the location of the control unit should be thought out in advance. Remember that only with the careful neat operation of the power plant, it will work in your production efficiently and smooth over long years.

Long and short-term operation is basic for database. For example, a long mode of operation is suitable for an escalator or conveyor, in which the electric motor works static over a long amount of the clock. For a long mode of operation, an increased external heat transfer is provided: heat dissipation to the environment should exceed the internal heat dissipation of the power plant.

In short mode, the engine during its work should not have time to warm up to the maximum temperature value, i.e. Must be turned off before this moment. During breaks between the inclusions and the engine work, it should have time to cool. This is how the insane engines work in lifting elevator mechanisms, electric razors, dryers, hair dryers and a friend of modern electrical equipment.

The engine winding resistance is associated with the efficiency of the power plant. Maximum efficiency can be achieved with the smallest winding resistance.

The maximum operating voltage is the limit voltage value that can be submitted to winding the stator of the power plant. The maximum operating voltage is directly related to the maximum engine turnover and the maximum value of the winding current. The maximum value of the winding current is limited to the possibility of overheating winding. It is for this reason that an optional, but recommended operating condition of electric motors is the negative ambient temperature. It allows you to significantly compensate for the overheating of the power plant and increase the duration of its operation.

The maximum engine power is the limit power to which the system can achieve in a few seconds. It should be borne in mind that the long-term operation of the electric motor at maximum power will inevitably lead to the overheating of the system and a failure in its operation.

Rated power is the power that the power supply can develop during the periodic permitted permitted work period (one inclusion).

The phase advance angle is provided in the electric motor due to the need to compensate for the phase switch delay.