Sie sind auf Seite 1von 11

College of Sciences

Bachelor of Engineering Technology


216.323 Final Year Project

Hardware Draft

1 | Page
Table of Contents

1.0 OVERVIEW..................................................................................................3
2.0 LED INDICATORS..........................................................................................4
3.0 RS-232 PORTS.............................................................................................6
4.0 SWITCHES..................................................................................................7
5.0 UP/DOWN CONVERTERS................................................................................8
6.0 MICROCONTROLLER.....................................................................................9
7.0 POWER SUPPLY.........................................................................................10
8.0 DRAFT CIRCUIT..........................................................................................11

2 | Page
1.0 OVERVIEW

This document outlines a detailed draft plan of the Serial Multiplexer Device.

From a hardware perspective, the device requires:

- 1 x power supply (~5V);


- 4 x RS-232 ports;
- 1 x microcontroller (C8051F020 has been decided);
- 2 x Up/down conversion chips for RS-232/TTL conversion;
- 8 x LEDS (4 ok, and 4 error for each port);
- 2 x 3 pin switches (to change baud rate).

Below is a functional flow diagram of how the hardware will interact (Figure 1).

Figure 1 – Function diagram

This document will now outline each of the components shown in the diagram above in
detail, and present a final draft schematic at the end.

3 | Page
2.0 LED INDICATORS

Each IO port on the device will have two LED’s associated with it. These are used to
visually show that the port is either operating or idle.

One will be green, and the other will be red. They will all be 3mm, to keep the lighting at
a minimum.

These will be driven by the microcontroller via transistors (to limit the drain on the
microcontroller). Note that the microcontroller can handle a 100mA output on one pin,
and 50mA on any addition pins.

The BC337is an NPN Epitaxial Silicon Transistor, commonly used for switching and
amplifier applications. Its base emitter on voltage is 1.2V, which will work fine with the
microcontroller’s logic high/low values.

The LED’s will operate at 20mA. The calculations for the components are:

R = Vs – Vd / I

Where:

Vs = Supply voltage
Vd = LED voltage
R = Resistor size

R = 5 – 1.7V (typical) / 20mA


R = 165 ohms (ideal)
R = 150 ohms (closest value)

4 | Page
No protection is required between the transistor and microcontroller pin, because the
F020 has internal protection. Below is a circuit diagram of the LED component (Figure
2).

VCC (5V)

LED

R
150

BC337
F020 IO pin

GND
Figure 2 – LED component

Total cost for these components is approximately $5.00 (for a one off prototype).
5 | Page
3.0 RS-232 PORTS

The four RS-232 ports are the critical link between the SMD microcontroller and the
external peripherals that are sending the serial data.

Below is a diagram of a typical RS-232 D type connector (Figure 3). Only three of the
pins need to be used because there will be no hardware level handshaking between
communicating devices.

Figure 3 – RS-232 connection (techpubs.sgi.com)

The pins to be used are:

- Pin 3, Rx;
- Pin 2, Tx;
- Pin 6, GND.

The IO pins will be connected to the cross-bar configured ports of the microcontroller
(more on this later), and the ground pin will go straight to ground.

Total cost for these components is approximately $4.00 (for a one off prototype).

6 | Page
4.0 SWITCHES

The switches will be used to change the communication baud rate between the SMD
and GPS, and also the SMD and weather station.

The switches have three pins, and two states. One pin will be connected to 5V. The
other two will be connected to two microcontroller IO pins.

Each pin will indicate a baud rate, if a particular pin goes high, then its respective baud
rate will be set.

There will also be a switch, open by default, that when pressed (driven low) will cause
the chip to reset.

7 | Page
5.0 UP/DOWN CONVERTERS

Because the microcontroller only accepts TTL signals (pins are 5V tolerant), RS-232
signals need to be scaled down so the pins are not overloaded.

The standard was of doing this is using a MAX-232 (Figure 4). This is a chip which
belongs to the Maxim family of line drivers/receivers, and is intended for all EIA/TIA-
232E and V.28/V.24 communication interfaces, particularly applications where +/-12V is
not available.

The MAX232 requires five 0.1uF capacitors to work. These capacitors are required to
be polarised. The Tx and Rx pins of the RS-232 ports will be directly connected to their
respective pins of the MAX232.

Figure 4 – MAX232 pin outs

8 | Page
6.0 MICROCONTROLLER

The microcontroller 64 general purpose IO pins. The chips internal digital crossbar
must be configured to allow use of the hardware UARTS. The UARTS require preset IO
pins.

The reset switch must be open circuit by default (active high). Below is a pin out
diagram of the microcontroller (Figure 5).

2.7/3.6V GND

A10M/A2/P6.2
A11M/A3/P6.3
A12M/A4/P6.4
A8M/A0/P6.0
A9M/A1/P6.1
ALE/P4.5

/WR/P4.7

A15/P5.7
/RD/P4.6

A10/P5.2
A11/P5.3
A12/P5.4
A13/P5.5
A14/P5.6
A8/P5.0
A9/P5.1
DGND
DAC0
DAC1

VDD
P4.2
P4.3
P4.0
P4.1

P4.4
97

88

82
100
99
98

96
95
94
93
92
91
90
89

87
86
85
84
83

81
80
79
78
77
76
1 75
TMS A13M/A5/P6.5
2 74
TCK A14M/A6/P6.6
3 73
TDI A15M/A7/P6.7
4 72
TDO AD0/D0/P7.0 GLED0
5 71
Reset Switch /RST AD1/D1/P7.1 GLED1
6 70
CP1- AD2/D2/P7.2 GLED2
7 69
CP1+ AD3/D3/P7.3 GLED3
8 68
CP0- AD4/D4/P7.4 RLED0
9 67
CP0+ AD5/D5/P7.5 RLED1
10 66
AGND AD6/D6/P7.6 RLED2
11 65
AV+ AD7/D7/P7.7 RLED3
12 64
VREF VDD 2.7/3.6V
AGND
AV+
13
14 C8051F020 63
62
DGND
P0.0
GND
TX0
15 61
VREFD P0.1 RX0
16 60
VREF0 P0.2 TX2
17 59
VREF1 P0.3 RX2
18 58
AIN0.0 P0.4 TX1
19 57
AIN0.1 ALE/P0.5 TX3
20 56
AIN0.2 /RD/P0.6 RX3
21 55
AIN0.3 /WR/P0.7
22 54
AIN0.4 AD0/D0/P3.0 Baud Switch 1
23 53
AIN0.5 AD1/D1/P3.1 Baud Switch 2
24 52
AIN0.6 AD2/D2/P3.2
25 51
AIN0.7 AD3/D3/P3.3
29

38

44
26
27
28

30
31
32
33
34
35
36
37

39
40
41
42
43

45
46
47
48
49
50
XTAL1
XTAL2

AIN1.6/A14/P1.6
AIN1.5/A13/P1.5
AIN1.4/A12/P1.4

AIN1.0/A8/P1.0

A9M/A1/P2.1
AIN1.7/A15/P1.7

AIN1.3/A11/P1.3
AIN1.2/A10/P1.2
AIN1.1/A9/P1.1

A15M/A7/P2.7
A14M/A6/P2.6
A13M/A5/P2.5
A12M/A4/P2.4
A11M/A3/P2.3
A10M/A2/P2.2

A8M/A0/P2.0
AD7/D7/P3.7/IE7
AD6/D6/P3.6/IE6
AD5/D5/P3.5
AD4/D4/P3.4
VDD
MONEN

DGND

RX1 2.7/3.6V GND

Figure 5 – C8051F020 pin outs

9 | Page
7.0 POWER SUPPLY

It is important for the power supply to be reliable. The SMD will be operating in
electrical noisy environments for long periods of time.

Below is the schematic diagram of the power supply that will be used (Figure 6). The
design is a full-wave bridge rectifier.

A 1A fuse has been added to protect from any current spikes. To limit the effects of any
brownouts, the input voltage has been slightly increased from the standard 12V, to 15V.
A large 2000uF smoothing capacitor will effectively act as a short term UPS.

The smoothed waveform will then be regulated by a 7805 voltage regulator, which will
result in a 5V output. The 5V will then be run through a voltage divider. The final output
from the power supply will be approximately 3V (after voltage divider) and 5V (before
voltage divider).

The transformer will require a turn ratio of 5000/312, to output a voltage of 15V.

The voltage regulator has a line peak current of 2A, which is more than enough to
power the microcontroller, line drivers/receivers and associated LEDs.

7805
R1
Vin Vout
GND 6.8K
4 x IN4004
1A
240/15V
R2
C1 C2 C3 10K
2000uF 0.1uF 0.1uF

GND

Figure 6 – Power supply

10 | P a g e
8.0 DRAFT CIRCUIT

A full size circuit diagram can be found at


http://www.wellingtonrowing.org.nz/project/circuit.bmp

11 | P a g e

Das könnte Ihnen auch gefallen