You are on page 1of 16

You always wanted wireless control of your project with a PC.

e-Gizmo now brings you your building
block module-

8/16-bit RF Wireless Remote Output
that you can control using your PC!
Designed and Written by Henry Chua

I met a lot of students and enthusi-
asts who build or are trying to build
gadgets that they hope can be re-
motely controlled by RF (Radio Fre-
quency). Because of the unavailabil-
ity of any locally-built RF remote cir-
cuit boards, the moneyed ones sim-
ply purchase this stuff from overseas
suppliers, spending 12,000 pesos,
perhaps a bit more.

Others resort to buying RC (Radio
Controlled) cars, tearing it apart, tak-
ing only the much needed RF remote
parts. A cheap RC car with two output
functions can cost as little as 600 pe-
sos. This seems to be attractive enough to jump into
this solution, except that: Typical Performance

Frequency: 433MHz nominal
• Unless you are an experienced electronics geek, find-
430-439 MHz
ing the correct output and matching it with your circuit
can be very tricky. Transmitter Side:

• Most R/C toys operate on 27MHz to 49MHz frequen- Output Power:
cies. If you are planning to use a microcontroller or mi- 0dBm (1mW)
croprocessor with your wireless, then you have a prob- Harmonics:
lem. As those who already tried this found out, 2nd < -15dB
microcontroller circuits generate all sorts of RF noise 3rd up < -25db
interference within these frequency bands. This severely
Receiver Side:
affects the reception ability of the receiver circuit, re-
ducing the control distance range to only a couple of
Sensitivity:
meter or so. Of course, a wireless controlling distance 8uV @ 2.4Khz 80%mod
within your arm's reach will not look impressive at all. RF Bandwidth (-6db):
2.4 MHz typ
Our wireless kit is designed to be free from these prob- Adjacent Frequency Rejection fo +/- 5MHz:
lems. It operates at 433MHz unlicensed ISM (Industrial - 55dB
Scientific Medical) frequency, far from the interfering sig- Control Distance:
nal frequencies coming out of your microcontroller cir- > 100ft in open space
cuits. It is easy to use, fully documented. All available

Copyright 2005 by e-Gizmo Mechatronix Central
All rights reserved.
No part of this publication may be reproduced in any form without the written consent of e-Gizmo Mechatronix. Content subject to change without prior notice.
All informations contained herein are believed to be correct and reliable.

Before using this document, you must agree with the following terms and conditions:
1. e-Gizmo Mechatronix and the author cannot be held liable for any damage that may occur with the use or misuse of any information contained in this document.
2. You are allowed to reproduce this publication and the product it describes for personal use only. Commercial reproduction is prohibited!

Page 1 Copyright 2005 e-Gizmo Mechatronix Central
I/Os are fully explained with some interfacing examples. The circuit schematic of the transmitter is shown on Fig.
The transmitters plugs into one of your PC serial com 1. The circuit is remarkably simple, thanks to the RF
port. It is Visual Basic friendly, 10 lines of code is enough module UC1817. I used this module because (after
to operate it. some modification) of its good frequency stability over
temperature and time, although it contains no saw filter
CIRCUIT EXPLAINED component at all. Of course, a 433 MHz saw filter-stabi-
lized oscillator circuit would give much better frequency
The wireless kit consists of two subsystems, the trans- stability, but you'll need a load of luck to find one in the
mitter circuit, and the receiver/decoder circuit. local hobby market.

JDR1

J3 J1 1
R1 1 6
1 1 2 6
2 2 2 7
3 3 D1 3 7
4 4 R2 3 8
5 5 5V1 4 8
6 6 4 9
J2 5 9
CON6 CON6
5
1

CON1 CONN DSUB 9-R

Figure 1. Complete schematic diagram of the transmitter unit.

Power to the transmitter is directly drawn from the RS- age to -0.6V in case pin 4's output suddenly decides to
232C lines. With pin 4 (DTR) output permanently stay- go negative.
ing at the V+ side, the transmitter can be switched ON
and OFF through pin 3's (TX) output of the serial port. The receiver circuit is a bit more complicated, it will make
In other words, the serial data output itself turns ON more sense if we describe the circuit in its block dia-
and OFF the transmitter, effecting a Amplitude Modu- gram form as shown in Figure 2. The complete sche-
lated system. D1 keeps the voltage to the transmitter matic of the receiver is shown on Figure 2a on page 3.
from exceeding 5.1V, at the same time, limits the volt-

Figure 2. The receiver circuit functional block diagram

8/16-bit Wireless Remote Output Page 2
U3
J3 L7805/TO220 C16
1 +V 1 3 +5

Page 3
2 VIN VOUT
3 U1

5
R15

GND
PHONEJACK + C13 8 11
9 P31/OE P00/CLR 12

VCC
P32/EPM P01/CLK

2
10 13
P33/VPP P02/PGM
7 15
6 XTAL1/CE P20/D0 16
+ C14 J6 XTAL2 P21/D1 17
R14 P22/D2 18
1 P23/D3 1
Y1
2 P24/D4 2
P25/D5 3
CON2 P26/D6 4
CRY STAL

GND
R17 P27/D7

14
C11 C12
Z86E04

C18 R10

C3 + C7 R9 R12
C5 L2 1n
C4
R4
330pF 1pF R8
56k
+ C9 R11
J2 C17 C15
Q1 CAP
1 C1

8
0.5pF U2A
CON1 C 3 R7
+
R3 NPN BCE R5 1 5 R13
C2 +
L1 2 7
15k -
330pF CHOKE RF 6
-
+ C8 4 LM358
R2 LM358

U2B
D1 15k
1N4148 R1 C6 R6
5k6 10n

C10

Figure 2a. Complete schematic diagram of the Receiver Module.

Copyright 2005 e-Gizmo Mechatronix Central
We all know the function of the antenna; it grabs what- Receiver Board Assembly
ever radio signal wanders in its reach. Because of its
finite length, it favors radio signals with frequencies that Use a PCB layout pattern which is a faithful reproduc-
falls within half wavelength, which, by design, is tion of the pattern shown in the downloads. If you choose
433MHz. not to, you may be buying yourself into trouble you
must be certain you know what you are doing.
The receiver is more picky. It will work only on 433MHz
signals, totally ignoring all others. The very weak signal Treat each component with reasonable care. The ICs
from the antenna is greatly amplified, at the same time are particularly susceptible to damage due to ESD (Elec-
demodulated in this block, resulting in the recovered trostatic Discharge) and must be handled properly. Sol-
data signal from the receiver output. The receiver block dering workmanship is very important, this project must
consists of components Q1, R1 to R4, C1 to C7, L1, L2 be built by a soldering iron master!
and D1.
Recommended reading:
The recovered data signal however is still too weak and
is mixed with all sorts of noise. The amplifier stage General PCB Assembly procedure
boosts the signal to a more usable level, using to its www.e-gizmo.com/ARTICLES/ProjectB/Assembly.htm
advantage its inability to amplify high frequency noise,
thereby improving its signal to noise ratio. Then, this
preconditioned signal is fed to a pulse shaper where
data signal is reconstructed into nice digital signals the
microcontroller can now understand. The amplifier cir-
cuit consists of U2A and associated components, the
pulse shaper is formed by U2B and associated parts
wired as Schmitt trigger.

The microcontroller then assembles the received data
into an 8-bit data format. As wireless transmission is
very prone to error due to unaccountable external influ-
ences, extra bits are transmitted and received as a form
of error checking. If everything matches the error-check-
ing code, then the received data is fed to its 8-bit output
port. A successful data transmission is indicated by a
flashing LED indicator in the receiver board. Data trans-
mission format is discussed in detail in the Program-
ming section. The microcontroller section is based on a
Z86E02 microcontroller U1. U3 converts the DC supply
input into a stable 5V source to supply the whole circuit.
Figure 3. Component side of the receiver module.

ASSEMBLY INSTRUCTIONS

Part of the circuit, the receiver circuit in particular, works
at a very high RF frequency (UHF 433 MHz). The choice
of components becomes very important. At this fre-
quency, the PCB layout becomes very much part of the
circuit. Each component is carefully laid out to minimize
unwanted interaction against each other. Merely repo-
sitioning these components can have an astonishing
effect on the performance of the circuit. Many people
who do not understand this suspects that RF design is
engineering mixed with witchcraft, or maybe the other
way around. Figure 4. Bottom side of the receiver module. Four
components are soldered on this side; U1, U3, Q1, and
D1.

8/16-bit Wireless Remote Output Page 4
Mount and solder the components in the following or- Double side layout is used for the receiver board, with
der : resistor, capacitors, coils, transistor, diode, ICs, the component side copper used mainly as a ground
and whatever component is left out of this list. Keep all plane. Some components must be soldered on the com-
components lead as short as possible. Q1, U1, U3 and ponent side copper trace ( if the PCB you are using is
D1 are surface mount components - they are soldered not a plated through hole type), these are shown and
directly on the copper side of the PCB. are listed as follows:

Figure 5. Components with leads soldered on the compo-
nent side.

1 - C18
2 - C15
3 - R14
4 - C12
5 - R13
6 - Crystal Can
7 - C16
8 - U2 pin 4
9 - C6
10 - R1

Form the antenna by cutting an AWG25 solid insulated This phenomena is caused by insufficient isolation of
hook up wire 35cm long. Note that this length corre- the receiver's tuned circuit with the input port.
sponds to the half wavelength of the 433MHz RF sig-
nal. Making this wire any longer or shorter will not im- We can easily solve this problem by winding the base
prove reception, in fact, it will do just the opposite. One portion of the antenna 8 turns around a 5mm diameter
problem we noticed though is the antenna does not like temporary form, forming it as shown in the picture be-
to be touched (i.e. hand effect). Grabbing the antenna low. Of course, this solution is a compromise, we do
with one hand will detune the receiver and can alto- this at the expense of reduced transmission distance.
gether stop reception. Swaying the antenna, will also But still, the control distance goes more than 100 feet in
have the same effect, although to a much lesser extent. an open field.

Figure 6. The receiver module antenna.

Page 5 Copyright 2005 e-Gizmo Mechatronix Central
Transmitter Board Assembly

Building the transmitter board is a breeze! You only have and the antenna and its done. The antenna is formed
to solder a couple of resistor R1 and R2, a zener diode out of solid AWG 16 tw wire cut to 35cm length.
D1, the transmitter module, a DB-9 female connector,

Figure 7a. Transmitter component side. Figure 7b. The RF module is soldered on
the copper side.

TEST and ALIGNMENT data terminal connector J1 and keep your fingers
away from the high frequency receiver area as you
do the adjustments.
EQUIPMENT NEEDED:
5. Keeping an eye on the LED, move farther away from
a) Personal Computer (PC) with microsoft Visual Basic the transmitter until the LED stops flashing.
6 software installed.
b) Non metal screwdriver alignment tool. 6. Slowly readjust L2 until the LED flashes again.
c) 9V Battery with Battery Snap.
7. Repeat steps 5 and 6 until no further improvements
Alignment Procedure: can be obtained.

1. Download and run the Visual Basic test program. You should have moved at least 100 feet away (open
space) from the transmitter by the time the LED stops
2. Install the transmitter to serial communication port1 flashing if L2 is properly adjusted. Final distance will
(com1) of your PC. vary considerably if you do the alignment indoors, but it
should not be less than 50 feet when obstructed with
3. You will be moving around with the receiver module two concrete walls in between.
as you align it for the farthest control distance. Use a
9V battery to temporarily power it while doing the
alignment. Solder the battery snap red wire to the +
pin of C14, with the black wire going to - pin of the
same capacitor.

4. Working close to your transmitter, tune coil L2 using
the screwdriver alignment tool until the receiver LED
indicator D4 flashes. Hold the PCB module near the

8/16-bit Wireless Remote Output Page 6
USING THE WIRELESS SYSTEM This data transmission scheme is very easy to imple-
mented in Visual Basic. The downloadable test program
Wireless control is accomplished by sending a stream source code serves as a sample showing how to do it.
of data from the PC to the transmitter through the serial
communications port (com1, com2,.. and so on). The Output interfacing
serial data is then picked-up from a remote location by
the receiver module and then reconstructed to appear All outputs are 5V TTL/CMOS compatible, and follow-
as an 8 or 16 bit parallel data on its output. ing the specifications of the IC, each output is capable
of directly driving two TTL loads only. Do not connect
But serial transfer cannot be reliably accomplished in any inductive load to the outputs directly, unless it is
wireless realm by simply throwing data all by itself. A lot really your intent to kill the IC U1. Examples of highly
of things could happen as signal travels through space inductive loads are solenoids, relays, and motors.
towards the receiver side. And when these things hap-
pens, it always leads to a erroneous data appearing on An output interfacing circuit example is shown in figure
the receiver side. 8. The transistor circuit allows on/off control of loads
and is capable of sinking up to 100mA. D1 is necessary
Obviously, we have to devise some way for the receiver when the load is inductive. It prevents the switch-off tran-
to recognized whether the data it receives is intact or sient of the load from frying Q1.
invalid. We can easily do this by transmitting extra data
used mainly for error checking.

Communications Format

Aside from the 8-bit data of interest, we have to throw
in two extra bytes of data preceding and succeeding
the 8 bit data. Let us call these extra bytes as the Header
and the Checksum. The communications format is then
more clearly described as:

[Header] + [Data] + [Checksum]

This is a three byte transmission. Each data set en-
closed with bracket is 8-bit wide.

Header - The header is used mainly to tell the receiver Figure 8. A switching transistor circuit should be used when
that data transmission is started. This is a fixed driving inductive loads, such as a relay.
data with a valid hexadecimal value of 54
(&H54 in Visual Basic format) or 55.

Data - This is the actual 8 bit data you are sending.

Checksum - 8-bit Sum of [Header] + [Data] (results
truncated to 8 bits)

Upon reception, the receiver checks the integrity of the
header and proceeds to compute its own checksum and
compares it with the received checksum. If the checksum
matches, a valid data reception is assumed and the 8-
bit data is outputted on the receiver output port. Other-
wise, if error is found in either header or checksum, the
receiver rejects the data set by ignoring it.

Page 7 Copyright 2005 e-Gizmo Mechatronix Central
IF EIGHT IS NOT ENOUGH

Throw in a couple of 374s and connect them as shown To output an 8 bit data on U1, use a hexadecimal &H54
in the figure below and you get a 16-bit output. You can header value in the data communications (see Com-
use 74LS374, or its HC and HCT equivalent. Power pins munications Format). To output an 8 bit data on U2,
connections of the ICs (pin 10 - GND, pin 20 - Vcc) are use a header value of &H55.
not shown in the schematic, but you should connect
them to the supply lines! For best results, add a 0.1uF
multilayer capacitor across the Vcc to GND lines clos-
est to the ICs.

Figure 9. Adding a pair of 374 latches
allows you to control up to 16 outputs.

MEASURED PERFORMANCE NOTES

Performance test setup:

View of the test bench and equipment used to
evaluate the transmitter and receiver.

Instruments used:

- Advantest R3261C 9khz-2.6GHz Spectrum
Analyser.
- Hewlett Packard HP8647A 1GHz RF Signal
Generator
- Tektronix TDS754A 500MHz 2Gs/S Digital
Oscilloscope
- Tektronix 2465B 400MHz Analog Oscilloscope
- Hewlett Packard HP6633A System Power
Supply
- Wavetek model 166 50MHz Function and
Pulse Generator.

8/16-bit Wireless Remote Output Page 8
Close up view of the receiver module under test.
Tetronix probe P6137 were used.

To measure receiver sensitivity, the signal generator
output is reduced until noise starts to show up on the
digital pulse shaper output. The upper trace shows
the output of signal amplifier U2A (1V/div) while the
lower trace displays the pulse shaper output U2B. An
analog oscilloscope is used to monitor the output so
that all high frequency noise and artifacts can be
seen, something a digital oscilloscope is not good at.

Under the test criteria described above, and with the
signal generator externally modulated with a 2.4kHz
square wave signal at 80% modulation depth, the
signal generator reveals a respectable 18dBu (7.94
uV) receiver input sensitivity.

The 6dB RF bandwidth measured 2.7MHz, not
impressive actually, but it is not fair either to expect
more for this type of receiver circuit.

The measured RF bandwidth is much wider than we ing, the frequency can wander a bit. The excess re-
need. We don't want excessive bandwidth because it ceiver bandwidth actually makes it tolerant to this kind
makes the receiver more susceptible to noise and in- of deficiency, ensuring a good data transmission even
terference. On the other hand, we could make use of if the transmitter frequency alignment stray by as much
this excessive bandwidth to our advantage. Remem- as 1MHz.
ber, our transmitter is not saw filter controlled, mean-

Page 9 Copyright 2005 e-Gizmo Mechatronix Central
Adjacent frequency rejection at +/- 5MHz and +/-10MHz
frequency were also measured. Results are as follows:

431.2MHz + 5MHz - 62dB
431.2MHz - 5MHz - 58dB
431.2MHz + 10MHz - 78dB
431.2MHz - 10MHz - 65dB

The nominal operating voltage of the receiver is 9V.
At this supply voltage, it consumes 18mA current
(0.162W). It will work with supply voltage as low as
7V to as high as 16VDC.

The transmitter was evaluated using a spectrum
analyzer. The transmitter is both powered and
modulated by the model 166 function generator
output set at 20Vp-p 2.4KHz square wave. This test
condition is chosen to simulate the working condi-
tion when it is finally connected to an RS-232 PC
communications port. A 20dB attenuator is used at
the analyzer input to prevent input overloading.
The picture on the right shows the resulting trace
scan at 100kHz span.

Antenna hand effect was also measured and turned
out to be less than 30KHz.

The transmitter output scanned to 1MHz span. Here,
it also indicates a 0dbm (1mW) output for the trans-
mitter. This low output makes it less likely to cause
harmful interference to an appliance or equipment
operating near it.

8/16-bit Wireless Remote Output Page 10
The transmitter output at full 2.6GHz span shows its
spurious output signals. The second harmonic is 18db
below the fundamental. The remaining harmonics are
at least 30db below.

We are currently measuring the short term and long
term frequency drift, and how it behaves with chang-
ing temperature. We will publish the results when data
becomes available.

8 PARALLEL INPUTS
REMOTE CONTROLLER

If your application do not require a PC (such as
microcontroller based circuits ), or you just need a
remote controller with push button functions, an 8-
input remote controller transmitter is also available.

The operation of the controller is straightforward.
The z8 microcontroller constantly read the inputs, if
a change is detected, the new input states is
transmitted via the UC1817 transmitter module
into the correct communications format.
Figure 10. 8 parallel inputs remote controller
The receiver module then perfoms the action, as module.
described in the Circuit Explained section of this
article (page 2), turning ON or OFF its output port
corresponding to the inputs of this controller.

The remote controller inputs can, at your option, be
configured in push-on/push-off mode : push to turn
it on, push a second time to turn it off, a very
useful feature with push button operation. Z8 UC1817
Microcontroller Transmitter
The board comes complete with 8 push button
switches (soldered on the copper side). A snap-on
wafer connector connects it to a controller circuit of
your choice. 8 inputs

The full schematic diagram of the controller is Figure 11. Block diagram of the remote controller
shown in figure 12.

Page 11 Copyright 2005 e-Gizmo Mechatronix Central
Page 12

R2 R1 U1 C4 R21

5
10K 10K 0.1u RESISTOR
J8 8 11 D2
9 P31/OE P00/CLR 12

VCC
1 10 P32/EPM P01/CLK 13
2 P33/VPP P02/PGM
J4 LED J3 J1
CON2 7 15 R5 10K
6 XTAL1/CE P20/D0 16 R6 10K 1 1 1
XTAL2 P21/D1 17 R7 2 2 2
J6 10K
P22/D2 18 R8 10K 3 3 3
Y1
1 P23/D3 1 R9 10K 4 4 4
2 P24/D4 2 R10 10K 5 5 5
P25/D5 3 R11 6 6 6
CON2 10K
P26/D6 4 R12 10K 7
CON6 UCN3815 CON6

GND
C1 C2 P27/D7 8
9 TRANSMITTER MODULE
22pF 22pF
Z86E02

14
CON9

1
3.5874MHz
2 Q1
MPS3469
R4 2K2

3
R13 10K R3
2K2

R14 10K

R15 10K
U2
4 3 4 3 4 3 4 3 L7805/TO220
R16 10K
3 1
+ VIN
SW1 SW2 SW3 SW4 + C5 + C6
R17 10K 47u 100
GND

1 2 1 2 1 2 1 2
R18 10K
2

R19 10K
4 3 4 3 4 3 4 3
R20 10K
SW5 SW6 SW7 SW8

1 2 1 2 1 2 1 2

Figure 12. Schematic diagram of the 8 parallel inputs remote controller.
8/16-bit Wireless Remote Output
BILL OF MATERIALS

Receiver Module

ITEM QUANTITY REFERENCE PART

1 1 C1 0.5pF Ceramic NPO
2 2 C2,C5 330pF Ceramic SL
3 2 C3,C18 1n Ceramic SL
4 1 C4 1pF Ceramic NPO
5 1 C6 4n7 Ceramic SL
6 2 C7,C9 47u/10V Electrolytic
7 1 C8 4u7 Electrolytic
8 2 C11,C12 27p Ceramic SL
9 1 C13 220u/6v3 Electrolytic
10 1 C14 100u/16V Electrolytic
11 2 C15,C16 0u1 Multilayer Ceramic
12 1 C17 39p Ceramic SL
13 1 D1 1N4148 Signal Diode
14 1 D4 LED 3 or 5mm diameter
15 1 J1 9 pin header connector with lock
17 1 J3 CROWN JACK
21 1 L1 2u2H
22 1 L2 Adjustable Coil
23 1 Q1 2SC3707
24 1 R1 5k6 1/4 watt carbon film resistor
R2,R5,R7,R9,R11,R13,
25 9 R14, R15,R17 10K 1/4 watt carbon film resistor

26 1 R3 6K2 1/4 watt carbon film resistor
27 1 R4 22K 1/4 watt carbon film resistor
28 2 R6,R8 1M2 1/4 watt carbon film resistor
29 1 R10 56 1/4 watt carbon film resistor
30 1 R12 220K 1/4 watt carbon film resistor
31 1 R16 220 1/4 watt carbon film resistor
32 1 U1 Z86E04 - RFW Microcontroller IC
33 1 U2 LM358 OPAMP IC
34 1 U3 L7805/TO220 Voltage Regulator IC
35 1 Y1 3.583MHZ Crystal
36 1 PCB - receiver
37 1 ANT AWG #25 solid insulated wire, 35cm long

Transmitter Assembly

1 2 R1,R2 27 ohms 1/4 watt carbon film resistor
2 1 D1 5V1 1/2W Zener Diode
3 1 UC1817 (Modified) RF Module
4 1 PCB
5 1 JDR1 Dsub-9 Female, PC Mount
6 1 ANT AWG # 16 solid TW wire, 35cm Long

Page 13 Copyright 2005 e-Gizmo Mechatronix Central
PCB ARTWORKS
Important: For personal use only. Commercial reproduction
is strictly prohibited!

Transmitter Component Layout

Transmitter Copper pattern (shown on
component side)

8/16-bit Wireless Remote Output Page 14
PCB ARTWORKS
Important: For personal use only. Commercial reproduction
is strictly prohibited!

Receiver Component Layout

Receiver Component side

Receiver Copper pattern (shown on compo-
nent side)

Page 15 Copyright 2005 e-Gizmo Mechatronix Central
PCB ARTWORKS
Important: For personal use only. Commercial reproduction
is strictly prohibited!

Remote controller component Layout Remote Controller component side
(Jumper)

Remote Controller Copper pattern (shown
on component side)

8/16-bit Wireless Remote Output Page 16