Software Based Controllers

advertisement
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
Graphically based programming with Circuit Wizard
These supplementary notes are to support student activities in Topic 2.5.2
Software Based Controllers, using the Genie E18 Activity Board and Circuit
Wizard Software provided by New Wave Concepts.
This program has an additional function that allows the integration of the
circuit, flowchart and PCB design, making it easy to design and build your own
control system. (If you do not have access to PCB manufacturing equipment
you can download your program to a breadboard or strip board based circuit)
1
GCSE Electronics.
Unit E2 : Applications of Electronics
Activity 1: Demonstrating the Software Program
1a.
Your teacher will set up and demonstrate the simple control program
shown in flowchart 1 to you. Suggest how the program can be made to
repeat continuously?
......................................................................................................................................
......................................................................................................................................
1b.
The following Circuit Wizard flowchart shows the program modified so
the sequence repeats itself continuously.
Flowchart 1a
Notice that Outputs 0
and 1 have been switched
on one after the other
Notice that Outputs 0
and 1 have been switched
off one after the other
2
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
Why do you think the 1 second delay has been added to the program?
......................................................................................................................................
......................................................................................................................................
Activity 2:
Configuring the software
The Circuit Wizard (Genie) Software is capable of programming several
different microcontrollers. These notes have been written for the E18
Activity Board. You do not have to have a board to write and test the
flowchart programs, but you will not be able to see the program run for real
if you don’t. The first stage in creating a flowchart program is to ensure that
you have selected the correct microcontroller, so that the flowchart
understands the inputs and outputs that are available.
From the <Project>
tab, select
<Microcontroller>
from the drop down
list, and then
<Program Settings>
from the next
menu.
3
GCSE Electronics.
Unit E2 : Applications of Electronics
The following window will appear.
Point the mouse at the drop down arrow next to the word CORE, and press
the left mouse button to reveal the following list of microcontrollers.
Select the Genie E18, ELITE option, shown highlighted and click OK.
4
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
You will need to go through this configuration procedure each time you open
Circuit Wizard to write a program.
The Program Setting screen should now look like this.
You should notice that the diagram of the signals available has changed to
show 5 inputs, and 8 outputs. If you are using the E18 Activity Board then
these inputs and outputs are allocated as follows:
A0 (D0)
A1 (D1)
A2 (D2)
Variable Input Voltage via potentiometer
LDR configured as light sensor, VOUT high in daylight
Not connected – Available for user.
D6 - Push Switch – Output high when pressed.
D7 – Push Switch – Output high when pressed.
Q0 & 3 – Green LED
Q1 & 4 – Yellow LED
Q2 & 5 – Red LED
Q6 – Piezo Sounder
Q7 – User output (Medium Power)
5
GCSE Electronics.
Unit E2 : Applications of Electronics
Activity 3:
If we wanted to switch a number of outputs on or off at the same time
we can use
instead of
and
to save
time and effort, let us take a look at these options in a bit more detail.
To switch outputs on in flowchart 1a we used the
command box. Double Clicking this box in Circuit Wizard brings up the
following dialog box.
In the dialogue box, you need to
select the output you want to
switch on from the drop down
list on the signal list as shown
below.
Select the output you require
and then press OK.
The ‘High’ box in control studio
will then change to the following
The caption box allows you add a
more meaningful comment as
shown on next page.
6
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
The comment then appears next
to the flowchart symbol as
shown below.
Adding comments helps someone reading or checking the program to
understand what output Q0 refers to, in this case switching on a Green
LED.
To switch outputs off in Flowchart 1 we used the
command. Double clicking this box in Circuit Wizard brings up a similar
dialogue box to that used to switch the output on as follows:
The process is exactly the same, i.e. select the output you want to
switch off, e.g. Q0, and add a comment in the caption box to explain
what is happening to help understand the program more clearly as shown
below.
The comment appears next to
the flowchart symbol so that it
is clear what is being turned off.
7
GCSE Electronics.
Unit E2 : Applications of Electronics
There is another way in which we could switch the outputs on or off, by
using the
option instead of our two previous commands.
Double Clicking this flowchart symbol brings up an entirely different set
of options as shown below.
Here we can see that all available outputs are shown in a state ‘x’. By
pointing and clicking on the ‘x’ for each output you can select three
possible settings for the output as shown below.
The three options are shown here.
0 0 means the output will be switched off.
1 0 means the output will be switched on.
T 0 means ‘toggle’ the output. i.e. an output that is on will switch off,
and an output that is off will switch on.
Leaving the setting on x 0means the output will be unaltered by
processing this output statement.
8
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
The outputs box is particularly useful when more than one output needs
to be switched on at the same time. In flowchart 1a we had two
statements together to switch on first output Q0 and then Q1.
We can use the
option to switch both on at the same time.
Double click the
dialogue box.
box in Circuit Wizard to bring up the
The two outputs we want to
switch on are Q0 and Q1.
Set these outputs to 1 0
Add a suitable comment in the
Caption Box to explain what is
happening in a bit more detail.
Then click OK
The result will be a change to the outputs box to the following:
Note that the software has changed the ‘Outputs’ box to show ‘High
Q0,1’.
A word of caution here because the wording in the symbol may not
completely represent everything that is going on at that stage. We will
look at an example to illustrate this.
9
GCSE Electronics.
Unit E2 : Applications of Electronics
If the outputs dialogue box is configured as shown below:
The corresponding flowchart
symbol will show:
No mention is made of Q5 or Q2
so here is where the Caption
comment is invaluable.
The Caption comment now
explains exactly what is going on
inside the output function.
The only other command we have used in this flowchart is the ‘Wait’ box
to cause a pause in the program. This is very easy to program as the
dialogue box shows below.
It is simply a case of typing in
the delay required in seconds in
the Time box, or used the drop
down list. A caption box is
provided but rarely used on Wait
statements as it fairly obvious
what is happening in a box which says “Wait 5” for example.
10
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
3a.
.
You should now be able to construct the modified flowchart 1b as shown
below. Try it out.
Notice that Outputs 0
and 1 have been switched
on at the same time
Notice that Outputs 0
and 1 have been switched
off at the same time
Flowchart 1b
3b
Test the program, either using the on screen indicators or by
downloading it to the E18 Activity Board.
11
GCSE Electronics.
Unit E2 : Applications of Electronics
Activity 4:
Flowchart 2 shown below gives a traffic light sequence. A Red LED is
attached to output Q2, Amber to Q1, and Green to Q0 You will notice that
labels have been added next to some of the flowchart symbols to describe
which outputs are being switched on.
Flowchart 2
Construct the flowchart and test it. Does the program perform the
correct sequence?
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
12
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
Activity 5:
Re-design the flowchart program in Activity 4 so that it represents two
sets of traffic lights at a cross roads, shown by the following sequence
Step
1
2
3
4
5
Hint:
North-South Lights
Red On (20sec)
Red & Amber (3 sec)
Green On (20 sec)
Amber On (3 sec)
Red On (20Sec)
East-West Lights
Green On (20sec)
Amber (3 sec)
Red On (20 sec)
Red & Amber On (3 sec)
Green On (20Sec)
Use Q3, Q4 and Q5 for East-West Lights. A Red LED is attached
to output Q5, Amber to Q4, and Green to Q3
Complete the flowchart in the space below.
13
GCSE Electronics.
Unit E2 : Applications of Electronics
Using Decision Boxes
All the programs so far have involved only outputs. Now we look at a program
where decisions are made based on the state of the inputs.
Within Circuit Wizard there are three types of decisions boxes.
– for testing the state of an input switch. For example this
could be a switch to start the program running, and is an
example of inputting data
- for testing the state of an analogue sensor, e.g. LDR. The
sensor outputs a value between 0 and 255. This is an example
of testing data.
- to perform a comparative mathematical test on a piece of
data, e.g. Is C = 10, Is A < 5, Is D >= 8 etc
No matter which decisions box we use there will always be two possible
outcomes. These are referred to as Yes and No routes from the decision box.
In programming language decisions boxes cause branches in a program. The
flow will be directed one way or another depending on the result of what
happens in the decisions box. We will now look at some ways in which decisions
boxes can be used within programs.
14
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
A decision box can be used to cause a program to ‘wait’ and repeatedly test to
check until an input comes on or goes off as shown on the left hand side
below. D6 is a digital input on the E18 Activity Board. The Dialogue box in the
centre shows the settings needed to configure the digital decisions box in
Circuit Wizard, and the right hand diagram shows the completed decisions
box.
Another use of a decision box is to divert to a different part of the program
depending on the state of an input, as shown below.
Is Input
5 On
No
Yes
Turn Output
0 On
Turn Output
7 Off
15
GCSE Electronics.
Unit E2 : Applications of Electronics
The E18 Activity Board has two analogue sensors fitted to the board. A
variable resistor configured as a variable voltage source. And an LDR
configures as part of a potential divider. Both sensors output a value between
0 and 255, which can be tested using the analogue decisions box. For example
a cricket umpire might want a light meter to determine if the amount of light
available was suitable for playing cricket. If an output from the light sensor
is above 130, then the light is ok and it is safe to play, below 130 it is not safe
to play.
We can set the system up as shown below.
Here is the analogue decisions box.
The range of acceptable values has
been set to 130 to 255. Any value in
this range will cause the program to
follow the ‘Yes’ route.
The flow chart might look something like this:
16
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
The final type of decisions box performs a mathematical comparison. e.g. a
program is required to switch on a warning lamp when the value of an input
less than 56.
This option tests the analogue input A0 (connected
to the variable resistor) and follows the ‘Yes’ path
if the value is less than 56. A sample program is
shown on the right.
This decisions box is very powerful and is able to perform many different
functions
Here we can see some of the
variables that can be tested. A0, A1
and A2 are analogue inputs from the
E18 Activity Board.
A – G are internal variables that can
be used by the program to store
numerical data in. We will see how to
use these in a short while.
This shows the range of
mathematical comparisons that can
be performed, equal to, both values
are different, less than, greater
than, less than or equal to, greater
than or equal to.
17
GCSE Electronics.
Unit E2 : Applications of Electronics
Finally in the third drop down list we
again have the option of choosing the
analogue inputs, an internal variable,
or any number between 0 and 255.
In many control applications we often need to repeat sections of code a set
number of times. e.g. to pack cans on a production line into a boxes of 6. To
enable this to happen we need to setup a count sequence within the program.
We need to use some Process boxes to help setup and maintain a count within
the program. The Process box we need is the
box which can be
found in the processing section.
The first thing to do is to set a counter to zero. This is achieved by using the
process box and setting up the dialogue box as shown below.
The first drop down list gives a list
of internal variables we can use.
Anyone can be used but ‘C’ is a useful
one for a count.
The second drop down list offers a
long list of options, scroll down the
list until you find 0, using the arrow
at the bottom of the list.
18
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
Finally add a suitable comment in the
Caption box and press OK. The
flowchart symbol will then look like
this:
When an event has occurred in the program and we need to increase the
count by one. We use the same process box
as before but we
change what happens in the dialogue box as shown below.
The flowchart symbol then becomes :
Finally we use the compare decisions box to check if we have reached the
expected figure of 6 cans, as follows:
Here the variable ‘C’ is tested to see
if it has reached 6. If it has then the
program will follow the ‘Yes’ branch. If
it has not reached 6 then it will follow
the ‘No’ branch.
Our next activity will put these decision boxes and counting systems into
practice.
19
GCSE Electronics.
Unit E2 : Applications of Electronics
Activity 6:
Study FLOWCHART 6 below. It is a modified version of FLOWCHART 1a with
a decision box and 2 process boxes added
Flowchart 6
Look at the flowchart. What does it do? Write your description in the space
below.
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
20
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
Now try it out. Did you predict the correct result; if not what did you get
wrong?
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
You may have realised that
i.
ii.
iii.
the ‘let C = 0’ statement box was used to set a counter to zero at
the start of a program.
the ‘let C = C + 1’ box was used to increase the count by 1 each
time the sequence repeated itself.
the ‘Is C = 10’ decisions box was used to monitor the count. If
the count was less than 10 the sequence was allowed to continue.
If the count was equal to 10 the program stopped.
Later on we will consider how to use a decision box to check the state of
inputs.
21
GCSE Electronics.
Unit E2 : Applications of Electronics
Standard Genie Board Simulation
As well as simulating the flowchart we can simulate the program flowchart
running on a circuit board. To do this:
1.
Start with Flowchart 6.
2.
Click on the PCB Layout tab on the bottom of the screen
22
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
3.
You will see this screen.
4.
Select <Standard Genie Boards> from the side menu.
.
23
GCSE Electronics.
Unit E2 : Applications of Electronics
5.
Use the scroll bar on the right hand side to move down the list of
standard Genie Boards until you reach the E18 Activity Board.
6.
Select the Genie E18 Activity Kit, using the left mouse button, and drag
it onto the PCB area.
24
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
7.
You will then have the following on your screen. Notice that the board
has been placed in the top right hand corner of the design area. This is
because we have to add a power source to the board.
8.
To add a power supply for the board we need to open the Power Supplies
Folder. Expand the drop down list on the right hand side.
25
GCSE Electronics.
Unit E2 : Applications of Electronics
9.
You will see this screen
10.
Select the <Power Supplies> Option
26
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
11.
Select the 3 x AA Battery with holder, and drag it underneath the PCB
layout of the Activity board, as shown below.
12.
Now we simply need to connect the
battery pack to the PCB design
using some wire links.
Click on the PCB Layout Tools Icon,
and select Flying wire.
27
GCSE Electronics.
Unit E2 : Applications of Electronics
13.
The cursor will change to a ‘+’ sign. Move this to the ‘+’ sign of the
terminal block on the PCB. Press the left mouse button, and holding
down the left mouse button drag a wire to the positive of the battery
pack and then release the left mouse button so that you get the
connection as shown below.
The lead will be blue when first connected, but as
this is the positive lead it would be better if this was
red. We can change the colour if we place the cursor
over the wire and press the right mouse button. The
menu opposite will appear. Select the colour option
from the menu which will open a colour palette,
choose red, and press <OK>. The wire will then be red.
28
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
14.
We connect up the negative terminal in exactly the same way. As it is
the negative lead we should colour it black. The circuit should now look
like this.
15.
The program can be seen running through its sequence by pressing the
start simulation button at the top of the screen.
29
GCSE Electronics.
Unit E2 : Applications of Electronics
16.
The program can be observed going through the sequence with the
bottom two LEDs lighting up in sequence.
17.
We can also see what is happening to the outputs by clicking on the view
digital inputs and outputs option.
30
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
18.
.
Here we can see Q0 on; both in the digital outputs window and on the
circuit board.
Note: At this stage we are only simulating the performance of the system in
the computer. There is no actual device connected to the system.
31
GCSE Electronics.
Unit E2 : Applications of Electronics
Downloading the Program to a Real Microcontroller
All that is needed to do this is to plug one end of the USB cable into
computer and the other end into the jack socket on the circuit board.
The following message should appear on screen.
Click <OK> to remove the message, and the following screen will be shown. To
download the program and actually run it on the activity board just click on
<Run Live>.
32
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
The green LED next to the jack socket will flash several times as the
program is downloaded, the window on the top right will show the program
downloading and the percentage completed.
Once the program has completed downloading the program will start
automatically on the Activity Board and you will see the screen above showing
the program running live.
The program is now embedded into the microcontroller. The USB lead can be
disconnected and the program will run until the battery is disconnected. As
soon as the battery is reconnected the program will start running again.
The program will remain on the microcontroller indefinitely or until you
reprogram it with another sequence.
33
GCSE Electronics.
Unit E2 : Applications of Electronics
Activity 7:
Construct and test the following flowchart.
Describe the programs operation.
...................................................................................................................................
...................................................................................................................................
...................................................................................................................................
...................................................................................................................................
34
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
Activity 8: Using Analogue Inputs
The E18 Activity Board is fitted with a LDR on input A/D1, and a Buzzer on
Output Q6. We will use these and the LED on Q0 to solve the following
problem.
Problem:
8a.
An intelligent door bell is required for a family with a young baby.
If it is light then when a switch is pressed a buzzer should pulse
on and off at 1 second intervals for 10 seconds. If it is dark, then
the LED should pulse on and off continuously until reset by a
different switch.
Set up the flowchart as shown above and test it to see if it meets the
design specification.
35
GCSE Electronics.
Unit E2 : Applications of Electronics
Activity 9.
The UK cycling team is busy preparing for the Olympic Games. At the
velodrome in Manchester the team coach wants to have a lap counter fitted
to the track to light a lamp when 10 laps of the track have been completed.
A pressure switch is fitted to the track so that when the wheel of the bike
passes over it, the switch is closed.
Can you spot a potential problem with this method?
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
36
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
9a.
.
The flowchart below provides a possible solution to the problem.
37
GCSE Electronics.
Unit E2 : Applications of Electronics
9b.
Setup the flowchart on page 37.
D6 is checking that the bike is correctly positioned on the start line.
D7 is the pressure switch checking for completion of a lap.
9c.
Explain what each step of the program does.
…………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………
You can now return to the main set of notes Page 24.
The following section demonstrates how straightforward it can be to
incorporate a microcontroller in a project using Circuit Wizard.
38
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
Project Building with Microcontrollers
Part of your GCSE Electronics course requires you to build a project to
satisfy a design brief. You can now incorporate a microcontroller into your
project very easily using the Circuit Wizard suite of programs.
The following notes will take you through a very simple project idea, which is
too basic for a GCSE project, but is just to illustrate the steps needed to
create a working solution and how straightforward it can be.
Design Brief:
You have been asked to design a musical birthday card to play Happy Birthday
when the card is opened and to flash a couple of LEDs to the lucky birthday
boy or girl.
This might sound very difficult, but using circuit wizard it is quite straight
forward as the next few pages will illustrate. The musical part is taken care
of in some prewritten tunes available in the flowchart section of circuit
wizard.
We only need one switch for the card, so just one input, and three outputs,
one for the musical output, and two for the flashing LED’s. We can therefore
use a very basic microcontroller for such a simple system and the Genie C08
fits the bill nicely.
So now we will take you through the steps needed to create this project.
39
GCSE Electronics.
Unit E2 : Applications of Electronics
Open Circuit Wizard, the following screen will be shown.
Click on the Flowchart Tab – the screen becomes:
40
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
Now select the C08 Microcontroller. Can you remember how to do this?
Select <Project>
from the menu,
then
<microcontroller>,
then
<program settings>
This will open the following window:
The Genie C08 is the default microcontroller, so
we don’t have to change anything here.
However, notice that the inputs are G1 and G3,
and the outputs are G0, G2 and G4.
We will setup the switch input on G3, Musical
Sounder on G2, and LEDs on G0 and G4.
41
GCSE Electronics.
Unit E2 : Applications of Electronics
Now create this flowchart.
The only new instruction in
this flowchart is the
Instruction. You will find it
the Inputs and outputs
section.
Once you have dragged the
instruction onto your
flowchart, double click it to
open the properties window.
42
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
This dialogue box allows you to choose
pre-recorded tunes by selecting them
from the drop down list.
Select ‘Happy Birthday’ from the list.
43
GCSE Electronics.
Unit E2 : Applications of Electronics
Then select the output that we want
Music to played from. In this case
that was G2, to click on the ‘x’ for G2
until the
shown.
symbol is
Finally add a suitable caption to
explain what happens in the tune box.
Click OK.
Continue to build the rest of the flowchart.
Once completed you can test the flowchart, as you did previously. When S3 is
pressed, ‘Happy Birthday’ should play and then the two led’s should come on
and off 10 times.
Once the program is running, we need to make the circuit.
Leave the Flowchart on screen and click the “Circuit Diagram” Tab at the
bottom of the screen.
44
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
You will then have a blank screen as follows:
Start by selecting the <Integrated
Circuits> folder, and then
<Microcontrollers> to select our
microcontroller. The panel on the right
should be visible.
The Microcontroller we want is the
Genie C08, Click on this with the left
mouse button and drag it on to the
circuit work area.
45
GCSE Electronics.
Unit E2 : Applications of Electronics
The screen will now look like that above. It is now just a case of adding the
rest of the components needed to make the rest of the circuit, from the
component folders on the right.
If you are not familiar with this process your teacher can show you how to do
so, but the circuit you are looking to end up with is shown on the following
page.
46
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
Once you have completed the circuit you will be able to see the power of this
integrated package.
You now have a circuit diagram containing a programmable device. You have
written a flow chart program for this device and tested it on the simulator.
You can now run the circuit diagram in simulation mode and it will actually run
your program from the flowchart page. Just click on the small arrow at the
top of the screen
to start the simulation running. When you operate the switch, you should hear
Happy Birthday being played followed by the LEDs flashing.
47
GCSE Electronics.
Unit E2 : Applications of Electronics
The next stage would be to make a Printed Circuit Board of your finished
design, and we will look at how to do that in a minute. First we have to tell the
software, which type of switch we are using.
Select the Switch, and press the right
mouse button.
The first menu will appear, then select
<Symbol>, then <Convert As…>
The following
dialogue box will
appear.
Using the Drop Down list will reveal a number of possibilities for the switch,
as shown below:
Choose the Push Switch (6 x 6 mm) as
shown highlighted.
Then click <OK>
The switch on screen will not look any
different; however the software now
knows what type of switch it is when
designing the Printed Circuit Board.
All of the other components on the board are already defined and need no
further action so we are ready to design a Printed Circuit Board.
48
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
Once again making a Printed Circuit Board or PCB for your project, sounds
hard, but this could not be easier to achieve.
From the <Project> Menu,
select
<Circuit Symbols>
then
<Convert to PCB Layout>
This will bring up the following dialogue box.
This lets you know what is about to
happen to your circuit design.
Just click <Next>
49
GCSE Electronics.
Unit E2 : Applications of Electronics
Now we have an options box to
select our particular type of
PCB. As this is a fairly simple
design, just choose the top
option Single Sided; Thick
Tracks.
Then Click <Next>
Here you can specify the size of
your circuit board if you have a
limited space available.
For now just click <Next> and let
the software decide the size
required.
Finally you are presented with
this screen which actually
starts the conversion process.
Click on Convert.
Watch as the software places
the components on the PCB and
then connects then all together
for you.
50
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
You will then see this screen.
Click on <OK> to remove the dialog box, to reveal a completed PCB design.
51
GCSE Electronics.
Unit E2 : Applications of Electronics
Now that the PCB has been designed you will be amazed to find out that you
can actually simulate your project on the PCB design. We need to add a power
pack first though, as no circuit works without power. So select the <Power
Supplies> Option from the right hand side of the screen, and drag in the 3AA
Battery pack and place it on the left of the PCB as shown below.
Now we simply need to connect the
battery pack to the PCB design using
some wire links.
Click on the PCB Layout Tools Icon, and
select Flying wire.
52
Topic 2.5 – Programmable Control Systems.
2.5.2 Software Based Controllers – Supplementary Notes
.
The cursor will change to a ‘+’ sign. Move this to the ‘+’ sign of the terminal
block on the PCB. Press the left mouse button, and holding down the left
mouse button drag a wire to the positive of the battery pack and then release
the left mouse button so that you get the connection as shown below.
53
GCSE Electronics.
Unit E2 : Applications of Electronics
Repeat this process for the negative wire, and you should end up with this.
Your Circuit is all ready for simulating; just press
the start simulation button from the top of the
screen, and then press the switch on the circuit
board design, and your program will run.
When you are satisfied that your design satisfies
the specification you can manufacture the PCB and
assemble the circuit. The program can then be downloaded to the circuit
board for final testing.
This is a very powerful design and development tool, all integrated into one
package. We have tried to show you how a programmable device can be easily
integrated into your projects, using this simple example. We leave it up to you
to imagine the possibilities of what can be achieved, but using this package
provides the most flexible and rigorous approach to being able to develop and
test your circuits at every stage of their development. Good Luck!
54
Download