Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Electrician

Stepper motor driver with microstepping. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Electric motors

Comments on the article Comments on the article

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

  • Supply voltage of the power unit, V ....... 27
  • Supply voltage of the logical part, V ....... 12
  • Maximum motor phase current amplitude, A, not less than ....... 5
  • Minimum amplitude of motor phase current, A, no more ....... 0,25
  • Preset pitch division ratio ... .1/8, 1/4, 1/2, 1/1
  • Auto-down current in hold mode, %.......65
  • Current auto-down delay relative to the last step, s ....... 3,4
  • Control signal levels ...... TTL, 5 V
  • Maximum step frequency, kHz ....... 12
  • Dimensions, mm ....... 102x68x40

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.

Stepper motor driver with microstepping
Rice. 1. Schematic diagram of the driver (click to enlarge)

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.

Stepper motor driver with microstepping
Rice. 2. Drawing of printed conductors

Stepper motor driver with microstepping
Rice. 3. Location of elements on the board

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

Imf, A 0,25 0,5 1,0 2,0 3,0 4,0 5,0 6,0 6.5
R18, R19, kOhm 0,31 0,62 1,27 2,62 4,07 5,62 7,29 9,09 10,04

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

Jumpers on XP1 Pitch division factor
1-2 3-4
There is There is 1/1
No There is 1/2
There is No 1/4
No No 1/8

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.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

Sensors will help stop the car 22.03.2002

At the Japanese Technology Exhibition in London, a new Toyota vehicle is presented, equipped with systems that ensure its high safety. The brakes will reliably stop the car if special sensors detect an obstacle dangerously close to it, and cameras built into the front bumper allow the driver to see what is happening around the corner.

Other interesting news:

▪ Ultra-durable sensor for smart textiles

▪ The moon is rusting

▪ 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

▪ article Restrictive and rectifier-limiting diodes. Encyclopedia of radio electronics and electrical engineering

▪ article Indicator of the charging process in the memory on the basis of a computer PSU. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024