In detail: do-it-yourself servo motor repair from a real master for the site my.housecope.com.
I recently made a robot arm, and now I decided to add a mini servo-powered gripper to it. I decided to make two variations to see how it would work better with a straight or round gear. I liked the round gear version better, as it took only 2 hours to make, and the gap between the gears was very small.
First, I cut out the parts on a milling machine:
I assembled the parts with 2x10mm screws.
And here's how the mini servo attaches to the gripper:
How the servo gripper works:
And now, when everything is assembled and the mechanical part is also almost ready, I just have to finish the electronic part of the work! I chose an Arduino to control my robot, and made a circuit (it's on the right) to connect the Arduino to the servo.
The circuit is actually very simple, it just sends signals to and from the Arduino. There is also a connector for an infrared receiver and some connectors for a power supply and 4 connections to the rest of the (unused) Arduino pins. Thus, another switch or sensor can be connected.
And here is how the manipulator arm moves:
The acquisition by the enterprise of a CNC milling machine for the manufacture of facades from MDF raises the question of the need to overpay for certain mechanisms and power units installed on expensive and high-tech equipment. To position the power units of CNC machines, as a rule, stepper motors and servo motors (servo drives) are used.
Video (click to play).
Stepper motors are cheaper. However, servo drives have a wide range of advantages, including high performance and positioning accuracy. So what to choose?
A stepper motor is a brushless DC synchronous motor with multiple stator windings. When current is applied to one of the windings, the rotor rotates and then is fixed in a certain position. Sequential excitation of the windings through the stepper motor control controller allows you to rotate the rotor at a given angle.
Stepper motors are widely used in industry, as they have high reliability and long service life. The main advantage of stepper motors is positioning accuracy. When current is applied to the windings, the rotor will rotate strictly at a certain angle.
· High torque at low and zero speeds;
·Quick start, stop and reverse;
· Work under high loading without risk of failure;
· The only wear mechanism that affects the duration of operation is bearings;
· Possibility of occurrence of a resonance;
· Constant power consumption regardless of the load;
Loss of torque at high speeds;
· Lack of feedback when positioning;
· Poor repairability.
A servomotor (servo drive) is an electric motor controlled through negative feedback, which allows you to precisely control the movement parameters in order to achieve the required speed or obtain the desired angle of rotation. The composition of the servomotor includes the electric motor itself, a feedback sensor, a power supply and control unit.
The design features of electric motors for a servo drive are not much different from conventional electric motors with a stator and a rotor, operating on direct and alternating current, with and without brushes.A special role here is played by a feedback sensor, which can be installed both directly in the engine itself and transmit data on the position of the rotor, as well as determine its positioning by external signs. On the other hand, the operation of a servomotor is unthinkable without a power supply and control unit (aka inverter or servo amplifier), which converts the voltage and frequency of the current supplied to the electric motor, thereby controlling its action.
· High power at the small sizes;
· Fast acceleration and deceleration;
· Continuous and uninterrupted position tracking;
· Low noise level, lack of vibrations and a resonance;
· Wide range of speed of rotation;
· Stable operation in a wide range of speeds;
· Small weight and compact design;
· Low consumption of the electric power at small loadings.
· Demanding for periodic maintenance (for example, with the replacement of brushes);
The complexity of the device (the presence of a sensor, power supply and control unit) and the logic of its operation.
When comparing the characteristics of a servo drive and a stepper motor, one should pay attention, first of all, to their performance and cost.
For the production of MDF facades in a small enterprise working with small volumes, I think there is no need to overpay for installing expensive servo motors on a CNC milling machine. On the other hand, if an enterprise seeks to reach the maximum possible production volumes, then it makes no sense to cheapen on low-performance stepper motors for CNC.
Servo motors are used not only in aircraft modeling and robotics, they can also be used in household devices. Small size, high performance, and simple servomotor control make them the most suitable for remote control of various devices.
The combined use of servomotors with radio modules for receiving and transmitting does not create any difficulties, it is enough on the receiver side to simply connect the appropriate connector to the servomotor, containing the supply voltage and the control signal, and the job is done.
But if we want to control the servomotor "manually", for example, with a potentiometer, we need a pulse control generator.
Below is a fairly simple oscillator circuit based on the 74HC00 integrated circuit.
This circuit allows manual control of servomotors by applying control pulses with a width of 0.6 to 2 ms. The scheme can be used, for example, to rotate small antennas, outdoor spotlights, CCTV cameras, etc.
The basis of the circuit is the 74HC00 (IC1) chip, which is 4 NAND gates. An oscillator was created on the elements IC1A and IC1B, at the output of which pulses are formed with a frequency of 50 Hz. These pulses activate the RS flip-flop, which consists of logic elements IC1C and IC1D.
With each pulse coming from the generator, the output of IC1D is set to "0" and the capacitor C2 is discharged through the resistor R2 and the potentiometer P1. If the voltage on the capacitor C2 drops to a certain level, then the RC circuit switches the element to the opposite state. Thus, at the output we get rectangular pulses with a period of 20 ms. The pulse width is set with potentiometer P1.
For example, the Futaba S3003 servo drive changes the angle of rotation of the shaft by 90 degrees due to control pulses with a duration of 1 to 2 ms. If we change the pulse width from 0.6 to 2ms, then the rotation angle will be up to 120°. The components in the circuit are chosen in such a way that the output pulse is in the range of 0.6 to 2 ms, and therefore the installation angle is 120°. Futaby's S3003 servo motor has a sufficiently large torque, and the current consumption can be from tens to hundreds of mA, depending on the mechanical load.
The servomotor control circuit is assembled on a double-sided printed circuit board measuring 29 x 36 mm.Installation is very simple, so even a novice radio amateur can easily handle the assembly of the device.
Valve motors are synchronous brushless (brushless) machines. On the rotor are permanent magnets made of rare earth metals, on the stator there is an armature winding. The switching of the stator windings is carried out by semiconductor power switches (transistors) so that the stator magnetic field vector is always perpendicular to the rotor magnetic field vector - for this, a rotor position sensor (Hall sensor or encoder) is used. The phase current is controlled by PWM modulation and can be either trapezoidal or sinusoidal.
The flat rotor of the linear motor is made of rare earth permanent magnets. According to the principle of operation, it is similar to a valve motor.
Unlike continuous rotation synchronous machines, stepper motors have pronounced poles on the stator, on which the control winding coils are located - their switching is performed by an external drive.
Consider the principle of operation of a reactive stepper motor, in which teeth are located on the stator poles, and the rotor is made of soft magnetic steel and also has teeth. The teeth on the stator are arranged so that at one step the magnetic resistance is less along the longitudinal axis of the motor, and at the other - along the transverse axis. If the stator windings are discretely excited in a certain sequence with direct current, then the rotor will turn one step at each switching, equal to the pitch of the teeth on the rotor.
Some models of frequency converters can work with both standard asynchronous motors and servo motors. That is, the main difference between servo drives is not in the power part, but in the control algorithm and calculation speed. Since the program uses information about the position of the rotor, the servo drive has an interface for connecting an encoder mounted on the motor shaft.
Servo systems use the principle subordinate control: the current loop is subordinate to the speed loop, which in turn is subordinate to the position loop (see automatic control theory). First, the innermost loop, the current loop, is set up, then the speed loop, and the last one is the position loop.
current loop always implemented in the servo.
speed loop (as well as a speed sensor) is also always present in the servo system, it can be implemented both on the basis of a servo controller built into the drive, and external.
Position loop used for precise positioning (for example, feed axes in CNC machines).
If there are no backlashes in the kinematic connections between the executive body (coordinate table) and the motor shaft, then the coordinate is indirectly recalculated by the value of the rotary encoder. If there are backlashes, then an additional position sensor (which is connected to the servo controller) is installed on the executive body for direct measurement of the coordinate.
That is, depending on the configuration of the speed and position loops, the appropriate servo controller and servo drive are selected (not every servo controller can implement a position loop!).
Positioning
Interpolation
Synchronization, electronic gear (Gear)
Precise maintenance of rotation speed (machine spindle)
Electronic cam (Cam)
Programmable logic controller.
In general, a servo system (Motion Control System) can consist of the following devices:
Servo motor (Servo Motor) with a circular speed feedback sensor (it can also act as a rotor position sensor)
Servo Gear
Actuator position sensor (e.g. linear feed axis coordinate sensor)
Servo Drive
Servo controller (Motion Controller)
Operator Interface (HMI).
PLC based servo system (PLC-based Motion Control)
The Motion Control Function Module is added to the PLC Expansion Cart
Standalone servo controller
PC based servo system (PC-based Motion Control)
Dedicated motion control software for tablet PC with user interface (HMI)
Programmable Automation controller (PAC) with motion control
Drive based servo system (Drive-based Motion Control)
Frequency converter with built-in servo controller
Optional software that is loaded into the drive and adds motion control functionality to the drive
Optional boards with motion control functions that are built into the drive.
Compact brushless permanent magnet servomotors (valve type) for high dynamics and precision.
Asynchronous
Drives of the main movement and spindles of tool machines.
direct drive (Direct drive)
Direct drive does not contain intermediate transmission mechanisms (ball screws, belts, gearboxes):
Linear motors (Linear Motors) can be supplied with profile rail guides
Torque motors (Torque Motors) - synchronous multi-pole machines with permanent magnet excitation, liquid cooling, hollow shaft rotor. Provide high precision and power at low speeds.
High speed, dynamics and positioning accuracy
High torque
Low inertia
Large torque capacity
Wide control range
Brushless.
Lack of kinematic chains for converting rotational motion into linear:
Micron accuracy is required in CNC metalworking machines, and in stackers a centimeter is enough. The choice of servo motor and servo drive depends on the accuracy.
Positioning accuracy
Speed Accuracy
Torque accuracy.
Articles, surveys, prices for machine tools and completing.
Yaskawa 400 watt servos have an encoder key. The encoder can be supplied in 4 options, there are 4 slots in the encoder. When you take it apart, mark it to make it easier to reassemble.
Rather alive. Serva probably worked constantly more than the face value.
Take it apart and see it there. Do not admire this dead motor
when the S-ON signal is applied and the brake is turned on, there must be a special output to control the brake.
to a relay or an open collector.
If you don’t need a brake when turning on the servo, apply 24v to the brake and there will be a simple servo
when the machine is turned off so that the axles do not slip under the weight. The brake is slow and will simply not keep up with the CNC. In this case, the brake has the same or slightly more torque than the servo itself. That is, if the servo is 5Nm, then the brake can be 7Nm, and since the servo can work with excess torque, the servo itself works as a brake when working in the CNC.
More than 1000 enterprises from more than 200 cities from small businesses to state corporations. Only in the last year more than 2000 units of complex industrial electronics were repaired over 300 different manufacturers. According to statistics 90% equipment that has failed must be repaired.
Pay only for the result - a working unit
6 month warranty on the entire unit
Repair time 5 to 15 days
Free Preliminary Inspection for Repairability
We do not make structural changes
Repair at the component level
We divide all servomotors into 4 categories depending on the complexity of the repair:
Servo motor Allen-Bradley E146578
Servo motor BRUSHLESS B6310P2H 3A052039
Servo motor YASKAWA SGMP- 15V316CT 1P0348-14-6
Servo motor Schneider Electric iSH100/ 30044/ 0/1/00/ 0/00/00/00
Servo motor Siemens 1FK7086- 7SF71- 1EH0
Allen-Bradley BULLETIN 1326 AC SERVO MOTOR
Servo motor Rexroth MSK071E- 0200-NN- M1-UG0- NNNN
Servo motor EMERSON Unimotor
Servo motor Fanuc L25/3000 A06B- 0571- B377
Servo motor INDRAMAT 090B-0-JD-3-C/ 110-A-1/SO1
Servo motor Siemens 1FT6134- 6SB71- 2AA0
We can determine the type of servomotor and the approximate cost of repair from the photo of the nameplate. If you do not know what a shield is, then here example .
We will be able to tell you the exact cost of the repair after a free inspection of the servomotor.
Sending equipment for inspection
Pay bills and start repairs
After 7 days information to the customer
15 days the equipment is sent to the customer
1. How to determine the type of servomotor and repair cost?
Send a photo of the nameplate and the symptoms of the malfunction - we will answer you as soon as possible.
2. When will you tell the exact cost?
After inspection of the equipment in our laboratory within 1-2 days.
3. How much will the diagnostics cost?
The initial repairability inspection is free of charge. You pay only for the positive result of the repair.
4. What happens if you can't repair the servo motor?
If during the repair of the equipment it is established that the restoration of working capacity is impossible, we return 100% of the money paid. There is no diagnostic fee.
5. Do you tune the encoder after repair?
Yes, we adjust the position of the encoder relative to the servo. However, in production it is often necessary to adjust the position of the servomotor itself. This is done by the Customer's specialists, using the documentation from the manufacturer.
6. Do you do motor rewinding?
We do not do rewind.
A servomotor is a unique type of equipment that combines a reliable mechanical part and sophisticated electronic feedback sensors (and, in some cases, control units for the motor itself). Due to this combination of completely different components, its repair has much more features, unlike equipment that has only electronic and software parts. For a complete repair of a servomotor, it is necessary to restore not only the mechanical and electronic parts, but also set up their joint functioning, which requires high-precision measurement and correct analysis of the parameters of all components of the motor.
Repair of electronic components that are part of a servomotor requires careful preparation and the availability of special equipment for both tuning and reprogramming - most often an encoder. At the same time, the presence of a serviceable electronic component does not at all mean the correct operation of the motor, since the slightest failure in its positioning inside the motor (for example, due to shock or vibration) automatically entails a malfunction. Often, independent attempts to replace the encoder end in failure, because in addition to proper installation, it requires positioning, in addition, it requires a special tool and software to work.
In most industrial plants, servo motors are used in the production process. High/low temperatures, significant temperature fluctuations, high humidity, high dynamic loads, chemically aggressive environments, etc.
Section topic Auto off-road in category car models; Symptom 1: The remote control is on, turn on the board. The servos moved in a chaotic manner and stopped. They do not respond to the remote control. Repair: check the reliability of the power supply for.
Symptom 1: The remote control is on, turn on the board. The servos moved in a chaotic manner and stopped. They do not respond to the remote control.
Repair: check the reliability of the power supply for contact bounce, oxidation of contacts or a toggle switch. It may be enough to tighten (clean) the contacts, in extreme cases, we disassemble the toggle switch and inspect it. The contacts of the toggle switch tend to burn.
Sympton 2: The remote control is turned on, turn on the board. It is raining or snowing outside. The servos stand still, they react to the remote control. But periodically the servos tremble when the hand touches the side antenna or the remote control antenna, as well as from wet drops.
Repair: You just need to extend the telescopic antenna on the console, completely.
Symptom 3: The remote control is on, turn on the board. When you turn the steering wheel to the left or right, the servo very slowly returns to its original state. Or, after a short ride, the servo becomes sluggish, for example, it turns badly. At the same time, everything is in order with the power of the board. And so constantly, take the model out of the house, the battery is fully charged. We rode in wet weather for 10-20 minutes and the servo “falls asleep”. Although the battery has not sat down yet.
Repair: We disassemble the servo, take out the scarf. We examine the conductive paths and parts for oxide. It looks like a whitish coating, or like particles of green or dark blue salt crystals. We take white spirit and a toothbrush and remove these electrolysis deposits. After that, dry.
Symptom 4: The remote control is turned on, turn on the board. For example, we press the gas smoothly, the servo moves and at some point, reaching a certain place, it fails.
Repair: Inside the servo is a potentiometer. It provides feedback. That is, when the servo turns the rocker (rocker), the slider sliding along the graphite track turns in the potentiometer. The resistance of the potentiometer changes, the circuit analyzes the movements, etc. Since the potentiometer is not sealed in all servos, water (moisture, ice already in the cold), sand, dirt, etc. can get into it. a change in its resistance will become incomprehensible to the circuit. Hence the failure. You can dry the servo - if it is from moisture, the malfunction will be eliminated. If drying does not help, dirt may have got in. Then there is a possibility that the graphite layer in the potentiometer has worn out and needs to be replaced. You can wash the potentiometer if there are holes in it. Then dry and lubricate by dropping silicone oil (for example, shock absorber) into the inside. You can even check the potentiometer with a cheap tester that costs like a pack of cigarettes. We switch the tester to resistance mode, connect the middle and outer legs of the potentiometer, turn the potentiometer smoothly and look at the tester. The tester should show a smooth change in resistance without any jerks. If there are dips, then the potentiometer is faulty .
Guys, tell me.. I got a servo (bitch!) engine .. which wants to start and wants to stop. (tag photo below). If it doesn’t start, the keys fly .. sad ..
Its 3 windings are switched by a servo drive with a corresponding shift of 0 V, 180 V, 310 V, 180 V, etc. - the corresponding “large step” “sinusoid”.
They started it separately from the drive, through load lamps of 2 kW each. in each of the 3 phases of 220 V. It happens that it starts - it spins .. the lamps burn dimly. And sometimes it doesn’t start, all the lamps burn at full heat. The current is correspondingly greater. "Manually" push - also does not spin .. Leave it off for a few minutes - it will start again ..
They say it is advisable not to disassemble in order to “study” how it works there ..
Can anyone come across such a "bitch" .. Tell me .. what can be done with it, except to throw it away ..
After long and repeated promises to myself and everyone around me, I will finally tell you how to upgrade a servo machine and turn it into an ubermotor. The advantages are obvious - a gear motor that can be connected directly to the MK without any drivers is cool! And if a servo with bearings, and even metal gears, that's great =)
Excuses Some serv rework actions are irreversible and can only be called vandalism. You can repeat everything that is described below, but at your own peril and risk. If, as a result of your actions, your top branded, titanium-carbot, super-intelligent, inertialess, hand-made servo servo for a hundred dollars dies irrevocably, we have nothing to do with it 😉 Also pay attention - the servo gears are quite thickly smeared with grease - you should not disassemble them in a snow-white shirt and on a velvet sofa.
So, intimidated, now, to calm down, a little theory =) Serva, as we remember, is controlled by pulses of variable width - they set the angle by which the output shaft should turn (say, the narrowest - all the way to the left, the widest - all the way to the right). The current position of the shaft is read by the brains of the servo from the potentiometer, which is connected with its engine to the output shaft. Moreover, the greater the difference between the current and the given angles, the faster the shaft will jerk in the right direction. It is in this place that the variety of possible alteration options is buried. If we "mislead the servo" =) - we disconnect the potentiometer and the shaft, and make it be assumed that the potentiometer's slider is at the midpoint, then we can control the speed and direction of rotation. And just one signal wire! Now the pulses corresponding to the middle position of the output shaft are zero speed, the wider (from the “zero” width) the faster the rotation to the right, the narrower (from the “zero” width) the faster the rotation to the left.
This implies one important property of constant rotation servos - they they cannot turn at a certain angle, a strictly defined number of revolutions rotates, etc.(after all, we removed the feedback ourselves) - this is, in general, not a servo anymore, but a gear motor with a built-in driver.
All these alterations have a couple of drawbacks: First - the complexity of setting the zero point - fine tuning is required Secondly, a very narrow adjustment range - a rather small change in the pulse width causes a rather large change in speed (see video). The range can be extended programmatically - you just need to keep in mind that the range of pulse width adjustment (from full clockwise to full counterclockwise travel) of the converted servo corresponds to 80-140 degrees (in AduinoIDE, Servo library). for example, in the knob sketch, it is enough to change the line: on the and everything becomes much more fun =) And about the coarsening of the midpoint and other soldering alterations, I will tell you next time.
Group: Users Posts: 19 Registration: 29.10.2007 From: Moscow Region User No: 881
Dear CNC Gurus, please help Recently I came across two drives with OS 4 Brushes are connected in parallel, that is, it is powered like a regular DC motor (it spins with a bang) at the end in a metal glass, an optical encoder (5 pins) is hidden and rotating disk with notches pitch approximately: 3 notches per 1 mm
I learned how to turn steppers, but with this servo motors, an ambush someone suggested that it can be moved “in steps” with the help of PWM, as well as a stepper motor and track the position using the encoder but nothing smart comes to mind from the schemes
who came across a small diagram or a link where to read about this miracle and how to manage it I know a little about electronics
In the future, screw these two motors onto a homemade router for milling plastic wood, PP
The PLC hacked, the protection there turned out to be not even childish - idiotic, the password went from the PLC to the computer in clear text and checked with the one already entered in the software. So the RS232 sniffer is our everything 🙂 I chopped cabbage and decided to spend it somewhere. caught my eye servo HS-311. So I bought it to show what kind of animal it is.
Serva is the cornerstone of RC model mechanics and, more recently, home robotics. It is a small unit with a motor, gearbox and control circuit. A power and control signal is supplied to the input of the servo machine, which sets the angle at which the servo shaft must be set.
Basically, all control here is standardized (if there are RCs here, can you add your five cents?) And servos, for the most part, differ in shaft force, speed, control accuracy, dimensions, weight and gear material. The price ranges from 200-300 rubles for the cheapest and to infinity for ultra-megatechnological devices. As in any fan area, the upper price bar is not limited here, and probably some perforated titanium gears and carbon cases with feedback through a million-pulse optical encoder are used under the ceiling =) In general, you can always measure something.
I did not show off and took so far the cheapest, most common HS-311. Especially since I already have plans to remake it.
Characteristics of HS-311
Shaft torque: 3kg*cm
Dimensions: 41x20x37mm
Weight: 44.5 gr
Speed of rotation of a shaft on 60 degrees: 0.19 sec
Impulse control
Price: 350-450r
I don’t really need the servo itself, but the gearbox from it will do just fine. Moreover, I saw an UpgradeKit for it with metal gears 🙂 However, plastic will do for my tasks.
Constructive: First of all, I took it apart - since childhood I have had such a habit of smoking new toys. The case is about the size of a matchbox, a little thicker.
If you unscrew the screw from the axle, then the wheel is removed and it becomes clear that the shaft is serrated - it will not scroll.
If you unscrew the four screws, you can remove the gearbox cover:
As you can see, there is a four-stage cylindrical gearbox. Gear ratio will not say, but large.
After removing the bottom cover, you can see the control board:
You can see four transistors forming an H-bridge that allows you to reverse the engine and the logic chip. Mikruha, by the way, their development. So you can find the datasheet for it. It was not possible to disassemble further. The engine seems to be glued in there, and the board is made of such shitty getinaks that I almost broke it in half when I tried to pick it out. Since it was not part of my plans to finally break the native logic, I did not invade the engine compartment. Moreover, there is nothing interesting there.
If you remove all the gears, you can see the shaft of the position feedback resistor:
An approximate construct can be seen in the diagram that I quickly sketched here:
The output shaft is tightly connected to the shaft of the variable feedback resistor. Therefore, the server always knows in what position it is at the moment. Of the minuses - the inability to make a full turn. For example, this one can turn the shaft no more than 180 degrees. However, you can break the limit stop, and turn the resistor into an encoder by surgical intervention (who was outraged that the idea of an encoder from a resistor is useless? 😉 Try to pick up an encoder exactly so that it stands instead of a servo one?) In this case, of course, you will have to throw away the native board, but We're not looking for easy ways, are we? In general, I will soon upgrade this device and turn the servo machine into a servo motor.
Control: Everything is clear with the constructive, now about how to steer this beast. There are three wires sticking out of the servo. Ground (black), Power supply 5 volts (red) and signal (yellow or white).
Her control is impulse, via a signal wire. In order to turn the servo to the desired angle, it needs to apply a pulse with the desired duration to the input.
0.8ms is about 0 degrees, extreme left. 2.3ms is about 170 degrees - far right. 1.5ms is the middle position. The manufacturer recommends giving 20ms between pulses. But this is not critical and the machine can be overclocked.
Control logic operation How does management work? Yes, simple! When a pulse arrives at the input, it starts the single vibrator inside the servo with its leading edge. A single vibrator is a unit that produces one pulse of a given duration along a triggering edge. The duration of this internal pulse depends solely on the position of the variable resistor, i.e. from the current position of the output shaft.
Further, these two impulses are compared on the dumbest logic. If the external pulse is shorter than the internal one, then this difference will go to the motor in one polarity. If the external pulse is longer than the internal one, then the feed polarity to the engine will be different. Under the action of one pulse, the engine will twitch in the direction of decreasing the difference. And since the pulses go often (20ms between each), then a kind of PWM goes to the dviglo. And the greater the difference between the task and the current position, the greater the fill factor and the engine more actively seeks to eliminate this difference. As a result, when the driving and internal pulses are equal in duration, the engine will either stop or, more likely, because the circuit is not ideal - the variable resistor rattles, so there will be no perfect equality, it will begin to "scour". Trembling to one side or the other. The more dead the resistor or the worse the driving pulses, the greater these yaws.
In the picture, I depicted two cases when the setting pulse is longer than the internal one and when it is shorter. And below he showed how the signal looks on the engine when reaching a given point. This is, in fact, a classic case of proportional control.
The pulse repetition rate determines the speed with which the servo will rotate the shaft. The minimum interval above which the speed stops increasing, and the chatter increases is about 5-8ms. Below 20ms, the servo becomes thoughtfully sluggish. IMHO the optimal pause is about 10-15ms.
In order to play with a sim device, I quickly threw a program on my Mega16 core. It was true that I could not calculate the full range from 0.8 to 2.3. Calculated for 1 ... 2 ms pulse. It's about 100 degrees.
Everything is done on RTOS, so I will only describe interrupts and tasks.
The task of scanning the ADC - once every 10ms, it starts the ADC for conversion. Of course, it would be possible to do Freerunning mode (continuous conversion mode), but I did not want the MK to twitch every few microseconds to interrupt.
After long and repeated promises to myself and everyone around me, I will finally tell you how to upgrade a servo machine and turn it into an ubermotor. The advantages are obvious - a gear motor that can be connected directly to the MK without any drivers is cool! And if a servo with bearings, and even metal gears, that's great =)
Excuses Some serv rework actions are irreversible and can only be called vandalism. You can repeat everything that is described below, but at your own peril and risk. If, as a result of your actions, your top branded, titanium-carbot, super-intelligent, inertialess, hand-made servo servo for a hundred dollars dies irrevocably, we have nothing to do with it 😉 Also pay attention - the servo gears are quite thickly smeared with grease - you should not disassemble them in a snow-white shirt and on a velvet sofa.
So, intimidated, now, to calm down, a little theory =) Serva, as we remember, is controlled by pulses of variable width - they set the angle by which the output shaft should turn (say, the narrowest - all the way to the left, the widest - all the way to the right). The current position of the shaft is read by the brains of the servo from the potentiometer, which is connected with its engine to the output shaft. Moreover, the greater the difference between the current and the given angles, the faster the shaft will jerk in the right direction. It is in this place that the variety of possible alteration options is buried. If we "mislead the servo" =) - we disconnect the potentiometer and the shaft, and make it be assumed that the potentiometer's slider is at the midpoint, then we can control the speed and direction of rotation. And just one signal wire! Now the pulses corresponding to the middle position of the output shaft are zero speed, the wider (from the “zero” width) the faster the rotation to the right, the narrower (from the “zero” width) the faster the rotation to the left.
This implies one important property of constant rotation servos - they they cannot turn at a certain angle, a strictly defined number of revolutions rotates, etc.(after all, we removed the feedback ourselves) - this is, in general, not a servo anymore, but a gear motor with a built-in driver.
Video (click to play).
All these alterations have a couple of drawbacks: First - the complexity of setting the zero point - fine tuning is required Secondly, a very narrow adjustment range - a rather small change in the pulse width causes a rather large change in speed (see video). The range can be extended programmatically - you just need to keep in mind that the range of pulse width adjustment (from full clockwise to full counterclockwise travel) of the converted servo corresponds to 80-140 degrees (in AduinoIDE, Servo library). for example, in the knob sketch, it is enough to change the line: on the and everything becomes much more fun =) And about the coarsening of the midpoint and other soldering alterations, I will tell you next time.