Study notes Digital steering gear Horizontal and vertical linkage pan tilt

<> use STM32F103 make

The steering gear can be used for the rotating mechanism selected in the production of pan tilt , DC motor , Stepper motor , This time, we use the PTZ kit of balance car home

<> Theory part

<> Steering gear

There are two types of steering gear , Digital steering gear , Analog Servo . The response speed can be improved by increasing the voltage appropriately .

The main component of steering gear is servo motor , The so-called servo is to obey the requirements of the signal and action . Before the signal comes , The rotor stops ; When the signal comes , The rotor moves immediately . So we can input different signals to the steering gear , To control its rotation to different angles .

The steering gear receives PWM signal , When the signal enters the internal circuit, a bias voltage is generated , The trigger motor drives the potentiometer to move through the reduction gear , When the voltage difference is zero , Motor stalling , So as to achieve the effect of servo . To put it simply, it is to give the steering gear a specific setting PWM signal , The steering gear can be rotated to the specified position .
There are three wires on the steering gear , namely GND,VCC and SIG, That's the ground wire , Power line and signal line , Among them PWM The wave is input to the steering gear from the signal line .
generally speaking , Received by the steering gear PWM The signal frequency is 50HZ, The period is 20ms. When the pulse width of high level is 0.5ms-2.5ms The steering gear can be rotated to different angles .

Brown : GND

red : VCC

yellow : Control line

<> Digital steering gear

1, Common types of numbers on the market
2, Driving mode
frequency :50HZ
Duty cycle : with a period of 20ms, According to different pulse width ( Duty cycle ) The rudder turns to a different angle .

<> Analog Servo

1, Common types of numbers on the market
SG90 steering engine
2, Driving mode
frequency :50HZ
Duty cycle : with a period of 20ms, According to different pulse width ( Duty cycle ) The rudder turns to a different angle .

<> Comparison of two kinds of steering gear

Mainly by motor , Reduction gear , Control circuit, etc , The biggest difference between digital steering gear and analog steering gear is reflected in the control circuit , The control circuit of digital actuator is more microprocessor and crystal oscillator than that of analog actuator .
Difference between digital steering gear and analog steering gear :
The digital actuator only needs to give one target position duty cycle PWM To simulate the steering gear, the angle should be given all the time PWM---- Need to repeat the same square wave
Advantages of digital steering gear :

Digital rudder subverts the control system of rudder fundamentally , Compared with the traditional simulation actuator , Two advantages of digital steering gear are :1. Because of the microprocessor , The digital steering gear can transmit the power pulse to the steering motor , The input signal is processed according to the set parameters .

This means the width of the power pulse , That is to say, the power that excites the motor , It can be adjusted according to the program operation of microprocessor , To adapt to different functional requirements , And optimize the performance of the actuator .

2. The digital actuator sends power pulses to the motor at a much higher frequency . That is to say , Relative and traditional 50 pulse / second , Now it is 300 pulse / second . although , Because of the high frequency , The width of each power pulse is reduced , But the motor receives more excitation signals at the same time , And it turns faster .

This also means that it's not just the steering motor that responds to the transmitter's signal at a higher frequency , and “ No reaction zone ” Smaller ; The reaction becomes faster ; Acceleration and deceleration are also faster , Softer ; Digital actuator provides higher accuracy and better fixed force . In addition, there is anti shake , The advantages of fast response .

<> Installation of pan tilt

Two steering gears

<> Coaxial linkage part ( Interpolation method )

<>Bresenham method

First of all, why do we need interpolation ?
I don't know if you've seen the robot in the processing plant , It turns to a plane angle first , Then turn to another angle , If you let him paint or write, it's just like this

But it's not just straight lines, it's curves

How to form the curve needs interpolation algorithm
Let's zoom in on the curve

It can be found that the curve is actually composed of small straight line segments

I'm tired. I won't write any more , More tomorrow .

©2019-2020 Toolsou All rights reserved,
2020 The 11th National Blue Bridge Cup C/C++b Group summary ( Completion ) Review of the most complete computer network principles in history vue-cli 3 VUE Scaffold project construction ( Detailed explanation ) solve Vue+TypeScript Under development TS Don't recognize this.$refs The question of Vue Using the function of anti chattering and throttling How to use division operation in relational algebra SQL Statement representation ?copy-webpack-plugin Copy and compress files avue The use of dictionaries in English Teaching girls to learn Java: What is? Java?python Code painting Cherry Blossom -python Draw cherry tree code Specific code introduction