Digital v Analogue

Problems, experiences or just something to say about RC gear? Say it here.

Digital v Analogue

Postby SailServo » Fri Jan 20, 2012 12:00 am

Digital signals are a pulses of a constant voltage (0 or 5v) for a given period creating an on/off digital signal.
In an analogue signal, the voltage fluctuates giving a wave form signal. This wave can be made square, fluctuating above and below zero. If you add a constant carrier wave equal to half the total height of the square wave, you now have a digital signal giving 5v 0n or 0v Off pulses. This is called a Digital over Analogue signal.

I have been carrying out tests on Digital and Analogue Sail Drum Servos using Spectrum Dx5e/ar500, Stix 27hz, GWS tester and a DIY tester. All receivers can control both Digital and Analogue servos.
Is the signal coming from the receiver Analogue or Digital?


I am teaching myself to programme a microprocessor IC to control a large motor from an R/C receiver input. In my case, the joystick will control speed and direction of the motor but not the number of turns/position.

You cannot drive the motor directly from the IC due to voltage/current. A standard H-Bridge Driver IC is put between the microprocessor and motor and it is the digital signal between them that Manufacturers are calling “Digital”.
This signal is at 50Hz (10ms) for standard servos and 300Hz (1.65ms) for Digital. So Digital servos should actually be called Hi Resolution as they are 6 times faster.

All Servos are Analogue with Hi and Low Res versions.

See my full article on http://www.sailservo.co.uk/digital.html

I am I correct or is it all bo...cks?

Can anybody explain this odd effect?
I can use a servo stretcher with an analogue servo but not with a digital servo as it twitches wildly.
SailServo
 
Posts: 6
Joined: Thu Jan 19, 2012 5:48 pm

Re: Digital v Analogue

Postby RCModelReviews » Fri Jan 20, 2012 4:12 am

The signal coming from the receiver is classified as a digital PWM (pulse-width modulated) signal.

The old PPM standard is for a 20mS frame rate (ie: the gap between successive pulses to the same servo/channel).

Digital servos are not necessarily higher resolution simply because they have a higher update rate -- the resolution is determined by the amount of deadband (the minimum change in pulse width that will cause the motor to be driven from its current position) built into the system.

You should scope the output of the pulse-stretcher to see what's happening.

In theory, unless stated otherwise, all commercial servos will expect a pulse of between 1mS and 2mS that repeats every 20mS. Sending a pulse train that is outside these parameters can cause unpredictable results.
RCModelReviews.com, just the facts.
User avatar
RCModelReviews
 
Posts: 2120
Joined: Tue May 04, 2010 3:40 am

Re: Digital v Analogue

Postby BillGriffiths100 » Fri Jan 20, 2012 4:12 pm

You might save yourself a lot of trouble by using a reversing speed controller for brushed motors such as:

www.mtroniks.net/details1.asp/ProductID ... rine20.htm
Compromising with out of control government is like living with a lion, sooner or later the bloody thing will eat you .

You accept the tyranny of the state when it's not being applied to you, when it is: it's too late.
User avatar
BillGriffiths100
 
Posts: 553
Joined: Mon Sep 20, 2010 2:04 pm
Location: London UK

All Servos are Digital

Postby SailServo » Sat Jan 21, 2012 6:37 pm

Thank you for your reply but you did not answer my fundamental question that a servo is either Analog or Digital but not both.

My comments are related to sail drum servos which introduce a set of parameters that are outside the original servo designer’s intentions.
In teaching electronics I always start with Input ---- Process ---- Output


Input
Let us agree that the input from the receiver to the servo is a Digital PWM signal (1)

All Manufacturers fail to specify their receiver’s output. (voltage & current)
After much hassle, for Spectrum ar500 - UK says 1.0 to 2.0ms, US says 1.1 to 1.9ms, My tests give 1.03 to 1.77ms (GWS tester MT1)

Some servo manufacturers give their required input
CYS/Eurgle 0.8 – 2.0ms
Robbie/Futaba 0.9 – 2.1ms
Graupner/Hitec 1.1 – 1.9ms

My own DIY servo tester can output from 0.2 to 3.0ms. I can get the Hitec 785 to rotate 8 turns and run continuously in both directions.

Action Electronics Servo Morph P96 tests with Hitec 785 sail drum servo give sheet travel to be:
Spectrum receiver 430mm and with Morph 60 – 750mm
Stix receiver 520mm and with Morph 60 – 885mm

1. All servos are Digital


Output
a. Motor direction
To swap the +ve and –ve feeds to change motor direction is achieved by using four power transistors in an H-Bridge format. All it requires to change direction is a low voltage signal from the processor. This signal is Digital as it is On (forwards) or Off (reverse).

2. All servos are Digital

b. Motor speed
A series of fully On and fully Off pulses of power are fed to the motor through the H-Bridge. As they are On and Off pulses they are Digital (2)

The pulse width for an “Analog” servo is 10ms and for a “Digital” servo is 1,65ms

3. All servos are Digital


Processor
The microprocessor converts the input signal representing the joystick’s position into a number. (numbers given below are examples)

Between 1480 to 1520 is a deadband where nothing will happen and the sail drum is in its central position

If the joystick is pushed forwards and the number is over 1520, it tells the H-Bridge to make the motor turn forwards. Below 1480 = reverse.

If the joystick is moved half forwards, the input signal goes to 1700.
The output shaft/drum is connected to a variable resistor which sends a voltage to the microprocessor denoting its position. This signal is converted to a number and when it matches the joystick input number the motor stops. This is called Feedback.

The wind force on the sail is continually varying especially if the boat is being rotated by wave action.
The last thing we want is sensitive feedback continually telling the motor to turn forwards then backwards. This is called “Hunting” which consumes a lot of power and damages servos.
At this point we add a line of code which says if the number moves by plus or minus 10 then do not move the motor. This is called the deadband. For sailing 7us is not unusual. Helis use 0us

4. All servos are Digital

My argument is that all servos are Digital, the only difference being the frequency of the power pulses to the motor.
The difference should be called Hifi and Lofi as this will give real consumer meaning to the difference allowing them to make a reasoned purchase choice.


All Servos are Digital. Do you agree with my logic?

Tony


Citation
1.
In a nutshell, PWM is a way of digitally encoding analog signal levels. Through the use of high-resolution counters, the duty cycle of a square wave is modulated to encode a specific analog signal level. The PWM signal is still digital because, at any given instant of time, the full DC supply is either fully on or fully off.

2.
The voltage or current source is supplied to the analog load by means of a repeating series of on and off pulses. The on-time is the time during which the DC supply is applied to the load, and the off-time is the period during which that supply is switched off. Given a sufficient bandwidth, any analog value can be encoded with PWM.

Barr, Michael. "Pulse Width Modulation," Embedded Systems Programming, September 2001, pp. 103-104.
SailServo
 
Posts: 6
Joined: Thu Jan 19, 2012 5:48 pm

Re: Digital v Analogue

Postby Allan Warner » Sat Jan 21, 2012 8:07 pm

SS,
If I understand you correctly it would seem to me that you have a slight misconception of how, what we RC'ers call, 'analogue' servos work. Please excuse me if I am teaching my grandmother to suck eggs here;
The Rx decoder outputs, on the various channel o/p's of the Rx, pulses that can vary in width between 1 and 2 mili seconds with the centre being 1.5. The width of the pulse, which varies in an analogue way, is related to the Tx stick position for that channel. Known as Pulse Width Modulation. A 'frame ' of information consists of the number of channel pulses plus a longer pulse to re-set the decoder. The frame repetition rate (update of information relating to stick position) is at 50c/s (frame rate timing 20 mili secs). Full title for this system Pulse Width Time Division Modulation. (please excuse the terminology as the passing years mean all this was many decades back for me)
Taking one channel as an example: a pulse of between 1 to 2 mili seconds (which varies in width in an analogue way) and whos width is updated at the frame rate of 50c/s (every 20 m/s) is feed to the input of a servo. This pulse triggers the servos internal pulse generator to generate a pulse of opposite polarity to the incoming pulse. The width of the internally generated pulse is determined by the position of the feed back pot which is linked directly to the servo mechanical o/p. These two pulses are then feed to a suming junction - both the same width but opposite polarity = no o/p. If one should be wider than the other then there will be an o/p the polarity of which depends on which pulse is wider. If the difference is small (there is a small variable degree of pulse stretching applied) then the signal to the o/p bridge driving the servo motor will be pulsed causing the correct polarity of pulsed DC being feed to the servo motor to drive the o/p to a postion that causes the feed back pot/internal pulse generator to match the width of the incoming pulse. If the difference is over a predetermined amount then the o/p to the bridge will cause the bridge o/p to be fully switched on with no pulsing. As the servo nears the position of matching both pulses the bridge o/p will go back to a pulsed o/p allowing the servo to slow down and reach the desired position without overshoot. Along with the deadband, if correctly designed for the mechanical characteristics of the servo, this gives a servo without overshoot(bounce) and hunting that moves rapidly to the desired position. There are no micro processors in 'analogue' servos.
Therefore IMHO what we describe as an 'analogue' servo would more correctly be described as an 'analogue digital hybrid'
Allan Warner
 
Posts: 46
Joined: Tue Aug 24, 2010 9:45 pm

Re: Digital v Analogue

Postby BillGriffiths100 » Sun Jan 22, 2012 11:34 am

Allans description of the analogue servo is very good, the analogue part comes from that pulse stretching which uses capacitive charging /discharging to estimate the drive to the servo bridge. It only started to be called an analogue servo after the advent of the digital servo.
Previously an analogue servo would have been drive electronics which responded to a varying DC voltage presented to its input, driving its output to the appropriate position.
A digital servo looks at the incoming pulse width, with a counter, and compares it to the reading from the feed back pot measured using a d/a, it then uses algorithms to estimate supply drive pulses to the drive bridge depending on how far and fast it is required to move the output. A digital servo can apply a full burst of current in the area where the analogue servo would be applying a smaller one as it approaches its destination, hence the digital servo is faster. The constant high speed buzzing of the digital servo is caused as it overshoots in both directions slightly, this leads to its high current consumption even under no load!
My suggestion for a sail winch if that's what you want to make?! using a speed controller is a ready made solution. Just gear down a powerful electric motor and apply it to the winch using a reversible speed controller with a bit of end stop switching added.
Or do you want to give a lecture on making one I'm confused?
Compromising with out of control government is like living with a lion, sooner or later the bloody thing will eat you .

You accept the tyranny of the state when it's not being applied to you, when it is: it's too late.
User avatar
BillGriffiths100
 
Posts: 553
Joined: Mon Sep 20, 2010 2:04 pm
Location: London UK

Re: Digital v Analogue

Postby SailServo » Sun Jan 22, 2012 7:04 pm

Thanks Allan & Bill.

This is the first time I have found an explanation as to the differences between Analog and Digital servos. I have spent hours searching. My DIY servo tester uses a 555 timer.
This goes some way to explain why a servo stretcher will not work with a digital servo without twitching even though the input signal is the same for Analog and Digital servos.

Examples of Bill’s suggestion of using a geared motor and an ESC can be found on my website http://www.joilebrisemodels.co.uk/tenth/winch.html
Videos of my many attempts.

One problem with geared motors is that they cannot hold a load with the power turned off. I have tried using a Meccano Worm gear to stop the shaft turning but it quickly wore out. I need to pull a 7kg sheet load from my main and top sail.

My research into sail drum servos has shown up that manufacturer’s specifications are inaccurate. Hitec 785 says stall torque is 13kg.cm, standing 10.5 but the best I can achieve is 9kg.cm at near stall. I tested 30 servos (8 types, 4 suppliers) and not one achieved their quoted specs. Speeds were no better.

Thanks again for all your help.

Tony
SailServo
 
Posts: 6
Joined: Thu Jan 19, 2012 5:48 pm

Re: Digital v Analogue

Postby BillGriffiths100 » Sun Jan 22, 2012 7:49 pm

""problem with geared motors is that they cannot hold a load with the power turned off. I have tried using a Meccano Worm gear to stop the shaft turning but it quickly wore out. I need to pull a 7kg sheet load from my main and top sail.""
Using a worm gear seems pretty sensible larger ones are available try searching the net e.g.:
www.qtcgears.com/RFQ/WormGears.htm
Could you use the worm gear or another gear or a double pronged pawl as a lock, fixed and on a pivoting arm pushed in by another servo or spring and solenoid?
Sorry you may have tried this but currently I can't access your website.
Compromising with out of control government is like living with a lion, sooner or later the bloody thing will eat you .

You accept the tyranny of the state when it's not being applied to you, when it is: it's too late.
User avatar
BillGriffiths100
 
Posts: 553
Joined: Mon Sep 20, 2010 2:04 pm
Location: London UK

Re: Digital v Analogue

Postby SailServo » Sun Jan 22, 2012 8:45 pm

SailServo
 
Posts: 6
Joined: Thu Jan 19, 2012 5:48 pm

Re: Digital v Analogue

Postby BillGriffiths100 » Mon Jan 23, 2012 9:09 am

OK,
I've seen your website.
Now I understand your need to understand!
I'm impressed by the number of prototypes you've been through!
It looks as though you're near cracking it now.
Regards,
Bill.
Compromising with out of control government is like living with a lion, sooner or later the bloody thing will eat you .

You accept the tyranny of the state when it's not being applied to you, when it is: it's too late.
User avatar
BillGriffiths100
 
Posts: 553
Joined: Mon Sep 20, 2010 2:04 pm
Location: London UK

Next

Return to Radios and Servos

Who is online

Users browsing this forum: No registered users and 1 guest

cron