Servo basics

I'm fairly new to servos.

I see that they come in two basic types: continuous rotation (their speed of rotation is determined by the pulse width) and fixed travel (usually 180 degrees, sometimes a bit more).

They come in various standard (not sure how standard these actually are) sizes - micro, sub-micro, standard.

And they can have plastic or metal gears.

What else should one be aware of? I have an application in which I'd like reasonable accuracy and precision, and for a 5-degree command (say) to have a 5-degree output.

I've been fooling around with a pair of HiTec HS-55s - they're OK, but they are not what I'd call precise. One of them also takes the slightest excuse not to respond (possibly my abuse has damaged it).

If I wanted something stronger and more accurate, and don't need more speed, what sort of thing should I be looking at?

Thanks,

Daniele

Reply to
D.M. Procida
Loading thread data ...

Is there a reason you chose a servo motor?

I've always preferred stepper motors. They are far less finicky and very precise. If the step size is too great, you simply gear it down.

--
W J G
Reply to
Folderol

...

...

as this is Raspberry newsgroup I would also be interested which controller you use for these steppers.

There are simple and cheap controllers for servos (e.g. a 16-channel conroller for ca. $10) and I think it is far more expensive to use steppers for several axes, like a robot arm (6 axis).

And how do you program the stepper controllers?

TIA, Gerhard

--
 Gerhard Reithofer - Techn. EDV Reithofer - http://www.tech-edv.co.at
Reply to
Gerhard Reithofer

Mainly that I happen to have a couple of servo motors already, and GpioZero and MicroPython can drive them directly.

Daniele

Reply to
D.M. Procida

On Fri, 21 Dec 2018 22:05:30 +0000, Folderol wrote in :

I'll second that, unless there is a compelling reason to use a servo. I was programming stepper motors with National SC/MP-1 micros back in '78; they should be a doddle with all the outputs available on a Pi. ISTR that the motors we used had 4 states, defined by two digital outputs, and using shift registers I could step the motors backward and forwards by cycling through these states. We also had a need to increase the power to start moving the motors (controlling the point of view in a two-axis periscope investigating upper-atmosphere airglow in Antarctica...) so a third output boosted the applied voltage (from 5 V to 12 V ?) for a predetermined number of steps at the start of any one movement.

--
                  Ivan Reid (ivan.reid@[brunel.ac.uk|cern.ch]) 
Engineering, Design & Physical Sciences                CMS Collaboration, 
 Click to see the full signature
Reply to
Ivan D. Reid

I know nothing about these rotation except that they may be intended for use on models that require a winch, e.g. ships/yachts and all-terrain vehicles.

These are intended to operate control surfaces, throttles, etc on models to move things that have a fixed travel and need to have consistent positioning for a given signal. The signal is analogue, a constant height pulse train at about 50 Hz where the pulse width determines the servo position and is normally 1mS to 2ms wide. They all use three-wire connections (ground, +ve and control signal) but the plugs and pin assignments may still be manufacturer-specific, so check. Same for operating voltage, originally a nominal 5v to suit a 4 cell NoCd stack, though now most will be happy on a single Li-ion cell (3.7-4.2v).

These servos were originally developed for radio-control model aircraft and originally were not mix and match between manufacturers who sold complete systems, Now that servos are frequently made independently of receivers and transmitters, their connections, voltages and pulse widths have become a lot more standardised.

Also be aware that in this application (moving rudders, elevators and ailerons), while accurate positioning under fairly light loads is important, the ability of a servo to apply a controllable force can at least important as precise positioning.

That depends mostly on the speed and size of model the servo was designed for: sub-micro servos are used for slow, light indoor models, micro for small outdoor models (park fliers, F3K gliders) and standard servos for 'Sport' RC models, typically 1-5kg and with a 2.5-10cc IC motor or equivalent electric motor (i.e 0.25 - 1.5 hp).

Plastic equals light and cheap, not very durable, but less positioning accuracy. Metal is used in competition models where positioning accuracy is important for both very fast models and for aerobatic competition models. Metal gears are also a lot more vibration-resistant, so I'd be surprised to see plastic gears used on helicopters unless they are very small and light, i.e indoor models or park flyers.

You match any servo to what it will be used for and pay accordingly.

The amount of torque you require. The higher the load the servo must work against, the more torque it must output, both to move the control and then to hold it stationary against external loads: remember that the load on a control surface varies as the square of airspeed and, to a first approximation, is proportional to model weight, IOW a 200mph pylon racer with a piped racing 8cc motor is going to need high torque, metal geared servos while a light-weight sheet foam indoor aerobatic model wants the smallest, lightest servos you can find while retaining good accuracy.

If you use servos, your program and hardware needs to be capable of generating accurate pulse widths that can resolve at least 100 steps across the 1 - 2 mS pulse width range. The accuracy of the pulse width determines the positional accuracy of the servo.

If this isn't a good match for your requirements, consider using geared stepper motors, with or without a gray-scale for measuring the motor's current position rather than keeping book on steps taken in either direction from a known starting position.

Cheap and cheerful: intended for use on small, fairly slow and light outdoor foamies: IOW 'park flyers'. 'Foamie' means the model's body and flying surfaces are solid blocks of lightweight moulded plastic foam. This is the sort of stuff used to package printers, laptops, etc. It will have holes moulded in the body to take batteries, motor, receiver and servos.

Think about:

- the loads the servo has to work against without stalling. High loads mean a bigger servo with a more powerful motor and metal gears and less accurate positioning when working against an external load.

- vibration. Use metal rather than plastic gears if there's usually vibration.

- space available for the servo. Small space, vibration, and high loads mean small, powerful servos with metal bodies and gears. These ain't cheap. Lots of space and no vibration may mean that a physically big, cheaper plastic geared servo can be used. That said, you may be able to use something like the HS-55 for prototyping and program development and only swap in more expensive/ specialised servos at the end.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

The stepper motor controllers like this one:

formatting link
typically use a few GPIOs for STEP, DIRECTION and so on.

The CNC folks typically have multi axis stepper controllers with support for limit switches, spindle control etc:

formatting link

There's a variety of firmware for running such controllers on Arduino and similar, doing closed loop control.

Theo

Reply to
Theo

Thru experience, it's alot easier to move a servo to an exact angle, than a stepper. I never saw a stepper with 360 steps/rev. I use servos for antenna pattern testing. That said, different servos have different PID loops. I've had some oscilate while settling to an angle, while others didn't. Some a programmable.

Reply to
4ctestsystems

Alternatively, think about simple sensor feedback for the position.

Reply to
A. Dumas

###>>>>> "as this is Raspberry newsgroup"

Reply to
A. Dumas

It seems that here is a mix-up with the word 'servo'. The OP seems to use it in the model airplane/ship/car sense, where there is a small motor with gearbox and actuator.

The industrial idea of 'servo' is a DC motor with position or velocity feedback. This is the thing used in similar places as stepper motors.

--

-TV
Reply to
Tauno Voipio

...

Sounds interesting, but how do I controll these shields with a raspberry?

--
 Gerhard Reithofer - Techn. EDV Reithofer - http://www.tech-edv.co.at
Reply to
Gerhard Reithofer

Reply to
Theo

Using Arduino firmware like Grbl:

formatting link
or other G-Code interpreters
formatting link

I've used a TinyG which is a fork of Grbl (and comes with its own Atmega on the board - but more expensive):

formatting link

You typically connect over a (USB) serial port and send them G-Code for positioning movements.

Theo

Reply to
Theo

Reply to
Folderol

On a sunny day (Sat, 22 Dec 2018 11:38:04 +0000) it happened Folderol wrote in :

Indeed, here raspi driving a stepper via GPIO, uses an ebay stepper motor driver:

formatting link
More info:
formatting link

But I changed to a Microchip PIC in a separate box doing the stepping. is connected via ethernet to the raspberry:

formatting link

For RC type servos I have some PIC code on my site. Not a good idea to directly drive that from a raspberry, timing is problematic, but driving a PIC via RS232 works (PIC asm):

formatting link

Reply to
Jan Panteltje

270 degrees actually.

Mmm. Most RC transmitters have non linear lookup tables so that is almost impossible to achive.

I would try a quality metal geared servo, of soem size, as some have twin gears spring loaded together to minimise backlash.

And asking somewhere else.

Like the RCgroups international forum which has a spot dedicated to servos.

formatting link

Cost nothing to register and post.

Mm. I used thema lot - and there are a lot of fake ones out there - for light weight but precision they are not. Try something with a bigger pot in it like and HS85MG or somesuch]

First go bigger. Then look for moulded carbon track pots. Also some 'digital' servos are better than the so called analogue ones for resolution (both are a mixture of both, but that's marketing).

--
Renewable energy: Expensive solutions that don't work to a problem that  
doesn't exist instituted by self legalising protection rackets that  
 Click to see the full signature
Reply to
The Natural Philosopher

Well the average nodel servo gets a pulse every 50ms so its hardly gonna kill a Pi.

--
?it should be clear by now to everyone that activist environmentalism  
(or environmental activism) is becoming a general ideology about humans,  
 Click to see the full signature
Reply to
The Natural Philosopher

True, but since Linux isn't an RTOS you can't rule out jitter. A loop like:

while(running) sleep 49 mS set output pin high wait pulselength /* 1-2 mS */ set output pin low

can be pre-empted during the sleep, so the 50mS cycle time isn't guaranteed and it can also be pre-empted during the wait while the signal is high. While cycle length jitter probably isn't an issue, pre-emption while the pulse is being output certainly is because it is guaranteed to make the servo jitter.

If Linux had the same task scheduling capability as a dedicated RTOS such as OS/9 this would not be an issue, but its task scheduler is surprisingly basic. Fortunately there's another easy and cheap solution: export servo management to an 8 pin PICAXE-08M2 chip.

PICAXEs have built-in firmware for servo management. To move the servo you just write a byte setting the required servo position to the port connected to the servo and the firmware does the rest. PICAXE-08M2 chips

on an RPi prototyping expansion board would be very easy. As a bonus, the PICAXE cross compiler, needed for its 'integer BASIC' programming language, can be run on an RPi and the PICAXE basic source files can be edited with your favourite editor and put under version control like any other source file. I have a copy of the PICAXE compiler installed and working on my RPi. The only difference from what I described above is that my PICAXE chip is on a separate PICAXE proto board and connected to the RPi via their AXE027 USB-serial adapter.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Indeed, but isnt there some interrupt driven PWM thing? I seem to remember reading that there was...

--
When plunder becomes a way of life for a group of men in a society, over  
the course of time they create for themselves a legal system that  
 Click to see the full signature
Reply to
The Natural Philosopher

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.