I. Differences between stepper motors, servo motors, and automatic motors
A stepper motor is an open-loop control unit that converts electrical pulse signals into angular or linear displacement. Simply put, it controls the angle and number of rotations using electrical pulse signals. Therefore, it relies solely on pulse signals to determine the amount of rotation. Because there are no sensors, there will be some deviation in the stopping angle. However, precise pulse signals will minimize this deviation.
Servo motors: The motor speed is controlled by a servo control circuit, and the rotational position is controlled by sensors. Therefore, the position control is very precise. The speed is also variable.
Servo (electronic servo): The main component of a servo is a servo motor. This includes a servo motor control circuit and a reduction gear set. Oh, by the way, a servo motor doesn't have a reduction gear set, while a servo motor does.
For limit servos, the steering angle of the servo arm is determined by a potentiometer located below the output shaft. Servo signal control uses a pulse width modulation (PWM) signal, which can be easily generated by any microcontroller.
II. Basic Principles of Stepper Motors
Working principle:
Typically, the rotor of a stepper motor is a permanent magnet. When current flows through the stator windings, the stator windings generate a vector magnetic field. This magnetic field causes the rotor to rotate by an angle, aligning the direction of the rotor's magnetic field with that of the stator's magnetic field. When the stator's vector magnetic field rotates by an angle, the rotor also rotates by the same angle. Each input electrical pulse causes the motor to rotate one angle and move one step forward. Its output angular displacement is proportional to the number of input pulses, and its rotational speed is proportional to the pulse frequency. Changing the energizing sequence of the windings reverses the motor's rotation. Therefore, the rotation of a stepper motor can be controlled by adjusting the number and frequency of pulses and the energizing sequence of each phase winding.
Heating principle:
Most motors contain an iron core and winding coils. The windings have resistance, and when current flows through them, losses occur. The magnitude of these losses is proportional to the resistance and the square of the current; this is what we commonly call copper loss. If the current is not standard DC or a sine wave, harmonic losses will also occur. The iron core has hysteresis and eddy current effects, which also generate losses in an alternating magnetic field. The magnitude of these losses depends on the material, current, frequency, and voltage; this is called iron loss. Both copper and iron losses manifest as heat, thus affecting the motor's efficiency. Stepper motors generally prioritize positioning accuracy and torque output, resulting in relatively low efficiency, generally higher current, and higher harmonic content. The frequency of the alternating current also varies with the rotational speed. Therefore, stepper motors commonly experience heat generation, and this is more severe than with general AC motors.
III. Servo Motor Structure
A servo motor mainly consists of a housing, circuit board, drive motor, reducer, and position detection element. Its working principle is as follows: a receiver sends a signal to the servo motor, which is then driven by an IC on the circuit board to start the coreless motor rotating. Power is transmitted to the swing arm through a reduction gear, while a position detector sends back a signal to determine if the desired position has been reached. The position detector is essentially a variable resistor; its resistance changes as the servo motor rotates, and the angle of rotation is determined by detecting the resistance value. A typical servo motor winds thin copper wire around a three-pole rotor. When current flows through the coil, a magnetic field is generated, which repels the magnet surrounding the rotor, thus generating a rotational force. According to the principles of physics, the moment of inertia of an object is proportional to its mass; therefore, the greater the mass of an object, the greater the force required to rotate it. To achieve high speed and low power consumption, servo motors wind thin copper wire into an extremely thin hollow cylinder, forming a very lightweight, stepless hollow rotor, and place the magnet inside the cylinder—this is the hollow cup motor.
To suit different working environments, servos are available with waterproof and dustproof designs. Furthermore, to meet varying load requirements, servo gears are available in both plastic and metal. Servos with metal gears are generally high-torque and high-speed types, with the advantage of not having their gears break under excessive load. Higher-end servos utilize ball bearings, resulting in smoother and more precise rotation. Ball bearings are available with one or two bearings; two bearings are naturally preferred. Newly released FET servos primarily utilize FET (Field Effect Transistor) transistors. FETs have the advantage of low internal resistance, thus resulting in less current loss compared to conventional transistors.
IV. Working Principle of Servo Motor
A bias voltage is generated by the PWM wave entering the internal circuit, which triggers the motor to move the potentiometer through the reduction gear. When the voltage difference is zero, the motor stops, thus achieving the servo effect.
The PWM protocol for servos is the same, but the latest servos may use a different one.
The protocol typically involves a high-level pulse width of 0.5ms to 2.5ms controlling the servo motor to rotate through different angles.
For example, a certain model is as follows:
For different models, you can find the relevant servo motor documentation.
analyze:
This section provides a detailed analysis of the programming of a 50Hz servo motor (20ms period) and a 51 microcontroller as the main control chip.
As shown in the diagram above, pulses of different widths can produce different angle outputs. PWM waves can be simulated using timers and I/O ports, and the angle can be controlled by controlling the duty cycle through timing. Theoretically, the 51 microcontroller can generate pulses in the microsecond range (µs). 180/2000µs = 0.09µs, which can achieve an accuracy of about 0.1µs.
V. Working Principle of Servo Motors
The diagram below shows a servo motor control circuit using an LM675 power operational amplifier. The motor is a DC servo motor. As shown, the LM675 is powered by 15V. This 15V voltage is applied to the non-inverting input of the LM675 via RP1. The output voltage of the LM675 is applied to the input of the servo motor. A speed signal generator is installed on the motor to detect its speed in real time. This speed signal generator is essentially a generator; its output voltage is proportional to the speed. The voltage output from the speed signal generator G is divided by a voltage divider circuit and fed back to the inverting input of the operational amplifier as a speed error signal. The voltage value set by the speed command potentiometer RP1 is divided by resistors R1 and R2 and applied to the non-inverting input of the operational amplifier, serving as a reference voltage.
Servo motor control principle diagram
The servo motor, represented by the letter M, is the power source of the drive system. The operational amplifier, indicated by its circuit name (LM675), is an amplifying device in the servo control circuit that provides drive current to the servo motor.
Speed command potentiometer RP1: Sets the reference voltage of the operational amplifier in the circuit, i.e., the speed setting. Amplifier gain adjustment potentiometer RP2: Used in the circuit to fine-tune the amplifier gain and the magnitude of the speed feedback signal, respectively.
When the motor load changes, the voltage fed back to the inverting input of the operational amplifier also changes. Specifically, when the motor load increases, the speed decreases, and the output voltage of the speed sensor generator also decreases, causing the voltage at the inverting input of the operational amplifier to decrease. This increases the difference between this voltage and the reference voltage, thus increasing the output voltage of the operational amplifier. Conversely, when the load decreases and the motor speed increases, the output voltage of the speed sensor generator rises, increasing the feedback voltage to the inverting input of the operational amplifier. This decreases the difference between this voltage and the reference voltage, causing the output voltage of the operational amplifier to drop, which in turn causes the motor speed to decrease, thus automatically stabilizing the rotational speed at the set value.