Homemade driver for shd circuit. We control stepper motors and DC motors, L298 and Raspberry Pi. Fast and slow current decay

home / About cars

Stepper motors have long been successfully used in a wide variety of devices. They can be found in disk drives, printers, plotters, scanners, faxes, as well as in a variety of industrial and special equipment. Currently, many different types of stepper motors are produced for all occasions. However, choosing the right type of engine is still half the battle. It is equally important to choose the right driver circuit and its operation algorithm, which is often determined by the microcontroller program. The purpose of this article is to systematize information about the design of stepper motors, how to control them, driver circuits and algorithms. As an example, a practical implementation of a simple and cheap stepper motor driver based on an AVR microcontroller is given.

What's happened stepper motor, and why is it needed?

A stepper motor is an electromechanical device that converts electrical impulses into discrete mechanical movements. So, perhaps, it is possible to give a strict definition. Probably, everyone has seen what a stepper motor looks like externally: it practically does not differ from other types of motors. Most often it is a round body, a shaft, several leads (Fig. 1).

Rice. one. Appearance stepper motors of the DSHI-200 family.

However, stepper motors have some unique properties which sometimes makes them extremely convenient to use or even indispensable.

How good is a stepper motor?

  • the angle of rotation of the rotor is determined by the number of pulses that are applied to the motor
  • motor provides full torque in stop mode (if windings are energized)
  • precision positioning and repeatability. Good stepper motors have an accuracy of 3-5% of the step size. This error does not accumulate from step to step
  • quick start/stop/reverse capability
  • high reliability due to the absence of brushes, the life of the stepper motor is actually determined by the life of the bearings
  • unambiguous dependence of the position on the input pulses ensures positioning without feedback
  • the possibility of obtaining very low rotational speeds for a load attached directly to the motor shaft without an intermediate gearbox
  • quite a wide range of speeds can be covered, the speed is proportional to the frequency of the input pulses

But not everything is so good...

  • stepper motor inherent resonance phenomenon
  • possible loss of position control due to open loop operation
  • power consumption does not decrease even without load
  • difficult to work at high speeds
  • low power density
  • relatively complex control scheme

What to choose?

Stepper motors belong to the class of brushless motors direct current. Like any brushless motor, they are highly reliable and have a long service life, making them suitable for critical applications such as industrial applications. Compared to conventional DC motors, stepper motors require much more complex control circuits to perform all the switching of the windings when the motor is running. In addition, the stepper motor itself is an expensive device, so where precise positioning is not required, conventional brushed motors have a distinct advantage. In fairness, it should be noted that recently controllers are increasingly used to control collector motors, which are practically not inferior in complexity to stepper motor controllers.

One of the main advantages of stepper motors is the ability to perform precise positioning and speed control without a feedback sensor. This is very important, as such sensors can cost much more than the engine itself. However, this is only suitable for systems that operate at low acceleration and with a relatively constant load. At the same time, feedback systems are capable of operating with high accelerations and even with a variable nature of the load. If the stepper motor load exceeds its torque, then information about the position of the rotor is lost and the system requires basing using, for example, a limit switch or other sensor. Feedback systems do not have this drawback.

When designing specific systems, one has to make a choice between a servo motor and a stepper motor. When precise positioning and precise speed control are required, and the required torque and speed are within acceptable limits, a stepper motor is the most economical solution. As with conventional motors, a reduction gear can be used to increase the torque. However, a gearbox is not always suitable for stepper motors. Unlike brushed motors, where torque increases with speed, a stepper motor has more torque at low speeds. In addition, stepper motors have a much lower maximum speed compared to commutator motors, which limits the maximum gear ratio and, accordingly, the increase in torque using a gearbox. Ready-made stepper motors with gearboxes, although they exist, are exotic. Another fact that limits the use of the gearbox is its inherent backlash.

The ability to achieve low speed is often the reason why developers, being unable to design a gearbox, use stepper motors unnecessarily often. At the same time, the commutator motor has higher specific power, low cost, simple control scheme, and together with single-stage worm gear it is capable of providing the same speed range as a stepper motor. In addition, this provides a much greater torque. Drives based on collector motors are very often used in military technology, and this indirectly indicates good parameters and high reliability of such drives. And in modern household appliances, cars, industrial equipment, collector motors are quite common. Nevertheless, stepper motors have their own, albeit rather narrow, scope of application, where they are indispensable.

Types of stepper motors

There are three main types of stepper motors:

  • variable reluctance motors
  • permanent magnet motors
  • hybrid engines

You can even determine the type of engine by touch: when the shaft of a de-energized permanent magnet (or hybrid) engine rotates, a variable resistance to rotation is felt, the engine rotates as if with clicks. At the same time, the shaft of a de-energized variable reluctance motor rotates freely. Hybrid motors are a further development of permanent magnet motors and do not differ from them in the way they are controlled. You can also determine the type of motor by the configuration of the windings. Variable reluctance motors usually have three (rarely four) windings with one common terminal. Permanent magnet motors most often have two independent windings. These windings may have taps from the middle. Sometimes permanent magnet motors have 4 separate windings.

In a stepper motor, the torque is generated by the magnetic fluxes of the stator and rotor, which are appropriately oriented relative to each other. The stator is made of high permeability material and has multiple poles. A pole can be defined as a certain area of ​​a magnetized body where the magnetic field is concentrated. The poles have both a stator and a rotor. To reduce eddy current losses, the magnetic circuits are assembled from separate plates, similar to the core of a transformer. The torque is proportional to the magnitude of the magnetic field, which is proportional to the current in the winding and the number of turns. Thus, the torque depends on the parameters of the windings. If at least one winding of the stepper motor is energized, the rotor assumes a certain position. It will be in this position until the external applied moment exceeds a certain value, called the holding moment. After that, the rotor will turn and will try to take one of the following equilibrium positions.

Variable Reluctance Motors

Stepper motors with variable magnetic resistance have several poles on the stator and a gear-shaped rotor made of soft magnetic material (Fig. 2). The magnetization of the rotor is absent. For simplicity, in the figure the rotor has 4 teeth and the stator has 6 poles. The motor has 3 independent windings, each wound on two opposite stator poles. Such an engine has a step of 30 degrees.

Rice. 2. Engine with variable magnetic resistance.

When the current is turned on in one of the coils, the rotor tends to take a position when the magnetic flux is closed, i.e. the teeth of the rotor will be opposite those poles on which the energized winding is located. If you then turn off this winding and turn on the next one, the rotor will change position, again closing the magnetic flux with its teeth. Thus, in order to carry out continuous rotation, it is necessary to turn on the phases alternately. The motor is not sensitive to the direction of current in the windings. A real motor may have more stator poles and more rotor teeth, corresponding to more steps per revolution. Sometimes the surface of each stator pole is made toothed, which, together with the corresponding teeth of the rotor, provides a very small step angle, on the order of a few degrees. Variable reluctance motors are rarely used in industrial applications.

Permanent magnet motors

Permanent magnet motors consist of a stator that has windings and a rotor that contains permanent magnets (Figure 3). The alternating poles of the rotor have a rectilinear shape and are parallel to the axis of the motor. Due to the magnetization of the rotor, such motors provide a greater magnetic flux and, as a result, a greater torque than motors with variable magnetic resistance.

Rice. 3. Permanent magnet motor.

The motor shown in the figure has 3 pairs of rotor poles and 2 pairs of stator poles. The motor has 2 independent windings, each of which is wound on two opposite stator poles. Such an engine, like the engine with variable magnetic resistance considered earlier, has a step size of 30 deg. When the current is turned on in one of the coils, the rotor tends to take a position where the opposite poles of the rotor and stator are opposite each other. To implement continuous rotation, you need to turn on the phases alternately. In practice, permanent magnet motors typically have 48 - 24 steps per revolution (step angle 7.5 - 15 degrees).

A section of a real permanent magnet stepper motor is shown in fig. 4.

Rice. 4. Section of a stepper motor with permanent magnets.

To reduce the cost of the engine design, the stator magnetic circuit is made in the form of a stamped glass. Inside there are pole pieces in the form of lamellae. The phase windings are placed on two different magnetic circuits, which are installed on top of each other. The rotor is a cylindrical multi-pole permanent magnet.

Permanent magnet motors are subject to rotor side back EMF which limits the maximum speed. Variable reluctance motors are used for high speed operation.

hybrid engines

Hybrid motors are more expensive than permanent magnet motors, but they provide smaller steps, more torque, and faster speeds. The typical number of steps per revolution for hybrid engines is between 100 and 400 (step angle 3.6 - 0.9 degrees). Hybrid motors combine the best features of variable reluctance and permanent magnet motors. The rotor of a hybrid engine has teeth arranged in an axial direction (Fig. 5).

Rice. 5. Hybrid engine.

The rotor is divided into two parts, between which is a cylindrical permanent magnet. Thus, the teeth of the upper half of the rotor are the north poles, and the teeth of the lower half are the south. In addition, the upper and lower halves of the rotor are rotated relative to each other by half the pitch angle of the teeth. The number of pairs of rotor poles is equal to the number of teeth on one of its halves. The toothed pole pieces of the rotor, like the stator, are assembled from separate plates to reduce eddy current losses. The hybrid motor stator is also toothed, providing a large number of equivalent poles, as opposed to the main poles where the windings are located. Usually 4 main poles are used for 3.6 deg. motors and 8 main poles for 1.8- and 0.9 deg. engines. The teeth of the rotor provide less resistance to the magnetic circuit at certain positions of the rotor, which improves static and dynamic torque. This is ensured by the appropriate arrangement of the teeth, when part of the rotor teeth is strictly opposite the stator teeth, and part is between them. The relationship between the number of rotor poles, the number of equivalent stator poles and the number of phases determines the step angle S of the motor:

S \u003d 360 / (Nph * Ph) \u003d 360 / N,

where Nph - number of equivalent poles per phase = number of rotor poles,
Ph - number of phases,
N is the total number of poles for all phases together.

The rotor of the motor shown in the figure has 100 poles (50 pairs), the motor has 2 phases, so the total number of poles is 200, and the pitch, respectively, is 1.8 degrees.

The longitudinal section of the hybrid stepper motor is shown in fig. 6. The arrows show the direction of the magnetic flux permanent magnet rotor. Part of the flux (shown as a black line in the figure) passes through the rotor pole pieces, the air gaps and the stator pole piece. This part is not involved in the creation of the moment.

Rice. 6. Longitudinal section of a hybrid stepper motor.

As can be seen in the figure, the air gaps at the upper and lower pole pieces of the rotor are different. This is achieved by turning the pole pieces by half the pitch of the teeth. Therefore, there is another magnetic circuit that contains minimal air gaps and, as a result, has a minimal magnetic resistance. Another part of the flow closes along this circuit (shown in the figure by a dashed white line), which creates the moment. Part of the chain lies in a plane perpendicular to the figure, therefore it is not shown. In the same plane, the magnetic flux of the stator coil is created. In a hybrid engine, this flow is partially closed by the rotor pole pieces, and the permanent magnet “sees” it weakly. Therefore, unlike DC motors, the hybrid motor magnet cannot be demagnetized at any winding current.

The gap between the teeth of the rotor and the stator is very small - typically 0.1 mm. This requires high precision during assembly, so the stepper motor should not be disassembled for the sake of satisfying curiosity, otherwise its service life may end there.
So that the magnetic flux does not close through the shaft, which passes inside the magnet, it is made of non-magnetic steel grades. They are usually very brittle, so a shaft, especially a small diameter, should be handled with care.

To obtain large moments, it is necessary to increase both the field created by the stator and the field of the permanent magnet. This requires a larger rotor diameter, which worsens the ratio of torque to moment of inertia. Therefore, powerful stepper motors are sometimes structurally made from several sections in the form of a whatnot. Torque and moment of inertia increase in proportion to the number of sections, and their ratio does not deteriorate.

There are other designs of stepper motors. For example, motors with a disk magnetized rotor. Such motors have a small moment of inertia of the rotor, which is important in some cases.

Most modern stepper motors are hybrid. In fact hybrid engine is a permanent magnet motor, but with a large number of poles. According to the control method, such engines are the same, only such engines will be considered further. Most often in practice, engines have 100 or 200 steps per revolution, respectively, the step is 3.6 degrees or 1.8 degrees. Most controllers allow half-stepping, where this angle is half, and some controllers provide microstepping.

Bipolar and unipolar stepper motors

Depending on the configuration of the windings, the motors are divided into bipolar and unipolar. A bipolar motor has one winding in each phase, which must be reversed by the driver in order to change the direction of the magnetic field. This type of motor requires a bridge driver, or a half-bridge driver with dual supply. In total, the bipolar motor has two windings and, accordingly, four outputs (Fig. 7a).

Rice. 7. Bipolar motor (a), unipolar (b) and four-winding (c).

A unipolar motor also has one winding in each phase, but a tap is made from the middle of the winding. This makes it possible to change the direction of the magnetic field created by the winding by simply switching the halves of the winding. This greatly simplifies the driver circuit. The driver should only have 4 simple keys. Thus, in a unipolar motor, a different way of changing the direction of the magnetic field is used. The middle terminals of the windings can be combined inside the motor, so such a motor can have 5 or 6 terminals (Fig. 7b). Sometimes unipolar motors have separate 4 windings, for this reason they are mistakenly called 4-phase motors. Each winding has separate leads, so there are 8 leads in total (Fig. 7c). With an appropriate connection of the windings, such a motor can be used as a unipolar or bipolar. A unipolar motor with two windings and taps can also be used in bipolar mode if the taps are left unconnected. In any case, the winding current should be chosen so as not to exceed the maximum power dissipation.

Bipolar or unipolar?

If we compare bipolar and unipolar motors, then bipolar has a higher power density. For the same size, bipolar motors provide more torque.

The moment created by the stepper motor is proportional to the magnitude of the magnetic field created by the stator windings. The way to increase the magnetic field is to increase the current or the number of turns of the windings. A natural limitation when increasing the current of the windings is the danger of saturation of the iron core. However, in practice this limitation is rarely enforced. Much more significant is the limitation on motor heating due to ohmic losses in the windings. Just this fact demonstrates one of the advantages of bipolar motors. In a unipolar motor, only half of the windings are used at any given time. The other half simply takes up space in the core window, which forces the windings to be made with smaller diameter wire. At the same time, all windings are always working in a bipolar motor, i.e. their use is optimal. In such a motor, the cross section of the individual windings is twice as large, and the ohmic resistance is, accordingly, half as much. This makes it possible to increase the current by the root of two times with the same losses, which gives a gain in torque of about 40%. If increased torque is not required, a unipolar motor allows you to reduce the size or simply work with less loss. In practice, however, unipolar motors are often used, since they require much simpler winding control circuits. This is important if the drivers are implemented on discrete components. Currently, there are specialized driver microcircuits for bipolar motors, using which the driver is no more difficult than for a unipolar motor. For example, these are L293E, L298N or L6202 chips from SGS-Thomson, PBL3770, PBL3774 from Ericsson, NJM3717, NJM3770, NJM3774 from JRC, A3957 from Allegro, LMD18T245 from National Semiconductor.

Diagrams, charts...

There are several ways to control the phases of a stepper motor.

The first method is provided by alternating phase switching, while they do not overlap, only one phase is switched on at one time (Fig. 8a). This method is called "one phase on" full step or wave drive mode. The rotor balance points for each pitch are the same as the "natural" rotor balance points of an unpowered motor. The disadvantage of this control method is that for a bipolar motor, 50% of the windings are used at the same time, and for a unipolar motor, only 25%. This means that full torque cannot be obtained in this mode.

Rice. 8. Various ways to control the phases of the stepper motor.

The second way is overlapping phase control: two phases are switched on at the same time. It is called ”two-phase-on” full step or simply full step mode. With this control method, the rotor is fixed in intermediate positions between the stator poles (Fig. 8b) and provides approximately 40% more torque than in the case of a single phase. This control method provides the same step angle as the first method, but the position of the rotor equilibrium points is shifted by half a step.

The third mode is a combination of the first two and is called half step mode, ”one and two-phase-on” half step or simply half step mode, when the motor takes a step in half of the main one. This method of control is quite common, as a smaller pitch motor costs more and it is very tempting to get 200 steps per revolution from a 100 step motor. Every second step only one phase is powered, and in other cases two are powered (Fig. 8c). As a result, the angular displacement of the rotor is half the pitch angle for the first two control methods. In addition to reducing the step size, this control method allows you to partially get rid of the resonance phenomenon. Half-stepping typically does not provide full torque, although the most advanced drivers implement a modified half-stepping mode in which the motor delivers almost full torque without exceeding the power dissipation rating.

Another control method is called microstepping mode or micro stepping mode. With this control method, the current in the phases must be changed in small steps, thus ensuring that the half step is split into even smaller microsteps. When two phases are switched on at the same time, but their currents are not equal, then the equilibrium position of the rotor will not lie in the middle of the step, but in a different place, determined by the ratio of the phase currents. By changing this ratio, it is possible to provide a certain number of microsteps within one step. In addition to increasing resolution, microstepping has other advantages, which will be described below. At the same time, to implement the microstep mode, much more complex drivers are required, which make it possible to set the current in the windings with the required discreteness. The half-stepping mode is a special case of the microstepping mode, but it does not require the formation of a stepped coil supply current, therefore it is often implemented.

Hold it!

In full step mode with two phases on, the positions of the rotor equilibrium points are shifted by half a step. It should be noted that the rotor takes these positions when the engine is running, but the position of the rotor cannot remain unchanged after the winding current is turned off. Therefore, when the motor is powered on and off, the rotor will shift by half a step. In order for it not to shift when stopped, it is necessary to apply a holding current to the windings. The same is true for half-stepping and microstepping modes. It should be noted that if the motor rotor rotated in the off state, then when the power is turned on, the rotor may be displaced by more than half a step.

The holding current can be less than the rated current, since a fixed rotor motor usually does not require much torque. However, there are applications where the motor must provide full torque when stopped, which is possible with a stepper motor. This property of the stepper motor allows in such situations to do without mechanical brake systems. Since modern drivers allow you to adjust the current supply to the motor windings, setting the required holding current is usually not a problem. The challenge is usually simply the appropriate software support for the control microcontroller.

half step mode

The basic principle of a stepper motor is to create a rotating magnetic field that causes the rotor to turn. The rotating magnetic field is generated by the stator, the windings of which are appropriately energized.

For a motor with one winding energized, the dependence of torque on the angle of rotation of the rotor relative to the equilibrium point is approximately sinusoidal. This relationship for a two-winding motor that has N steps per revolution (step angle in radians S = (2*pi)/N) is shown in fig. nine.

Rice. 9. Dependence of torque on the angle of rotation of the rotor for one powered winding.

In reality, the nature of the dependence may be somewhat different, which is explained by the non-ideal geometry of the rotor and stator. The peak value of the torque is called the holding torque. The formula describing the dependence of the torque on the angle of rotation of the rotor is as follows:

T = - Th*sin((pi/2)/S)*Ф),

where T - moment, Th - holding moment,
S - step angle,
Ф is the angle of rotation of the rotor.

If an external torque greater than the holding torque is applied to the rotor, the rotor will turn. If the external torque does not exceed the holding torque, then the rotor will be in equilibrium within the pitch angle. It should be noted that for a de-energized motor, the holding torque is not equal to zero due to the action of the permanent magnets of the rotor. This torque is typically around 10% of the maximum torque provided by the motor.

The terms "mechanical rotor angle" and "electrical rotor angle" are sometimes used. The mechanical angle is calculated based on the fact that a complete revolution of the rotor is 2*pi radians. When calculating the electric angle, it is assumed that one revolution corresponds to one period of the angular dependence of the moment. For the above formulas, Ф is the mechanical angle of rotation of the rotor, and the electrical angle for a motor having 4 steps per period of the torque curve is ((pi / 2) / S) * Ф or (N / 4) * Ф, where N is the number steps per turn. The electrical angle actually determines the angle of rotation of the stator magnetic field and allows you to build a theory regardless of the number of steps per revolution for a particular motor.

If two motor windings are powered at the same time, then the moment will be equal to the sum of the moments provided by the windings separately (Fig. 10).

Rice. 10. Dependence of torque on the angle of rotation of the rotor for two powered windings.

In this case, if the currents in the windings are the same, then the point of maximum torque will be shifted by half a step. The balance point of the rotor will also shift by half a step (point e in the figure). This fact is the basis for the implementation of the half-step mode. The peak value of the torque (holding torque) in this case will be the root of two times greater than with one energized winding.

Th 2 \u003d 2 0.5 *Th 1,

where Th 2 is the holding moment with two energized windings,
Th 1 - holding moment with one energized winding.

It is this moment that is usually indicated in the characteristics of a stepper motor.

The magnitude and direction of the magnetic field are shown in the vector diagram (Fig. 11).

Rice. 11. The magnitude and direction of the magnetic field for different phase power modes.

The X and Y axes coincide with the direction of the magnetic field created by the windings of the first and second phases of the motor. When the motor is running with one phase on, the rotor can take positions 1, 3, 5, 7. If two phases are on, the rotor can take positions 2, 4, 6, 8. In addition, in this mode, more torque, since it is proportional to the length of the vector in the figure. Both of these control methods provide a full step, but the rotor equilibrium positions are shifted by half a step. If you combine these two methods and apply appropriate pulse sequences to the windings, then you can make the rotor sequentially occupy positions 1, 2, 3, 4, 5, 6, 7, 8, which corresponds to a half step.

Compared with full step mode, half step mode has the following advantages:

  • higher resolution without more expensive motors
  • less problems with resonance phenomenon. Resonance results in only a partial loss of torque, which usually does not interfere with normal drive operation.

The disadvantage of the half-step mode is the rather significant torque fluctuation from step to step. In those positions of the rotor when one phase is energized, the torque is approximately 70% of the full torque when two phases are energized. These fluctuations can cause increased vibration and noise, although they are still less than in full step mode.

The way to eliminate torque fluctuations is to increase the torque in positions with one phase included and thus ensure the same torque in all positions of the rotor. This can be achieved by increasing the current at these positions to about 141% of the rated current. Some drivers, such as Ericsson's PBL 3717/2 and PBL 3770A, have logic inputs for changing the current. It should be noted that the value of 141% is theoretical, therefore, in applications requiring high accuracy of torque maintenance, this value must be selected experimentally for a specific speed and a specific motor. Since the current only rises when one phase is on, the power dissipation is equal to the full step power at 100% of the rated current. However, such an increase in current requires a higher supply voltage, which is not always possible. There is another approach. To eliminate torque fluctuations when the motor is running in half-stepping mode, you can reduce the current at those moments when two phases are on. To obtain constant torque, this current must be 70.7% of the rated current. Thus, the A3955 driver chip from Allegro implements a half-step mode, for example.

For half-step mode, it is very important to enter the state with one phase off. In order to force the rotor to assume the appropriate position, the off-phase current must be reduced to zero as quickly as possible. The duration of the current decay depends on the voltage on the winding at the time when it loses its stored energy. By shorting the winding at this time to a power source that represents the maximum voltage available in the system, the fastest possible current decay is ensured. To obtain a rapid current decay when the motor windings are powered by an H-bridge, all transistors must be closed, while the winding through the diodes is connected to the power source. The current decay rate will decrease significantly if one bridge transistor is left open and the winding is shorted to the transistor and diode. To increase the current decay rate when controlling unipolar motors, it is preferable to suppress self-induction EMF surges not with diodes, but with varistors or a combination of diodes and a zener diode, which will limit the surge at a larger, but safe level for transistors.

Micro stepping

Microstepping is achieved by making the stator field rotate more smoothly than full or half stepping. The result is less vibration and virtually silent operation down to zero frequency. In addition, a smaller pitch angle can provide more accurate positioning. There are many different microstepping modes, with step sizes ranging from 1/3 of a full step to 1/32 or even less. The stepper motor is a synchronous motor. This means that the equilibrium position of the stationary rotor coincides with the direction of the stator magnetic field. When the stator field rotates, the rotor also rotates, trying to take a new equilibrium position.

Rice. 12. Dependence of the torque on the angle of rotation of the rotor in the case of different values ​​of the phase current.

To obtain the desired direction of the magnetic field, it is necessary to choose not only right direction currents in the coils, but also the correct ratio of these currents.

If two motor windings are simultaneously powered, but the currents in these windings are not equal (Fig. 12), then the resulting torque will be

Th \u003d (a 2 + b 2) 0.5,

and the balance point of the rotor will shift to the point

x = (S / (pi/2)) arctan(b / a),

where a and b are the moment created by the first and second phases, respectively,
Th is the resulting holding moment,
x - rotor equilibrium position in radians,
S - step angle in radians.

The shift of the balance point of the rotor indicates that the rotor can be fixed in any arbitrary position. To do this, you just need to correctly set the ratio of currents in the phases. It is this fact that is used in the implementation of the microstep mode.
Once again, it should be noted that the above formulas are correct only if the dependence of the torque on the angle of rotation of the rotor is sinusoidal and if not a single part of the motor magnetic circuit is saturated.

In the limit, the stepper motor can operate as a synchronous motor in continuous rotation mode. To do this, the currents of its phases must be sinusoidal, shifted relative to each other by 90 degrees.

The result of using microstepping is a much smoother rotor at low frequencies. At frequencies 2 to 3 times the natural resonant frequency of the rotor and load, microstepping offers little benefit over half or full stepping. The reason for this is the filtering effect of the inertia of the rotor and the load. The stepper motor system works like a low pass filter. In microstep mode, you can only accelerate and decelerate, and most of the time work in full step mode. In addition, to achieve high speeds in the microstep mode, a very high repetition rate of microsteps is required, which cannot always be provided by the control microcontroller. To prevent transients and loss of steps, switching the motor operation modes (from microstepping to full-stepping, etc.) must be done at those moments when the rotor is in the position corresponding to one switched on phase. Some microstepping driver ICs have a special signal that informs about this position of the rotor. For example, this is the Allegro A3955 driver.

In many applications where small relative displacements and high resolution are required, microstepping can replace a mechanical gear. Often the simplicity of the system is the deciding factor, even if it involves the use of a larger motor. Despite the fact that the microstepping driver is much more complicated than a conventional driver, the system can still be simpler and cheaper than a stepper motor plus a gearbox. Modern microcontrollers sometimes have built-in DACs that can be used to implement microstepping instead of special controllers. This makes it possible to make the cost of equipment for full-step and microstep modes almost the same.

Sometimes microstepping is used to increase the accuracy of the step size beyond what is stated by the motor manufacturer. This uses the nominal number of steps. To improve the accuracy, the correction of the position of the rotor at the equilibrium points is used. To do this, first, a characteristic is taken for a specific motor, and then, by changing the ratio of currents in the phases, the position of the rotor is adjusted individually for each step. This method requires preliminary calibration and additional resources of the control microcontroller. In addition, a rotor initial position sensor is required to synchronize its position with a table of correction factors.

In practice, during the implementation of each step, the rotor does not immediately stop in a new equilibrium position, but carries out damped oscillations around the equilibrium position. The settling time depends on the characteristics of the load and on the driver circuit. In many applications, such fluctuations are undesirable. You can get rid of this phenomenon by using the microstep mode. On fig. 13 shows the movements of the rotor when operating in full-stepping and micro-stepping modes.

Rice. 13. Rotor movements in full-step and micro-step modes.

It can be seen that spikes and fluctuations are observed in the full-step mode, while they are absent in the microstep mode. However, even in this mode, the rotor position graph differs from a straight line. This error is explained by the geometry error of the motor parts and can be reduced by performing calibration and subsequent compensation by adjusting the phase currents.
In practice, there are some factors that limit the accuracy of the drive in microstepping mode. Some of them are related to the driver, and some are directly related to the engine.

Typically, manufacturers of stepper motors specify such a parameter as step accuracy. The pitch accuracy is indicated for the equilibrium positions of the rotor with two phases switched on, the currents of which are equal. This corresponds to full-step mode with phase overlap. For microstepping, when the phase currents are not equal, no data is usually given.

An ideal stepper motor, when powered by phases with sinusoidal and cosine current, should rotate at a constant speed. At real engine in this mode, some fluctuations in speed will be observed. This is due to the instability of the air gap between the rotor and stator poles, the presence of magnetic hysteresis, which leads to errors in the magnitude and direction of the magnetic field, etc. Therefore, the equilibrium positions and moment have some deviations. These deviations depend on the error in the shape of the teeth of the rotor and stator and on the material of the magnetic circuits used.

Some motor designs are optimized for best full step accuracy and maximum holding torque. The special shape of the teeth of the rotor and stator is designed so that in the equilibrium position for full step operation, the magnetic flux is greatly increased. This results in poor accuracy in microstepping. top scores allow you to get motors in which the holding torque in the de-energized state is less.

Deviations can be divided into two types: deviations in the magnitude of the magnetic field, which lead to deviations in the holding moment in microstepping mode, and deviations in the direction of the magnetic field, which lead to deviations in the equilibrium position. Holding torque deviations in microstepping are typically 10 to 30% of maximum torque. It must be said that in the full-step mode, the holding torque can also fluctuate by 10 - 20% due to distortions in the geometry of the rotor and stator.

If you measure the equilibrium positions of the rotor when the motor rotates clockwise and counterclockwise, you will get slightly different results. This hysteresis is primarily due to the magnetic hysteresis of the core material, although friction also contributes. Magnetic hysteresis leads to the fact that the magnetic flux depends not only on the current of the windings, but also on its previous value. The error created by the hysteresis can be equal to several microsteps. Therefore, in high-precision applications, when moving in one of the directions, it is necessary to pass behind the desired position, and then return back so that the approach to the desired position is always carried out in one direction.

It is quite natural that any desired increase in resolution runs into some physical limitations. Do not think that the positioning accuracy for 7.2 degrees. motor in microstepping mode is not inferior to the accuracy of 1.8 deg. engine.

The following physical limitations are an obstacle:

  • The 7.2-degree engine's torque-to-angle build-up is four times flatter than a true 1.8-degree engine. Due to the effect of the moment of friction or the moment of inertia of the load, the positioning accuracy will already be worse
  • as will be shown below, if there is friction in the system, then due to the appearance of dead zones, the positioning accuracy will be limited
  • most commercial motors are not of precision design and the relationship between torque and rotor angle is not exactly sinusoidal. As a result, the relationship between the phase of the sinusoidal supply current and the angle of rotation of the shaft will be non-linear. As a result, the motor rotor will accurately pass the positions of each step and half step, and quite significant deviations will be observed between these positions.

These problems are most pronounced for motors with a large number of poles. However, there are motors that are optimized for microstepping even at the development stage. The poles of the rotor and stator of such motors are less pronounced due to the beveled shape of the teeth.

Another source of positioning errors is the quantization error of the DAC, which generates the phase currents. The fact is that the current must be formed according to a sinusoidal law, therefore, to minimize the error, a linear DAC must have an increased bit depth. There are specialized drivers with a built-in non-linear DAC, which allows you to immediately get the results of the sin function. An example is the A3955 driver from Allegro, which has a built-in 3-bit DAC that provides the following phase current values: 100%, 92.4%, 83.1%, 70.7%, 55.5%, 38.2%, 19.5%, 0%. This allows you to work in microstep mode with a step size of 1/8, while the error in setting the phase current does not exceed 2%. In addition, this driver has the ability to control the rate of current decay of the motor windings during operation, which allows you to fine-tune the driver for a specific motor in order to obtain the smallest positioning error.

Even if the DAC accurately generated a sinusoidal reference voltage, it must be amplified and turned into a sinusoidal winding current. Many drivers have significant non-linearity near zero current, which causes significant waveform distortion and, as a result, significant positioning errors. If high quality drivers are used, such as Ericsson's PBM3960 and PBL3771, the error associated with the driver is vanishingly small compared to the motor error.

Sometimes stepper motor controllers allow you to correct the shape of the output signal by adding or subtracting from the sine of its third harmonic. However, such an adjustment must be made individually for a specific engine, the characteristics of which must be measured before that.

Because of these limitations, microstepping is mainly used to ensure smooth rotation (especially at very low speeds), to eliminate noise and resonance phenomena. Microstepping can also reduce settling time mechanical system, since, unlike the full-step mode, there are no overshoots and oscillations. However, in most cases, accurate microstep positioning cannot be guaranteed for conventional motors.

Sinusoidal phase current can be provided by using special drivers. Some of them, for example A3955, A3957 from Allegro, already contain a DAC and require only digital codes from the microcontroller. Others, such as L6506, L298 from SGS-Thomson, require external sinusoidal reference voltages, which must be generated by the microcontroller using DACs. It must be said that too many sine samples do not lead to an increase in positioning accuracy, since the error associated with the non-ideal geometry of the motor poles begins to dominate. Moreover, in this case, readings should follow with a high frequency, which is a problem in their program formation. When working at high speeds, the resolution of the DACs can be reduced. Moreover, at very high speeds, it is generally recommended to work in the normal full-step mode, since the control of the harmonic signal loses its advantages. This happens for the reason that the motor windings are inductance, respectively, any specific driver circuit with a specific supply voltage provides a well-defined maximum current slew rate. Therefore, as the frequency increases, the shape of the current begins to deviate from the sinusoidal and becomes triangular at very high frequencies.

Torque versus speed, load effect

The torque generated by a stepper motor depends on several factors:

  • speed
  • winding current
  • driver circuits

On fig. 14a shows the dependence of torque on the angle of rotation of the rotor.

Rice. 14. The occurrence of dead zones as a result of friction.

For an ideal stepper motor, this dependence is sinusoidal. The S points are the equilibrium positions of the rotor for an unloaded motor and correspond to several successive steps. If an external torque less than the holding torque is applied to the motor shaft, then the angular position of the rotor will change by a certain angle Ф.

Ф = (N/(2*pi))*sin(Ta/Th),

where Ф - angular displacement,
N is the number of engine steps per revolution,
Ta - external applied moment,
Th - holding moment.

Angular displacement Ф is the positioning error of the loaded motor. If a torque greater than the holding torque is applied to the motor shaft, then under the action of this moment the shaft will turn. In this mode, the position of the rotor is uncontrolled.
In practice, there is always an external torque applied to the motor, if only because the motor has to overcome friction. Friction forces can be divided into two categories: static or static friction, which requires a constant torque to overcome, and dynamic or viscous friction, which depends on speed. Consider static friction. Suppose that it takes half the peak torque to overcome it. On fig. 14a, the dashed lines show the moment of friction. Thus, for the rotation of the rotor, only the moment that lies on the graph outside the dashed lines remains. Two conclusions follow from this: friction reduces the torque on the motor shaft and there are dead zones around each rotor equilibrium position (Fig. 14b):

d = 2 (S / (pi/2)) arcsin(T f /T h) = (S / (pi/4)) arcsin(T f / Th),

where d is the width of the dead zone in radians,
S - step angle in radians,
Tf is the moment of friction,
Th - holding moment.

Dead zones limit positioning accuracy. For example, the presence of static friction at half the peak torque of the engine in steps of 90 degrees. will cause the presence of dead zones of 60 degrees. This means that the motor step can vary from 30 to 150 degrees, depending on where in the dead zone the rotor stops after the next step.

The presence of dead zones is very important for microstepping. If, for example, there are dead zones with a value of d, then a microstep of less than d will not move the rotor at all. Therefore, for systems using microstepping, it is very important to minimize the static friction.

When the motor is running under load, there is always some shift between the angular position of the rotor and the orientation of the stator magnetic field. Especially unfavorable is the situation when the motor starts to decelerate and the load torque is reversed. It should be noted that lag or lead refers only to the position, not to the speed. In any case, as long as the motor is not out of sync, this lag or lead cannot exceed two full steps. This is a very pleasant fact.

Each time the stepper motor takes a step, the rotor rotates S radians. In this case, the minimum moment occurs when the rotor is exactly between adjacent equilibrium positions (Fig. 15).

Rice. 15. Holding torque and working torque of the stepper motor.

This moment is called the working moment, it means what is the largest moment that the engine can overcome when rotating at low speed. With a sinusoidal dependence of the moment on the angle of rotation of the rotor, this moment is Tr = Th/(2 0.5). If the motor is stepping with two energized windings, then the operating torque is equal to the holding torque for one energized winding.

The parameters of a stepper motor drive are highly dependent on the characteristics of the load. In addition to friction, a real load has inertia. Inertia prevents a change in speed. The inertial load requires high acceleration and deceleration torques from the motor, thus limiting the maximum acceleration. On the other hand, increasing the load inertia increases the speed stability.

Such a parameter of a stepper motor as the dependence of torque on speed is the most important when choosing the type of motor, choosing a phase control method and choosing a driver circuit. When designing high-speed stepper motor drivers, one must take into account that the motor windings are inductive. This inductance determines the rise and fall time of the current. Therefore, if a square wave voltage is applied to the winding, the current waveform will not be square wave. At low speeds (Fig. 16a), the rise and fall time of the current is not able to greatly affect the torque, but at high speeds, the torque drops. This is due to the fact that at high speeds the current in the motor windings does not have time to reach the nominal value (Fig. 16b).

Rice. 16. The shape of the current in the motor windings at different speeds.

In order for the torque to drop as little as possible, it is necessary to ensure a high rate of current rise in the motor windings, which is achieved by using special circuits to power them.

The behavior of the torque with an increase in the switching frequency of the phases is approximately as follows: starting from a certain cutoff frequency, the torque monotonically decreases. Typically, two torque versus speed curves are given for a stepper motor (Fig. 17).

Rice. 17. Dependence of torque on speed.

The inner curve (start curve, or pull-in curve) shows at what maximum friction torque for a given speed the stepper motor is able to start. This curve intersects the velocity axis at a point called the maximum start frequency or throttle response frequency. It defines the maximum speed at which an unloaded motor can start. In practice, this value lies in the range of 200 - 500 full steps per second. The inertia of the load greatly affects the shape of the internal curve. Large inertia corresponds to a smaller area under the curve. This area is called the start area. The outer curve (acceleration curve, or pull-out curve) shows at what maximum friction torque for a given speed the stepper motor is able to maintain rotation without skipping steps. This curve intersects the velocity axis at a point called the maximum acceleration frequency. It shows the maximum speed for this engine without load. When measuring the maximum speed, it must be borne in mind that, due to the resonance phenomenon, the torque is also zero at the resonant frequency. The region that lies between the curves is called the acceleration region.

It should be noted that the driver circuit greatly affects the course of the torque-speed curve, but this issue will be discussed below.

Overclock!

In order to operate at high speed from the acceleration area (Fig. 17), it is necessary to start at low speed from the start area, and then accelerate. When stopping, you must act in reverse order: first perform braking, and only after entering the start area, you can stop the supply of control pulses. Otherwise there will be a loss of synchronism and the position of the rotor will be lost. The use of acceleration and deceleration makes it possible to achieve significantly higher speeds - speeds up to 10,000 full steps per second are used in industrial applications. It should be noted that the continuous operation of a stepper motor at high speed is not always permissible due to the heating of the rotor. However, high speed can be used for a short time in positioning.

During acceleration, the engine passes through a series of speeds, while at one of the speeds you may encounter an unpleasant resonance phenomenon. For normal acceleration, it is desirable to have a load whose moment of inertia is at least equal to the moment of inertia of the rotor. On an unloaded engine, the resonance phenomenon is most pronounced. Methods for dealing with this phenomenon will be described in detail below.
When accelerating or decelerating, it is important to choose the law of speed change and maximum acceleration correctly. The acceleration should be the smaller, the higher the inertia of the load. Criterion right choice acceleration mode is the implementation of acceleration to the desired speed for a specific load in the minimum time. In practice, acceleration and deceleration with constant acceleration are most often used.

The implementation of the law, according to which the acceleration or deceleration of the motor will be performed, is usually carried out by a program-controlled microcontroller, since it is the microcontroller that is usually the source of the clock frequency for the stepper motor driver. Although earlier voltage-controlled generators or programmable frequency dividers were used for these purposes. To generate a clock frequency, it is convenient to use a hardware timer, which is included in almost any microcontroller. When the motor rotates at a constant speed, it is enough to load the timer with a constant value of the step repetition period (step duration). If the engine is accelerating or decelerating, this period changes with each new step. When accelerating or decelerating with constant acceleration, the frequency of repetition of steps should change linearly, respectively, the value of the period that must be loaded into the timer should change according to the hyperbolic law.

For the most general case, it is required to know the dependence of the step duration on the current speed. The number of steps that the engine performs during acceleration in time t is:

N = 1/2At 2 +Vt, where N is the number of steps, t is time, V is the speed expressed in steps per unit time, A is the acceleration expressed in steps divided by time squared.

For one step N \u003d 1, then the step duration t 1 \u003d T \u003d (-V + (V 2 +2A) 0.5) / A

As a result of the step, the speed becomes equal to Vnew = (V 2 +2A) 0.5

Calculations using the above formulas are rather laborious and require significant CPU time. At the same time, they allow you to change the acceleration value at any time. Calculations can be greatly simplified if the acceleration is required to be constant during acceleration and deceleration. In this case, you can write the dependence of the step duration on the acceleration time:
V = V 0 + At, where V is the current speed, V 0 is the initial speed (the minimum speed at which acceleration begins), A is acceleration;
1/T = 1/T 0 +At, where T - step duration, T 0 - initial step duration, t - current time;

Whence T = T 0 /(1+T 0 At)

Calculations using this formula are much easier to carry out, however, in order to change the acceleration value, it is required to stop the engine.

Resonance

Stepper motors have an undesirable effect called resonance. The effect manifests itself in the form of a sudden drop in torque at certain speeds. This can result in skipped steps and loss of synchronization. The effect is manifested if the step frequency coincides with the natural resonant frequency of the motor rotor.

When the engine takes a step, the rotor is not immediately set to a new position, but makes damped oscillations. The fact is that the system rotor - magnetic field - stator can be considered as a spring pendulum, the oscillation frequency of which depends on the moment of inertia of the rotor (plus the load) and the magnitude of the magnetic field. Due to the complex configuration of the magnetic field, the resonant frequency of the rotor depends on the amplitude of the oscillations. As the amplitude decreases, the frequency increases, approaching a low-amplitude frequency, which is more easily quantified. This frequency depends on the pitch angle and on the ratio of the holding moment to the moment of inertia of the rotor. A larger holding moment and a smaller moment of inertia result in an increase in the resonant frequency.
The resonant frequency is calculated by the formula:

F 0 \u003d (N * T H / (J R + J L)) 0.5 / 4 * pi,

where F 0 - resonant frequency,
N is the number of full steps per revolution,
T H - holding torque for the used control method and phase current,
J R - moment of inertia of the rotor,
J L - moment of inertia of the load.

It should be noted that the resonant frequency is determined by the moment of inertia of the motor rotor itself plus the moment of inertia of the load connected to the motor shaft. Therefore, the rotor resonant frequency of an unloaded motor, which is sometimes given as a parameter, is of little practical value, since any load connected to the motor will change this frequency.
In practice, the resonance effect leads to difficulties when operating at a frequency close to the resonant one. The torque at the resonance frequency is zero, and without taking special measures, the stepper motor cannot pass the resonant frequency during acceleration. In any case, the resonance phenomenon can significantly degrade the accuracy characteristics of the drive.

In systems with low damping, there is a danger of losing steps or increasing noise when the motor is running near the resonant frequency. In some cases, problems can also arise at the harmonics of the fundamental resonance frequency.

When non-microstepping is used, the main cause of oscillation is the intermittent rotation of the rotor. When a step is taken, some energy is imparted to the rotor by impetus. This impulse excites oscillations. The energy that is imparted to the rotor in half step mode is about 30% of the energy of a full step. Therefore, in the half-step mode, the oscillation amplitude is much smaller. In microstepping mode with 1/32 of the main step, only about 0.1% of the energy of a full step is reported at each microstep. Therefore, in the microstep mode, the resonance phenomenon is almost imperceptible.

There are electrical methods to deal with resonance. The oscillating rotor leads to the occurrence of EMF in the stator windings. If you short windings that are not used in this step, this will dampen the resonance.

And, finally, there are methods of dealing with resonance at the level of the driver operation algorithm. For example, you can use the fact that when operating with two phases switched on, the resonant frequency is about 20% higher than with one phase switched on. If the resonant frequency is precisely known, then it can be passed by changing the mode of operation.

If possible, start and stop should use frequencies above resonant. Increasing the moment of inertia of the rotor-load system reduces the resonant frequency.

However, the most effective measure to combat resonance is the use of microstepping.

What to feed him?

For nutrition conventional engine direct current only requires a source constant voltage, and the necessary switching of the windings is performed by the collector. With a stepper motor, everything is more complicated. All commutations must be performed by an external controller. Currently, in about 95% of cases, microcontrollers are used to control stepper motors. In the simplest case, to control a stepper motor in full step mode, only two signals are required, phase shifted by 90 degrees. The direction of rotation depends on which phase leads. The speed is determined by the pulse repetition rate. In half-step mode, everything is somewhat more complicated and requires at least 4 signals. All stepper motor control signals can be generated by software, but this will cause a large load on the microcontroller. Therefore, special stepper motor driver chips are more often used, which reduce the number of dynamic signals required from the processor. Typically these microcircuits require a clock frequency, which is the repetition rate of steps, and a static signal, which sets the direction. Sometimes there is also a signal for turning on the half-step mode. Driver ICs that operate in microstepping require more signals. A common case is when the necessary sequences of phase control signals are formed using one microcircuit, and the necessary phase currents are provided by another microcircuit. Although recently there are more and more drivers that implement all the functions in one chip.

The power required from the driver depends on the size of the motor and is a fraction of a watt for small motors and up to 10-20 watts for big engines. The maximum level of power dissipation is limited by motor heating. Maximum working temperature usually indicated by the manufacturer, but it can be approximately assumed that the case temperature of 90 degrees is normal. Therefore, when designing devices with stepper motors continuously operating at maximum current, it is necessary to take measures to prevent the operator from touching the motor case. In some cases, it is possible to use a cooling radiator. This sometimes allows for a smaller motor and a better power/cost ratio.

For given size stepper motor, the space occupied by the windings is limited. Therefore, it is very important to design the driver in such a way as to provide the best efficiency for given winding parameters.

The driver circuit must perform three main tasks:

  • be able to turn the current in the windings on and off, as well as change its direction
  • maintain the set current value
  • provide the fastest rise and fall of current for good speed characteristics

Ways to change the direction of the current

The operation of a stepper motor requires a change in the direction of the magnetic field independently for each phase. Changing the direction of the magnetic field can be done different ways. In unipolar motors, the windings are center tapped or there are two separate windings for each phase. The direction of the magnetic field is changed by switching half windings or whole windings. In this case, only two simple keys A and B are required for each phase (fig. 18).

Rice. 18. Power supply of the winding of a unipolar motor.

In bipolar motors, the direction is changed by reversing the winding leads. This polarity reversal requires a full H-bridge (Fig. 19). Key management in both cases should be carried out by a logic circuit that implements the desired operation algorithm. It is assumed that the power supply of the circuits has a nominal voltage for the motor windings.

Rice. 19. Power supply of the bipolar motor winding.

This simplest way winding current control, and as will be shown later, it significantly limits the capabilities of the motor. It should be noted that with separate control of the H-bridge transistors, situations are possible when the power supply is shorted by the keys. Therefore, the control logic must be designed in such a way as to exclude this situation even in the event of failures of the control microcontroller.

The motor windings are inductive, which means that the current cannot rise or fall indefinitely quickly without involving an infinite potential difference. When the winding is connected to a power source, the current will increase at a certain rate, and when the winding is disconnected, a voltage surge will occur. This surge can damage the keys, which are used as bipolar or field-effect transistors. To limit this release, special protective chains are installed. On the diagrams of Fig. 18 and 19, these chains are formed by diodes, capacitors or their combination with diodes are used much less frequently. The use of capacitors causes electrical resonance, which can cause an increase in torque at a certain speed. On fig. 18 required 4 diodes for the reason that the halves of the windings of a unipolar motor are located on a common core and are strongly interconnected. They work as an autotransformer and surges occur at the terminals of both windings. If MOSFETs are used as switches, then only two external diodes are sufficient, since they already have diodes inside. Integrated circuits containing high-power open-collector output stages also often contain such diodes. In addition, some chips, such as ULN2003, ULN2803 and the like, have both protection diodes inside for each transistor. It should be noted that in the case of using high-speed switches, diodes of comparable speed are required. In the case of using slow diodes, they need to be shunted with small capacitors.

Current stabilization

To adjust the torque, it is necessary to regulate the current in the windings. In any case, the current must be limited so as not to exceed the power dissipation on the ohmic resistance of the windings. Moreover, in the half-stepping mode, it is still required to provide a zero current value in the windings at certain moments, and in the microstepping mode, it is generally required to set different current values.

For each motor, the manufacturer specifies the rated operating voltage of the windings. Therefore, the simplest way to power the windings is to use a constant voltage source. In this case, the current is limited by the ohmic resistance of the windings and the voltage of the power supply (Fig. 20a), so this power supply is called L / R-power. The current in the winding increases exponentially at a rate determined by the inductance, the active resistance of the winding, and the applied voltage. When the frequency increases, the current does not reach the nominal value and the torque drops. Therefore, this power supply method is suitable only for low speed operation and is used in practice only for low-power motors.

Rice. 20. Winding supply with rated voltage (a) and use of a limiting resistor (b).

When operating at high speeds, it is required to increase the rate of current rise in the windings, which is possible by increasing the voltage of the power source. In this case, the maximum winding current must be limited by an additional resistor. For example, if the supply voltage is 5 times the nominal voltage, then an additional resistor is required so that the total resistance is 5R, where R is the ohmic resistance of the winding (L / 5R-supply). This power supply method provides a faster increase in current and, as a result, a greater torque (Fig. 20b). However, it has a significant drawback: additional power is dissipated on the resistor. The large dimensions of powerful resistors, the need for heat removal and the increased required power of the power source - all this makes this method inefficient and limits its scope to small motors with a power of 1 - 2 watts. It must be said that until the beginning of the 80s of the last century, the parameters of stepper motors given by manufacturers referred precisely to this method of power supply.

An even faster increase in current can be obtained if a current generator is used to power the engine. The increase in current will occur linearly, this will allow you to quickly reach the rated current value. Moreover, a pair of powerful resistors can cost more than a pair of powerful transistors with heatsinks. But as in the previous case, the current generator will dissipate additional power, which makes this power supply scheme inefficient.

There is another solution that provides a high current slew rate and low power loss. It is based on the use of two power sources.

Rice. 21. Power supply of the motor winding with step voltage.

At the beginning of each step, the windings are briefly connected to a higher voltage source, which provides a rapid increase in current (Fig. 21). Then the supply voltage of the windings decreases (time t 1 in Fig. 21). The disadvantage of this method is the need for two switches, two power supplies and a more complex control circuit. In systems where such sources already exist, the method can be quite cheap. Another difficulty is the impossibility of determining the moment of time t 1 for the general case. For a motor with a lower winding inductance, the rate of current rise is higher and at a fixed t 1 the average current may be higher than the rated current, which is fraught with motor overheating.

Another method for stabilizing the current in the motor windings is key (pulse-width) regulation. Modern stepper motor drivers use this method. The key regulator provides a high rate of current rise in the windings along with ease of regulation and very low losses. Another advantage of the key current stabilization circuit is that it keeps the motor torque constant, regardless of fluctuations in the supply voltage. This allows the use of simple and cheap unregulated power supplies.

To ensure a high current slew rate, a power supply voltage is used that is several times higher than the nominal voltage. By adjusting the duty cycle of the pulses, the average voltage and current are maintained at the nominal level for the winding. Maintenance is carried out as a result of feedback action. A resistor is connected in series with the winding - a current sensor R (Fig. 22a). The voltage drop across this resistor is proportional to the current in the winding. When the current reaches the set value, the key turns off, causing the current to drop. When the current drops to the lower threshold, the key turns on again. This process is repeated periodically, keeping the average current constant.

Rice. 22. Various schemes of key current stabilization.

By controlling the Uref value, it is possible to regulate the phase current, for example, increase it during acceleration and deceleration and decrease it when operating at a constant speed. You can also set it with a DAC in the form of a sinusoid, thus realizing the microstep mode. This method of controlling the key transistor provides a constant current ripple in the winding, which is determined by the hysteresis of the comparator. However, the switching frequency will depend on the rate of change of the current in the winding, in particular on its inductance and on the supply voltage. In addition, two such circuits supplying different phases of the motor cannot be synchronized, which may cause additional noise.

The circuit with a constant switching frequency is free from these disadvantages (Fig. 22b). The key transistor is controlled by a trigger, which is set by a special generator. When the trigger is set, the key transistor opens and the phase current begins to rise. Along with it, the voltage drop across the current sensor also increases. When it reaches the reference voltage, the comparator switches, resetting the flip-flop. The key transistor turns off and the phase current begins to drop until the trigger is re-installed by the generator. Such a circuit provides a constant switching frequency, but the magnitude of the current ripple will not be constant. The generator frequency is usually chosen at least 20 kHz, so that the engine does not create an audible sound. At the same time, too high a switching frequency can cause increased losses in the motor core and switching losses of transistors. Although the core loss does not grow as fast with increasing frequency due to the decrease in the amplitude of the current ripples with increasing frequency. Ripple on the order of 10% of the average current usually does not cause loss problems.

A similar circuit is implemented inside the SGS-Thomson L297 chip, the use of which minimizes the number of external components. Key regulation is implemented by other specialized microcircuits.

Rice. 23. The shape of the current in the motor windings for various ways nutrition.

On fig. 23 shows the current waveform in the motor windings for three power supplies. The best in the sense of the moment is the key method. In addition, it provides high efficiency and allows you to simply adjust the amount of current.

Fast and slow current decay

On fig. 19 shows configurations of keys in an H-bridge for turning on different directions of current in the winding. To turn off the current, you can turn off all the keys of the H-bridge or leave one key on (Fig. 24). These two situations differ in the rate of current decay in the winding. After disconnecting the inductance from the power source, the current cannot stop instantly. There is an EMF of self-induction, which has the direction opposite to the power source. When using transistors as switches, shunt diodes must be used to ensure conduction in both directions. The rate of change of current in an inductor is proportional to the applied voltage. This is true for both current rise and fall. Only in the first case, the source of energy is the power source, and in the second, the inductance itself gives off the stored energy. This process can take place under different conditions.

Rice. 24. Slow and fast current decay.

On fig. 24a shows the state of the H-bridge switches when the coil is turned on. Switches A and D are on, the direction of current is shown by an arrow. On fig. 24b, the winding is off, but key A is on. The self-inductance emf is shorted through this key and the VD3 diode. At this time, there will be a small voltage across the winding terminals, equal to the forward drop across the diode plus the drop across the switch (the saturation voltage of the transistor). Since the voltage at the terminals of the winding is small, the rate of change of current will also be small. Correspondingly, the rate of decay of the magnetic field will also be small. And this means that for some time the motor stator will create a magnetic field, which should not be at this time. This field will have a braking effect on a rotating rotor. At high engine speeds, this effect can seriously interfere with normal engine operation. The rapid current decay at turn-off is very important for high-speed controllers operating in half-step mode.

There is another way to turn off the winding current, when all the keys of the H-bridge open (Fig. 24c). In this case, the self-induction EMF is shorted through the diodes VD2, VD3 to the power source. This means that during the current decay, the winding will have a voltage equal to the sum of the power supply voltage and the forward drop across the two diodes. Compared to the first case, this is a much greater stress. Accordingly, the decay of the current and magnetic field will be faster. Such a solution, using the power supply voltage to accelerate the decay of the current, is the simplest, but not the only one. It must be said that in some cases, emissions may appear on the power source, to suppress which special damper chains will be needed. It does not matter how the increased voltage is provided on the winding during the current decline. To do this, you can use zener diodes or varistors. However, additional power will be dissipated on these elements, which in the first case was given back to the power source.

For a unipolar motor, the situation is more complicated. The fact is that the halves of the winding, or two separate windings of the same phase, are strongly interconnected. As a result of this connection, high-amplitude surges will occur on the closing transistor. Therefore, transistors must be protected by special circuits. These circuits must provide a fairly high clamping voltage to ensure that the current falls off quickly. Most often, diodes are used together with zener diodes or varistors. One of the ways of circuit implementation is shown in Fig. 25.

Rice. 25. An example of the implementation of a rapid current decay for a unipolar motor.

With key regulation, the magnitude of the current ripple depends on the rate of its decline. There are different options here.

If the diode shorts the winding, a slow current decay will be realized. This leads to a decrease in the amplitude of current ripples, which is highly desirable, especially when the motor is running in microstepping mode. For a given ripple level, the slow current decay allows operation at lower PWM frequencies, which reduces motor heating. For these reasons, slow current decay is widely used. However, there are several reasons why a slow current rise is not always optimal: firstly, due to the negative back EMF, due to the low voltage on the winding during the current decline, the actual average winding current may be overestimated; secondly, when it is required to sharply reduce the phase current (for example, in half-step mode), a slow decline will not allow this to be done quickly; thirdly, when it is required to set a very low value of the phase current, the regulation may be violated due to the existence of a limitation on the minimum time of the on state of the keys.

The high rate of current decay, which is realized by shorting the winding to the power source, leads to increased ripple. At the same time, the disadvantages inherent in the slow decay of the current are eliminated. However, in this case, the accuracy of maintaining the average current is less, and the loss is also greater.

The most advanced driver ICs have the ability to control the rate of current decay.

Practical implementation of drivers

The stepper motor driver must solve two main tasks: it is the formation of the necessary time sequences of signals and the provision of the necessary current in the windings. In integrated implementations, these tasks are sometimes performed by different chips. An example is the L297 and L298 chipset from SGS-Thomson. The L297 chip contains the time sequencing logic, while the L298 is a powerful dual H-bridge. Unfortunately, there is some confusion in the terminology regarding such microcircuits. The term "driver" is often applied to many microcircuits, even if their functions vary greatly. Sometimes logic chips are called "translators". This article will continue to use the following terminology: "controller" - a microcircuit responsible for the formation of time sequences; "driver" - a powerful power supply circuit for the motor windings. However, the terms "driver" and "controller" can also refer to a complete stepper motor control device. It should be noted that recently more and more often the controller and driver are combined in one chip.

In practice, you can do without specialized microcircuits. For example, all controller functions can be implemented in software, and a set of discrete transistors can be used as a driver. However, in this case, the microcontroller will be heavily loaded, and the driver circuit may turn out to be cumbersome. Despite this, in some cases, such a solution will be cost-effective.
The simplest driver is required to control the windings of a unipolar motor. For this, the simplest keys are suitable, which can be used as bipolar or field-effect transistors. Powerful logic-level controlled MOSFETs such as IRLZ34, IRLZ44, IRL540 are quite efficient. They have an open resistance of less than 0.1 ohm and an allowable current of about 30A. These transistors have domestic counterparts KP723G, KP727V and KP746G, respectively. There are also special microcircuits that contain several powerful transistor switches inside. An example is the ULN2003 microcircuit from Allegro (our analogue is K1109KT23), which contains 7 switches with a maximum current of 0.5 A. A schematic diagram of one cell of this microcircuit is shown in fig. 26.

Rice. 26. Schematic diagram of one cell of the ULN2003 microcircuit.

Similar microcircuits are produced by many companies. It should be noted that these microcircuits are suitable not only for powering stepper motor windings, but also for powering any other loads. In addition to simple driver ICs, there are more complex ICs that have an integrated controller, PWM current regulation, and even a DAC for microstepping.

As noted earlier, in order to control bipolar motors more complex schemes, such as H-bridges. Such circuits can also be implemented on discrete elements, although recently they have been increasingly implemented on integrated circuits. An example of a discrete implementation is shown in fig. 27.

Rice. 27. Implementation of a bridge driver on discrete components.

Such an H-bridge is controlled by two signals, so it does not allow for all possible combinations. The winding is energized when the input levels are different and shorted when the levels are the same. This allows you to get only a slow current decay (dynamic braking). Integrated bridge drivers are produced by many companies. An example is L293 (KR1128KT3A) and L298 from SGS-Thomson.

Until recently, a large number of microcircuits for controlling stepper motors were produced by Ericsson. However, on June 11, 1999, it transferred the production of its industrial-purpose chips to the New Japan Radio Company (New JRC). At the same time, the designations of the microcircuits changed from PBLxxxx to NJMxxxx.

Both simple switches and H-bridges can form part of a key current regulator. The key management scheme can be implemented on discrete components or in the form of a specialized microcircuit. A fairly popular microcircuit that implements PWM current stabilization is the L297 from SGS-Thomson. Together with the L293 or L298 bridge driver chip, they form a complete control system for a stepper motor (Fig. 28).

Rice. 28. Typical scheme enabling chips L297 and L298N.

The L297 microcircuit greatly unloads the control microcontroller, since it only requires the CLOCK clock frequency (step repetition frequency) and several static signals: DIRECTION - direction (the signal is internally synchronized, you can switch at any time), HALF / FULL - half-step / full-step mode, RESET - sets the phases to their initial state (ABCD = 0101), ENABLE - enables the operation of the microcircuit, V ref - reference voltage, which sets the peak current during PWM regulation. In addition, there are several additional signals. The CONTROL signal sets the operating mode of the PWM controller. When it is low, PWM control occurs at the outputs INH1, INH2, and when it is high - at the outputs ABCD. SYNC - output of the internal PWM clock generator. It serves to synchronize the operation of several microcircuits. It can also be used as an input when clocked from an external generator. HOME - home position signal (ABCD = 0101). It is used to synchronize the HALF/FULL mode switching. Depending on the moment of transition to the full-step mode, the microcircuit can operate in the mode with one phase on or with two phases on.

Key regulation is implemented by many other microcircuits. Some microcircuits have certain features, for example, the LMD18T245 driver from National Semiconductor does not require the use of an external current sensor, since it is implemented internally based on a single cell of a key MOSFET.

Some ICs are designed specifically for microstepping. An example is the A3955 chip from Allegro. It has a built-in 3-bit non-linear DAC to set the phase current changing according to a sinusoidal law.

Rice. 29. Current and rotor displacement vector.

The rotor displacement as a function of the phase currents generated by this 3-bit DAC is shown in fig. 29. The A3972 has a built-in 6-bit linear DAC.

Driver type selection

The maximum torque and power that a stepper motor can provide on the shaft depends on the size of the motor, cooling conditions, operating mode (on/off ratio), on the parameters of the motor windings and on the type of driver used. The type of driver used greatly affects the power on the motor shaft. With the same power dissipation, a driver with pulsed current stabilization provides a gain in torque at some speeds up to 5-6 times, compared to supplying the windings with a rated voltage. This also expands the range of permissible speeds.

Stepper motor drive technology is constantly evolving. The development is aimed at obtaining the greatest moment on the shaft with the minimum dimensions of the engine, wide speed capabilities, high efficiency and improved accuracy. An important element of this technology is the use of microstepping.

In practice, the development time of a drive based on a stepper motor is also important. The development of a specialized design for each specific case requires a significant investment of time. From this point of view, it is preferable to use universal control schemes based on PWM current stabilization, despite their higher cost.

A practical example of a stepper motor controller based on an AVR family microcontroller

Despite the fact that at present there are a large number of specialized microcircuits for controlling stepper motors, in some cases you can do without them. When the requirements are not too stringent, the controller can be implemented entirely in software. At the same time, the cost of such a controller is very low.

The proposed controller is designed to control a unipolar stepper motor with an average current of each winding up to 2.5A. The controller can be used with common stepper motors such as DSHI-200-1, -2, -3. It can also be used to control less powerful motors, such as those used to position the heads in 5-inch drives. At the same time, the circuit can be simplified by abandoning the parallel connection of key transistors and key current stabilization, since for low-power motors a simple L / R power supply is sufficient.

Rice. 30. Schematic diagram of the stepper motor controller.

The basis of the device (Fig. 30) is the U1 microcontroller type AT90S2313 from Atmel. Motor winding control signals are generated on ports PB4 - PB7 by software. To switch the windings, two field-effect transistors of the KP505A type are used in parallel, a total of 8 transistors (VT1 - VT8). These transistors have a TO-92 package and can switch current up to 1.4A, the channel resistance is about 0.3 ohm. In order for the transistors to remain closed during the “reset” signal of the microcontroller (the ports are in a high-impedance state at this time), resistors R11 - R14 are connected between the gates and sources. Resistors R6 - R9 are installed to limit the recharging current of the gate capacitance. This controller does not claim high speed characteristics, therefore, it is quite satisfied with the slow decline in the phase current, which is provided by shunting the motor windings with diodes VD2 - VD5. To connect a stepper motor, there is an 8-pin XP3 connector, which allows you to connect a motor that has two separate outputs from each winding (such as DSHI-200). For motors with internally connected windings, one or two common pins of the connector will remain free.

It should be noted that the controller can be used to control a motor with a large average phase current. To do this, it is only necessary to replace the transistors VT1 - VT8 and the diodes VD2 - VD5 with more powerful ones. Moreover, in this case, the parallel connection of transistors can not be used. The most suitable are MOSFETs controlled by a logic level. For example, these are KP723G, KP727V and others.

Current stabilization is carried out using PWM, which is also implemented in software. For this, two current sensors R15 and R16 are used. The signals taken from the current sensors, through the low-pass filter R17C8 and R18C9, are fed to the inputs of the comparators U3A and U3B. LPF prevent false positives of comparators due to interference. A reference voltage must be applied to the second input of each comparator, which determines the peak current in the motor windings. This voltage is generated by the microcontroller using a built-in timer operating in 8-bit PWM mode. To filter the PWM signal, a two-section low-pass filter R19C10R22C11 is used. At the same time, resistors R19, R22 and R23 form a divider that sets the scale for adjusting the phase currents. In this case, the maximum peak current corresponding to code 255 is 5.11A, which corresponds to a voltage of 0.511V on the current sensors. Considering the fact that the constant component at the PWM output varies from 0 to 5V, the required division factor is approximately 9.7. The outputs of the comparators are connected to the interrupt inputs of the microcontroller INT0 and INT1.

To control the operation of the engine, there are two logical inputs: FWD (forward) and REW (reverse), connected to the XP1 connector. When one of these inputs is LOW, the motor starts at the set minimum speed, gradually accelerating at the set constant acceleration. Acceleration ends when the motor reaches the set operating speed. If a rotation direction change command is given, the motor decelerates with the same acceleration, then reverses and accelerates again.

In addition to the command inputs, there are two inputs for limit switches connected to the XP2 connector. The limit switch is considered triggered if the corresponding input is logic LOW. In this case, rotation in this direction is prohibited. When the limit switch is triggered while the motor is rotating, the motor will decelerate at the specified acceleration and then stop.

Command inputs and inputs of limit switches are protected from overvoltages by chains R1VD6, R2VD7, R3VD8 and R4VD9, consisting of a resistor and a zener diode.

The power supply of the microcontroller is formed using the 78LR05 stabilizer microcircuit, which simultaneously performs the functions of a power monitor. When the supply voltage drops below the set threshold, this microcircuit generates a “reset” signal for the microcontroller. Power is supplied to the stabilizer through the VD1 diode, which, together with the capacitor C6, reduces the ripple caused by switching a relatively powerful load, which is a stepper motor. Power is supplied to the board through a 4-pin XP4 connector, the contacts of which are duplicated.

The demo version of the program allows you to accelerate and decelerate the motor with constant acceleration, as well as rotate at a constant speed in full-step or half-step mode. This program contains all the necessary set of functions and can be used as a base for writing specialized programs. Therefore, it makes sense to consider its structure in more detail.

The main task of the program is the formation of pulse sequences for 4 motor windings. Since the timing is critical for these sequences, the formation is performed in the timer 0 interrupt handler. We can say that the main work of the program is done in this handler. The block diagram of the handler is shown in fig. 31.

Rice. 31. Block diagram of the timer 0 interrupt handler.

It would certainly be more convenient to use Timer 1, as it is 16-bit and capable of causing periodic interrupts to coincide with auto-zeroing. However, he is busy generating a reference voltage for the comparators using PWM. Therefore, it is necessary to reset timer 0 in the interrupt, which requires some adjustment of the loaded value and causes some jitter, which, however, does not interfere in practice. The interval of 25 µs was chosen as the main time base, which is formed by the timer. With such discreteness, time sequences of phases can be formed, the PWM of current stabilization in the motor phases has the same period.

A software 16-bit timer STCNT is used to form the step repetition period. Unlike timer 0, its load value is not a constant, since it determines the speed of the motor. Thus, phase switching occurs only when the software timer overflows.

The phase sequence is given in a table. There are three different tables in the program memory of the microcontroller: for full-step mode without phase overlap, full-step with overlap, and for half-step mode. All tables have the same length of 8 bytes. The desired table is loaded into RAM at the beginning of work, which makes it easier to switch between different regimes engine operation. The selection of values ​​from the table is done using the PHASE pointer, so switching the direction of rotation of the motor is also very simple: for forward rotation, you need to increment the pointer, and for reverse rotation, decrement.

The most "master" variable in the program is the 24-bit signed variable VC, which contains the value of the current speed. The sign of this variable determines the direction of rotation, and the value determines the frequency of steps. A value of zero for this variable indicates that the engine is stopped. The program in this case turns off the current of all phases, although in many applications in this situation it is necessary to leave the current phases on and only slightly reduce their current, thus ensuring that the position of the motor is maintained. If necessary, it is very easy to make such a change in the logic of the program.

Thus, if the STCNT software timer overflows, the value of the VC variable is analyzed, in the case of a positive value, the PHASE pointer is incremented, and in the case of a negative value, it is decremented. Then the next combination of phases is selected from the table, which is output to the port. If the VC value is null, the PHASE pointer is not changed and all null values ​​are output to the port.

The value of T to load the STCNT timer is uniquely related to the value of the variable VC. However, the conversion of the frequency into a period takes quite a long time, so these calculations are performed in the main program, and not at every step, but much less frequently. In general, these calculations only need to be done periodically during acceleration or deceleration. In other cases, the speed, and, accordingly, the period of repetition of steps, do not change.

To implement PWM current stabilization, the phases must be periodically turned on, and then, when the current reaches a predetermined level, turned off. Periodic activation is performed in a timer 0 interrupt, for which, even in the absence of an overflow of the STCNT software timer, the current combination of phases is output to the port. This happens with a period of 25 µs (which corresponds to a PWM frequency of 40 kHz). Phase switching is controlled by comparators, the outputs of which are connected to the interrupt inputs INT0 and INT1. Interrupts are enabled after the phase current is turned on and disabled immediately after switching the comparators. This prevents them from being re-processed. In interrupt handlers, only the corresponding phases are turned off (Fig. 32).

Rice. 32. Block diagram of the interrupt handler INT0 and INT1.

The processes occurring during PWM current stabilization are shown in fig. 33. It should be especially noted that the current in the current sensor is intermittent even if the winding current is not interrupted. This is due to the fact that during the current decay, its path does not pass through the current sensor (but passes through the diode).

Rice. 33. The process of PWM current stabilization.

It must be said that the analog part of the PWM current stabilization system for the motor phases is rather “capricious”. The fact is that the signal taken from the current sensor contains a large amount of interference. Interference occurs mainly at the moments of switching the motor windings, both "own" and "foreign" phases. Correct PCB layout is required for proper circuit operation, especially for ground conductors. You may have to choose the low-pass filter at the input of the comparator or even introduce a small hysteresis into the comparator. As noted above, when controlling low-power motors, PWM current stabilization can be completely abandoned by using the usual L / R winding power supply circuit. To exclude PWM stabilization, it is enough just not to connect the inputs INT0 and INT1 of the microcontroller, of course, in this case, you can not install a comparator and current sensors at all.

In this program, the frequency of calculating new values ​​of speed and period is chosen to be 15.625ms. This value was not chosen by chance. This interval is 1/64s, and most importantly, it contains an integer number of timer 0 overflow periods (25µs). It is convenient if the values ​​of speed and acceleration are given in natural units, i.e. in steps per second and in steps per second squared. In order to be able to calculate the instantaneous speed 64 times per second in integer arithmetic, you need to go to the internal representation of the speed, increased by 64 times. Multiplication and division by 64 is reduced to simple shifts and therefore requires very little time. The specified frequency of calculations is provided by another software timer URCNT, which is decremented in the timer interrupt 0 (once every 25 μs). This timer is always loaded at a constant value, which gives it a fixed overflow period of 15.625ms. When this timer overflows, the UPD bit flag is set, which signals to the main program that "it's time to update the speed and period values."

The main program (Fig. 34) calculates the instantaneous values ​​of the speed and the period of the steps, providing the necessary acceleration curve. In this case, acceleration and deceleration are carried out with constant acceleration, so the speed changes linearly. In this case, the period changes according to the hyperbolic law, and its calculation is the main work of the program.

Rice. 34. Block diagram of the main cycle of the program.

The main program updates the values ​​of the speed and the period of the steps periodically, the frequency is set by the UPD flag. The program makes the update based on a comparison of the values ​​of two variables: the instantaneous speed VC and the required speed VR.

The value of the required speed is also defined in the main program. This is done based on the analysis of control signals and signals from limit switches. Depending on these signals, the main program loads the variable VR with the value of the required speed. In this program, it's V to move forward, -V to move backward, and 0 to stop. In general, the set of speeds (as well as accelerations and phase currents) can be arbitrarily large, depending on the requirements.

If the speeds VC and VR are equal, then the stepper motor is running in stationary mode and no update is required. If the speeds are not equal, then the value of VC with a given acceleration approaches VR, i.e. the motor accelerates (or decelerates) until the rated speed is reached. In the case where even the signs of VR and VC are different, the motor slows down, reverses and then reaches the required speed. This happens as if by itself, thanks to the structure of the program.

If at the next check it is found that the speeds VR and VC are not equal, then the value of acceleration A is added (or subtracted) to the value of VC. If as a result of this operation the required speed is exceeded, then the obtained value is corrected by replacing it with the exact value of the required speed.

Then the period T is calculated (Fig. 35).

Rice. 35. Block diagram of the period calculation subroutine.

First, the module of the current speed is calculated. Then there is a minimum speed limit. This restriction is necessary for two reasons. First, an infinitely small speed corresponds to an infinitely long period, which will cause an error in the calculations. Secondly, stepper motors have a rather long start zone in terms of speed, so there is no need to start at a very low speed, especially since rotation at low speeds causes increased noise and vibration. The value of the minimum speed VMIN must be selected according to the specific application and motor type. After limiting the minimum speed, the period is calculated using the formula T = 2560000/|VC|. At first glance, the formula is not obvious, but if we take into account that the period must be obtained in 25 µs intervals, and the internal representation of VC is its true value multiplied by 64, then everything falls into place. Calculating T requires a 24/24 unsigned division operation, which the AVR at 10 MHz does in about 70 µs. Considering that the period calculations occur no more than once every 15.625ms, the processor load is very low. The main load is produced by the timer 0 interrupt, and it is mainly performed on a short branch (without STCNT overflow) with a duration of about 3 μs, which corresponds to a 12% processor load. This means that there are significant reserves of computing resources.

The printed circuit board of the stepper motor controller is shown in fig. 36.

Rice. 36. Printed circuit board of the stepper motor controller.

The demo program shown does not have many of the features that should be present in a complete stepper motor controller. The implementation of these functions is highly dependent on the application of a particular stepper motor and can hardly be made universal. At the same time, the above program can serve as a basis for writing special programs that have one or another set of capabilities. For example, a number of specialized stepper motor controllers have been created on the basis of this board. One of the models of such a controller has the following features:

  • maximum phase switching frequency 3 kHz
  • constant acceleration
  • programmable direction of rotation
  • High resolution graphic LCD controller




Sooner or later, when building a robot, there will be a need for precise movements, for example, when you want to make a manipulator. There are two options here - servo, with current, voltage and position feedback, or a stepper drive. The servo drive is more economical, more powerful, but at the same time it has a very non-trivial control system and not everyone can do it, but stepper motor this is closer to reality.

stepper motor this, as its name implies, is an engine that rotates discrete movements. This is achieved due to the cunning shape of the rotor and two (rarely four) windings. As a result, by alternating the direction of the voltage in the windings, it is possible to achieve that the rotor will take turns occupying fixed values.
On average, a stepper motor has about a hundred steps per revolution of the shaft. But it strongly depends on the model of the engine, as well as on its design. In addition, there are half step And micro stepping, when a PWM voltage is applied to the motor windings, causing the rotor to stand between steps in an equilibrium state, which is maintained by a different voltage level on the windings. These tricks dramatically improve the accuracy, speed and noiselessness of work, but the torque decreases and the complexity of the control program greatly increases - after all, you need to calculate the voltage for each step.

One of the disadvantages of steppers, at least for me, is the rather high current. Since the voltage is applied to the windings all the time, and such a phenomenon as counter-EMF in it, unlike collector motors, is not observed, then, in fact, we are loaded on the active resistance of the windings, and it is small. So be prepared for the fact that you have to fence a powerful driver on MOSFET transistors or stocked with special microcircuits.

Types of stepper motors
If you don't go deep into internal structure, the number of steps and other subtleties, then from the user's point of view there are three types:

  • Bipolar- has four outputs, contains two windings.
  • Unipolar- has six outlets. It contains two windings, but each winding has a tap from the middle.
  • Four winding- has four independent windings. In fact, it is the same unipolar, only its windings are separated. Haven't seen it live, only in books.
Unipolar differs from bipolar only in that it needs much more simple circuit control, and it also has a much weaker moment. Since it works only with half of the windings. BUT! If we tear off the average output of the unipolar, then we get the usual bipolar. It is not difficult to determine which of the conclusions is average, it is enough to ring the resistance with a tester. From medium to extreme, the resistance will be equal to exactly half the resistance between the extreme conclusions. So if you got a unipolar, and the connection diagram is for a bipolar, then don’t worry and tear off the middle wire.

Where can I get a stepper motor.
In general, steppers are found in many places. The tastiest place five-inch drives and old dot matrix printers. You can also profit from them in ancient 40MB hard drives, unless, of course, a hand rises to cripple such antiques.
But in three-inch floppers, a bummer awaits us - the fact is that there is a stepper of a very flawed design - it has only one rear bearing, and the front end of the shaft rests on a bearing mounted on the drive frame. So you can only use it in your native mount. Or fence a high-precision mounting structure. However, you may be lucky and find an atypical flopper with a full-fledged engine.

Stepper motor control circuit
I got hold of stepper controllers L297 and powerful double bridge L298N.

Lyrical digression, if you wish, you can skip it


Switching scheme L298N+L297 ridiculously simple - you just need to stupidly connect them together. They are so made for each other that in the datasheet on L298N is a direct reference to L297, and in the dock on L297 on the L298N.

It remains only to connect the microcontroller.
  • At the entrance CW/CCW we give the direction of rotation - 0 in one direction, 1 - in the other.
  • at the entrance CLOCK- impulses. One impulse, one step.
  • entrance HALF/FULL sets the operating mode - full step / half step
  • RESET resets the driver to the default state ABCD=0101.
  • CONTROL determines how the PWM is set, if it is at zero, then the PWM is generated through the enable outputs INH1 And INH2, and if 1 then through the outputs to the ABCD driver. This may be useful if instead of L298 which has where to connect permission inputs INH1/INH2 there will be either a homemade bridge on transistors, or some other microcircuit.
  • At the entrance Vref it is necessary to apply voltage from the potentiometer, which will determine the maximum overload capacity. Apply 5 volts - the buffer will work at the limit, and in case of overload it will burn out L298, give less - at the maximum current it will simply stall. At first, I stupidly drove the power there, but then I changed my mind and put a trimmer resistor - protection is still a useful thing, it will be bad if the driver L298 will burn.
    If you don’t care about protection, then at the same time you can also throw out the resistors hanging at the sense output. These are current shunts, from them L297 finds out what current flows through the driver L298 and decides he will die and it's time to chop off or still stretch. More powerful resistors are needed there, given that the current through the driver can reach 4A, then with a recommended resistance of 0.5 ohms, there will be a voltage drop of about 2 volts, which means that the power released will be about 4 * 2 = 8 W - for a ogo resistor! I put two-watt ones, but I also had a small stepper, not capable of shaving 4 amperes.

True for the future, when I make a stepper drive for the robot, I will not take a bunch L297+L293, but mikruha L6208 which may be slightly weaker in current, but two in one! Plug in the engine and go right away. If you buy them, then on the L6208 it turns out even a little cheaper.

Nikolai Gurylev.

Hello Yuri Valerievich! I will describe the changes in the scheme > What prompted me to change the scheme? In the original scheme, the engine is controlled by two buttons each, of which contains two groups of contacts. One group supplies a high logic level to the input of microcircuits, the other supplies power to the motor. In view of the fact that some motors consume significant current, the group of contacts that controls the motor must be powerful enough, and, therefore, overall.

This, of course, is not convenient and not desirable in view of reducing the reliability of the device due to the use of mechanical contacts in high-current circuits. I propose to control the power supply of the motor with a powerful field effect transistor, which in turn is controlled by the same buttons. When the SB-1 or SB-2 buttons are closed, a high logic level through the OR logic element formed by the VD-6 and VD-7 diodes enters the gate of the VT-5 field effect transistor, opening it, and thereby closing the motor power circuit. This makes it possible to separate the power and control circuits, and use miniature low-current buttons for control, for example, tact buttons, and in addition, it makes it possible to control from an external device (for example, a computer) by supplying the appropriate logic levels. Naturally through an additional matching device. You can also implement step-by-step control, but I will not complicate it. After all, this is a SIMPLE device. Diodes can be used any, silicon, which will fit. The field effect transistor should be selected based on the supply voltage and current consumption of the motor used. Field-effect transistors are now sold in many different capacities with drain-source voltages up to hundreds of volts and with drain currents up to tens of amperes. If a low-voltage motor is used, then it is desirable to choose a low-voltage transistor as well, since they have a lower drain-source resistance, which implies a smaller voltage drop and less heating and power loss.

For the same reason, it is also desirable to use field workers with an N-channel as VT1-VT5. In this case, the resistance of the resistors in the base circuit can be reduced, this will not lead to an overload of the logic elements. The original circuit does not indicate the type of stabilizer used, but I think that 12 volts will be just right. It should be borne in mind that powerful field drivers, as a rule, begin to open intensively at a gate voltage of about 4 volts and saturate at a voltage of about 10 volts. That's like everything. The modified scheme and the modified signet are attached.

For the operation of almost all electrical appliances, special drive mechanisms are required. We propose to consider what a stepper motor is, its design, principle of operation and connection diagrams.

What is a stepper motor?

A stepper motor is an electrical machine designed to convert the electrical energy of the network into mechanical energy. Structurally, it consists of stator windings and a soft or hard magnetic rotor. A distinctive feature of a stepper motor is discrete rotation, in which a given number of pulses corresponds to a certain number of steps. Such devices are most widely used in CNC machine tools, robotics, information storage and reading devices.

Unlike other types of machines, a stepper motor does not rotate continuously, but in steps, from which the name of the device comes. Each such step is only a part of its full turnover. The number of steps required for a full rotation of the shaft will differ depending on the connection scheme, motor brand and control method.

Advantages and disadvantages of a stepper motor

The benefits of using a stepper motor include:

  • In stepper motors, the angle of rotation corresponds to the number of electrical signals applied, while, after stopping the rotation, the full torque and fixation are maintained;
  • Precise positioning - provides 3 - 5% of the set step, which does not accumulate from step to step;
  • Provides high speed start, reverse, stop;
  • It is distinguished by high reliability due to the absence of rubbing components for current collection, unlike collector motors;
  • The stepper motor does not require feedback for positioning;
  • Can deliver low rpm for directly applied load without any gears;
  • Relatively lower cost relative to the same;
  • A wide range of shaft speed control is provided by changing the frequency of electrical impulses.

The disadvantages of using a stepper motor include:

  • A resonance effect and slippage of the stepper unit may occur;
  • There is a possibility of losing control due to lack of feedback;
  • The amount of electricity consumed does not depend on the presence or absence of a load;
  • Difficulties in control due to the peculiarity of the circuit

Device and principle of operation

Rice. 1. The principle of operation of the stepper motor

Figure 1 shows 4 windings that belong to the motor stator, and their arrangement is arranged so that they are at an angle of 90º relative to each other. From which it follows that such a machine is characterized by a step size of 90º.

At the moment the voltage U1 is applied to the first winding, the rotor moves by the same 90º. In the case of alternately applying voltage U2, U3, U4 to the corresponding windings, the shaft will continue to rotate until the completion of a full circle. Then the cycle repeats again. To change the direction of rotation, it is enough to change the order in which pulses are supplied to the corresponding windings.

Types of stepper motors

To ensure various operating parameters, both the step size by which the shaft will move and the moment applied to move are important. Variations of these parameters are achieved due to the design of the rotor itself, the connection method and the design of the windings.

According to the design of the rotor

The rotating element provides magnetic interaction with the electromagnetic field of the stator. Therefore, its design and technical features directly determine the operating mode and rotation parameters of the stepping unit. In order to practically determine the type of stepper motor, with a de-energized network, it is necessary to turn the shaft, if you feel resistance, then this indicates the presence of a magnet, otherwise, this is a design without magnetic resistance.

Reactive

A reactive stepper motor is not equipped with a magnet on the rotor, but is made of soft magnetic alloys, as a rule, it is assembled from plates to reduce induction losses. The design in cross section resembles a gear with teeth. The poles of the stator windings are powered by opposite pairs and create a magnetic force to move the rotor, which moves from the alternating flow of electric current in the winding pairs.


A significant advantage of this design of the stepper drive is the absence of a locking moment generated by the field in relation to the armature. In fact, this is the same one in which the rotation of the rotor goes in accordance with the stator field. The disadvantage is the reduction in the amount of torque. Step for jet engine fluctuates from 5 to 15 °.

With permanent magnets

In this case, the moving element of the stepper motor is assembled from a permanent magnet, which may have two or more poles. The rotation of the rotor is provided by the attraction or repulsion of the magnetic poles by the electric field when voltage is applied to the corresponding windings. For this design, the angular pitch is 45-90°.


hybrid

It was designed to combine the best qualities of the two previous models, due to which the unit has a smaller angle and pitch. Its rotor is made in the form of a cylindrical permanent magnet, which is magnetized along the longitudinal axis. Structurally, it looks like two round poles, on the surface of which there are rotor teeth made of soft magnetic material. This solution made it possible to provide excellent holding and torque.


The advantages of a hybrid stepper motor are its high accuracy, smoothness and speed of movement, in small steps - from 0.9 to 5 °. They are used for high-end CNC machines, computer and office equipment and modern robotics. The only drawback is the relatively high cost.

For example, let's analyze the hybrid stepper motor for 200 shaft positioning steps. Accordingly, each of the cylinders will have 50 teeth, one of them is a positive pole, the second is negative. In this case, each positive tooth is located opposite the groove in the negative cylinder and vice versa. Structurally, it looks like this:


Because of this, 100 alternating poles with excellent polarity are obtained on the stepper motor shaft. The stator also has teeth as shown in Figure 6 below, except for the gaps between its components.


Rice. 6. Working principle of hybrid stepper motor

Due to this design, it is possible to achieve a displacement of the same south pole relative to the stator in 50 different positions. Due to the difference in the position in the half-position between the north and south poles, the possibility of moving in 100 positions is achieved, and the phase shift by a quarter division makes it possible to double the number of steps due to sequential excitation, that is, up to 200 steps of the angular shaft per 1 revolution.

Pay attention to Figure 6, the principle of operation of such a stepper motor is that when current is supplied in pairs to opposite windings, the opposite poles of the rotor located behind the stator teeth are pulled up and the same-named poles are repelled in front of them in the direction of rotation.

By type of windings

In practice, a stepper motor is a polyphase motor. The smoothness of work in which directly depends on the number of windings - the more there are, the smoother the rotation occurs, but also the higher the cost. In this case, the torque does not increase from the number of phases, although for normal operation their minimum number on the motor stator must be at least two. The number of phases does not determine the number of windings, so a two-phase stepper motor can have four or more windings.

Unipolar

A unipolar stepper motor is different in that the winding connection circuit has a branch from the midpoint. This makes it easy to change the magnetic poles. The disadvantage of this design is the use of only one half of the available turns, due to which less torque is achieved. Therefore, they are large in size.


To use the full power of the coil, the middle terminal is left unconnected. Consider the designs of unipolar units, they can contain 5 and 6 pins. Their number will depend on whether the middle wire is output separately from each motor winding or they are connected together.


Bipolar

The bipolar stepper motor is connected to the controller via 4 pins. In this case, the windings can be connected internally both in series and in parallel. Consider an example of his work in the figure.


In the structural diagram of such a motor, you see with one excitation winding in each phase. Because of this, changing the direction of the current requires the use of electronic circuit special drivers (electronic chips designed for control). A similar effect can be achieved by turning on the H-bridge. Compared to the previous one, the bipolar device provides the same torque in a much smaller package.

Connecting a stepper motor

To power the windings, you will need a device capable of delivering a control pulse or a series of pulses in a certain sequence. Such blocks are semiconductor devices for connecting a stepper motor, microprocessor drivers. In which there is a set of output terminals, each of them determines the power supply method and operation mode.

Depending on the connection scheme, one or another output of the stepper unit must be used. With various options for summing up certain terminals to the DC output signal, a certain rotational speed, step or microstep of linear movement in the plane is obtained. Since some tasks need a low frequency, while others need a high one, the same motor can set the parameter at the expense of the driver.

Typical stepper motor connection diagrams

Depending on how many pins are presented on a particular stepper motor: 4, 6 or 8 pins, the possibility of using one or another connection scheme will also differ. Look at the pictures, here are typical options for connecting a stepper mechanism:


Wiring diagrams for various types of stepper motors

Provided that the main poles of the stepper machine are powered from the same driver, according to these schemes, the following distinctive features of work can be noted:

  • The outputs are uniquely connected to the corresponding terminals of the device. When the windings are connected in series, it increases the inductance of the windings, but reduces the current.
  • Provides passport value electrical characteristics. In a parallel circuit, the current increases and the inductance decreases.
  • When connecting one phase per winding, the torque will decrease by low revs and reduce currents.
  • When connected, carries out all electrical and dynamic characteristics according to the passport, rated currents. The control scheme is greatly simplified.
  • Gives out much more torque and is used for high speeds;
  • Like the previous one, it is designed to increase torque, but is used for low speeds.

Stepper motor control

The operation of a stepping unit can be carried out in several ways. Each of which differs in the way the signals are applied to the pairs of poles. In total, a shooting range of the winding activation method is distinguished.

Wave- in this mode, only one winding is excited, to which the rotor poles are attracted. At the same time, the stepper motor is not capable of pulling a large load, since it produces only half of the torque.


full step- in this mode, simultaneous switching of phases occurs, that is, both are excited at once. Because of this, the maximum torque is provided, in the case of a parallel connection or series connection of the windings, the maximum voltage or current will be created.


half step- is a combination of the two previous methods of switching windings. During the implementation of which, in a stepper motor, voltage is alternately applied first to one coil, and then to two at once. This results in a better fixation on maximum speeds and more steps.


For softer control and overcoming the rotor inertia, microstepping control is used, when the sinusoid of the signal is carried out by microstepping pulses. Due to which the forces of interaction of magnetic circuits in a stepper motor get a smoother change and, as a result, the movement of the rotor between the poles. Allows you to significantly reduce the jerks of the stepper motor.

Without controller

The H-bridge system is used to control brushless motors. Which allows you to switch the polarity to reverse the stepper motor. It can be performed on transistors or microcircuits that create a logical chain for moving keys.


As you can see, from the power supply V, voltage is applied to the bridge. When the contacts S1 - S4 or S3 - S2 are connected in pairs, current will flow through the motor windings. Which will cause rotation in one direction or another.

with controller

The controller device allows you to control the stepper motor in various modes. The controller is based on the electronic unit, which forms groups of signals and their sequence sent to the stator coils. To prevent the possibility of damage in the event of a short circuit or other emergency situation on the motor itself, each output is protected by a diode that does not miss the impulse in the opposite direction.


Connection via unipolar stepper motor controller

Popular stepper motor control schemes


Control circuit from a controller with a differential output

It is one of the most noise-proof ways of working. In this case, the direct and inverse signal is directly connected to the corresponding poles. In such a circuit, shielding of the signal conductor must be applied. Great for low power loads.


Control circuit from a controller with an open collector output

In this circuit, the positive inputs of the controller are combined, which are connected to the positive pole. In the case of power supply above 9V, a special resistor must be included in the circuit to limit the current. Allows you to set the required number of steps with a strictly set speed, determine acceleration, etc.

The simplest do-it-yourself stepper motor driver

To assemble a driver circuit at home, some items from old printers, computers and other equipment may come in handy. You will need transistors, diodes, resistors (R) and an IC (RG).


To build a program, be guided by the following principle: when a logical unit is applied to one of the outputs D (the rest signal zero), the transistor opens and the signal passes to the motor coil. Thus, one step is completed.

Based on the circuit, a printed circuit board is compiled, which you can try to make yourself or make to order. After that, the corresponding parts are soldered on the board. The device is able to control the stepper from a home computer by connecting to a regular USB port.

Useful video



I recently purchased an ARDUINO from China. Thoughts on the manufacture of various devices - the sea. I got tired of blinking the LED on the board very quickly, I wanted something more substantial. Of course, it would be necessary to order a set, but its price is somewhat overpriced and I had to look for something on the Internet, to come up with something myself. As a result, I still ordered various sensors, relays, indicators in the same China ... A little later, the famous indicator 1602 came. I learned how to work with it, and also quickly got used to it. I wanted to control a stepper motor from a CD-DVD drive. I didn’t feel like waiting for a parcel from the East for 1-2 months, and I decided to try to make a driver myself. I found this circuit for switching on a bipolar stepper motor:

I did not find microcircuits in our wilderness, or order microcircuits in Russian online stores at the cost of 2-3 ready-made drivers for 1 microcircuit. The microcircuit is an H-bridge of transistors. By the way, either composite bipolar transistors (the so-called Darlington assemblies) or field-effect transistors must be included in the bridge. Single bipolar transistors need a good buildup, which the controller cannot give, otherwise there is a very high voltage drop across the transistor due to the fact that it cannot open. Because a good friend is engaged in repairing computers, then there were no problems with the field workers. At first I wanted to do it on bipolars, but it turns out 2 times more transistors, which is not entirely good for the size of the driver, and they can withstand much less current. Having soldered about a dozen field-effect transistors and read the datasheets on them, I again fell into despair - there are circuits on the Internet only on pairs of n- and p-type field effect transistors. And I simply did not find a single circuit on transistors of the same type. Computers use n-type transistors. I had to make a small device on the field workers on the breadboard, tried to control the LEDs, it worked out and I decided to assemble the finished device. The driver does not need to be adjusted because there is practically nothing to adjust here. The only problem was with the software. I found a datasheet for a similar engine and set the output states according to the work schedules. After that, it remains only to pick up the delay and all-device ready! Actually the scheme for replacing the L293D chip.


The transistor data is given just like that - in the multisim I could not change them in any way. I used P60N03LDG transistors in TO-252 package. Everything is quite simple in it: when voltage is applied to one of the inputs U1 or U2, 2 transistors open in the upper and lower arms, and crosswise. Thus, the polarity of the voltage on the motor is switched. And so that voltage is not applied immediately to 2 inputs (this will cause a short circuit in the power circuit) and used the L293D switching circuit. With this inclusion, the NPN transistor does not allow you to open all 4 H-bridge transistors at once. By the way, 1 motor will be controlled by 2 Arduino outputs, which is extremely important for saving outputs and inputs of the microcontroller. Another condition is that the negative wire of the transistor switches must be connected to the negative terminal of the control board. Power is supplied to the control board from Arduino, to the keys - from an external power supply. This allows you to connect sufficiently powerful engines. It all depends on the characteristics of the transistors. So for one driver you need 8 field effect transistors (P60N03LDG or any other n-channel), any 2 NPN SMD bipolar transistors (I have them marked t04), smd resistors of size 0805, and 4 of the same jumpers of the same size ( they are written 000 or just 0). All these details can be found on old and unusable motherboards. Be sure to check the parts before installation.


Arduino driver board

I spread the board in Layout6 format. . I note that you should get just such a look - the inscriptions should be readable and not upside down, keep this in mind when printing the board, because the details will be installed from the side of the tracks. We also solder the connectors from the motherboard with a hairdryer, cut off as many pins as necessary and solder them into our board - it’s much more convenient and reliable than soldering wires into the board. Let's deal with the purpose of the pins: Out1 and Out2 pins - connection of the stepper motor windings, In1,2 - input from Arduino, ± 5V - control power from Arduino (I made a double connector because you can connect power to several blocks at once with a loop), 2 jumpers located on the other side of the board, they supply voltage to the keys. Board size - 43x33mm. Who wants to, can minimize even more.

Let's deal with the software for the stepper motor. For any stepper motor, you need to find a datasheet or, at worst, a diagram of its operation. I only found a diagram, it looks like this:


Stepper Motor Diagram

The numbers indicate the step numbers. Based on the fact that when switching the controller high level If the driver switches the necessary keys to the low one, then we write, for example, the states only for the upper graphs of each winding. The first step: the first winding is the first wire + (HIGH), the other will automatically switch to minus (LOW) by the driver, I remind you that we describe the first wire of each winding. The second winding: the first wire - (LOW), the second + (HIGH), the second wire will switch automatically by the driver. Let's move on to the first change in the schedule. This is step 2. We describe the state of only the first wires. 1 wire of the first winding remained HIGH, 1 wire of the second changed from LOW to HIGH. The third step - 1 wire of the first winding changed from HIGH to LOW, 1 wire of the second remained HIGH. Fourth step: 1 wire of the first winding remained LOW, 1 wire of the second winding changed from HIGH to LOW. You can describe from any step, the main thing is to keep the sequence. To make the motor rotate in the other direction, you just need to shift the values ​​​​of any winding in the diagram by half a cycle in any direction. In this way it is possible to write software for drivers. You just need to know the diagram and correctly describe its state on the output pins.

Now we connect the board to the Arduino, the motor. Let's drop this sketch:

// connect to arduino pins 8,9
int input1 = 8;
int input2 = 9;
int stepCount = 5; //delay between steps adjusts motor speed

void setup()
{
pinMode(input1,OUTPUT);
pinMode(input2,OUTPUT);
}

void loop()
{
//1st step
digitalWrite(input1,LOW);
digitalWrite(input2,HIGH);
delay(stepCount);

//2nd step
digitalWrite(input1,HIGH);
digitalWrite(input2,HIGH);
delay(stepCount);

//3rd step
digitalWrite(input1,HIGH);
digitalWrite(input2,LOW);
delay(stepCount);

digitalWrite(input1,LOW);
digitalWrite(input2,LOW);
delay(stepCount);

We supply power to the driver, change, if necessary, the conclusions of one winding and think where to adapt this device (you can open the windows in the greenhouse in time and temperature, control the blinds and much more). I draw your attention to the fact that the engine will spin without stopping according to this sketch, if necessary, drive it into a loop and turn it to the required value, or, even better, write a library and connect it directly. Of course, this is not such a cool driver as on a microcircuit, but for experiments, while there are normal drivers from China, it is more than enough. Good luck and success in mastering microcontrollers. Read more about ARDUINO microcontrollers.

© 2022 bugulma-lada.ru -- Portal for car owners