RU2704486C1 - Method of percussion control of several step motors with the help of personal computer via usb channel and device for its implementation - Google Patents

Method of percussion control of several step motors with the help of personal computer via usb channel and device for its implementation Download PDF

Info

Publication number
RU2704486C1
RU2704486C1 RU2018146586A RU2018146586A RU2704486C1 RU 2704486 C1 RU2704486 C1 RU 2704486C1 RU 2018146586 A RU2018146586 A RU 2018146586A RU 2018146586 A RU2018146586 A RU 2018146586A RU 2704486 C1 RU2704486 C1 RU 2704486C1
Authority
RU
Russia
Prior art keywords
control
drivers
output
inputs
stepper motors
Prior art date
Application number
RU2018146586A
Other languages
Russian (ru)
Inventor
Алексей Игоревич Иванов
Сергей Михайлович Иванов
Алексей Васильевич Разумов
Александр Федорович Сонин
Original Assignee
Акционерное общество "Корпорация "Московский институт теплотехники" (АО "Корпорация "МИТ")
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Акционерное общество "Корпорация "Московский институт теплотехники" (АО "Корпорация "МИТ") filed Critical Акционерное общество "Корпорация "Московский институт теплотехники" (АО "Корпорация "МИТ")
Priority to RU2018146586A priority Critical patent/RU2704486C1/en
Application granted granted Critical
Publication of RU2704486C1 publication Critical patent/RU2704486C1/en

Links

Images

Abstract

FIELD: electrical engineering.
SUBSTANCE: invention relates to electrical engineering and can be used to control step motors (SM) using a personal computer (PC) via USB. Method of perforated control of several step motors implements control mode with constant frequency and consists in the fact that for each control cycle a data packet is formed, which contains information on direction of rotation and number of steps of rotor of each step motor (SM), which it must perform at this control cycle. This data packet is transmitted to a virtual serial port of a personal computer. Port driver transmits data packet on USB channel after conversion in accordance with standard of data transmission interface through half-duplex multipoint serial communication channel to microcontroller (MC), where the received data packet is converted into three discrete signals to be sent to three inputs EN, DIR and STEP drivers of each SM. Drivers provide required commutation of their windings that causes simultaneous rotation of their shafts by corresponding number of steps in required directions. If advancement of step instruction is required by motors for several forward cycles, forming an array of data packets for a certain number of cycles, recording it in a virtual serial port and transmitting to the MC, where said array is successively developed by the SM at each control cycle.
EFFECT: providing virtually unlimited buildup of the number of controlled engines, increasing the distance between the PC and MC up to 1,200 meters, providing, if necessary, simultaneous control of the SM or time diversity of execution of commands of the SM for reducing requirements for instantaneous power of the power supply and reducing noise.
12 cl, 21 dwg

Description

Предполагаемое изобретение относится к электротехнике, а именно, к способам и устройствам управления шаговыми двигателями (ШД) с помощью персонального компьютера (ПК) по каналу USB.The alleged invention relates to electrical engineering, namely, to methods and devices for controlling stepper motors (ST) using a personal computer (PC) via USB.

Известны технические решения, которые применяются для управления множеством электродвигателей. Например, в описании патента [1] предложен способ управления несколькими бесколлекторными (brushless DC motors - безщеточными) двигателями от компьютера, предусматривающий передачу команд управления по системной шине (CAN или LIN) к драйверам двигателей или к дополнительному микроконтроллеру (МК), организующему обмен данными по отдельной шине управления несколькими двигателями. Данный способ управления предполагает адресное обращение к каждому двигателю непосредственно от ПК по последовательному интерфейсу, что, с одной стороны, значительно увеличивает разновременность выполнения управляющих команд, а с другой стороны требует использования в составе каждого привода не только простого драйвера, но и контроллера, обеспечивающего поддержку выбранного протокола с приемопередатчиком шины CAN или LIN. Величина задержки между интервалами времени выполнения двух последовательных шагов одним и тем же ШД определяется количеством ШД и длительностью операций, необходимых для формирования соответствующих сигналов, а также задержками времени на обмен данными между персональным компьютером и микроконтроллером.Known technical solutions that are used to control many electric motors. For example, in the description of the patent [1], a method for controlling several brushless DC motors (brushless) motors from a computer is proposed, which involves transmitting control commands via the system bus (CAN or LIN) to motor drivers or to an additional microcontroller (MK) that organizes data exchange on a separate control bus for several engines. This control method involves addressing each engine directly from the PC via a serial interface, which, on the one hand, significantly increases the timing of the execution of control commands, and on the other hand requires the use of not only a simple driver, but also a controller that provides support selected protocol with CAN or LIN bus transceiver. The amount of delay between the time intervals for the execution of two consecutive steps by the same SD is determined by the number of SDs and the duration of operations necessary to generate the corresponding signals, as well as the time delays in exchanging data between a personal computer and a microcontroller.

В техническом решении, изложенном в описании патента [2], предложен способ управления нескольким шаговыми двигателями от компьютера через специализированный контроллер многоосевого позиционирования, формирующий команды управления движением для нескольких драйверов ШД. Увеличение количества управляемых двигателей достигается введением дополнительного коммутатора на выходе каждого драйвера, позволяющего выбрать один из двух подключенных к нему ШД. При этом возникают перерывы в процессе запитывания обмоток каждого отдельного ШД током, поскольку драйвер питает обмотки только того ШД, который должен совершить перемещение в данный момент. Данное решение требует введения в систему нескольких силовых коммутаторов (по числу приводов), что значительно увеличивает габариты, а также снижает момент удержания обесточенных ШД. При этом многократное обесточивание и последующее подключение к питанию обмоток ШД приводит к случайному перемещению каждого ШД в пределах одного шага и снижает тем самым точность позиционирования. Кроме того, одновременно выполнить шаг может только половина управляемых ШД, а управление оставшимися двигателями возможно только по окончании движения и прекращения тока в обмотках первой группы ШД.In the technical solution set forth in the description of the patent [2], a method for controlling several stepper motors from a computer through a specialized multi-axis positioning controller that generates motion control commands for several stepper motor drivers is proposed. An increase in the number of controllable engines is achieved by introducing an additional switch at the output of each driver, which allows one to choose one of the two motor drives connected to it. In this case, interruptions occur in the process of energizing the windings of each individual motor drive with current, since the driver only supplies the windings of the motor drive that must be moving at the moment. This solution requires the introduction of several power switches into the system (according to the number of drives), which significantly increases the dimensions, and also reduces the moment of holding de-energized motor drives. At the same time, multiple blackouts and the subsequent connection to the power supply of the windings of the motor steams leads to the random movement of each motor steams within one step and thereby reduces the accuracy of positioning. In addition, at the same time, only half of the controlled motor drives can perform the step, and the control of the remaining motors is possible only at the end of the movement and the current ceases in the windings of the first group of motor drives.

Аналогичное решение предложено в патенте [3], где в отличие от технического решения предыдущего патента к одному драйверу через демультиплексор подключается более двух ШД. При этом обращение к каждому из них будет происходить реже в n раз (где n - количество ШД, подключенных к одному драйверу).A similar solution was proposed in the patent [3], where, in contrast to the technical solution of the previous patent, more than two motor drives are connected to one driver via a demultiplexer. In this case, access to each of them will occur less than n times (where n is the number of SDs connected to one driver).

Наиболее близким к предлагаемому является техническое решение [4], принятое за прототип. Для этого технического решения характерно, что потактовое управление несколькими шаговыми двигателями осуществляется с помощью персонального компьютера по каналу USB (Universal Serial Bus - универсальная последовательная шина). При этом реализуется режим управления с постоянной частотой, который состоит в том, что для каждого такта управления формируют пакет данных, содержащий информацию о направлении поворота и количестве шагов ротора каждого шагового двигателя, которые он должен выполнить на данном такте управления. Этот пакет данных передают в виртуальный последовательный порт персонального компьютера, а драйвер порта передает пакет данных по каналу USB в микроконтроллер, в котором его обрабатывают и формируют с частотой выполнения шагов дискретные команды для драйвера каждого двигателя, где они вызывают коммутацию обмоток двигателей, заставляя каждый из них выполнить на каждом такте управления заданное количество шагов в требуемом направлении. В результате обеспечивается управление от ПК шестнадцатью ШД по каналу USB через микроконтроллер. При таком управлении используется достаточно распространенная схема, при которой команда на поворот вала каждого ШД на заданное количество шагов в нужном направлении выдается один раз в начале установленного интервала времени (такта). Далее команда отрабатывается каждым ШД путем подачи на его драйвер управляющих импульсов обычно с постоянной частотой. При этом за один такт управления может быть выполнено не более определенного заранее количества шагов.Closest to the proposed is a technical solution [4], taken as a prototype. This technical solution is characterized by the fact that the step-by-step control of several stepper motors is carried out using a personal computer via the USB channel (Universal Serial Bus - universal serial bus). In this case, a control mode with a constant frequency is implemented, which consists in the fact that for each control cycle a data packet is generated containing information about the direction of rotation and the number of rotor steps of each stepper motor that it must perform on this control cycle. This data packet is transmitted to the virtual serial port of a personal computer, and the port driver transfers the data packet via USB to a microcontroller, in which it is processed and discrete commands for each motor driver are generated with the frequency of the steps, where they cause the motor windings to commute, forcing each them to perform at each control step a predetermined number of steps in the desired direction. As a result, sixteen SDs are controlled from a PC via USB through a microcontroller. With this control, a fairly common scheme is used, in which a command to rotate the shaft of each motor drive for a given number of steps in the desired direction is issued once at the beginning of the set time interval (cycle). Next, the command is worked out by each SD by supplying control pulses to its driver, usually with a constant frequency. Moreover, in one control cycle, no more than a predetermined number of steps can be performed.

В техническом решении «Способ управления шестнадцатью шаговыми двигателями по USB-каналу квазиодновременно» [4] предложен вариант мультиплексного управления несколькими шаговыми двигателями. От упомянутых выше способов управления это решение отличается тем, что в нем мультиплексор перенесен с выхода драйвера на его вход. Кроме того, на входе каждого драйвера производится запоминание сигналов в добавленных элементах памяти. При этом используется прямое управление ключами драйвера. Данный способ позволяет управлять только ШД, в которых не требуется регулирование тока в обмотках. При этом использование мультиплексирования имеет следующие недостатки: значительное увеличение аппаратного состава и, как следствие, стоимости оборудования по сравнению с прямым управлением; увеличение габаритов устройства; значительное увеличение времени выдачи команд множеству ШД, вызванное последовательной выборкой команды и адреса; повышенные требования к скорости канала передачи информации от ПК к микроконтроллеру, обусловленные содержанием в протоколе обмена адреса ШД и нескольких байт команды. Следует также отметить, что использование в качестве канала связи USB-интерфейса ограничивает расстояние от ПК до микроконтроллера величиной 6 метров.In the technical solution “A method for controlling sixteen stepper motors via a USB channel quasi-simultaneously” [4], a multiplex control option for several stepper motors is proposed. This solution differs from the control methods mentioned above in that the multiplexer is transferred from the output of the driver to its input. In addition, at the input of each driver, the signals are stored in the added memory elements. This uses direct driver key management. This method allows you to control only the stepper motor, in which the current regulation in the windings is not required. Moreover, the use of multiplexing has the following disadvantages: a significant increase in the hardware composition and, as a consequence, the cost of equipment compared to direct control; increase the size of the device; a significant increase in the time of issuing commands to a plurality of SDs caused by sequential selection of the command and address; increased requirements for the speed of the information transfer channel from the PC to the microcontroller, due to the contents of the SD address and several bytes of the command in the exchange protocol. It should also be noted that using a USB interface as a communication channel limits the distance from the PC to the microcontroller to 6 meters.

Задачей предполагаемого изобретения является расширение функциональных возможностей способа управления ШД и реализующего его устройства. Решение этой задачи достигается за счет того, что пакет данных имеет размер n байт (по байту на каждый из n двигателей соответственно). Причем первый бит каждого байта содержит информацию о направлении вращения двигателя, а следующие 7 бит содержат информацию о количестве шагов, на которые должен повернуться вал данного двигателя в текущем такте управления. Пакет данных, записанный в виртуальный последовательный порт персонального компьютера и переданный по каналу USB, преобразуют в соответствии со стандартом интерфейса передачи данных по полудуплексному многоточечному последовательному каналу связи и передают в микроконтроллер, где принятый пакет данных преобразуют в три дискретных сигнала для подачи на три входа EN, DIR и STEP драйверов каждого двигателя так, что на все время работы двигателей подают высокий потенциал на входы EN драйверов всех двигателей, в течение всего текущего такта управления на вход DIR драйвера соответствующего двигателя подают низкий потенциал, если необходимо обеспечить направление вращения влево, и высокий потенциал, если необходимо обеспечить направление вращения вправо, а на входы STEP драйверов всех двигателей одновременно с частотой выполнения шагов подают управляющие импульсы высокого уровня длительностью менее периода выполнения шагов, если соответствующий двигатель должен выполнить шаг, и подают низкий потенциал на входы STEP драйверов тех двигателей, для которых все требуемые на данном такте управления шаги уже выполнены. В результате таких действий все драйверы обеспечивают необходимую коммутацию обмоток своих шаговых двигателей, вызывающую одновременный поворот их валов на соответствующее количество шагов в требуемых направлениях. Причем, если заранее известно задание на отработку шагов двигателями на несколько тактов управления вперед, то формируют массив пакетов данных для известного количества тактов, записывают его в виртуальный последовательный порт и передают в микроконтроллер, где этот массив последовательно отрабатывают на каждом такте управления в соответствии с описанной последовательностью операций.The objective of the proposed invention is to expand the functionality of the control method of the stepper motor and the device that implements it. The solution to this problem is achieved due to the fact that the data packet has a size of n bytes (by byte for each of n engines, respectively). Moreover, the first bit of each byte contains information about the direction of rotation of the engine, and the next 7 bits contain information about the number of steps that the shaft of this engine should rotate in the current control cycle. The data packet recorded in the virtual serial port of a personal computer and transferred via USB is converted in accordance with the standard of the data transmission interface via a half-duplex multipoint serial communication channel and transmitted to the microcontroller, where the received data packet is converted into three discrete signals for feeding to three EN inputs , DIR and STEP drivers of each engine so that for the entire time the engines are running, they supply high potential to the EN inputs of the drivers of all engines, throughout the entire control cycle Lines at the DIR input of the driver of the corresponding engine supply low potential if it is necessary to provide the direction of rotation to the left, and high potential if it is necessary to provide the direction of rotation to the right, and high-level control pulses with a duration shorter than the execution period are fed to the STEP inputs of the drivers of all engines simultaneously steps, if the corresponding motor must complete the step, and apply a low potential to the STEP inputs of the drivers of those motors for which all are required at a given cycle Control steps have been performed. As a result of such actions, all drivers provide the necessary switching of the windings of their stepper motors, causing their shafts to simultaneously rotate by the appropriate number of steps in the required directions. Moreover, if the task for working off the steps by the engines for several control clock cycles is known in advance, then an array of data packets for a known number of clock cycles is formed, it is recorded in a virtual serial port and transferred to the microcontroller, where this array is sequentially worked out on each control cycle in accordance with the described sequence of operations.

Применение последовательного интерфейса RS-485 (Recommended Standard ANSI TIA/EIA-485A - стандарт передачи данных по полудуплексному многоточечному последовательному интерфейсу) обеспечивает возможность масштабирования рассматриваемого способа за счет применения нескольких индивидуально адресуемых микроконтроллеров и позволяет увеличить расстояние между персональным компьютером и микроконтроллером до 1200 метров (для USB - максимум 6 метров).The use of the RS-485 serial interface (Recommended Standard ANSI TIA / EIA-485A - the standard for transmitting data via a half-duplex multipoint serial interface) allows the method to be scaled by using several individually addressable microcontrollers and allows to increase the distance between the personal computer and the microcontroller up to 1200 meters ( for USB - a maximum of 6 meters).

Если необходимо увеличить количество управляемых ШД от данного персонального компьютера (если у одного микроконтроллера имеется недостаточное количество выводов для управления требуемым количеством ШД), то в виртуальный последовательный порт персонального компьютера передают несколько (по количеству используемых микроконтроллеров) пакетов данных, каждый из которых дополнительно содержит один байт, определяющий адрес микроконтроллера. При этом каждый пакет данных передают на каждом такте управления в микроконтроллер, имеющий соответствующий адрес.If it is necessary to increase the number of managed SDs from this personal computer (if one microcontroller does not have enough outputs to control the required number of SDs), several data packets (according to the number of microcontrollers used) are transferred to the virtual serial port of the personal computer, each of which additionally contains one byte that identifies the address of the microcontroller. In this case, each data packet is transmitted at each control clock to a microcontroller having a corresponding address.

Применяемый формат данных, включающий унифицированный набор сигналов: «включить питание обмоток» (EN), «выбрать направление вращения» (DIR) и «выполнить шаг» (STEP), позволяет управлять различными типами ШД, используя различные драйверы (например, А4979 для биполярного ШД [5]) без изменения управляющей программы.The applied data format, which includes a unified set of signals: “turn on the power of the windings” (EN), “select the direction of rotation” (DIR) and “execute the step” (STEP), allows you to control various types of motor drives using various drivers (for example, A4979 for bipolar SD [5]) without changing the control program.

Кроме того, использование унифицированного набора сигналов позволяет сократить количество управляющих сигналов (и, соответственно, выводов микроконтроллера) для одного ШД до двух (DIR и STEP) против четырех, используемых в [4]. Сигнал «включение питания обмоток» используется общий для драйверов всех ШД, подключенных к данному микропроцессору. Таким образом, управляющие импульсы подаются синхронно и одновременно на драйверы всех ШД, подключенных к одному порту микропроцессора, обеспечивая одновременное (а не квазиодновременное, как в [4]) управление этими ШД.In addition, the use of a unified set of signals makes it possible to reduce the number of control signals (and, accordingly, the outputs of the microcontroller) for one SD to two (DIR and STEP) versus four used in [4]. The signal “turning on the power of the windings” is used common for the drivers of all motor drives connected to this microprocessor. Thus, control pulses are supplied synchronously and simultaneously to the drivers of all the motor drives connected to one port of the microprocessor, providing simultaneous (and not quasi-simultaneous, as in [4]) control of these motor drives.

Если необходимо уменьшить количество выводов микропроцессора, используемых для решения задачи управления, то предлагается сигналы DIR, поступающие от микроконтроллера на соответствующие входы всех драйверов связанных с ним двигателей, формировать на одном выходе микроконтроллера перед выполнением каждого шага двигателей. При этом сначала на входы DIR всех драйверов подают низкий потенциал, после чего подают управляющий импульс высокого уровня на входы STEP драйверов тех двигателей, которые должны повернуть на текущем шаге свой вал влево. Затем на входы DIR всех драйверов подают высокий потенциал и далее подают управляющий импульс высокого уровня на входы STEP драйверов тех двигателей, которые должны повернуть на текущем шаге свой вал вправо, обеспечивая уже квазиодновременное управление всеми двигателями. При этом выполнение шага всеми ШД может быть осуществлено за пять тактов микропроцессора. Тогда как при использовании технического решения [4] для этого потребуется 32 такта микропроцессора.If it is necessary to reduce the number of microprocessor outputs used to solve the control problem, it is proposed that the DIR signals coming from the microcontroller to the corresponding inputs of all the drivers of the motors connected to it be formed on one output of the microcontroller before each step of the motors. In this case, first low potential is applied to the DIR inputs of all drivers, after which a high-level control pulse is supplied to the STEP inputs of the drivers of those engines that must turn their shaft to the left at the current step. Then, the high potential is applied to the DIR inputs of all the drivers, and then a high-level control pulse is sent to the STEP inputs of the drivers of those engines, which should turn their shaft to the right at the current step, providing already quasi-simultaneous control of all engines. In this case, the execution of the step by all SDs can be carried out in five cycles of the microprocessor. Whereas when using a technical solution [4], this requires 32 cycles of the microprocessor.

При использовании автономного электропитания для осуществления управления ШД на передний план выдвигаются условия по снижению требований к мгновенной мощности источника питания и уменьшению помех, создаваемых при переключении обмоток ШД, а также демпфированию возникающего при этом напряжения самоиндукции. Эта задача решается за счет того, что управляющие импульсы на входы STEP драйверов двигателей за отрезок времени Tstep, в течение которого двигатель должен совершить шаг, формируют не одновременно в начале этого отрезка, а с задержкой по времени, для чего предварительно до начала управления двигателями измеряют промежуток времени Δtp, за который ток потребления драйвера достигает своего квазистационарного значения после его снижения при подаче управляющего импульса (под квазистационарным значением тока потребления драйвера понимают его среднее значение, измеренное при включенном драйвере и отсутствии управляющих импульсов в течение интервала времени не менее 10Tstep секунд). В процессе управления определяют количество двигателей nd, которые должны выполнить шаг на наступающем отрезке времени Tslep, определяют величину временного интервала At„=Tstep /nd, а затем поочередно с задержкой по времени Δtp, если Δtp<Δtn, и с задержкой Δtn, если Δtp≥Atn, подают управляющие импульсы на входы STEP драйверов тех двигателей, которые должны выполнить шаг на наступающем отрезке времени Tstep.When using autonomous power supply to control the stepper motor, conditions are put forward to reduce the requirements for the instantaneous power of the power source and to reduce the noise created when switching the stepper motor windings, as well as damping the self-induction voltage resulting from this. This problem is solved due to the fact that the control pulses to the STEP inputs of the engine drivers for the time interval T step , during which the engine must take a step, are formed not simultaneously at the beginning of this interval, but with a time delay, for which, prior to the start of engine control measure the time interval Δt p during which the driver current consumption reaches its quasistationary value after it decreases when a control pulse is applied (by the quasistationary value of the driver current consumption average value measured with the driver turned on and there are no control pulses during the time interval of at least 10T step seconds). In the control process, determine the number of engines n d that must perform a step on the upcoming time interval T slep , determine the value of the time interval At „= T step / n d , and then alternately with a time delay Δt p if Δt p <Δt n , and with a delay Δt n , if Δt p ≥At n , control pulses are supplied to the STEP inputs of the drivers of those engines that must perform a step in the upcoming period of time T step .

Сущность предлагаемого технического решения поясняется чертежами.The essence of the proposed technical solution is illustrated by drawings.

Фиг. 1. Участок экспериментального переходного процесса изменения тока потребления драйвера ШД при совершении одного шага.FIG. 1. The plot of the experimental transient process of changing the current consumption of the driver of the stepper motor during one step.

Фиг.2. Участок экспериментально полученных графиков процессов изменения суммарного тока потребления четырех драйверов ШД.Figure 2. Plot of experimentally obtained graphs of processes of changes in the total current consumption of four SD drivers.

Фиг. 3. Пример блок-схемы устройства, реализующего управление шестнадцатью ШД.FIG. 3. An example of a block diagram of a device that implements control of sixteen SD.

Фиг. 4. Пример электрической принципиальной схемы соединения приемопередатчика RS-485 с модулем универсального асинхронного приемопередатчика UART микроконтроллера.FIG. 4. An example of an electrical circuit diagram for connecting an RS-485 transceiver to a universal asynchronous UART transceiver module of a microcontroller.

Фиг. 5. Пример электрической принципиальной схемы силового питания через буферную емкость.FIG. 5. An example of an electrical circuit diagram of power supply through a buffer tank.

Фиг. 6. Блок-схема, иллюстрирующая пример последовательности операций, поясняющих работу устройства фиг. 3.FIG. 6. A flowchart illustrating an example of a flowchart explaining the operation of the device of FIG. 3.

Фиг. 7. Блок-схема, иллюстрирующая пример последовательности операций, поясняющих работу устройства, реализующего способ управления с использованием нескольких микроконтроллеров.FIG. 7. A flowchart illustrating an example of a sequence of operations explaining the operation of a device that implements a control method using multiple microcontrollers.

Фиг. 8. Пример блок-схемы устройства с элементом гальванической развязки, реализующего управление шестнадцатью ШД.FIG. 8. An example of a block diagram of a device with an element of galvanic isolation that implements control of sixteen SD.

Фиг. 9. Пример электрической принципиальной схемы элемента гальванической развязки при управлении четырьмя ШД.FIG. 9. An example of an electrical circuit diagram of an element of galvanic isolation when controlling four motor drives.

Фиг. 10. Пример электрической принципиальной схемы основного и дополнительного вторичного источника питания.FIG. 10. An example of an electrical circuit diagram of a primary and secondary secondary power source.

Фиг. 11. Пример блок-схемы устройства для управления шестнадцатью ШД, имеющего один общий для всех шаговых двигателей дискретный выход DIR микропроцессора.FIG. 11. An example of a block diagram of a device for controlling sixteen motor drives having one discrete microprocessor DIR output common to all stepper motors.

Фиг. 12. Пример блок-схемы устройства, имеющего элемент гальванической развязки и один общий для всех шаговых двигателей дискретный выход DIR микропроцессора.FIG. 12. An example of a block diagram of a device having a galvanic isolation element and one common for all stepper motors discrete microprocessor DIR output.

Фиг. 13. Блок-схема, иллюстрирующая пример последовательности операций, поясняющих работу устройств фиг. 11 и фиг.12, имеющих один общий для всех шаговых двигателей дискретный выход DIR микропроцессора.FIG. 13. A flowchart illustrating an example of a flowchart explaining the operation of the devices of FIG. 11 and 12, having one common for all stepper motors discrete microprocessor DIR output.

Фиг. 14. Пример блок-схемы устройства с датчиком тока потребления для управления шестнадцатью ШД.FIG. 14. An example of a block diagram of a device with a current consumption sensor for controlling sixteen motor drives.

Фиг. 15. Пример блок-схемы устройства с датчиком тока потребления и элементом гальванической развязки для управления шестнадцатью ШД.FIG. 15. An example of a block diagram of a device with a consumption current sensor and a galvanic isolation element for controlling sixteen motor drives.

Фиг. 16. Пример блок-схемы устройства с датчиком тока потребления и одним общим для всех шаговых двигателей дискретным выходом DIR микропроцессора.FIG. 16. An example of a block diagram of a device with a consumption current sensor and one discrete microprocessor DIR output common to all stepper motors.

Фиг. 17. Пример блок-схемы устройства с датчиком тока потребления, одним общим для всех шаговых двигателей дискретным выходом DIR микропроцессора и элементом гальванической развязки.FIG. 17. An example of a block diagram of a device with a consumption current sensor, one common for all stepper motors discrete microprocessor DIR output and galvanic isolation element.

Фиг. 18. Блок-схема, иллюстрирующая пример последовательности операций, поясняющих работу устройств, имеющих в своем составе датчик тока потребления драйверов ШД.FIG. 18. A flowchart illustrating an example of a sequence of operations explaining the operation of devices incorporating a current sensor for consumption of SD drivers.

Фиг. 19. Электрическая принципиальная схема датчика тока.FIG. 19. Electrical schematic diagram of the current sensor.

Фиг. 20. Пример электрической принципиальной схемы микроконтроллера с приемопередатчиком RS-485 для управления шестнадцатью ШД.FIG. 20. An example of an electrical circuit diagram of a microcontroller with an RS-485 transceiver to control sixteen motor drives.

Фиг. 21. Пример электрической принципиальной схемы соединений драйверов с шестнадцатью ШД и модулем микроконтроллера.FIG. 21. An example of an electrical schematic diagram of driver connections with sixteen SDs and a microcontroller module.

На фиг. 1 приведен пример участка экспериментально полученного графика изменения тока потребления Ip драйвера ШД для иллюстрации технического эффекта, получаемого при решении задачи по снижению требований к мгновенной мощности источника питания и уменьшению помех, создаваемых при переключении обмоток ШД, а также демпфировании возникающего при этом напряжения самоиндукции. Из графика видно, что (при выполнении шага двигателем) сначала происходит снижение тока потребления драйвером вплоть до изменения его направления из-за возникающей ЭДС самоиндукции в обмотке ШД, а затем возрастание и плавное снижение тока потребления до его квазистационарного значения, имеющего место в режиме, когда двигатель не совершает шагов достаточно продолжительное время. На графике отмечен промежуток времени Atp и показаны пиковые и квазистационарные значения тока потребления.In FIG. Figure 1 shows an example of a plot of the experimentally obtained graph of the change in the current consumption I p of the SD driver to illustrate the technical effect obtained when solving the problem of reducing the requirements for the instantaneous power of the power source and reducing the noise created when switching the SD windings, as well as damping the self-induction voltage resulting from this. It can be seen from the graph that (when the motor performs the step), the driver first reduces the current consumption up to its direction change due to the emerging EMF of self-induction in the motor winding, and then the consumption current increases and gradually decreases to its quasi-stationary value, which takes place in the mode when the engine does not take steps for a sufficiently long time. The graph shows the time interval At p and shows the peak and quasi-stationary values of the current consumption.

В рассмотренном примере Tstep=2.048 мс, Δtp=0.518 мс. Если квазиодновременное управление производится четырьмя ШД, то nd=4, a Δtn=0.512 мс. На фиг. 2 показан участок экспериментально полученных графиков процессов изменения суммарного тока потребления четырех драйверов ШД для случая использования предлагаемого технического решения (сплошная линия) и для случая одновременного выполнения шагов всеми четырьмя ШД (штриховая линия). Здесь всеми ШД выполнялось несколько шагов при подаче на каждый из них управляющих импульсов с периодом Tstep=2.048 мс. На графике показаны числовые пиковые и квазистационарное значения суммарного тока потребления для обоих случаев. Сравнение полученных результатов показывает, что отклонение пиковых значений суммарного тока потребления драйверов от его квазистационарного значения при использовании предлагаемого технического решения снижается в 2,5-3 раза, что подтверждает реальный технический эффект от использования предполагаемого изобретения.In the considered example, T step = 2.048 ms, Δt p = 0.518 ms. If quasi-simultaneous control is performed by four stepper motors, then n d = 4, and Δt n = 0.512 ms. In FIG. Figure 2 shows a plot of experimentally obtained graphs of the processes of changing the total current consumption of four SD drivers for the case of using the proposed technical solution (solid line) and for the case of simultaneous execution of steps by all four SD (dashed line). Here, all the motor steps performed several steps when applying to each of them control pulses with a period T step = 2.048 ms. The graph shows the numerical peak and quasi-stationary values of the total current consumption for both cases. A comparison of the results shows that the deviation of the peak values of the total current consumption of drivers from its quasi-stationary value when using the proposed technical solution is reduced by 2.5-3 times, which confirms the real technical effect of using the proposed invention.

Аппаратная реализация способов управления с помощью ПК несколькими ШД, описанных в [1-4], предполагает применение устройств, обычно имеющих в своем составе один или несколько связанных с ПК микроконтроллеров, внешние кварцевые резонаторы, и драйверы двигателей. Недостатки этих устройств, как правило, обусловлены реализуемыми ими способами управления. Наиболее близким к заявляемому является схемное решение устройства, предложенное в качестве примера в описании патента [4]. Оно содержит микроконтроллер, внешний кварцевый резонатор, выводы которого соединены с соответствующими входами микроконтроллера, драйверы, соответствующие типу и количеству используемых шаговых двигателей, причем выводы драйверов соединены с соответствующими выводами шаговых двигателей.The hardware implementation of PC control methods for several BHs described in [1-4] involves the use of devices that usually include one or more microcontrollers connected to a PC, external quartz resonators, and motor drivers. The disadvantages of these devices are, as a rule, due to the control methods they implement. Closest to the claimed is a circuit design of the device, proposed as an example in the description of the patent [4]. It contains a microcontroller, an external quartz resonator, the terminals of which are connected to the corresponding inputs of the microcontroller, drivers corresponding to the type and number of stepper motors used, and the driver terminals are connected to the corresponding terminals of the stepper motors.

Для решения поставленной задачи в устройство дополнительно введены буферная емкость, вторичный источник питания (ВИП), а также связанный стандартным USB-кабелем с персональным компьютером конвертер интерфейса USB - RS-485 и приемопередатчик RS-485, соединенные между собой линией связи типа витая пара в экране с волновым сопротивлением 120 Ом. Приемопередатчик RS-485 связан с модулем универсального асинхронного приемопередатчика UART (Universal Asynchronous Receiver Transmitter) микроконтроллера. Питающие выводы драйверов и вход вторичного источника питания соединены через буферную емкость с выводом внешнего источника питания требуемого напряжения. Выход вторичного источника питания соединен с питающим входом микроконтроллера, а соответствующие дискретные выходы микропроцессора соединены с входами STEP, DIR и EN драйверов соответствующих шаговых двигателей.To solve this problem, a buffer capacity, a secondary power supply (VIP), as well as a USB-RS-485 interface converter and RS-485 transceiver connected to each other by a twisted pair type communication cable are added to the device; screen with a wave impedance of 120 ohms. The RS-485 transceiver is connected to the universal Asynchronous Receiver Transmitter (UART) module of the microcontroller. The driver supply terminals and the secondary power supply input are connected through a buffer capacitance to the output of the external voltage source of the required voltage. The output of the secondary power source is connected to the power input of the microcontroller, and the corresponding discrete outputs of the microprocessor are connected to the inputs of the STEP, DIR and EN drivers of the respective stepper motors.

Пример блок-схемы устройства, реализующего управление шестнадцатью ШД, показан на фиг. 3. На фиг. 4. приведен пример электрической принципиальной схемы соединения приемопередатчика RS-485 с модулем универсального асинхронного приемопередатчика UART микроконтроллера. Пример схемы силового питания через буферную емкость представлен на фиг. 5.An example of a block diagram of a device implementing control of sixteen SDs is shown in FIG. 3. In FIG. 4. An example of an electrical circuit diagram for connecting an RS-485 transceiver to a universal asynchronous UART transceiver module of a microcontroller is given. An example of a power supply circuit through a buffer tank is shown in FIG. 5.

Работу устройства иллюстрирует последовательность операций, приведенная на фиг. 6. В соответствии с этой схемой работа устройства осуществляется следующим образом. В начале работы после включения питания МК подает высокий потенциал на входы EN драйверов всех ШД. После этого на ПК начинается выполнение цикла, который определяется условием, известно ли на текущий момент времени задание на выполнение одного или нескольких тактов шаговыми двигателями. Если известно задание только на один такт управления, ПК формирует пакет данных о направлении поворота и количестве шагов каждого ШД для текущего такта управления и затем передает его в МК. МК, прочитав пакет данных, определяет, что известно задание только на один такт управления, и готовит цикл по числу шагов на одном такте управления. Поскольку изменения направления вращения внутри такта не происходит, то перед его началом МК подает низкий потенциал на входы DIR тех драйверов, ШД которых должны вращаться влево, и - высокий потенциал на входы DIR тех драйверов, ШД которых должны вращаться вправо. Далее на МК запускается цикл с числом повторений, равным максимально возможному на одном такте управления количеству шагов. В этом цикле отрабатывается следующая последовательность операций. МК определяет порядковые номера ШД, которые еще не выполнили все требуемое для них в текущем такте управления количество шагов. Затем МК подает низкий потенциал на входы STEP всех драйверов и формирует импульс положительной полярности, поступающий на входы STEP тех драйверов, ШД которых должны вращаться. Длительность импульса выбирается больше минимально необходимой для нормальной работы драйвера ШД, поскольку команда управления по входу «STEP» воспринимается драйвером по переднему фронту управляющего импульса. Так происходит с частотой выполнения шагов до тех пор, пока не будет исчерпано время на выполнение максимально возможного на одном такте управления количества шагов, т.е. не будет закончен текущий такт управления.The operation of the device is illustrated by the sequence of operations shown in FIG. 6. In accordance with this scheme, the operation of the device is as follows. At the beginning of work, after turning on the power, the MK supplies high potential to the EN inputs of the drivers of all motor drives. After that, the execution of the cycle begins on the PC, which is determined by the condition whether the task for the execution of one or several measures by step motors is currently known. If the task for only one clock cycle is known, the PC generates a packet of data on the direction of rotation and the number of steps of each motor drive for the current clock cycle and then transfers it to the MC. MK, after reading the data packet, determines that the task is known for only one control cycle, and prepares a cycle according to the number of steps on one control cycle. Since there is no change in the direction of rotation inside the clock, before it starts, the MC supplies a low potential to the DIR inputs of the drivers whose SD should rotate to the left, and a high potential to the DIR inputs of those drivers whose BD should rotate to the right. Then, on the MK, a cycle starts with the number of repetitions equal to the maximum number of steps possible on one control step. In this cycle, the following sequence of operations is worked out. MK determines the serial numbers of the SD that have not yet completed all the number of steps required for them in the current control cycle. Then the MC supplies a low potential to the STEP inputs of all the drivers and generates a pulse of positive polarity arriving at the STEP inputs of those drivers whose SD should rotate. The pulse duration is selected more than the minimum necessary for the normal operation of the stepper motor driver, since the control command at the STEP input is perceived by the driver along the leading edge of the control pulse. This happens with the frequency of the steps until the time has been exhausted to complete the maximum number of steps possible on one clock cycle, i.e. The current control cycle will not be completed.

Если же персональным компьютером был сформирован массив пакетов данных на выполнение нескольких тактов управления, то МК определяет количество тактов, для которых получено задание. Тогда МК формирует внешний цикл по количеству заданных тактов управления, внутри которого каждый раз по окончании отработки одного такта управления запускается цикл отработки задания на следующий известный такт управления. Когда будет выполнено заданное массивом требуемое количество тактов управления, МК передает управление на ПК и ожидает приема нового задания. После чего ПК передает в МК новый массив пакетов данных для нескольких тактов управления (или одного) и выполнение задания повторяется. Если задания исчерпаны, ПК передает в МК команду на отключение питания всех ШД. Тогда МК подает низкий потенциал на входы EN драйверов всех ШД. На этом работа устройства заканчивается.If, using a personal computer, an array of data packets was generated for performing several control clock cycles, the MC determines the number of clock cycles for which the task was received. Then the MC forms an external cycle according to the number of specified control cycles, inside of which each time after completion of one control cycle, a task cycle for the next known control cycle is launched. When the required number of control clocks is specified by the array, the MK transfers control to the PC and waits for a new job to be received. After that, the PC transmits to the MK a new array of data packets for several control cycles (or one) and the task is repeated. If the tasks are exhausted, the PC sends a command to the MC to turn off the power to all the motor drives. Then the MK supplies low potential to the EN inputs of the drivers of all the SDs. This completes the operation of the device.

Применяемый формат данных, включающий унифицированный набор сигналов: «включить питание обмоток» (EN), «выбрать направление вращения» (DIR) и «выполнить шаг» (STEP), позволяет управлять различными типами ШД, используя различные драйверы (например, А4979 для биполярного ШД [5]) без изменения управляющей программы.The applied data format, which includes a unified set of signals: “turn on the power of the windings” (EN), “select the direction of rotation” (DIR) and “execute the step” (STEP), allows you to control various types of motor drives using various drivers (for example, A4979 for bipolar SD [5]) without changing the control program.

Кроме того, использование унифицированного набора сигналов позволяет сократить количество управляющих сигналов (и, соответственно, выводов микроконтроллера) для одного ШД до двух (DIR и STEP) против четырех, используемых в [4]. Сигнал «включение питания обмоток» используется общий для драйверов всех ШД, подключенных к данному микропроцессору. Таким образом, управляющие импульсы подаются синхронно и одновременно на драйверы всех ШД, подключенных к одному порту микропроцессора, обеспечивая одновременное (а не квазиодновременное, как в [4]) управление этими ШД.In addition, the use of a unified set of signals makes it possible to reduce the number of control signals (and, accordingly, the outputs of the microcontroller) for one SD to two (DIR and STEP) versus four used in [4]. The signal “turning on the power of the windings” is used common for the drivers of all motor drives connected to this microprocessor. Thus, control pulses are supplied synchronously and simultaneously to the drivers of all the motor drives connected to one port of the microprocessor, providing simultaneous (and not quasi-simultaneous, as in [4]) control of these motor drives.

Предложенное техническое решение (см. блок-схему на фиг. 3) позволяет синхронно управлять шестнадцатью ШД. Для передачи команд от ПК и приема ответов от устройства управления (УУ) используют последовательный канал USB. Для расширения функциональных возможностей канала связи ПК - УУ предложено преобразовать его в интерфейс RS-485. При использовании микроконтроллера с 16-разрядными портами вывода, например 1986 ВЕ92У [6], формирование сигналов Step1-Step16 одним портом микроконтроллера и, соответственно, выполнение шага всеми 16 двигателями, подключенными к данному порту, будет произведено одновременно. Использование одного общего сигнала EN обеспечивает максимально быстрое отключение всех 16 ШД при возникновении аварийной ситуации. В качестве конвертера интерфейса USB - RS-485 может быть использован конвертер интерфейса МОХА UPort 11501 [7], а в качестве приемопередатчика RS-485 - приемопередатчик интерфейса RS-485/422 SN65HVD1785[8] или 5559ИН10А АЕЯР.431230.645ТУ [9]. Входной импеданс приемника соответствует 1/8 единицы нагрузки (1/8 U.L.), что допускает параллельное включение до 256 эквивалентных приемопередатчиков на шине. Эти микросхемы предназначены для использования в качестве приемопередатчика по стандарту RS-485/422 для организации полудуплексного канала связи по соответствующим стандартам. Максимальная длина линии связи для микросхем типа SN65HVD1785 1,5 км и 1,2 км для 5559ИН10А. в качестве линии связи используется витая пара в экране с волновым сопротивлением 120 Ом. Для устойчивой работы канала RS-485 с обоих концов линии установлены согласующие резисторы с номиналом 120 Ом, как показано на рис. 2 в [7].The proposed technical solution (see the block diagram in Fig. 3) allows you to synchronously control sixteen motor drives. To send commands from the PC and receive responses from the control device (UU) use a serial USB channel. To expand the functionality of the PC-UU communication channel, it was proposed to convert it into an RS-485 interface. When using a microcontroller with 16-bit output ports, for example, 1986 BE92U [6], the generation of Step1-Step16 signals by one port of the microcontroller and, accordingly, the execution of a step by all 16 motors connected to this port will be performed simultaneously. The use of one common EN signal ensures the fastest shutdown of all 16 motor drives in the event of an emergency. The MOXA UPort 11501 interface converter [7] can be used as a USB-RS-485 interface converter, and the RS-485/422 SN65HVD1785 [8] or 5559IN10A AEYAR.431230.645TU interface transceiver [9] can be used as an RS-485 transceiver. The receiver input impedance corresponds to 1/8 load unit (1/8 U.L.), which allows parallel connection of up to 256 equivalent transceivers on the bus. These microcircuits are intended for use as a transceiver according to the RS-485/422 standard for organizing a half-duplex communication channel according to relevant standards. The maximum communication line length for SN65HVD1785 chips is 1.5 km and 1.2 km for 5559IN10A. as a communication line, twisted pair in a screen with a wave impedance of 120 Ohms is used. For stable operation of the RS-485 channel, terminating resistors with a nominal value of 120 Ohms are installed at both ends of the line, as shown in Fig. 2 in [7].

Приемопередатчик RS-485 соединен с модулем универсального асинхронного приемопередатчика (UART - Universal Asynchronous Receiver Transmitter), представляющего собой периферийное устройство микроконтроллера. Возможная схема соединения приведена на фиг. 4. Резистор R12 обеспечивает согласование волнового сопротивления на конце линии. Резистор R15 необходим для отключения передатчика на время начальной установки микроконтроллера после включения питания. Сигналы RX1 и ТХ1 представляют собой выход приемника и вход передатчика соответственно, a R/T1 управляет направлением передачи. Если значение сигнала R/T1 соответствует «1», то микроконтроллер передает данные, а если соответствует «0», то микроконтроллер принимает данные.The RS-485 transceiver is connected to the Universal Asynchronous Receiver Transmitter (UART) module, which is a microcontroller peripheral device. A possible connection diagram is shown in FIG. 4. Resistor R12 provides matching impedance at the end of the line. Resistor R15 is required to turn off the transmitter during the initial installation of the microcontroller after turning on the power. The signals RX1 and TX1 represent the output of the receiver and the input of the transmitter, respectively, while R / T1 controls the direction of transmission. If the value of the signal R / T1 corresponds to "1", then the microcontroller transmits data, and if it corresponds to "0", then the microcontroller receives data.

В качестве микроконтроллера может быть применен микропроцессор PIC18F67K22[10], обеспечивающий выполнение следующих операций:As a microcontroller, the microprocessor PIC18F67K22 [10] can be used, providing the following operations:

- формирование управляющих сигналов на драйверы ШД в соответствии с командами, полученными от ПК;- the formation of control signals to the drivers SH in accordance with the commands received from the PC;

- управление приемопередатчиком RS-485 и поддержка протокола обмена с ПК;- control of the RS-485 transceiver and support of the protocol of exchange with a PC;

- синхронизация и обеспечение точных временных интервалов от собственного генератора с внешним кварцевым резонатором BQ1;- synchronization and providing accurate time intervals from the own generator with an external crystal resonator BQ1;

- формирование дискретных выходных сигналов STEP, DIR и EN. Количество подключаемых ШД может быть увеличено добавлением в пакет данных адреса микроконтроллера. При реализации такого технического решения на плате микроконтроллеров должно быть увеличено количество микропроцессоров. Работа устройства в этом случае поясняется блок-схемой, приведенной на фиг.7.- formation of discrete output signals STEP, DIR and EN. The number of connected SDs can be increased by adding the address of the microcontroller to the data packet. When implementing such a technical solution, the number of microprocessors should be increased on the microcontroller board. The operation of the device in this case is illustrated by the flowchart shown in Fig.7.

С целью повышения помехозащищенности управляющие сигналы от микроконтроллера поступают на драйверы ШД через схему гальванической развязки, разделяющую сигнальную и силовую части. Некоторые драйверы ШД уже имеют в своем составе гальваническую развязку, например драйверы серии OSM [11]. При использовании для управления ШД драйверов, не имеющих гальванической развязки по входам STEP, DIR и EN, в устройство (см. блок-схему устройства на фиг. 8) между соответствующими дискретными выходами микропроцессора и входами STEP, DIR и EN драйверов соответствующих ШД введен элемент гальванической развязки (ЭГР), а также дополнительный ВИП, вход которого соединен через буферную емкость с выводом внешнего ИП, а выход - со вторым питающим входом ЭГР, первый питающий вход которого соединен с выходом ВИП.In order to increase the noise immunity, the control signals from the microcontroller are fed to the stepper motor drivers through a galvanic isolation circuit separating the signal and power parts. Some BD drivers already include galvanic isolation, for example, OSM series drivers [11]. When using drivers that do not have galvanic isolation at the inputs of STEP, DIR and EN, to control the motor drives, an element is inserted between the corresponding discrete outputs of the microprocessor and the STEP, DIR, and EN inputs of the drivers of the corresponding motor drives. galvanic isolation (EGR), as well as an additional VIP, the input of which is connected through the buffer capacitance to the output of the external IP, and the output is connected to the second power input of the EGR, the first power input of which is connected to the output of the VIP.

Для реализации ЭГР можно, например, использовать схему, приведенную на фиг. 9. На этой схеме DD4 - ADuM6400CRWZ [12] четырехканальный изолятор, с встроенным вторичным источником питания. Сигналы STEP1+STEP4 поступают напрямую с выводов микроконтроллера, a STEP(1_I÷4_I) поступают на соответствующие входы драйверов ШД. индексы 1-5-4 указывают номер драйвера. При управлении большим количеством ШД используется необходимое количество схем ADuM6400CRWZ. Соответственно соединяются остальные сигналы STEP и сигналы DIR, начиная с 5-го. Сигнал EN поступает одновременно на соответствующие входы драйверов. Такое решение позволяет обеспечить одновременное управление ШД разных типов, изменяя только драйвер ШД, с сохранением программных и аппаратных решений, предложенных выше.To implement EGR, for example, one can use the circuit shown in FIG. 9. In this diagram, DD4 - ADuM6400CRWZ [12] is a four-channel isolator with an integrated secondary power source. The signals STEP1 + STEP4 come directly from the terminals of the microcontroller, and STEP (1_I ÷ 4_I) go to the corresponding inputs of the stepper motor drivers. indices 1-5-4 indicate the driver number. When managing a large number of motor drives, the required number of ADuM6400CRWZ circuits is used. Accordingly, the remaining STEP signals and DIR signals are connected, starting from the 5th. The EN signal is sent simultaneously to the corresponding driver inputs. Such a solution allows providing simultaneous control of different types of motor drives, changing only the motor driver, while preserving the software and hardware solutions proposed above.

В качестве драйвера ШД могут быть использованы как различные микросхемы, например А4979 Allegro MicroSystems с соответствующей обвязкой для управления биполярным шаговым двигателем, как показано на рис. Typical Applications для Parallel Control [13], или ТМС262 [14], так и готовые драйверы - контроллеры, например IDX 7505 [15] или OCM-42RA [11]. Работу с трехфазным ШД можно обеспечить, используя в качестве драйвера ШД микросхему ТМС389 TPJNAMIC Motion Control GmbH & Co. KG, как показано на figure 1: Basic application block diagram в [16].As a motor driver, various microchips can be used, for example, A4979 Allegro MicroSystems with the appropriate harness for controlling a bipolar stepper motor, as shown in Fig. Typical Applications for Parallel Control [13], or ТМС262 [14], as well as ready-made drivers are controllers, for example IDX 7505 [15] or OCM-42RA [11]. Operation with a three-phase SD can be achieved using the TMC389 TPJNAMIC Motion Control GmbH & Co. chip as the SD driver. KG, as shown in figure 1: Basic application block diagram in [16].

Силовое питание устройства обеспечивается через буферную емкость, например, как показано на фиг.5. Питание низковольтной части устройства обеспечивается двумя вторичными источниками питания (ВИП и дополнительный ВИП), построенными по схеме, приведенной на фиг. 10. В данной схеме конденсаторы С5, С6 образуют входной фильтр, а С9, С10, С12, С13 - выходной. В качестве преобразователя напряжения применен одноканальный модуль МПВ3А [17], обеспечивающий выходное напряжение 5 В ±1%, в диапазоне питающих напряжений 18÷36 В. Напряжение 5 В, формируемое ВИП, используется для питания цифровой части устройства, а выходное напряжение 5 В дополнительного ВИП поступает на низковольтную часть драйверов.Power supply to the device is provided through a buffer tank, for example, as shown in Fig.5. The low-voltage part of the device is powered by two secondary power sources (VIP and additional VIP), constructed according to the circuit shown in FIG. 10. In this circuit, capacitors C5, C6 form an input filter, and C9, C10, C12, C13 form an output filter. A single-channel MPV3A module [17] was used as a voltage converter, providing an output voltage of 5 V ± 1%, in the range of supply voltages 18 ÷ 36 V. The 5 V voltage generated by the VIP is used to power the digital part of the device, and the output voltage is 5 V additional VIP arrives at the low-voltage part of the drivers.

При необходимости уменьшить количество выводов микропроцессора, используемых для решения задачи управления, может быть использовано устройство, блок-схема которого показана на фиг. 11 или на фиг. 12 (при необходимости использовать ЭГР). В этих примерах реализуется управление шестнадцатью ШД. Работа этих устройств осуществляется аналогично описанному выше циклу с той лишь разницей, что добавляются последовательные операции, вызванные использованием общего выхода DIR всех драйверов. Эти отличия отражены на представленной на фиг. 13 блок-схеме, иллюстрирующей работу этих устройств.If necessary, reduce the number of microprocessor outputs used to solve the control problem, a device can be used, a block diagram of which is shown in FIG. 11 or in FIG. 12 (if necessary, use EGR). In these examples, the management of sixteen SDs is implemented. The operation of these devices is carried out similarly to the cycle described above, with the only difference being that sequential operations are added, caused by the use of the common DIR output of all drivers. These differences are reflected in FIG. 13 is a flowchart illustrating the operation of these devices.

Для решения задачи по снижению требований к мгновенной мощности источника питания и уменьшению помех, создаваемых при переключении обмоток ШД, а также демпфированию возникающего при этом напряжения самоиндукции в устройство дополнительно между буферной емкостью и драйверами введен датчик тока, второй вход которого соединен с выходом ВИП, а второй выход соединен с входом аналогово-цифрового преобразователя микропроцессора. При этом операция непрерывного формирования значения тока потребления драйверов ШД на заданном временном интервале для измерения промежутка времени Δtp и определения временной задержки выполнения шага каждым следующим по порядку ШД выполняется микроконтроллером.To solve the problem of reducing the requirements for the instantaneous power of the power source and reducing the noise created when switching the windings of the motor stepping motor, as well as damping the self-induction voltage resulting from this, an additional current sensor is introduced between the buffer capacity and the drivers, the second input of which is connected to the output of the VIP, and the second output is connected to the input of the analog-to-digital converter of the microprocessor. In this case, the operation of continuously generating the value of the current consumption of the BD drivers at a predetermined time interval for measuring the time interval Δt p and determining the time delay of the step execution by each subsequent BD in order is performed by the microcontroller.

Примеры блок-схем устройства без ЭГР и устройства с ЭГР для этого случая приведены соответственно на фиг. 14 и фиг. 15. Примеры блок-схем такого устройства в случае использования общего выхода DIR микроконтроллера для управления всеми драйверами для вариантов без ЭГР и с ЭГР приведены соответственно на фиг. 16 и фиг. 17. В этих примерах также реализуется управление шестнадцатью ШД.Examples of block diagrams of a device without EGR and a device with EGR for this case are shown in FIG. 14 and FIG. 15. Examples of block diagrams of such a device in the case of using the common DIR output of the microcontroller to control all drivers for versions without EGR and with EGR are shown in FIG. 16 and FIG. 17. These examples also implement management of sixteen SDs.

Для любого варианта устройства, использующего при формировании команд управления сигнал с датчика тока потребления драйверов, в рабочий цикл добавляются соответствующие операции, что отражено на иллюстрирующей работу этих устройств блок-схеме, представленной на фиг. 18.For any variant of the device that uses the signal from the driver consumption current sensor when generating control commands, the corresponding operations are added to the duty cycle, which is reflected in the flowchart illustrating the operation of these devices, shown in FIG. eighteen.

Для решения поставленной задачи устройствами, имеющими в своем составе датчик тока потребления, предлагается его конкретное исполнение. Датчик тока содержит два изолированных линейных датчика Холла, выполненных на микросхемах ACS758LCB-050B-PFF со встроенным усилителем, инструментальный операционный усилитель MCP6V02, шесть конденсаторов и восемь резисторов. Причем первый вход датчика тока соединен с пятыми выводами датчиков Холла, четвертые выводы которых соединены с первым выходом датчика тока. Первые выводы датчиков Холла и второй вывод седьмого резистора соединены со вторым входом датчика тока. Первый и второй выводы первого датчика Холла соединены между собой через первый конденсатор, а третий и второй выводы первого датчика Холла соединены между собой через последовательно соединенные первый резистор и третий конденсатор. Второй вывод первого резистора соединен с первым выводом третьего резистора, а первый и второй выводы второго датчика Холла соединены между собой через второй конденсатор. Третий и второй выводы второго датчика Холла соединены между собой через последовательно соединенные второй резистор и четвертый конденсатор, а второй вывод второго резистора соединен с первым выводом четвертого резистора. Вторые выводы третьего и четвертого резисторов соединены со вторым выводом инструментального операционного усилителя, а первый и второй выводы инструментального операционного усилителя соединены между собой через параллельно соединенные пятый конденсатор и шестой резистор. Первые выводы пятого и седьмого резисторов соединены с третьим выводом инструментального операционного усилителя, первый вывод которого через восьмой резистор соединен со вторым выходом датчика тока, а второй вывод восьмого резистора через шестой конденсатор и второй вывод пятого резистора соединены со вторым выводом второго датчика Холла.To solve this problem, devices incorporating a consumption current sensor, its specific design is proposed. The current sensor contains two isolated linear Hall sensors made on the ACS758LCB-050B-PFF microcircuit with a built-in amplifier, an MCP6V02 instrument operational amplifier, six capacitors and eight resistors. Moreover, the first input of the current sensor is connected to the fifth conclusions of the Hall sensors, the fourth conclusions of which are connected to the first output of the current sensor. The first conclusions of the Hall sensors and the second terminal of the seventh resistor are connected to the second input of the current sensor. The first and second terminals of the first Hall sensor are connected to each other through the first capacitor, and the third and second conclusions of the first Hall sensor are connected to each other through series-connected first resistor and third capacitor. The second terminal of the first resistor is connected to the first terminal of the third resistor, and the first and second terminals of the second Hall sensor are interconnected via a second capacitor. The third and second terminals of the second Hall sensor are interconnected via a second resistor and a fourth capacitor connected in series, and the second terminal of the second resistor is connected to the first terminal of the fourth resistor. The second terminals of the third and fourth resistors are connected to the second terminal of the instrumental operational amplifier, and the first and second terminals of the instrumental operational amplifier are interconnected via a fifth capacitor and a sixth resistor connected in parallel. The first terminals of the fifth and seventh resistors are connected to the third terminal of the instrumental operational amplifier, the first terminal of which through the eighth resistor is connected to the second output of the current sensor, and the second terminal of the eighth resistor through the sixth capacitor and the second terminal of the fifth resistor are connected to the second terminal of the second Hall sensor.

Электрическая принципиальная схема предлагаемой реализации датчика тока приведена на фиг. 19. Датчик тока выполнен на двух микросхемах DA1, DA2 ACS758LCB-050B-PFF [08], представляющих собой изолированные линейные датчики Холла с встроенным усилителем. Использование двух параллельно включенных датчиков тока позволяет повысить надежность работы устройства, а также снизить плотность тока в зоне входных контактов. Такое решение позволяет устанавливать датчики тока вместе с остальными элементами схемы на печатную плату, имеющую толщину дорожки 35 мкм. Кроме того, учитывая последующее инвертирование сигнала в сумматоре, направление тока через измерительные контакты датчика выбрано противоположным принятому - от +IP к -IP.An electrical circuit diagram of a proposed implementation of a current sensor is shown in FIG. 19. The current sensor is made on two DA1, DA2 ACS758LCB-050B-PFF microcircuits [08], which are isolated linear Hall sensors with a built-in amplifier. The use of two parallel-connected current sensors can improve the reliability of the device, as well as reduce the current density in the area of the input contacts. This solution allows you to install current sensors along with the rest of the circuit elements on a printed circuit board having a track thickness of 35 μm. In addition, given the subsequent inversion of the signal in the adder, the direction of the current through the measuring contacts of the sensor is chosen opposite to the accepted one - from + IP to -IP.

Суммирование выходных сигналов датчиков тока выполняется инструментальным операционным усилителем DA3:1 MCP6V02 [19] по схеме, приведенной на рис. 3.1 в книге [20]. Для подавления помех на частотах работы регуляторов тока в обмотках ШД в схему введены три звена ФНЧ, образованные Rl, С3 (R4, С4), R6, С5, R8, С6. Их частота среза F выбирается из условия 4fStep<F<0.l/rmjn, где:The summation of the output signals of the current sensors is performed by the instrumental operational amplifier DA3: 1 MCP6V02 [19] according to the circuit shown in Fig. 3.1 in the book [20]. To suppress interference at the frequencies of the current regulators in the motor windings, three low-pass filter links are introduced into the circuit, formed by Rl, C3 (R4, C4), R6, C5, R8, C6. Their cutoff frequency F is selected from the condition 4f Step <F <0.l / r mjn , where:

fstep - частота шагов;f step - frequency of steps;

7rmin - минимальная частота переключения регулятора тока в обмотке ШД.7r min - the minimum switching frequency of the current regulator in the motor winding.

Программное управление работой устройства во всех его предложенных вариантах обеспечивает микроконтроллерный модуль (микроконтроллер), электрическая принципиальная схема возможного исполнения которого для случая управления шестнадцатью ШД приведена на фиг. 20. Ядро выполнено на восьмиразрядном контроллере PIC18F67K22 (DD2). Команды управления от ПК поступают на приемопередатчик интерфейса RS-485 SN65HVD1785 (DD1), обеспечивающий преобразование дифференциального сигнала указанного интерфейса в 5-ти вольтовые логические уровни и обратно. Резистор R1 обеспечивает согласование линии, а резистор R2 необходим для перевода приемопередатчика DD1 в режим приема на время инициализации микроконтроллера. Тактирование микроконтроллера обеспечивает внутренний генератор, частоту которого определяет кварцевый резонатор BQ1 с конденсаторами обвязки С3 и С6. Первичное программирование микроконтроллера осуществляется в режиме внутрисхемного программирования (In-Circuit Serial Programming) через технологический соединитель ХТ3 при замкнутых джамперах ХТ1, ХТ2. Для программирования используется программатор ICD3 Microchip Technology Inc. Через соединитель ХР1 на вход АЦП RF3 поступает сигнал с выхода датчика тока. Резисторы R5+R22 обеспечивают защиту портов микроконтроллера от замыкания.Software control of the operation of the device in all its proposed variants is provided by a microcontroller module (microcontroller), an electrical circuit diagram of a possible implementation of which for the case of controlling sixteen motor drives is shown in FIG. 20. The core is made on an eight-bit controller PIC18F67K22 (DD2). Control commands from the PC are sent to the RS-485 SN65HVD1785 (DD1) interface transceiver, which converts the differential signal of the specified interface into 5-volt logic levels and vice versa. Resistor R1 provides line matching, and resistor R2 is needed to put the transceiver DD1 into receive mode for the duration of the initialization of the microcontroller. The microcontroller is clocked by an internal oscillator, the frequency of which is determined by the BQ1 quartz resonator with strapping capacitors C3 and C6. The primary programming of the microcontroller is carried out in the mode of in-circuit programming (In-Circuit Serial Programming) through the technological connector ХТ3 with closed jumpers ХТ1, ХТ2. For programming, the programmer ICD3 Microchip Technology Inc. is used. Through the connector XP1, the signal from the output of the current sensor is input to the input of the ADC RF3. Resistors R5 + R22 protect the microcontroller ports from short circuits.

Через соединитель Х3 осуществляется связь с драйверами ШД. Возможная электрическая принципиальная схема соединений драйверов с ШД и модулем микроконтроллера для случая управления шестнадцатью ШД приведена на фиг. 21. В качестве драйверов ШД АКА16 используются устройства OSM-42RA [И]. В качестве ШД в этой схеме могут быть использованы любые биполярные шаговые двигатели с номинальным током обмоток 1-4 А.Through connector X3, communication with the drivers is performed. A possible electrical schematic diagram of the connections between the drivers and the motor drive and the microcontroller module for the case of controlling sixteen motor drives is shown in FIG. 21. The OSM-42RA [I] devices are used as AK16 drivers. Any bipolar stepper motors with a rated winding current of 1-4 A can be used as a stepper motor in this circuit.

Все заявляемые варианты устройства представляют собой двухуровневую систему управления, включающую ПК, в котором реализуется: подготовительная вычислительная часть задачи управления, визуализация состояния системы, интерфейс оператора и связь с нижним уровнем. Нижний уровень управления реализуется в микроконтроллере. Связь между уровнями управления организована по принципу «Master - Slave» («ведущий -ведомый»), где ПК является «Master», а МК - «Slave». Работают эти устройства следующим образом. При включении ИП микроконтроллер проводит самодиагностику, на запрос ПК о состоянии сообщает «ЗАНЯТ», выставляет на входы всех драйверов ШД дискретный сигнал "EN", проводит самодиагностику и установку ШД в начальные положения. По окончании установки всех ШД в начальные положения состояние МК изменяется на «ГОТОВ». После получения готовности от МК, ПК начинает передачу данных задания на один или несколько тактов. Данные состоят из пакета последовательно передаваемых байт информации и служебных символов, по одному байту на каждый ШД, причем номер байта в пакете соответствует номеру ШД. МК проводит преобразование полученного пакета в задание для каждого ШД на один такт управления, содержащее количество шагов и направление вращения. Тактирование всех внутренних и внешних устройств выполняется таймерами МК, работающими от внутреннего генератора, стабилизированного внешним кварцевым резонатором. При выполнении шага МК уменьшает на единицу значение числа шагов задания на текущий такт управления для выбранного ШД до достижения нулевого значения.All the claimed device variants are a two-level control system, including a PC, which implements: preparatory computing part of the control task, visualization of the system status, operator interface and communication with the lower level. The lower level of control is implemented in the microcontroller. The connection between the control levels is organized according to the principle of “Master - Slave” (“master-slave”), where the PC is “Master”, and MK is “Slave”. These devices work as follows. When the IP is turned on, the microcontroller conducts self-diagnostics, reports “BUSY” about the status of the PC, sets the discrete signal “EN” to the inputs of all the SD drivers, conducts self-diagnostics and sets the SD in the initial positions. Upon completion of the installation of all SD in the initial position, the state of the MK changes to "READY". After receiving readiness from MK, the PC starts transmitting job data for one or more clock cycles. The data consists of a packet of sequentially transmitted bytes of information and service characters, one byte for each SD, and the byte number in the packet corresponds to the SD number. MK carries out the conversion of the received package into a task for each SD on one control cycle containing the number of steps and the direction of rotation. The clocking of all internal and external devices is performed by MK timers operating from an internal generator stabilized by an external quartz resonator. When the step is performed, the MC decreases by one the value of the number of job steps per current control cycle for the selected SD until the zero value is reached.

Если применяемые драйверы ШД имеют в своем составе гальваническую развязку (варианты устройства фиг. 3, 11, 14 и 16) между управляющими сигналами и силовым питанием, то сигналы «STEP», «DIR» и «EN» с дискретных выходов МК поступают на входы соответствующих драйверов ШД напрямую. В случае ее отсутствия дополнительно устанавливаются ЭГР (варианты устройства фиг. 8, 12, 15 и 17). ЭГР должны обеспечивать необходимую скорость передачи данных и иметь уровни логических сигналов, совместимые с МК с одной стороны и с управляющими входами драйверов ШД - с другой. Питание элементов устройства за ЭГР осуществляется от дополнительного ВИП.If the used stepper motor drivers incorporate galvanic isolation (device variants of Figs. 3, 11, 14 and 16) between control signals and power supply, then the STEP, DIR and EN signals from the discrete outputs of the MC are fed to the inputs corresponding bd drivers directly. In case of its absence, EGRs are additionally installed (device variants of Figs. 8, 12, 15 and 17). EGRs should provide the necessary data transfer rate and have levels of logical signals compatible with MK on the one hand and with control inputs of SM drivers on the other. The power of the device elements beyond the EGR is carried out from an additional VIP.

Если при работе устройства используется датчик тока (варианты блок-схем, представленных на фиг. 14-17). Он обеспечивает преобразование тока в напряжение с полосой пропускания более 4/step. Кроме формирования команд управления сигнал с датчика тока позволяет реализовать функцию защиты устройства от перегрузки по току.If during operation of the device a current sensor is used (variants of the block diagrams shown in Figs. 14-17). It provides current to voltage conversion with a passband of more than 4 / s tep. In addition to generating control commands, the signal from the current sensor allows you to implement the function of protecting the device from overcurrent.

Работоспособность заявляемого технического решения подтверждена экспериментально для случая управления четырьмя ШД. Экспериментально полученные осциллограммы изменения рабочих параметров устройства при реализации заявляемого способа управления приведены на фиг. 1 и 2 для одного характерного участка работы.The performance of the proposed technical solution is confirmed experimentally for the case of control of four SD. The experimentally obtained oscillograms of changes in the operating parameters of the device when implementing the proposed control method are shown in FIG. 1 and 2 for one characteristic site of work.

ИСТОЧНИКИ ИНФОРМАЦИИINFORMATION SOURCES

1. METHOD AND APPARATUS FOR CONTROLLING A PLURALITY OF MOTORS US 2009/0189550 Al H02P 5/00.1. METHOD AND APPARATUS FOR CONTROLLING A PLURALITY OF MOTORS US 2009/0189550 Al H02P 5/00.

2. MULTIPLEXED STEPPER MOTOR CONTROL APPARATUS (United States Patent Number: 5,237,250 H02P 9/00).2. MULTIPLEXED STEPPER MOTOR CONTROL APPARATUS (United States Patent Number: 5,237,250 H02P 9/00).

3. Контроллер шагового двигателя RU 2531360 C2 H02P 8/40.3. Stepper motor controller RU 2531360 C2 H02P 8/40.

4. Способ управления шестнадцатью шаговыми двигателями по USB-каналу квазиодновременно. Патент РФ RU 2546315 C1 G05B 19/00.4. A method of controlling sixteen stepper motors via a USB channel quasi-simultaneously. RF patent RU 2546315 C1 G05B 19/00.

5. A4979-DS, Rev. 2 Allegro MicroSystems, LLC, www.allegromicro.com.5. A4979-DS, Rev. 2 Allegro MicroSystems, LLC, www.allegromicro.com.

6. МИКРОСХЕМЫ ИНТЕГРАЛЬНЫЕ 1986 ВЕ91Т, 1986 ВЕ92У, 1986 ВЕ93У, 1986 ВЕ94Т Технические условия АЕЯР.431290.711ТУ.6. Integrated microcircuits 1986 VE91T, 1986 VE92U, 1986 VE93U, 1986 VE94T Specifications AEYAR.431290.711TU.

7. UPort 1100 Series User's Manual Fifth Edition, May 2009 www.moxa.com/7. UPort 1100 Series User's Manual Fifth Edition, May 2009 www.moxa.com/

8. http://www.ti.com/lit/ds/symlink/sn65hvdl785.pdf8. http://www.ti.com/lit/ds/symlink/sn65hvdl785.pdf

9. https://ic.milandr.ru/upload/iblock/fe5/fe58f8b55949bb7d5e278ed20edd8006.pdf9. https://ic.milandr.ru/upload/iblock/fe5/fe58f8b55949bb7d5e278ed20edd8006.pdf

10. http://www.microchip.com/support DS39960D.pdf10. http://www.microchip.com/support DS39960D.pdf

11. http://onitex.ru/attachments/article/85/datasheet_OSM-17RA_OSM-42RA.pdf11.http: //onitex.ru/attachments/article/85/datasheet_OSM-17RA_OSM-42RA.pdf

12. www.analog.com ADuM6400_6401_6402_6403_6404.pdf12. www.analog.com ADuM6400_6401_6402_6403_6404.pdf

13. www.allegromicro.com A4979-Datasheet.pdf13. www.allegromicro.com A4979-Datasheet.pdf

14. www.trinamic.com TMC262 DATASHEET (V2.01 /2012-FEB-16)14. www.trinamic.com TMC262 DATASHEET (V2.01 / 2012-FEB-16)

15. www.trinamic.com IDX Manual (VI. 16 / December 3rd, 2008)15. www.trinamic.com IDX Manual (VI. 16 / December 3rd, 2008)

16. www.trinamic.com TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)16. www.trinamic.com TMC389 DATASHEET (V. 1.14 / 2013-MAR-25)

17. www.mmp-irbis.ru / ТУ 6589-004-40039437-0717. www.mmp-irbis.ru / TU 6589-004-40039437-07

18. ACS758xCB-Datasheet.pdf www.allegromicro.com18. ACS758xCB-Datasheet.pdf www.allegromicro.com

19. http://support.microchip.com DS22058C19. http://support.microchip.com DS22058C

20. Алексенко А.Г., Коломбет E.A., Стародуб Г.И. Применение прецизионных аналоговых ИС. - М. Радио и связь, 1981.20. Aleksenko A.G., Colombet E.A., Starodub G.I. The use of precision analog ICs. - M. Radio and Communications, 1981.

Claims (12)

1. Способ потактового управления несколькими шаговыми двигателями с помощью персонального компьютера по каналу USB (Universal Serial Bus - универсальная последовательная шина), реализующий режим управления с постоянной частотой и состоящий в том, что для каждого такта управления формируют пакет данных, содержащий информацию о направлении поворота и количестве шагов ротора каждого шагового двигателя, которые он должен выполнить на данном такте управления, этот пакет данных передают в виртуальный последовательный порт персонального компьютера, драйвер порта передает пакет данных по каналу USB в микроконтроллер, в котором его обрабатывают и формируют с частотой выполнения шагов дискретные команды для драйвера каждого двигателя, где они вызывают коммутацию обмоток двигателей, заставляя каждый из них выполнить на каждом такте управления заданное количество шагов в требуемом направлении, отличающийся тем, что пакет данных имеет размер n байт (по байту на каждый из n двигателей соответственно), причем первый бит каждого байта содержит информацию о направлении вращения двигателя, а следующие 7 бит содержат информацию о количестве шагов, на которые должен повернуться вал данного двигателя в текущем такте управления, пакет данных, записанный в виртуальный последовательный порт персонального компьютера и переданный по каналу USB, преобразуют в соответствии со стандартом интерфейса передачи данных по полудуплексному многоточечному последовательному каналу связи и передают в микроконтроллер, где принятый пакет данных преобразуют в три дискретных сигнала для подачи на три входа EN, DIR и STEP драйверов каждого двигателя так, что на все время работы двигателей подают высокий потенциал на входы EN драйверов всех двигателей, в течение всего текущего такта управления на вход DIR драйвера соответствующего двигателя подают низкий потенциал, если необходимо обеспечить направление вращения влево, и высокий потенциал, если необходимо обеспечить направление вращения вправо, а на входы STEP драйверов всех двигателей одновременно с частотой выполнения шагов подают управляющие импульсы высокого уровня длительностью менее периода выполнения шагов, если соответствующий двигатель должен выполнить шаг, и подают низкий потенциал на входы STEP драйверов тех двигателей, для которых все требуемые на данном такте управления шаги уже выполнены, в результате таких действий все драйверы обеспечивают необходимую коммутацию обмоток своих шаговых двигателей, вызывающую одновременный поворот их валов на соответствующее количество шагов в требуемых направлениях, причем, если заранее известно задание на отработку шагов двигателями на несколько тактов управления вперед, формируют массив пакетов данных для известного количества тактов, записывают его в виртуальный последовательный порт и передают в микроконтроллер, где этот массив последовательно отрабатывают на каждом такте управления в соответствии с описанной последовательностью операций.1. The method of step-wise control of several stepper motors using a personal computer via USB (Universal Serial Bus), which implements a control mode with a constant frequency and consisting in the fact that for each control cycle a data packet containing information about the direction of rotation is formed and the number of rotor steps of each stepper motor that it must perform on a given control cycle, this data packet is transmitted to the virtual serial port of a personal computer, etc. the port yver transmits a data packet via USB to a microcontroller, in which it processes and generates discrete commands for the driver of each motor with the frequency of the steps, where they cause switching of the motor windings, forcing each of them to perform a given number of steps in each direction characterized in that the data packet has a size of n bytes (by byte for each of n engines, respectively), and the first bit of each byte contains information about the direction of rotation of the engine, and The 7 bits contain information on the number of steps that the shaft of a given engine should rotate in the current control cycle; a data packet recorded in a virtual serial port of a personal computer and transferred via USB is converted in accordance with the standard of a data transmission interface via a half-duplex multipoint serial channel communication and transmit it to the microcontroller, where the received data packet is converted into three discrete signals for supplying the EN, DIR and STEP drivers of each engine to the three inputs so that for the entire duration of the operation of the engines, high potential is fed to the EN inputs of the drivers of all engines, throughout the current control cycle, the potential of the corresponding motor drives the low potential if it is necessary to provide the direction of rotation to the left, and the high potential if it is necessary to provide the direction of rotation to the right, and At the STEP inputs of the drivers of all engines simultaneously with the frequency of the steps, high-level control pulses with a duration shorter than the period of the steps, if the corresponding motor The user must complete the step, and apply a low potential to the STEP inputs of the drivers of those motors for which all the steps required on this control cycle have already been completed, as a result of such actions all the drivers provide the necessary switching of the windings of their stepper motors, causing their shafts to simultaneously rotate by the corresponding number steps in the required directions; moreover, if the task for working off the steps by the engines for several clock cycles of control is known in advance, an array of data packets for a known number is formed ETS cycles, it is recorded in a virtual serial port, and is transmitted to the microcontroller, wherein the array sequentially and spend at each stroke control in accordance with the described flowchart. 2. Способ потактового управления несколькими шаговыми двигателями по п. 1, отличающийся тем, что при использовании для управления шаговыми двигателями нескольких микроконтроллеров в виртуальный последовательный порт персонального компьютера передают несколько (по количеству используемых микроконтроллеров) пакетов данных, каждый из которых дополнительно содержит один байт, определяющий адрес микроконтроллера, при этом каждый пакет данных передают на каждом такте управления в микроконтроллер, имеющий соответствующий адрес.2. The method of beat-by-bit control of several stepper motors according to claim 1, characterized in that when several microcontrollers are used to control the stepper motors, several data packets (by the number of microcontrollers used) are transmitted to the virtual serial port of the personal computer, each of which additionally contains one byte, defining the address of the microcontroller, wherein each data packet is transmitted at each control clock to a microcontroller having a corresponding address. 3. Способ потактового управления несколькими шаговыми двигателями по п. 1 или 2, отличающийся тем, что сигналы DIR, поступающие от микроконтроллера на соответствующие входы всех драйверов связанных с ним двигателей, формируют на одном выходе микроконтроллера перед выполнением каждого шага двигателей, при этом сначала на входы DIR всех драйверов подают низкий потенциал, после чего подают управляющий импульс высокого уровня на входы STEP драйверов тех двигателей, которые должны повернуть на текущем шаге свой вал влево, затем на входы DIR всех драйверов подают высокий потенциал и далее подают управляющий импульс высокого уровня на входы STEP драйверов тех двигателей, которые должны повернуть на текущем шаге свой вал вправо, обеспечивая квазиодновременное управление всеми двигателями.3. The method of tick-wise control of several stepper motors according to claim 1 or 2, characterized in that the DIR signals received from the microcontroller at the corresponding inputs of all the drivers of the motors connected to it are formed at one output of the microcontroller before each step of the motors, first the DIR inputs of all drivers supply low potential, after which they send a high-level control pulse to the STEP inputs of the drivers of those engines that must turn their shaft to the left at the current step, then to the DIR inputs of all drives jers serves high potential and then fed to a control pulse high-level inputs STEP drivers of those engines that have to turn on your current step to the right shaft, providing a quasi-simultaneous control of all engines. 4. Способ потактового управления несколькими шаговыми двигателями по п. 1, отличающийся тем, что управляющие импульсы на входы STEP драйверов двигателей за отрезок времени Tstep, в течение которого двигатель должен совершить шаг, формируют с задержкой по времени, для чего предварительно до начала управления двигателями измеряют промежуток времени Δtp, за который ток потребления драйвера достигает своего квазистационарного значения (среднее значение тока потребления драйвера, измеренное при включенном драйвере и отсутствии управляющих импульсов в течение интервала времени не менее 10Tstep секунд) после его снижения при подаче управляющего импульса, а в процессе управления определяют количество двигателей nd, которые должны выполнить шаг на наступающем отрезке времени Tstep, определяют величину временного интервала Δtn=Tstep/nd, а затем поочередно с задержкой по времени Δtp, если Δtp<Δtn, и с задержкой Δtn, если Δtp≥Δtn, подают управляющие импульсы на входы STEP драйверов тех двигателей, которые должны выполнить шаг на наступающем отрезке времени Tstep.4. The step-by-step control method for several stepper motors according to claim 1, characterized in that the control pulses to the STEP inputs of the motor drivers for the time interval T step , during which the motor must take a step, are formed with a time delay, for which, prior to the start of control engines measured time interval Δt p, for which the driver the current consumption reaches a quasi-steady value (average value of the driver current consumption measured when the driver and the absence of control pulses lsov during an interval of time not less than 10T step seconds) after its reduction when the control pulse, and a control process determines the number of engines n d, which must perform a step to upcoming time interval T step, determine the time interval Δt n = T step / n d , and then alternately with a time delay Δt p if Δt p <Δt n , and with a delay Δt n if Δt p ≥Δt n , control pulses are fed to the STEP inputs of the drivers of those engines that must perform a step on the upcoming segment time T step . 5. Устройство потактового управления несколькими шаговыми двигателями с помощью персонального компьютера по каналу USB по п. 1, содержащее микроконтроллер, внешний кварцевый резонатор, выводы которого соединены с соответствующими входами микроконтроллера, драйверы, соответствующие типу и количеству используемых шаговых двигателей, причем выводы драйверов соединены с соответствующими выводами шаговых двигателей, отличающееся тем, что в него введены буферная емкость, вторичный источник питания, а также связанный стандартным USB-кабелем с персональным компьютером конвертер интерфейса USB - RS-485 и приемопередатчик RS-485, соединенные между собой линией связи типа витая пара в экране с волновым сопротивлением 120 Ом, в свою очередь, приемопередатчик RS-485 связан с модулем универсального асинхронного приемопередатчика UART (Universal Asynchronous Receiver Transmitter) микроконтроллера, причем питающие выводы драйверов и вход вторичного источника питания соединены через буферную емкость с выводом внешнего источника питания требуемого напряжения, выход вторичного источника питания соединен с питающим входом микроконтроллера, а соответствующие дискретные выходы микропроцессора соединены с входами STEP, DIR и EN драйверов соответствующих шаговых двигателей.5. The device for tick-wise control of several stepper motors using a personal computer via the USB channel according to claim 1, containing a microcontroller, an external quartz resonator, the terminals of which are connected to the corresponding inputs of the microcontroller, drivers corresponding to the type and number of stepper motors used, and the driver outputs are connected to the corresponding conclusions of the stepper motors, characterized in that a buffer capacity, a secondary power source, and also connected with a standard USB cable with USB-RS-485 interface converter and RS-485 transceiver connected by a twisted pair type communication line in the screen with a wave impedance of 120 Ohms, in turn, the RS-485 transceiver is connected to the universal Asynchronous Receiver UART (Universal Asynchronous Receiver) module Transmitter) of the microcontroller, wherein the driver supply leads and the input of the secondary power supply are connected through a buffer tank to the output of the external power supply of the required voltage, the output of the secondary power supply is connected to the supply Odom microcontroller and the corresponding binary outputs of the microprocessor are connected to the inputs of STEP, DIR and EN drivers corresponding stepper motors. 6. Устройство потактового управления несколькими шаговыми двигателями по п. 5, отличающееся тем, что в него между соответствующими дискретными выходами микропроцессора и входами STEP, DIR и EN драйверов соответствующих шаговых двигателей введен элемент гальванической развязки, а также дополнительный вторичный источник питания, вход которого соединен через буферную емкость с выводом внешнего источника питания, а выход - со вторым питающим входом элемента гальванической развязки, первый питающий вход которого соединен с выходом вторичного источника питания.6. The step-wise control device for several stepper motors according to claim 5, characterized in that a galvanic isolation element is introduced between the corresponding discrete outputs of the microprocessor and the STEP, DIR and EN inputs of the drivers of the respective stepper motors, as well as an additional secondary power source, the input of which is connected through a buffer tank with the output of an external power source, and the output with the second power input of the galvanic isolation element, the first power input of which is connected to the output of the secondary power point. 7. Устройство потактового управления несколькими шаговыми двигателями по п. 5, отличающееся тем, что со входами DIR драйверов соответствующих шаговых двигателей соединен один общий для всех дискретный выход микропроцессора.7. The step-by-step control device for several stepper motors according to claim 5, characterized in that a single discrete microprocessor output common to all is connected to the DIR inputs of the drivers of the respective stepper motors. 8. Устройство потактового управления несколькими шаговыми двигателями по п. 6, отличающееся тем, что со входами DIR драйверов соответствующих шаговых двигателей соединен один общий для всех дискретный выход микропроцессора.8. The device of tick-wise control of several stepper motors according to claim 6, characterized in that a single discrete microprocessor output common to all is connected to the DIR inputs of the drivers of the respective stepper motors. 9. Устройство потактового управления несколькими шаговыми двигателями по п. 5, отличающееся тем, что в него между буферной емкостью и драйверами введен датчик тока, второй вход которого соединен с выходом вторичного источника питания, а второй выход соединен с входом аналогово-цифрового преобразователя микропроцессора, причем датчик тока содержит два изолированных линейных датчика Холла, выполненных на микросхемах ACS758LCB-050B-PFF со встроенным усилителем, инструментальный операционный усилитель MCP6V02, шесть конденсаторов и восемь резисторов, причем первый вход датчика тока соединен с пятыми выводами датчиков Холла, четвертые выводы которых соединены с первым выходом датчика тока, первые выводы датчиков Холла и второй вывод седьмого резистора соединены со вторым входом датчика тока, первый и второй выводы первого датчика Холла соединены между собой через первый конденсатор, третий и второй выводы первого датчика Холла соединены между собой через последовательно соединенные первый резистор и третий конденсатор, второй вывод первого резистора соединен с первым выводом третьего резистора, первый и второй выводы второго датчика Холла соединены между собой через второй конденсатор, третий и второй выводы второго датчика Холла соединены между собой через последовательно соединенные второй резистор и четвертый конденсатор, второй вывод второго резистора соединен с первым выводом четвертого резистора, вторые выводы третьего и четвертого резисторов соединены со вторым выводом инструментального операционного усилителя, первый и второй выводы инструментального операционного усилителя соединены между собой через параллельно соединенные пятый конденсатор и шестой резистор, первые выводы пятого и седьмого резисторов соединены с третьим выводом инструментального операционного усилителя, первый вывод которого через восьмой резистор соединен со вторым выходом датчика тока, а второй вывод восьмого резистора через шестой конденсатор и второй вывод пятого резистора соединены со вторым выводом второго датчика Холла.9. The step-wise control device for several stepper motors according to claim 5, characterized in that a current sensor is inserted between the buffer capacity and the drivers, the second input of which is connected to the output of the secondary power source, and the second output is connected to the input of the analog-to-digital microprocessor converter, moreover, the current sensor contains two isolated linear Hall sensors made on chips ACS758LCB-050B-PFF with built-in amplifier, instrument operational amplifier MCP6V02, six capacitors and eight resistors, moreover, the first input of the current sensor is connected to the fifth conclusions of the Hall sensors, the fourth conclusions of which are connected to the first output of the current sensor, the first conclusions of the Hall sensors and the second output of the seventh resistor are connected to the second input of the current sensor, the first and second conclusions of the first Hall sensor are interconnected through the first the capacitor, the third and second terminals of the first Hall sensor are interconnected via a first resistor and a third capacitor connected in series, the second terminal of the first resistor is connected to the first terminal one of its resistor, the first and second terminals of the second Hall sensor are interconnected via a second capacitor, the third and second terminals of the second Hall sensor are interconnected via a second resistor and a fourth capacitor connected in series, the second terminal of the second resistor is connected to the first terminal of the fourth resistor, the second terminals of the third and the fourth resistors are connected to the second terminal of the instrumental operational amplifier, the first and second terminals of the instrumental operational amplifier are interconnected the fifth capacitor and the sixth resistor are connected in parallel, the first terminals of the fifth and seventh resistors are connected to the third terminal of the instrument operational amplifier, the first terminal of which is connected through the eighth resistor to the second output of the current sensor, and the second terminal of the eighth resistor is connected through the sixth capacitor and the second terminal of the fifth resistor with the second output of the second Hall sensor. 10. Устройство потактового управления несколькими шаговыми двигателями по п. 6, отличающееся тем, что в него между буферной емкостью и драйверами введен датчик тока, второй вход которого соединен с выходом вторичного источника питания, а второй выход соединен с входом аналогово-цифрового преобразователя микропроцессора.10. The step-wise control device for several stepper motors according to claim 6, characterized in that a current sensor is inserted between the buffer tank and the drivers, the second input of which is connected to the output of the secondary power source, and the second output is connected to the input of the analog-to-digital microprocessor converter. 11. Устройство потактового управления несколькими шаговыми двигателями по п. 7, отличающееся тем, что в него между буферной емкостью и драйверами введен датчик тока, второй вход которого соединен с выходом вторичного источника питания, а второй выход соединен с входом аналогово-цифрового преобразователя микропроцессора.11. The tick-wise control device for several stepper motors according to claim 7, characterized in that a current sensor is inserted between the buffer tank and the drivers, the second input of which is connected to the output of the secondary power source, and the second output is connected to the input of the analog-to-digital microprocessor converter. 12. Устройство потактового управления несколькими шаговыми двигателями по п. 8, отличающееся тем, что в него между буферной емкостью и драйверами введен датчик тока, второй вход которого соединен с выходом вторичного источника питания, а второй выход соединен с входом аналогово-цифрового преобразователя микропроцессора.12. The single-step control device for several stepper motors according to claim 8, characterized in that a current sensor is inserted between the buffer tank and the drivers, the second input of which is connected to the output of the secondary power source, and the second output is connected to the input of the analog-to-digital microprocessor converter.
RU2018146586A 2018-12-26 2018-12-26 Method of percussion control of several step motors with the help of personal computer via usb channel and device for its implementation RU2704486C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2018146586A RU2704486C1 (en) 2018-12-26 2018-12-26 Method of percussion control of several step motors with the help of personal computer via usb channel and device for its implementation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2018146586A RU2704486C1 (en) 2018-12-26 2018-12-26 Method of percussion control of several step motors with the help of personal computer via usb channel and device for its implementation

Publications (1)

Publication Number Publication Date
RU2704486C1 true RU2704486C1 (en) 2019-10-29

Family

ID=68500859

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2018146586A RU2704486C1 (en) 2018-12-26 2018-12-26 Method of percussion control of several step motors with the help of personal computer via usb channel and device for its implementation

Country Status (1)

Country Link
RU (1) RU2704486C1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU200672U1 (en) * 2020-03-12 2020-11-05 федеральное государственное бюджетное образовательное учреждение высшего образования «Томский государственный университет систем управления и радиоэлектроники» DEVICE IMPLEMENTING CONTROL OF A SATELLITE ANTENNA DRIVE VIA DIGITAL INTERFACE
RU209513U1 (en) * 2021-10-26 2022-03-16 Общество с ограниченной ответственностью "Эйдос-Робототехника" FOUR-CHANNEL STEP MOTOR CONTROL UNIT SDC4STEP

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB1400160A (en) * 1971-09-09 1975-07-16 Toyoda Machine Works Ltd Machine control apparatus in a computer controlled machine tool apparatus
DE2805363A1 (en) * 1978-02-09 1979-08-16 Inst Flugnavigation Der Uni St DEVICE FOR THE CONTROLLED CONTROL OF A STEPPER MOTOR
WO1988005185A1 (en) * 1987-01-08 1988-07-14 Merit Machined Products, Inc. Multiple stepper motors simultaneously driven by a single stepper motor controller
US5237250A (en) * 1991-11-01 1993-08-17 Zeile Kim A Multiplexed stepper motor control apparatus
CN101540578B (en) * 2008-01-28 2013-11-13 德昌电机(深圳)有限公司 Method and apparatus for controlling a plurality of motors
RU2531360C2 (en) * 2009-10-22 2014-10-20 КОНТИНЕНТАЛЬ АУТОМОТИВЕ СИСТЕМЗ ЮЭс, ИНК. Step motor controller
RU2546315C1 (en) * 2014-01-17 2015-04-10 Федеральное государственное казённое военное образовательное учреждение высшего профессионального образования "Военная академия войсковой противовоздушной обороны Вооруженных Сил Российской Федерации имени Маршала Советского Союза А.М. Василевского" Method to control sixteen step motors along usb-channel in quasisimultaneous manner
RU160905U1 (en) * 2015-12-25 2016-04-10 ООО "Брейн Девелопмент" MULTIFUNCTIONAL CONTROLLER OF WIDE APPLICATION

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB1400160A (en) * 1971-09-09 1975-07-16 Toyoda Machine Works Ltd Machine control apparatus in a computer controlled machine tool apparatus
DE2805363A1 (en) * 1978-02-09 1979-08-16 Inst Flugnavigation Der Uni St DEVICE FOR THE CONTROLLED CONTROL OF A STEPPER MOTOR
WO1988005185A1 (en) * 1987-01-08 1988-07-14 Merit Machined Products, Inc. Multiple stepper motors simultaneously driven by a single stepper motor controller
US5237250A (en) * 1991-11-01 1993-08-17 Zeile Kim A Multiplexed stepper motor control apparatus
CN101540578B (en) * 2008-01-28 2013-11-13 德昌电机(深圳)有限公司 Method and apparatus for controlling a plurality of motors
RU2531360C2 (en) * 2009-10-22 2014-10-20 КОНТИНЕНТАЛЬ АУТОМОТИВЕ СИСТЕМЗ ЮЭс, ИНК. Step motor controller
RU2546315C1 (en) * 2014-01-17 2015-04-10 Федеральное государственное казённое военное образовательное учреждение высшего профессионального образования "Военная академия войсковой противовоздушной обороны Вооруженных Сил Российской Федерации имени Маршала Советского Союза А.М. Василевского" Method to control sixteen step motors along usb-channel in quasisimultaneous manner
RU160905U1 (en) * 2015-12-25 2016-04-10 ООО "Брейн Девелопмент" MULTIFUNCTIONAL CONTROLLER OF WIDE APPLICATION

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU200672U1 (en) * 2020-03-12 2020-11-05 федеральное государственное бюджетное образовательное учреждение высшего образования «Томский государственный университет систем управления и радиоэлектроники» DEVICE IMPLEMENTING CONTROL OF A SATELLITE ANTENNA DRIVE VIA DIGITAL INTERFACE
RU209513U1 (en) * 2021-10-26 2022-03-16 Общество с ограниченной ответственностью "Эйдос-Робототехника" FOUR-CHANNEL STEP MOTOR CONTROL UNIT SDC4STEP

Similar Documents

Publication Publication Date Title
RU2704486C1 (en) Method of percussion control of several step motors with the help of personal computer via usb channel and device for its implementation
BR112014027491B1 (en) TRANSMISSION SYSTEM, POWER TOOL AND METHOD FOR WIRELESS TRANSMISSION
WO2020195552A1 (en) Servo power supply system
JP2009037617A (en) Position measuring device and method for transmitting movement information
US6756881B2 (en) Multiplex bus interface system and method for transmitting and receiving power and data
JP2010541521A (en) Dual processor power supply
EP1193580A2 (en) Sensor arrangement for detecting position and/or speed and/or acceleration, drive control based thereon and method for networking a control unit to one or several sensor systems
WO2008154958A1 (en) A control system for controlling at least one industrial robot
JP2010136580A (en) Stepping motor control unit and program
US8952636B2 (en) Data communication device that carries out serial communication in order to control motor
US11489525B1 (en) Device and method for synchronous serial data transmission
US11640197B2 (en) Counter unit
JP2015125456A (en) Numeral control system
CN209140899U (en) For controlling control parts of motion, robot and the kinetic control system of motor
JP2013192296A (en) Power conversion device
CN105099282A (en) Self-coupling controller for motor with sensor
US10528497B2 (en) Bus arrangement and method for operating a bus arrangement
CN212649387U (en) Current control device of stepping motor
CN106227088B (en) Communication method
JPWO2016038685A1 (en) Multiplex communication equipment
RU2638522C2 (en) Step electric drive
KR100882628B1 (en) Apparatus and control method for relay board of data receive type
CN204967676U (en) Thoughts motor is from matcing controller
CN216122267U (en) Stepping motor control device
JP6201331B2 (en) Synchronous serial interface circuit