Hardware Design of a Stepper Motor Intelligent Controller Based on LonWorks Technology
2026-04-06 07:41:03··#1
1. Introduction A stepper motor is a servo actuator that converts pulse signals into linear or angular displacement. Due to its simple structure, reliable operation, convenient control, good control performance, and advantages such as step size unaffected by voltage and temperature changes and no long-term error accumulation, it has been increasingly widely used in instrumentation, robotics, CNC machine tools, industrial control, and building automation. Its basic principle is that each applied pulse signal causes the stepper shaft to rotate through a certain angle, called a step. As the number of pulses input to the stepper motor increases, the linear or angular displacement also increases. If the frequency of the pulse signal is increased, the rotational speed of the stepper motor increases, and vice versa. To achieve motion control of the stepper motor, a common approach is to use a traditional microcontroller as the microprocessor of the control system, using large-scale integrated circuits to control its pulse output frequency and number of pulses, thereby achieving speed and position control of the stepper motor. However, in this approach, the microprocessor itself lacks network communication capabilities. Connecting to a host computer requires additional communication interfaces, which are unreliable and cumbersome to implement. Furthermore, traditional microcontrollers struggle to implement intelligent control algorithms, and program processing speed becomes a bottleneck restricting the improvement of real-time system control. LonWorks technology, by combining low-level control with network communication and using its core component, the neuron chip, allows control signals to be transmitted to the LonWorks intelligent controller from a local or remote computer (the host controller) at any time, enabling control of the stepper motor's rotation angle and speed. Simultaneously, programming with NeuronC allows for easy implementation of intelligent control algorithms, and the program can be downloaded to the designed intelligent controller. Therefore, using LonWorks technology for stepper motor control system design offers higher precision, flexibility, adaptability, and real-time monitoring and control of the stepper motor via a network. 2 Overall Structural Design To design a stepper motor intelligent controller using LonWorks technology, the overall structure must first be planned. Two control methods are used: (1) The stepper motor follows the control signals from the host controller, including the rotation angle and running speed. (2) The stepper motor moves according to signals from external measurement and control equipment. The overall structural block diagram of the designed intelligent controller is shown in Figure 1. The execute/stop button is connected to pin IO4 of the neuron chip to control the motor to run according to the internal program of the controller. The forward jog button is connected to pin IO5 of the neuron chip to manually control the stepper motor to jog forward. The jog time for each step is determined by the program; pressing the button once results in one jog. If the button is held down, continuous jogging occurs. The reverse jog button is connected to pin IO6 of the neuron chip to manually control the stepper motor to jog in reverse. The control method is the same as the forward jog button. All buttons are connected to a 470Ω resistor and then to a +5V power supply on one end, and to the corresponding IO pin of the neuron chip on the other end, and simultaneously grounded. The A/D conversion circuit is connected to pins IO7, IO8, IO9, and IO10 of the neuron chip to convert the analog signals from the measuring device into digital signals before sending them to the neuron chip for processing. IO0 to IO3 are used to provide the waveform signals required by the stepper motor drive circuit. The specific operation process is as follows: first, the designed program is compiled and then downloaded to the controller. Pressing the execute button will cause the stepper motor to move according to the downloaded program control method. At the same time, we can also transmit control signals to the intelligent controller from the host computer in real time, so that the stepper motor can move according to our specified movement mode under the control of the internal program of the controller. 3 Specific Hardware Design 3.1 Design of LonWorks Control Module The use of LonWorks technology for intelligent controllers is inseparable from the control module. It is the most basic control unit of the LonWorks intelligent controller. According to Echelon's ideas, the control module is actually a general module for designing LonWorks intelligent nodes, which is a different unit separated from the external interface circuit. Figure 2 is the circuit board diagram of the designed control module. The neuron chip uses Toshiba's TMPN3150, the memory uses Atmel's AT29C256, and the transceiver is Echelon's FTT-10A free-topology twisted-pair transceiver. The left 20 pins are directly connected to the neuron chip's 11 I/O pins, RESET, SERVICE, power, and ground pins. The middle two of the right 6 pins are used for the twisted-pair interface. In the development of the intelligent controller, the control module only needs to be designed once; other similar products can use it. 3.2 A/D Conversion Circuit Design: To enable the controller to control the stepper motor based on the measured analog signal, the analog signal must be converted into a digital signal. Considering the control accuracy of the stepper motor, a high-precision A/D conversion chip must be selected. Furthermore, considering that using a serial connection between the neuron chip and the A/D chip can save I/O ports on the neuron chip, Maxim's MAX186, an 8-channel input 12-bit precision high-speed, low-power serial A/D converter, is selected. It can have a single +5V power input or a ±5V power input. Analog inputs can be configured via software to operate in bipolar/unipolar or single-ended/differential modes. The MAX186 has a four-wire serial interface, allowing direct connection to devices using SPI, QSPI, or Microwire external logic. The MAX186 has an internal +4.096V reference voltage source. Figure 3 shows the interface circuit of the A/D converter chip and its pin connection to the neuron chip. IO7 of the neuron chip is used for the MAX186 chip select, IO8 provides the clock signal output, IO9 is used for serial data output, and IO10 is used for serial data input. The MAX186's control word is written and the converted data is output via the serial data lines; each input channel is selected by the control word. The analog signal input range is 0 to +4.096V. It should be noted that the analog signal input must be coupled with a signal conditioning circuit for signal conversion, amplification, and attenuation to meet the range requirements. 3.3 Stepper Motor Drive Circuit Design A two-phase, eight-step stepper motor is selected here, meaning that the stepper motor moves one step for every eight clock cycles. Therefore, a dedicated chip, UC3770A, is selected to drive a two-phase stepper motor. It consists of controllable logic inputs, a current sensor, and a monostable output with built-in protection diodes. Since a two-phase stepper motor is being controlled, two UC3770A chips and some external components can form a complete two-phase stepper motor drive system. Figure 4 shows the drive circuit composed of two UC3770A chips. When the UC3770A logic inputs are open, they are considered high-order inputs. The commutation input of the UC3770A is pin 8, which controls the direction of the current in the two-phase stepper motor windings. The built-in Schmitt trigger generates a commutation delay, effectively eliminating current noise interference at the output pin during commutation. The output terminals are pins 1 and 15. When the circuit is working, the drive current of the stepper motor winding increases from 0. The external resistor on pin 16 generates a voltage divider Vrs. Vrs is applied to pin 10 through the resistor Rc of the low-pass circuit. When Vrs increases beyond the threshold voltage of the built-in voltage comparator, the current switching arithmetic unit will be turned off. The current switching arithmetic unit generates a signal to turn off its internal transistors. The winding current will continue to flow through the loop formed by the freewheeling diodes, and the current will gradually decrease, and Vrs will also decrease accordingly. When it is less than the threshold voltage, the current switching arithmetic unit will turn on. This process repeats until the winding current is required to reverse. When the commutation input terminal pin 8 is input with a logic signal to request commutation, the turned-on transistors are turned off, and a set of turned-off transistors will be turned on. At this time, the winding current decreases to 0 and then increases in the opposite direction. 3.4 Generation of UC3770A Input Signal Waveform Since a two-phase stepper motor is controlled in eight steps, the neuron chip must output a waveform signal appropriate to this phase. This waveform signal is then input into the UC3770A to control the stepper motor. To meet the requirements, the waveform timing diagram for two UC3770A chips is shown in Figure 5. To make the stepper motor move forward, the waveform for Phase B is selected as the forward direction in the diagram. To make the stepper motor move backward, the waveform for Phase B is simply inverted and selected as the reverse direction in the diagram. According to the timing diagram, the corresponding timing waveforms only need to be generated at ports IO0-IO3 under the control of the program. That is, at corresponding intervals, IO0-IO3 sequentially output 1100→0110→0100→0001→0000→1010→1000→1101. If the stepper motor is reversed, IO0-IO3 sequentially generate 1000→0010→0000→00101→0100→1110→1100→1001. Since the I/O ports of the neuron chip itself have high reliability, they fully meet the requirements of the UC3770A. This eliminates the need for waveform generation circuit design, simplifies the hardware structure, and improves system reliability. 4. Conclusion A two-phase eight-step stepper motor intelligent controller can be easily designed using LonWorks technology. It is not only simple in structure but also highly reliable. Designing a stepper motor intelligent controller using LonWorks technology combines intelligent control, network communication, and real-time computer control, possessing high technical content and compensating for the shortcomings of traditional microcontroller control, showing great development and application prospects.