This is only a preview of the December 1997 issue of Silicon Chip. You can view 30 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Build A Speed Alarm For Your Car":
Articles in this series:
Items relevant to "Loudness Control For Car Hifi Systems":
Items relevant to "Stepper Motor Driver With Onboard Buffer":
Articles in this series:
Items relevant to "Power Supply For Stepper Motor Cards":
Purchase a printed copy of this issue for $10.00. |
RADIO CONTROL
BY BOB YOUNG
How servo pulses are transmitted
This month we take a look at the method of
transmitting servo pulses using pulse
position modulation. This is another form of
serial data transmission except that it is via
a radio carrier instead of two wires, as used
for computer data.
Last month, we established the
basic parameters for the input pulse
used in a typical R/C servo. Fig.1, reprinted from last month, details these
parameters. This pulse must appear
at the input for each servo used in the
R/C system and hence an 8-channel
system will have eight pulses in the
data stream.
Last month we also established that
the servo works with a modulated
width input pulse. If the pulse is
wider than 1.5ms, the servo will move
clockwise with respect to the neutral
position and if it is narrower than
1.5ms it will move anticlockwise.
More particularly, while it was
not stated last month, the servo’s
final position, after it has settled, is
proportional to the position of the
trailing edge of the input pulse. Now
the problem with serial transmission
of this form of pulse is that there must
be some form of identification of the
position of the leading and trailing
edges of each pulse.
This is at complete odds with normal serial data transmission in which
a sample is taken to establish whether
the bit is high or low. The edges of the
pulse play no part in the usual form
of serial data transmission. Thus, for
example, we could have a situation
where all eight data bits are high and
all we would see on an oscilloscope
would be a solid high block (pulse)
eight bits long with no gaps to identify
the start and finish of each individual
pulse (or bit).
An additional complication is the
fact that the trailing edge is not fixed
and may vary between 1-2ms after the
leading edge. Therefore if we are to
serially transmit eight width modu
lated pulses, we need to separate each
pulse with a marker pulse. So how do
we transmit this form of data quickly
enough to keep the servo response
Fig.1: typical input pulse parameters for an R/C servo. This
pulse must appear at the input for each servo used in an R/C
system.
76 Silicon Chip
times as low as possible, so as not
to intro
duce delays in the control
response?
It is here that the cleverness of the
two NASA engineers who designed
the original digital proportional
system really shows through. Doug
Spreng and Don Mathers in the early
1960s not only designed a very clever
servo system, they also designed a
most efficient form of serial data transmission. There are no wasted pauses
or periods in their system. Depending
upon the number of channels in the
system, one complete frame can be
transmitted in as little as 14-25ms.
The formula for frame rate is:
FR = ((X x 2) + 6))ms
where X = the number of channels
while the “6” is the sync pause in
milliseconds. Thus the frame rate for
a 24-channel system would be 24 x 2
+ 6 = 54ms. This is about as slow as
the system can run because the pulse
stretchers in the servos can not hold
the charge for much longer. Also the
delay in response time starts to become noticeable after this.
It is difficult for the modern R/C
flyer to appreciate just how revolutionary the original digital proportional system was when it was first
introduced. Overnight we went from
reeds with ON-OFF controls and perhaps two simultaneous controls, if we
were lucky, to a rock-solid proportional system of unprecedented reliability
with all controls simultaneous. It was
a breathtaking development and a
giant leap forward and now it is all
taken for granted.
True, there were analog simultaneous proportional systems but these
were full of shortcomings and never
really fulfilled the role required of
them. Overnight the Mathers and
Spreng system swept all before it and
(PPM). Fig.2 shows the timing diagrams from an 8-channel transmitter
using pulse position modulation.
The bottom trace is the encoded
pulse train, the serial data stream if
you like, while the two traces above
it are the width-modulated pulses
for the first two channels. Note how
the start of the channel 1 pulse (top
trace) coincides with the start of the
pulse train in the bottom trace. And
note how the end of the channel 1
pulse coincides with the start of the
channel 2 pulse (middle trace). You
can also see how the start of the channel 2 pulse coincides with the start
of the second pulse in the encoded
pulse train.
Marker pulses & sync pause
Fig.2: these scope waveforms were taken from an 8-channel R/C transmitter. The
bottom trace is the encoded pulse train, while the two traces above it are the
width-modulated pulses for the first two channels.
their system became the international
standard for over 30 years. It is only
now being rivalled but not replaced,
by PCM, a standard bitstream form of
serial data transmission. Even here
though, the Mathers and Spreng servo
system is still used, with the PCM data
being converted to pulse width data
before being fed to the servo.
In other words, the PCM system
is merely used to transmit the pulse
width data. It is interesting to note
that in theory PCM should give better
results than PPM for two reasons.
First, it is more difficult to transmit
edges reliably than just to sample bits
for high or low. The edges in a PCM
system play no part in the carriage
of information. Second, computers
are very good at error detection and
correction, yet in practice the PCM
systems fail to live up to this promise.
There is a flaw in the basic design philosophy of the modern PCM system
it would appear.
Pulse position modulation
The system of data transmission
devised by Mathers and Spreng is now
known as Pulse Position Modulation
In fact, the encoded pulse train is
a series of “marker pulses” where
each marker pulse identifies the end
of one channel’s pulse and the start
of the next channel. There is one extra pulse in the system which is the
start marker. This identifies the end
of the sync pause and the start of the
channel 1 pulse.
Therefore, the bottom trace in Fig.2
shows the modulating waveform for
an 8-channel PPM transmitter encoder and it has nine marker pulses. A
6-channel system would have seven
marker pulses.
To understand how this serial
data stream is compiled, it is best to
examine one of the early “half shot”
encoders, which illustrates the principles involved more clearly than
one of the modern IC encoders such
as the NE5044.
Fig.3: the circuit of a half-shot encoder. Q1 & Q2 form a free-running multivibrator which is set at 25.4ms. This is
the master clock for the encoder. Q3 to Q10 are eight identical half-shot multivibrators connected in a ripplethrough arrangement so that the trailing (falling) edge of one half-shot triggers the leading edge of the next.
December 1997 77
shows the output of Q12. Note the
location of the leading edges of the
marker pulses relative to the leading
edges of the channel control pulses.
Here we see nine marker pulses whose
position is relative to the width of
each control pulse.
Again the scope is confused and
is trying to read the fre
quency of
the pulse train which is impossible
because each pulse has a different
period, with a sync pause thrown in
the middle of the data stream for good
measure. The sync pause, between the
two sets of pulses in trace 3, allows
the receiver decoder to reset before
the next pulse train arrives.
PWM to PPM
Fig.4: these scope waveforms were taken from a 8-channel R/C receiver decoder.
Trace 1 shows the output of the receiver detector. Traces 2 & 3 are the decoded
width-modulated pulses for channels 1 & 2 and are identical in form to the
waveforms in Fig.2.
Fig.3 is a circuit of a half-shot
encoder similar to that used in the
Silvertone transmitters from 1969 to
1974. Q1 and Q2 form a free running
multivibrator which is set at 25.4ms.
This multivibrator is the master clock
for the encoder. The falling edge of
the clock pulse triggers half-shot Q3
whose duration may vary between
1-2ms depending upon the setting of
the 5kΩ potentiometer in the collector
load of Q2.
Follow the leader
Transistors Q3-Q10 are eight identical half-shot multivibrators connect
ed in a ripple-through arrangement
so that the trailing (falling) edge of
one half-shot triggers the leading
edge of the next. Again the width
of the output pulse from these halfshots depends upon the position of
the wiper in each of the 5kΩ control
potentiometers. These pots are located in the controls on the transmitter
front panel. Q9 and Q10 are arranged
a little differently as they are toggle
switch auxiliary channels.
Diodes D1-D10 form a mixing network which has all anodes coupled to
a common line which in turn triggers
the transistor pair Q11 & Q12. This
pair of transistors is arranged as a
one-shot multivibrator with a pulse
output of 350µs. This one-shot acts as
78 Silicon Chip
a marker pip generator.
Referring again to Fig.2, the top
trace shows the output of Q3 (channel
1) which is a positive-going pulse of
about 10V amplitude and about 2ms
in duration. In this case, the oscillo
scope has measured the frame rate
which is the period between the
leading edge of each control pulse
and is shown as 25.5ms.
Trace 2 shows the output of Q4
which is the channel 2 pulse and in
this case the scope has latched onto
the pulse width which is shown as
1.77ms. The “unstable histogram”
comment on each measurement indicates the difficulty the scope has in
locking onto this form of pulse train.
In the end we had to use an external
trigger driven from the transmitter
master clock to achieve reliable triggering.
We have already noted that the
trailing edge of channel 1 coincides
with the leading edge of channel 2.
If we were to serially transmit these
two channels we would end up with
a pulse approximately 3.77ms wide,
with no way of knowing where pulse
one stopped and pulse two began.
Here is the really clever part of the
system. The one-shot Q11 & Q12 generates a 350µs marker pip every time a
falling edge is generated by transistors
Q2-Q10. So the bottom trace of Fig.2
Thus we have now changed the
system from a parallel pulse width
system to a serial pulse position system, hence the name PPM or pulse position modulation. The data is carried
in the position of each marker pulse.
The output of Q12 is inverted in the
modulator and the negative-going
pulse train is used to modulate the
transmitter, be it AM or FM.
In the case of AM (amplitude
modulation), the carrier is spiked or
gated OFF for 350µs by each marker
pip. Thus, as we have discussed previously, it is more correct to refer to
the AM system as a “gated carrier”
system as the carrier is not ampli
tude modulated in the normal sense,
merely switched ON or OFF. This
form of modulation results in a very
strong carrier for nearly 90% of the
time and results in a solid relatively
noise-free receiver signal.
In the case of FM (frequency) modulation the carrier frequency is shifted
by approximately 3kHz for 350µs
upon the arri
val of a marker pip.
Once again the common term FM is
incorrect as the system is in reality
an NBFSK system (narrow band,
frequency shift keying system) with
the emphasis on the narrow bit. In
other words the carrier is keyed or
shifted 3kHz each time a marker
pulse arrives.
Hard-wired systems
As stated previously, the top and
middle traces of Fig.2 show the
outputs of the pulse generators for
channels 1 and 2. Compare these with
Fig.1 and it is obvious that except
for the amplitude, the two traces are
exactly what we need to drive a servo.
Fig.5: the circuit of a serial to parallel decoder. This
was used in the Mk.22 receiver published in SILICON
CHIP, April 1995. The serial pulse train is fed to IC1,
a 74HC164 serial to parallel shift register. Its eight
outputs become the width modulated pulses for the
eight servo channels in the R/C car, boat or plane.
Had the encoder been set up to run
from 5V we could have hooked up
servos to the collectors of Q2-Q10 and
driven all eight servos direct from the
encoder. For hard-wired systems this
is quite feasible but for transmission
over a twisted wire pair or radio link
the data must be serially encoded as
in Fig.2, trace 3.
In the modern multiplexed encoder
it is not possible to drive the servos
direct from the encoder and a decoder
must be used in this case with a twisted wire pair. The Silvertone Mk.22
encoder has a plug specifically built
in for this purpose.
Serial data decoding
In the R/C receiver, the process
is reversed. Fig.4 shows the timing
diagrams for a receiver decoder and
Fig.5 shows the circuit of a serial to
parallel decoder. This was used in the
Mk.22 receiver published in SILICON
CHIP, April 1995.
Fig.4, trace 1 shows the output of
the receiver detector and is identical
in form to the output of the transmitter
one-shot. This signal is amplified and
squared up through the pulse shaper
Q1, IC2a, IC2b & IC2c.
The cleaned up pulse train is fed
to the appropriate pins on IC1. This
is a 74HC164 serial to parallel shift
register. The clock pulses are fed
directly into pin 8 from IC2a. IC2b
drives a sync separator consisting
of diode D2, R9 & C10 which holds
pins 1 and 2 of IC1 low as long as the
1-2ms pulses are present. During the
long sync pause, pins 1 and 2 go high
and the shift register is reset, ready
to receive the channel 1 start pulse.
IC2c, D1, R13 and C13 form a
chip-enable driver which will hold
pin 9 high so long as the clock pulses
continue to arrive from the receiver.
If these pulses disappear, then pin 9
will go low and the chip will be disabled. This protects the servo gears
in the event of a transmission failure
or the receiver being on when the
transmitter is switched off. If the chip
is not disabled, noise spikes may get
through from the receiver and drive
the servo up against the end stops,
damaging the gear train.
With the correct conditions on
pins 1, 2 and 9, the pulses will be
clocked through the shift register
so that an exact copy of the encoder
pulse appears at each of the output
pins Q0-Q7.
Referring again to Fig.4, trace 2
shows the output of channel 1 which
is an exact copy of the channel one
pulse from the encoder except for
amplitude. Likewise Fig.4, trace 3
shows the output of channel 2. Each
of the output pins Q0-Q7 will mirror
the transmitter encoder channels.
Thus we have now converted the
system back into a parallel, pulse
width modulated system.
Note that the output of the decoder
is identical to the parameters pub-
lished last month for the servo input.
All we have to do now is to hook
a servo to each of the channel output
plugs and we have an 8-channel proportional radio control system. Even
after working with this system for
32 years I still marvel at the magic of
being able to maintain such complete
and precise control over a model, at a
distance, with no strings attached. SC
SILICON
CHIP
This advertisment
is out of date and
has been removed
to prevent
confusion.
December 1997 79
|