ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Stepper motor driver with microstepping. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Electric motors The article presents a diagram and design, describes the principle of operation of a bipolar stepper motor driver based on the ATmega48 microcontroller. It is able to work with many motors, does not contain specialized microcircuits for controlling stepper motors. Versatility is ensured by the original method of maintaining a given current in the motor windings. This design can serve as the basis for the creation of similar devices containing additional safety elements - optocoupler input circuits, load short circuit protection, etc. In the described device, due to the assumed "moderate" conditions of its operation and to limit the cost, such nodes are not provided. The development goal was to create a simple and inexpensive bipolar stepper motor driver for universal use. All software is written in AVRASM assembly language and optimized in terms of runtime, which made it possible to solve the problem on the element base available at the time of development. Main Specifications
Schematic diagram of the driver is shown in fig. 1 . It is based on bridge current drivers of phases A and B on field-effect transistors VT1-VT4, VT5-VT8, respectively, controlled by specialized driver chips for the upper and lower half-bridge keys DA5-DA8 IR2104S. To increase the noise immunity, separate power supply for the power part (27 V) and the logic part with power switch drivers (12 V) was used.
Next, consider the part of the circuit related to one of the phases (phase A), since the part related to phase B acts similarly. The device determines the instantaneous value of the phase current by the voltage drop across the resistor R45, which, through the integrating circuit R5C6, is fed to the non-inverting input of the DA1.1 amplifier with adjustable gain, which also performs the function of a first-order low-pass filter. From the output of the amplifier, the signal comes to the inverting input of the comparator DA3.1. The comparator compares a signal proportional to the current flowing through the motor phase with a reference voltage. It is formed in the form of a stepped sinusoid (for microstep operation) by Timer 1 of the microcontroller, operating in the "Fast PWM" mode without preliminary division. The signal from the timer output is passed through a multi-stage filter R1C1R3C4R7C8. The repetition period of the width-modulated pulses is 12,7 μs, which corresponds to a frequency of 78,4 kHz. Resistor R23 in the operating mode does not participate in the formation of the reference voltage, since the output PB3 of the microcontroller to which it is connected is in a high-impedance state. In the hold mode (after the absence of pulses at the "Step" input during the last 3,4 s), the program sets the PB3 output of the microcontroller to a low logic level, and the amplitude of the exemplary signal decreases. From the output of the comparator DA3.1 with an open collector, loaded with resistor R25, the comparison result is fed to the input of the comparator DA3.2. The output of the comparator DA3.1 is also connected to the common wire through the capacitor C22. Together, R25 and C22 are the timing circuit of the current stabilization unit. When it falls below a certain reference level, the capacitor C22 is charged through the resistor R25. In the time interval from the start of charging until the voltage on the capacitor reaches the value set by the voltage divider R27R28, the power to the motor winding is turned off, which prevents rapid current fluctuations around the reference value. This algorithm in the classical sense does not apply to the “Fixed-Frequency PWM” or “Fixed-Off-Time PWM” current stabilization algorithms, but in practice it showed good performance. When the current exceeds the exemplary value, the output of the comparator DA3.2 is set to a low logic level. The microcontroller reacts to this by turning off the winding and simultaneously closing the transistors VT1-VT4 using the SD signal supplied to the DA5 and DA6 drivers. This achieves a rapid drop in current in the motor windings. In the case of a current drop below the exemplary one, the opposite happens, a high-level SD signal is supplied to the DA5 and DA6 drivers, which opens the said transistors, which does not prevent the current from rising in the winding. Changing the steps of the reference voltage, as well as changing the combinations of open and closed transistors of the bridge, occurs with the arrival of the next pulse at the "Step" input according to algorithms that depend on the preset step division factor (the presence of jumpers between contacts 1-2 and 3-4 of the XP1 connector) and the current direction of rotation (logical level of the signal at the input "Dir."). "Enable" input was conceived to enable and disable the engine, but it does not work in the version of the program attached to the article. The driver is made on a double-sided printed circuit board, the drawing of the printed conductors of which is shown in Fig. 2, and the arrangement of elements - in fig. 3. Transistors VT1-VT8 are located on one side of the board with heat-removing surfaces from it. A heat sink is pressed to these surfaces through insulating spacers - in the simplest case, an aluminum plate measuring 60x60 mm. It should be noted that with a phase current of more than 4 ... 5 A and a long-term operation of the heat sink in the form of a plate, it may not be enough and its surface should be increased by making the heat sink ribbed or needle-shaped.
The board material should be selected with a thickness of at least 1 ... 1,5 mm, the thickness of the foil should be at least 35 microns. Printed conductors, through which a large current flows, should be abundantly tinned or bandaged with copper wire, soldered along the entire length of the conductor. Most of the design components are used in surface mount design. Resistors and capacitors - size 1206. Resistors R45, R50 have wire leads and power - at least 2 watts. oxide capacitors in power circuits - with low ESR. Trimmer resistors R18 and R19 - multi-turn 3296W. The amplitude values of the motor phase current are regulated by trimming resistors R18, R19. The easiest way to do this is by switching the driver to the 1/8 microstep mode and monitoring the voltage drop across the current sensor resistors R45 and R50 with a digital voltmeter. By applying single pulses to the "Step" input, the maximum current values are achieved alternately in phases A and B. These values \u1b\uXNUMXbare set to the same values \uXNUMXb\uXNUMXband corresponding to the required current amplitude with trimmer resistors. Reducing the resistance of the tuning resistors leads to a decrease in current, and vice versa. For orientation, you can use the table. XNUMX, which shows the dependence of the amplitude of the current phase Imf from the entered resistance of the tuning resistor. Table 1
Before turning on the driver, install jumpers between contacts 1-2 and contacts 3-4 of the XP1 connector, which provide the required ratio of the motor step division in accordance with Table. 2. The program analyzes the state of the jumpers once at the beginning of its work; further changes in their state have no effect on the operation of the driver. Switching the division factor "on the fly" in the proposed version of the program is not provided. Table 2
The microcontroller program and PCB file in Sprint Layout 6.0 format can be downloaded from ftp://ftp.radio.ru/pub/2016/09/est-drv.zip. Author: M. Reznikov See other articles Section Electric motors. Read and write useful comments on this article. Latest news of science and technology, new electronics: Machine for thinning flowers in gardens
02.05.2024 Advanced Infrared Microscope
02.05.2024 Air trap for insects
01.05.2024
Other interesting news: ▪ Ultra-durable sensor for smart textiles ▪ NVIDIA Tegra Note 7 Tablet with LTE ▪ Touch screens will become cheaper ▪ Huawei FreeBuds Pro 2+ headphones with thermometer and heart rate monitor News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the site Medicine. Selection of articles ▪ article by Felicite-Robert de Lamennay. Famous aphorisms ▪ article Why do bats hang upside down? Detailed answer ▪ Artocarpus article. Legends, cultivation, methods of application
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |