2. Composition of the servo
3. Working principle of servo
4. Selection of servo
5. Matters needing attention when using the servo
6. Introduction to Huisheng S90 Servo
7. How to use the program to achieve steering
8.51 MCU Servo Test Program
1 Overview
The steering gear, also called servo motor, was first used on ships to achieve steering functions. Since its turning angle can be continuously controlled by program, it is widely used in smart cars to achieve steering and various joint movements of robots, as shown in Figures 1 and 2.
Figure 1 Servo used in robot
Figure 2: Servo used in smart car
The steering gear is the control mechanism for the car's steering. It has the characteristics of small size, large torque, simple external mechanical design, and high stability. Whether in hardware design or software design, the steering gear design is an important part of the car's control part. Figure 3 is the appearance of the steering gear. [page]
Figure 3: Steering gear appearance
2. Composition of the servo
Generally speaking, the servo is mainly composed of the following parts: steering wheel, reduction gear set, position feedback potentiometer, DC motor, control circuit, etc., as shown in Figure 4 and Figure 5.
Figure 4 Schematic diagram of the composition of the servo
Figure 5: Servo components
There are three input lines for the servo, as shown in Figure 6. The red one in the middle is the power line, and the black one on the side is the ground line. This line provides the most basic energy guarantee for the servo, mainly for the rotation consumption of the motor. There are two specifications of power supply, one is 4.8V and the other is 6.0V, which correspond to different torque standards, that is, the output torque is different, and the 6.0V one corresponds to a larger one, depending on the application conditions; the other line is the control signal line, Futaba's is generally white, and JR's is generally orange. In addition, it should be noted that the power line of some models of SANWA servos is on the side instead of in the middle, and needs to be identified. But remember that red is the power supply and black is the ground line, and generally you won't make a mistake.
Figure 6 Output line of the servo
3. Working principle of servo
The control circuit board receives the control signal from the signal line, controls the motor to rotate, and the motor drives a series of gear sets, which are decelerated and transmitted to the output steering wheel. The output shaft of the servo is connected to the position feedback potentiometer. When the steering wheel rotates, it drives the position feedback potentiometer. The potentiometer will output a voltage signal to the control circuit board for feedback. Then the control circuit board determines the direction and speed of the motor rotation according to the position, so as to achieve the target stop. Its working process is: control signal → control circuit board → motor rotation → gear set deceleration → steering wheel rotation → position feedback potentiometer → control circuit board feedback.
The control signal of the servo is a pulse width modulation (PWM) signal with a period of 20MS, in which the pulse width ranges from 0.5-2.5MS, and the corresponding steering wheel position is 0-180 degrees, which changes linearly. In other words, if a
certain pulse width is provided to it, its output shaft will maintain a certain corresponding angle, no matter how the external torque changes, until it is provided with a pulse signal of another width, it will change the output angle to the new corresponding position as shown in Figure 7. There is a reference circuit inside the servo, which generates a reference signal with a period of 20MS and a width of 1.5MS. There is a comparator that compares the external signal with the reference signal to determine the direction and size, thereby producing the rotation signal of the motor. It can be seen that the servo is a position servo drive, and the rotation range cannot exceed 180 degrees. It is suitable for drives that need to be constantly changed and can be maintained, such as robot joints, aircraft control surfaces, etc. [page]
Figure 7 Relationship between servo output angle and input pulse
4. Selection of servo
The servos on the market have plastic teeth, metal teeth, small size, standard size, large size, and there are also thin standard size servos and low center of gravity models. Small servos are generally called micro servos, and the torque is relatively small. The 2.5g, 3.7g, 4.4g, 7g, 9g servos on the market refer to the weight of the servos in grams, and the volume and torque are gradually increasing. Most of the micro servos have plastic teeth inside, and the 9g servos have metal teeth, and the torque is also greater than that of plastic teeth. Futaba S3003 and Huisheng MG995 are standard servos, with similar volumes, but the former has plastic teeth and the latter has metal teeth, and the nominal torque of the two is also very different. Spring SR403P and Dynamixel AX-12+ are robot-specific servos. The difference is that the former is made in China, while the latter is made in South Korea. Both have metal teeth with a nominal torque of more than 13kg, but the former is just an analog servo with a modified appearance, while the latter is a digital servo with RS485 serial communication, position feedback, speed feedback, and temperature feedback functions. The two are very different in performance and price.
In addition to the different choices of size, shape and torque, the reaction speed and dead space of the servo must also be considered. The nominal reaction speed of a general servo is commonly 0.22 seconds/60°, 0.18 seconds/60°, and some better servos have 0.12 seconds/60°, etc. The smaller the value, the faster the reaction.
The servo specifications provided by the manufacturer will include basic information such as size (mm), torque (kg/cm), speed (seconds/60°), test voltage (V) and weight (g). The unit of torque is kg/cm, which means that at a swing arm length of 1 cm, an object weighing several kilograms can be lifted. This is the concept of the lever arm, so the longer the swing arm length, the smaller the torque. The unit of speed is sec/60°, which means the time required for the servo to rotate 60°. Voltage will directly affect the performance of the servo. For example, the torque of Futaba S-9001 is 3.9kg/cm and the speed is 0.22 seconds/60° at 4.8V, and the torque is 5.2kg/cm and the speed is 0.18 seconds/60° at 6.0V. Unless otherwise specified, JR's servos are all tested at 4.8V, while Futaba's are tested at 6.0V. Fast-speed, high-torque servos are not only expensive, but also consume a lot of power. Therefore, when using advanced servos, be sure to use high-quality, high-capacity batteries that can provide stable and sufficient power.
There are a lot of mixed goods on the market now. Generally speaking, imitations are not as good as the originals, cheap ones are not as good as expensive ones, plastic teeth are not as good as metal teeth, old ones are not as good as new ones, domestic ones are not as good as foreign ones, etc. You don't have to pursue perfection too much, just choose what is sufficient according to your own purchasing power.
5. Matters needing attention when using the servo
1) The rated working voltage of commonly used servos is 6V. Chips such as LM1117 can be used to provide 6V voltage. If 5V power supply is used directly to simplify the hardware design, the impact is not very large, but it is best to separate the power supply from the microcontroller, otherwise the microcontroller will not work properly.
2) Generally speaking, the signal line can be connected to any pin of the microcontroller. For the 51 microcontroller, the PWM can be controlled through the timer module. However, if you connect a chip like Freescale, since Freescale has a PWM module inside, it can directly output the PWM signal. In this case, the signal should be connected to the dedicated PWM output pin.
6. Introduction to Huisheng S90 Servo
Due to the good cost performance of Huisheng S90, the current market price is generally 10-15 yuan, so it is widely used in the production and design of robots and smart cars. Figures 8 and 9 show the appearance and parameters of S90 respectively.
Figure 8 Huisheng S90 servo
Figure 9 Huisheng S90 servo parameters
Previous article:ATMEL ISP download line
Next article:Detailed explanation of 51 MCU header file reg51.h
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- 【ufun learning】Learning 5: "Basic Example 4 - USB Serial Port and PC Communication"
- [Sold] ST P-NUCLEO-IHM001 Brushless Motor Development Kit for Sale
- Among so many board games articles, which one do you like best?
- Inductor Inductive Reactance Characteristics
- RSL10 RTE add timer
- Adding 3D packaging issues
- How to set the via cover oil in Protel 99 SE PCB design software?
- Hey guys, I can't find the following libraries on Cadence's Psipce
- First look at Texas Instruments' C2000 series
- [Project source code] Digital tube companion - binary to BCD