Technological Studies

advertisement

Technological Studies

Systems and Control

Students’ Notes

Intermediate 2

5718

Summer 1999

HIGHER STILL

DET:

Technological

Studies

Systems and Control

Students’ Notes

Intermediate 2

Support Materials

*+,-./

TECHNOLOGICAL STUDIES

INTERMEDIATE 2

SYSTEMS AND CONTROL

STUDENTS’ NOTES

OUTCOME 1

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 1

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 2

Outcome 1 - Control Systems

The purpose of this unit is to introduce the operation of control systems.

When you have completed this unit you should be able to:

• recognise and identify common control systems

• describe the operation of open and closed loop control systems

• make use of systems diagrams and systems technology

Before you start this unit you should have a basic understanding of:

Block diagrams

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 3

Introduction

Many of the devices used in the home or in industry require an electronic control system so that they can operate correctly. A room heater has to be able to switch itself off as the room heats up, an oven control’s it’s heating elements to maintain an even temperature or a printer monitor’s its print cartridge and senses when it is empty.

Electronic control systems all contain the same basic elements, one or more real-world inputs, one or more real-world outputs, and the signal processing sub-system. A simple system with one input and one output can be represented by the following block diagram.

,1387 ,1387

75$16'8&(5

352&(66

287387

75$16'8&(5

287387

The Input Transducers could be simple digital on/off switches (e.g. a push switch), analogue sensors monitoring the control systems output (e.g. a temp sensor) or any other sensor that the control system requires (e.g. a water pressure sensor).

The Process sub-system may be a simple circuit based around discrete components such as transistors, or a more complicated system using logic gates or microcontrollers.

Motors, heating elements and lamps are all examples of Output Transducers. One of the most common output transducers in an electronic control system is a relay.

System Diagrams

A complete control system can be represented by a systems diagram. A simple system diagram is shown below.

IN PU T C O N TR O L

O U TP U T

D R IVER

O U TP U T

When applied to control systems, a Systems Diagram is a useful way of visually representing the desired function of the system.

The systems diagram is a form of block diagram than contains all the subsystems within a dashed box, called the systems boundary. The systems boundary indicates the extent of the control system.

The "real world" input and output conditions of the system are shown as arrows entering, and leaving, the systems diagram.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 4

Example

A product which has a fairly complicated control system is an automated washing machine.

A simplified systems diagram of a washing machine is shown below.

S ET W AS HING

C YCLE

C O NTR O L

C LE AN C O LD

W AT ER

H EATER M O TO R P UM P

D IRTY

C LO TH ES

D RUM

H O T D IRTY

W AT ER

C LE AN

C LO TH ES

The function of the washing machine is to process dirty clothes to produce clean clothes. This is clearly represented within the systems diagram.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 5

Assignment 1

Draw system diagrams for the control systems used in the following devices.

a) A smoke alarm.

b) A drill.

c) A hairdryer.

d) The on/off control on a TV.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 6

e) The water heating system in a dishwasher.

A temperature sensor detects when the water requires heating.

Assignment 2

Draw system diagrams for the systems described below.

a) A house alarm system with two door sensors, an arm key and a siren.

b) A temperature monitoring system where a warning lamp lights if the temperature gets to cold or a lamp test switch is pressed.

&

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 7

Open Loop Control

At the simplest level a control system can process an input condition to produce a specified output.

A good example of this type of system is a hand-held electric hairdryer. The heating element and fan motor are switched on when the appropriate switches are held down.

The system diagram for the hairdryer is shown below.

S W IT C H

H E LD

D O W N

C O N T R O L

O U T P U T

D R IV E R

FA N & H E ATE R

S W IT C H E D O N

This is an example of Open Loop Control, where an input is processed to produce an output. With the hairdryer example the heater and fan motor are held on until the switches are released. The air being blown out of the hairdryer is not temperature monitored or adjusted - the air is simply just blown out at whatever temperature the heater is capable of achieving.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 8

Another example of an open loop system is an automatic street lamp.

The systems diagram for the street lamp is shown below.

D ETEC T

LIG H T

LEV EL

C O N TR O L

O U T PU T

D R IVER

SW ITC H

LAM P

O N /O FF

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 9

A model of the street lamp can be represented by the following circuit diagram:

V cc

0V

The input to the circuit, light, is processed by the control subsystem to produce an electrical signal. In this example the potential divider arrangement provides a varying voltage signal.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 10

The electrical signal is processed by the output driver subsystem to produce the output. In this example the output is light from the signal lamp

An open loop control system represents the simplest and cheapest form of control.

However, although open loop control has many application, the basic weakness in this type of control lies in the lack of capability to adjust to suit the changing output requirements.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 11

Closed Loop Control

Closed loop control systems are capable of making decisions and adjusting their performance to suit changing output conditions.

Example 1

A personal cassette player is capable of detecting the end of the tape and switching the motor off, hence protecting the tape from snapping (or the motor burning out).

EN D O F

TAP E

C O N TR O L

O U TPU T

D R IVER

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 12

Example 2

The central heating in most modern houses is controlled by a thermostat. It senses changes in temperature and turns off the heating system automatically when the required temperature is reached. Likewise when the temperature level drops below the minimum acceptable level the heating system is automatically switched back on.

Assignment 3

Copy and complete diagram for the system.

the system heating control

SET TEMP

LEVEL

TEMP

CONTROL

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 13

Assignment 4

A control system is used in a fridge to keep the contents at a constant temperature.

For the fridge control system described above, copy and complete the systems diagram shown below.

TEMP

CONTROL

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 14

Feedback

All closed loop control systems include a feedback sensing subsystem within the systems diagram. The control subsystem will process the feedback signal by making a

'decision' on whether the state of the output should change.

FEE D B AC K

S E N S IN G

IN PU T C O N TR O L

O U TP U T

D R IVER

O U TP U T

Negative and Positive Feedback

The purpose of closed loop control is to ensure that the output is maintained, as closely as possible, to the desired output level. In the case of a central heating system, a graph of the temperature in a room might appear as in the graph below.

A C T UA L T E M P E RATU R E

S E T T E M P E R AT UR E

T IM E

As can be seen from the graph, the control system is constantly trying to pull the temperature of the room back towards the set temperature level by reducing the error.

This type of control uses negative feedback to reduce the error.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 15

S O U N D M IC R O P H O N E A M P L IF IE R S P E A K E R

A M P L IF IE D

S O U N D

A M P L IF IE D S O U N D F E E D BA C K T O S P E AK E R

The opposite effect can be created by reinforcing the error, as can sometimes happen with public address systems when the microphone is held too close to the speakers. A sound is picked up by the microphone, amplified, and then output through the speaker.

The amplified sound is then picked up, re-amplified and so on. The net result is a high pitch sound, which can be represented by the graph below.

S O U N D

S IG N AL

A CT U A L S O UN D

S IG N AL

R EQ U IR E D S O U N D

S IG N AL

T IM E

This is an example of positive feedback. Although positive feedback does have some useful applications, negative feedback is far more widely used in control systems.

Assignment 5

Explain the following terms when applied to control systems: a) b) control diagram, open loop, closed loop, negative feedback, positive feedback

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 16

Assignment 6

Explain what is meant by the term 'systems diagram'.

Assignment 7

Describe the differences between an open loop and closed loop control system.

Assignment 8

Describe the purpose of the feedback sensing subsystem in a closed loop control system.

Assignment 9

The figures above show two types of electric fire. The second electric fire is a more modern device fitted with a thermostat.

a) Name the type of control system used in each type of electric fire b) Draw a system diagram for each type of electric fire.

c) Name a type of electronic sensor that may used for measuring temperature.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 17

Control Diagrams

When working with control systems a control diagram is often used instead of a system diagram.

A heating control system can be represented by the following systems diagram.

T E M P E R AT U R E

S E N S O R

S E T

T E M P E R AT U R E

L E V E L

C O N TR O L

O U TP U T

D R IV E R

C O N S TA N T

O U TP U T

T E M P E R AT U R E

The system diagram can be redrawn as a control diagram as shown below.

SET TEMP

LEVEL

-

+

SENSOR

OUT PUT

DRIVER

COOLANT

PUMP

CONST ANT

OUT PUT T EMP

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 18

Error Detection Symbol

This control diagram always includes the Error

Detection symbol.

This symbol shows how the two signals, the set signal and the feedback signal, will be compared.

If the feedback signal is higher the output is high.

In the system above this would turn the coolant pump on when the sensor was warm.

If the feedback signal is lower than the set signal

(+ve) the output is low.

If the feedback signal is greater the output is low.

If the feedback signal is lower than the set signal

(+ve) the output is high.

In the system above this would turn the coolant pump on when it was already cold

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 19

Assignment 10

A robot arm is to move to a set position.

When in the correct position a sensor will send a signal to the control system and stop the arm.

The control system is shown below.

POSIT ION .

SENSOR

MOVE

COMMAND

+

-

AMPLIFIER

DRIVE

MOT OR

ARM

MOVEMENT a) Describe what happens to the system as the arm actuates the position sensor.

b) Explain the function of the error detector.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 20

Assignment 11

For the control situations below draw a control diagram and state whether it is an open loop or closed loop system.

a) An automatic kettle.

b) A microwave oven turntable.

c) A water fill system in a dishwasher.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 21

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 1 22

TECHNOLOGICAL STUDIES

INTERMEDIATE 2

SYSTEMS AND CONTROL

STUDENTS’ NOTES

OUTCOME 2

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 1

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 2

Outcome 2 – Common Applications of Control Systems

The purpose of this unit is to introduce common applications of control systems.

When you have completed this unit you should be able to:

• identify two state (on/off), continuous and sequential control systems

• correctly identify the main sub systems of a control system

• understand the difference between analogue and digital transducers

• select appropriate input transducers for control applications

• select appropriate output transducers for control applications

• understand common applications of electronic control systems

Before you start this unit you should have a basic understanding of:

System diagrams

Open and closed loop control

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 3

CLOSED LOOP CONTROL

Closed Loop control can take three possible forms:

1.

Two State (on/off) Control.

2.

Continuous Control.

3.

Sequential Control.

Two State (on/off) Control Systems

Two State (on/off) control is used to control simple systems where output devices are to be switched on and off. A typical example is the safety switch often built into the rear rubber bumper of modern lorries. If the lorry reverses into an object the switch is activated, and automatically applies the brakes to stop the lorry.

Another typical two state (on/off) system is a light sensor at the end of a conveyer belt in a production line. When an object reaches the end of the conveyer belt it blocks the light to the sensor, which then stops the motor so the object does not fall off the end of the conveyer belt.

Assignment 1.1

Describe two common devices that use two state (on/off) control. In each case explain why two state (on/off) control is appropriate for this type of device.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 4

Continuous Control Systems

Continuous control is used in control systems where the system is operational continuously. A typical example is in a commercial greenhouse, where the temperature is continuously monitored, and a heater is switched on if the temperature drops below a certain level.

Example 1

A home security light uses continuous control.

The PIR sensor continuously monitors to see if

a person is moving in the area. When activated the security light switches on until no further movement is detected.

This is an example of continuous control.

Example 2

An Industrial Soldering machine has to keep a bath of solder at a constant temperature.

Sensors continuously monitor the solder’s temperature and operates a heater when required.

This is an example of continuous

control.

CIRCUIT

BOARD

HEATER

CONTROLLER

SOLDER

BATH

TEMP

SENSOR

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 5

Assignment 1.2

Describe two devices that use continuous control. Draw the systems using control diagrams. Show the control system boundary.

Assignment 1.3

Traffic lights at a road junction follow a set sequence of operations. The traffic lights do not wait for a start signal but run continuously. The two sets of lights must be carefully programmed so that only one set shows ‘green’ at any time

This system would be described as

continuous control.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 6

a) Complete the following table to show the correct light sequence for the two sets of lights.

Lights Set 2 Lights Set 1

Red

Red

Red and Amber

Green

Amber

Red b) Draw a control diagram for the system, clearly identifying all the sub-systems.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 7

Sequential Control Systems

Sequential Control is used to control systems whose outputs are required to follow a fixed cycle of events (a sequence) when triggered.

Example 1

A robot arm used to weld car bodies on a production uses sequential control. The robot arm once a car body is in position follows a set sequence of movements.

When finished that body is removed and the robot repeats the sequence when another body is sensed.

C O N TRO LLER

C AR

S EN S O R

Assignment 1.4

Draw a control diagram for a robot arm that welds the door frame into the car body.

Clearly identify each of the sub-systems within the control diagram.

Example 2

A vending machine follows a preset sequence of operations when activated.

Depending on what has been requested then a cycle of operations start and can not be interrupted until completed.

P op

F izzy

K olah

J u ice

G inger

Y u k

Assignment 1.5

Draw a control diagram for a vending machine. Clearly identify each of the subsystems within the control diagram.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 8

The Basic Stamp system can be used to run a sequential control system. The Basic

Stamp controller studied in the next section could be used to control the two examples of sequential control above. The advantage of a programmable system is that the same robot can be used to carry out different tasks simply by changing the software within the programmable controller. When using discrete electronics it is necessary to completely redesign the electronic circuit every time a new robot is required.

Assignment 1.6

The lights at a pedestrian crossing are an example of a sequential control system. When the pedestrian pushes the switch beside the crossing a sequence of events starts.

Complete the following table to describe this sequence of events.

Step 1

Step 2

Wait warning light glows

Red Man warning light glows

Green traffic light goes out

Amber traffic light comes on

Step 3

Step 4

Step 5

Step 6

Assignment 1.7

Describe three common devices that use sequential control. In each case explain why sequential control is appropriate for this type of device.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 9

Assignment 1.8

For each of the systems described below: i) State which type of control system is used.

ii) Draw a control diagram of the system.

iii) Explain the purpose of each sub-system within the control diagram.

a) Placing bottle tops on bottles on a production line.

b) Domestic heating system running off a time clock.

c) Pelican crossing.

d) Temperature monitoring system on an aircraft engine.

e) A modem connecting a computer to the Internet.

f) A set of flashing Christmas tree lights.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 10

TRANSDUCERS

Any electronic control system can be broken down into three distinct parts

AE.Int2.O2.fig1

The input and output parts must ‘interface’ with the real world

A transducer is a device that converts one form of energy into another e.g. a microphone is a transducer that changes Sound Energy into Electrical Energy.

Output Transducers

Output transducers in electronic systems are used to convert Electrical Energy into another form that can be detected by the user or used in some other way.

Common Output Transducers

The table gives some examples of common output transducers that you may have met before.

Output Transducer

Bulb

Lamp

LED

Buzzer

Loudspeaker

Earphone

Motor

Pump

Solenoid

Heating element

Output Energy

Light

Sound

Movement

Heat

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 11

Examples of Common Output Transducers

At the output of an electronic system the output transducer converts the electrical signal in to some other useful form of energy such as heat, light, sound or mechanical energy.

Electric Motors

Electric motors convert the electrical signal into rotational kinetic energy. Before a motor is connected to a circuit it is necessary to know the characteristics of the motor in terms of working voltage and the maximum current to be drawn by it in order to determine the correct choice of driver. The most common and likely choice to drive a motor from an electronic circuit would be the relay.

Solenoids

The solenoid consists of a magnetic core that is free to move position inside a coil.

When current flows through the coil and it is energised, the magnetic core is pulled into the centre of the coil (along the coil axis). This converts the electrical signal into linear motion. A solenoid is used when in and out motion is required. Solenoids require very large currents in order to produce meaningful force and they are usually switched on and off by using relays.

AE.Int2.O2.fig1c - Circuit symbol for a solenoid

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 12

Relay

The relay is not strictly speaking an output device but a switch that can be driven by the output from an electric or electronic circuit. It is an electromechanical device consisting of two main parts - the operating coil (which is essentially a solenoid) and the contacts.

AE.Int2.O2.fig1a

DIL REED RELAY

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 13

AE.Int2.O2.fig1b - Circuit symbol for a relay

An electric current is sent through the coil that energises it. The coil becomes magnetic and it attracts a spring-loaded armature that moves the contacts together

(Energised position). Switching the supply off to the coil causes the relay to re-set to the normal (de-energised) position.

These contacts can then be used to switch on a very powerful circuit or a number of circuits.

The relay is a very useful device and is particularly useful for energising devices

that require substantial amounts of current. It is perhaps the most commonly used switch for driving devices that demand large currents.

Two relay circuits are shown below.

9V V 9 V

,QSXW 6LJQDO

)URP 'ULYHU

Y

SPST single pole single throw

Y

,QSXW 6LJQDO

)URP 'ULYHU

Y

DPDT double pole double throw

The SPST is used for any simple control system e.g. controlling a lamp, turning a heating element on etc.

Y

A DPDT relay is ideal for controlling a motor. As can be seen below the motor can run backwards or forwards.

02

725

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 14

V 9V

V 9V

,QSXW 6LJQDO

)URP 'ULYHU

Y

Y

02

725

,QSXW 6LJQDO

)URP 'ULYHU

Y

A typical relay will require 6V and approximately 60mA to switch.

Analogue & Digital Input Transducers

Y

An analogue signal uses the full voltage range. A signal from a circuit with an LDR

(light sensor) may vary from 0 to 5V.

92/7$*(

9

/,*+7

02

725

9

'$5.

7,0(

A digital signal is much simpler and can only have two voltages. OV (logic0) or 5V

(logic1). A push switch gives a digital signal.

VOLT AGE

5V

0V

T IME

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 15

Input Transducers

Input transducers convert a change in physical conditions (e.g. temperature) into a change in an electrical property (e.g. voltage) which can then be processed electronically to produce either a direct measurement of the physical condition

(Temperature in o

C) or to allow something to happen at a predetermined level (e.g.

switching on the central heating at 20 o

C).

Common Input Transducers

The table gives some examples of common input transducers that you may have met before.

Physical condition to be monitored

Temperature

Light

Displacement

Force

Angle

Input Transducer

Thermistor

Thermocouple

Platinum Film

LDR

Selenium Cell

Photo Diode

Slide Potentiometer

Variable Transformer

Variable Capacitor

Piezo electric crystal

Rotary Potentiometer

Electrical property that changes

Resistance

Voltage

Resistance

Resistance

Voltage

Resistance

Resistance

Inductance

Capacitance

Voltage

Resistance

It can be seen that electrical properties that change fall into three groups

1.

Transducers that produce voltage.

2.

Transducers that change the value of resistance.

3.

Transducers that change either the value of inductance or capacitance.

Changes in the resistance of an input transducer are usually converted to changes in voltage before the signal can be processed. This is normally done using a voltage divider circuit.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 16

Examples of common Input Transducers

The switch

We all make use of switches every day. We use them to turn on lights, personal stereos, hairdryers and numerous other devices. A switch in it’s simplest form is used for making and breaking an electrical circuit and it usually contains metal contacts which when touching allow current to flow.

Switch types

There are several ways in which the contacts in mechanical switches can be operated.

Some are push button, toggle, slide or magnetic (reed), tilt and electromagnetic relay.

Switches are wired up to suit their application. A switch with it’s contacts apart when it is not operated is called a normally open switch.

These switches are “digital” input devices as they can only be on or off.

7RJJOH

.H\

6OLGH

7LOW

5RFNHU 3XVK %XWWRQ

5HHG

The switches shown above are all single pole with single or double throws. These are known as SPST and SPDT switches. The symbols are shown overleaf.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 17

AE.Int2.O2.fig2

Notice that the switch consists of two parts, a pole and a contact. This switch is called a single pole single throw switch (SPST). It is given this name because its single pole can be thrown into contact in one position only.

Three further commonly used switch layouts are given below.

AE.Int2.O2.fig3

AE.Int2.O2.fig4

AE.Int2.O2.fig5

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 18

Variable Resistor (Potentiometer)

A potentiometer or variable resistor can be used in a circuit either as a voltage or current control device.

AE.Int2.O2.fig5a

Potentiometers normally have three tags, the outer ones being connected to the ends of the resistive material and the centre one the wiper.

The spindle of the potentiometer is connected to the wiper, which is able to traverse from one end of the resistance to the other when the spindle is rotated. As the spindle rotates a sliding contact puts more or less resistive material in series with the circuit.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 19

Light Dependent Resistor (LDR)

The LDR (sometimes called a photoresistor) is a component whose resistance depends on the amount of light falling on it. It’s resistance changes with light level. In bright light its resistance is low (typically around 1K). In darkness its resistance is high

(typically around 1M).

The circuit symbol and typical characteristics are shown below.

AE.Int2.O2.fig6

AE.Int2.O2.fig50 - Graph of Illumination / Resistance

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 20

Thermistors

A Thermistor is a device whose resistance varies with temperature. It is a temperature dependent resistor. There are two main types:

1.

Positive temperature coefficient (+t) or (ptc) - where resistance increases as temperature increases.

2.

Negative temperature coefficient (- t) or (ntc) - where resistance decreases as temperature increases.

The circuit symbol and typical characteristics are shown below.

AE.Int2.O2.fig7

AE.Int2.O2.fig8

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 21

AE.Int2.O2.fig51 - Graph of Temperature / Resistance

Strain Gauges

These are really load sensors. They consist of a length of resistance wire and when stretched their resistance changes. Strain gauges are attached to structural members and as they are loaded you can obtain a reading on a voltmeter.

AE.Int2.O2.fig9

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 22

Criteria for selecting transducers

Once the physical condition to be monitored and the output requirements of the system have been identified, a choice of transducers has to be made. A number of different criteria may need to be taken into account, some of which are listed in the table below.

Response Time

Linearity

Most transducers are required to respond to the change in conditions. If changes occur quickly, a transducer with a fast response time may be required.

This is especially important when using transducers in measuring instruments

Sensitivity

Physical Size

Robustness

Accuracy

Repeatability

Cost

If changes in physical conditions produce only small changes in the electrical properties of an input transducer, then a differential amplifier (covered in later units and at Higher) may be required to amplify the small changes before further processing can take place.

This may be an important criterion dependent on the system the transducer is to be placed in. (e.g. a loudspeaker may be inappropriate as an output transducer for a personal stereo).

This may be dependent on the environment that the transducer is exposed to ( or the users will be exposed to)

Accuracy of the transducer could be of the utmost importance in some situations.

The ability of a transducer to consistently reproduce the reading for the same conditions.

Given all the above, is the transducer cost effective for the application?

Full technical details of transducers and all electronic components are contained in manufactures data sheets and increasingly in catalogues. (RS Components supply a range of data sheets plus the RS Catalogue on CD-ROM. The CD-ROM contains

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 23

product technical details as well as data files in pdf. format that can be easily accessed and printed off if hard copies are required.)

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 24

Assignment 2.1

Name the transducers that would be used in the situations below.

State whether the transducer is analogue or digital.

a) Streetlight daylight sensor.

b) Sensing the angular position of a robot arm.

c) Counting components on a fast moving conveyor (non-contact).

d) Control the movement of a lift.

e) Sensing the high temperatures in an exhaust manifold.

f) Sensing the temperature in a home freezer.

g) Heating water.

h) Sensing lift doors are fully open.

i) Driving a pump in a heating system.

j) Setting sound levels in a recording studio.

k) A car alarm sensing the door is shut.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 25

Using Transducers

Assignment 2.2

Use the course Data Book for this assignment. All thermisters refer to type 256-045.

a) Lux indicates the light level. The higher the lux value then the brighter the light.

i) Use the graph in the data book to find the resistance of an LDR at 800 lux.

ii) Describe what happens to the resistance as it gets darker.

b) i) From the graph in data book find the resistance of the thermister at 120

°

C.

ii) Describe what happens to the resistance as the temperature increases.

c) Give the resistance for the following values. Use the graphs in the data book.

i) Thermistor at 0

°

C

ii) LDR at 2000 lux.

iii) Thermistor at 60

°

C.

iv) Thermistor at -20

°

C.

v) LDR at 30 lux.

vi) LDR at 570 lux.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 26

Assignment 2.3

Use manufacturers data sheets to answer the following questions

1.

A kiln used in a brick making process has to heat the bricks to a temperature of

600

0

C. Which temperature input transducer would be most suitable for monitoring the kiln temperature and why?

2.

A photographer wants to time how long his flash light bulb comes on for when he takes a photograph. To do this, he connects a light sensor to a timer as shown below.

AE.Int2.O2.fig10

With reference to appropriate manufacturers data sheets, decide which of the following light input transducers would be most suitable and why: - LDR, Selenium cell, and photo diode.

3.

Most computers use LED’s as indicators to show various conditions. Why are

LED's used in preference to normal filament bulbs?

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 27

INPUT SIGNALS

Voltage divider Circuits

If an input transducer changes it’s resistance as the physical conditions change, then the resistance change has to be first converted into a voltage change before the signal can be processed. This is normally done by using a voltage divider circuit.

If two or more resistors are connected in series (see figure 11 below), the voltage over each resistor will depend on the supply voltage and the ratio of the resistances.

Voltage divider circuits work on the basic electrical principle that if two resistors are connected in series across a supply, the voltage load across each of the resistors will be proportional to the value of the resistors.

AE.Int2.O2.fig11

The layouts of voltage divider circuits are conventionally represented as shown above in fig 11.

There are a number of different ways that a voltage divider circuit can be represented.

Some of these are shown in fig 12

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 28

AE.Int2.O2.fig12

These three diagrams each represent the same circuit, in slightly different form.

This should not be a cause for concern since all that has occurred is that the diagram has been rotated around on it’s side. As we progress through this section and onto more advanced circuits, it will become apparent to you why these circuits are positioned as they are.

Consider fig 11

Increasing the value of one of the resistors will increase the voltage drop across it.

(You can use Ohm’s Law to confirm this if you wish).

When monitoring physical conditions, one of the resistors in the circuit is an input transducer, the resistance of which will change depending on the physical conditions.

In general to calculate the voltage across any resistor in a series circuit, we can use the equation

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 29

Voltage across resistor R = Supply Voltage x (size of resistor R/ Total resistance)

For fig 11

V 2

=

Vcc

×

R 2

R 1

+

R 2

Worked Example

Calculate the voltage signal, V2 across the resistor R2, in the voltage divider circuit shown.

AE.Int2.O2.fig 13

Applying the voltage proportion formula

V 2

=

Vcc

×

R 2

R 1

+

R 2

V 2

=

12

×

40

V 2

=

4 V

The voltage over the 80K resistor could be calculated in the same way, but this is unnecessary for this circuit since we can use Kirchoff’s 2nd law to confirm the answer.

i.e. the voltages over each of the components in a series circuit must add up to the supply voltage, hence the voltage over the 80K resistor is 12V - 4V = 8V.

It is also possible to continue to use Ohm’s law to solve these voltage divider questions. You may choose whichever method you are most comfortable with.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 30

Obtaining a signal voltage from a voltage divider circuit

If we were to replace one of the fixed resistors in a voltage divider circuit with an analogue sensor, e.g. a Thermistor, we would now have a system which generates a signal voltage which is proportional to the change in the physical environment, in this case temperature. If you look at the E & L or Alpha analogue input boards you will find that this is the method used to generate signal voltages.

AE.Int2.O2.fig 13a

V sig

changes in proportion with the resistance of the Thermistor R th

.

The Thermistor in fig 13a can be replaced by any analogue sensor e.g. the LDR and will generate a signal voltage proportional to the resistance of the sensor.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 31

Assignment 2.4

Using the formula described above, calculate the voltages that would appear across each of the resistors marked “X” in the circuits below.

9V 6V 6 V

10k 22k 3k9

27k 18k 3k3

1.

In each of the following voltage divider circuits determine the unknown quantity.

9V 16V 9V

9R 12R

12R 39R

15V

4k 180R 2k2

8k2 150R

AE.Int2.O2.fig16

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 32

Assignment 2.5

1.

A ntc (negative temperature coefficient) Thermistor is used in a voltage divider circuit as shown in fig 17. Using information from the graph shown, determine the resistance of the Thermistor and hence calculate the voltage that would appear across it when it is at a temperature of a) 80

0

C b) 20

0

C

AE.Int2.O2.fig17

2.

What would happen to the voltage across the Thermistor in the circuit shown in fig

17 as the temperature is increased?

3.

What would happen to the voltage across the resistor in the circuit shown in fig 17 as the temperature increases?

4.

A Thermistor (type 5) is used in a voltage divider circuit as shown in fig 18. The characteristics of the Thermistor are shown in the graph. If the voltage V

2

is to be

4.5V at 100

0

C, determine a suitable value for R

1

.

State whether the V

2

will increase or decrease as the temperature drops. Explain your answer.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 33

AE.Int2.O2.fig18

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 34

Sensing circuits

Light sensors

Assignment 2.6

Obtain the relevant components and equipment then construct the light sensing circuit shown in fig 19.

AE.Int2.O2.fig 19

In normal light conditions, measure and record the voltage across the LDR and the fixed 10 K resistor.

Cover the LDR, repeat the measurements and record them.

You should have found in this circuit configuration that the resistance of the LDR increases as the light level decreases, so in this case the signal level (Vout) will rise as it gets dark.

Change the position of the LDR and the fixed resistor as shown in fig.20.

AE.Int2.O2.fig 20

Repeat the measurements taken on the first circuit record these.

You should have found that changing the position of the LDR and the fixed resistor allows the signal to change in the opposite direction i.e. the signal level will rise as it gets light.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 35

Temperature sensors

This is a very similar arrangement to light sensing and like the light sensing circuits, temperature sensing circuits can be arranged to produce a signal to move in the opposite direction when the same temperature change is applied.

Assignment 2.7

Obtain the relevant components and equipment then construct the light sensing circuit shown in fig 21. Use a type 3 Thermistor (TH3).

AE.Int2.O2.fig 21

In normal room temperature conditions, measure and record the voltage across the

Thermistor and the fixed resistor.

Apply heat to the Thermistor and repeat the measurements and record them.

Try reversing the positions of the Thermistor and the fixed resistor. Record what happens.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 36

TRANSDUCER DRIVERS

As the output transducers often require a large current or voltage to enable them to work, most control systems require a driver sub-system.

INPUT

TRANSDUCER

OUTPUT

DRIVER

OUTPUT

TRANSDUCER

The following are all signal amplifiers and can be used to drive transducers. -

bi-polar transistor

darlington driver

field effect transistor FET

Bi-polar Transistor

The diagram shows a bi-polar transistor in a circuit diagram.

6V

1K

OUTPUT

0V

The 1K resistor is known as the base resistor. The base resistor is used to limit the current going into the transistor. The current going into the base is known as the base current. Without the base resistor the base current could be too large and damage the transistor.

The base resistor value depends on the other components values in the circuit. For the work we are doing 1K is generally a suitable value.

6V

600K

1K

BASE

CURRENT

OUTPUT

As the thermister cools down the base voltage increases. When the base voltage reaches 0.7V the transistor switches on.

129K

BASE

VOLTAGE

0V

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 37

Transistors in Control Systems

Many simple control systems require the output to be either fully ON or fully OFF.

If a transistor is used as an amplifier in these control systems then it must behave as a switch.

Activity 3.1

Select the components and construct the circuit below, or use circuit simulation software. The transistor to be used is a BC108 or BC548B, look up component suppliers catalogues and record its h FE value.

The bulb should switch on at 100 lux - LDR at 1000 ohms.

6V

1K

BASE

CURRENT

1K

BC108

200R

0V

In this circuit the transistor is behaving as a switch.

The transistor is tending to operate as full ON or full OFF.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 38

Activity 3.2

Alter the circuit in activity 3.1 as shown below and test its performance.

Again the bulb has to switch on at 100 lux.

6V

7K

Ic

1K

0V

1K

1) For the above circuit measure and record the base current, Ib.

2) What is the required current for the bulb to be full on. The current flowing through the bulb is known as the collector current (Ic). (See Data Table).

3) Measure the actual Ic in your circuit.

4) Why does the bulb not light?

h

F E

= Ic

Ib

The h FE is the gain of the transistor. From your recorded values of Ib and Ic what is the h FE required for the above circuit to work.

How does your calculated h FE compare with the h FE you recorded for the BC108 at the start of activity 3.1.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 39

Activity 3.3

Modify your previous circuit as shown below.

9

.

.

% F

% )<

9

.

Use component suppliers data tables to find the gain of the BC108 and the BFY51

Measure Ic in this circuit.

Ic is much greater and now high enough to make the bulb light.

This type of transistor configuration is known as a Darlington pair or driver.

The gain is found by multiplying the h FE ’s together.

Calculate the total gain of this circuit.

h FE total

= h FE 1

x h FE 2

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 40

Developing a Transistor Based Control System

A simple transistor based control system can be developed by following the steps below.

a) Develop the potential divider circuit.

9

5

.

S IG N A L

V O LTA G E

9

9 b) Add a base resistor.

In the circuit above R would be a quite a large resistor so the base current will be

small. A base resistor will not be required.

5V

In a circuit like the one shown, if the LDR was in

bright light, it would have a very low resistance.

The base current could be very high and a base

resistor would be required.

0V

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 41

c) Calculate the base current.

6V

600K

1 K

BASE

CURRENT

OUTPUT

0.7V

I b

=

V cc

+

R 1 R b

If the base current is too big use a larger base resistor.

0V d) Find the current required for the output transducer. This is the required collector current (Ic). Look these values up in data tables.

e) Calculate the current gain of the transistor required.

h

F E

= Ic

Ib f) Select a suitable transistor from data tables.

It should have a suitable gain (h

FE

) and it’s maximum collector current (Ic) should

be greater than required.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 42

Assignment 3.4

Draw system diagrams then develop a transistor based electronic control circuits for the four control systems described below.

The current required to drive the output transducers can be found in the data tables.

Use simulation software to check you circuit design.

a) An experiment monitors the temperature of a chemical solution. If the temp reaches

120

°

C then a buzzer which operates on 6V and requires 25mA is to switch on.

Make the supply voltage 6V.

HEAT

TEMP

SENSOR

DRIVER BUZZER

SOUND b) A water temperature sensor in an electric shower is to cut off the power to the heating element if it becomes too high for safety. Determine a suitable cutoff temperature. When reached a relay is to be switched to cut power to the heating element. Investigate the Ic value required to operate the relay.

c) An automatic street light is to switch itself on when it gets dark at night Determine a suitable light level when it should switch on the relay which will control the lamp.

d) As the outside temperature drops to 3

°

C an ice warning lamp is to light on a car dashboard.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 2 43

TECHNOLOGICAL STUDIES

INTERMEDIATE 2

SYSTEMS AND CONTROL

STUDENTS’ NOTES

OUTCOME 3

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 1

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 2

Section 1 - Introduction

The purpose of this section is to introduce the microcontroller and it's architecture.

When you have completed this section you should be able to:

• describe the operation of microcontrollers

• understand the terms ALU, RAM, ROM, EEPROM, bus

• understand how the Basic Stamp system operates

Before you start this section you should have a basic understanding of:

No previous knowledge required.

To complete the exercises in this section you require:

No equipment required.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 3

Section 1 - Introduction

What is a microcontroller?

A microcontroller is often described as a 'computer-on-a-chip'. Microcontrollers have memory, processing units, and input/output circuitry all built into a single chip. As they are small and inexpensive they can easily be built into other devices to make these products more intelligent and easier to use.

Microcontrollers are usually programmed to perform one specific control task - for instance, a microwave oven may use a single microcontroller to process information from the keypads, display user information on the seven segment display, and control the output devices (turntable motor, light, bell and magnetron).

Microcontrollers are computers designed to control specific processes or products.

The microcontroller is programmed with a specific software program to complete the desired task. By altering this software program the same microcontroller can be used to complete different tasks. Therefore the same device can be used in a range of different products by simply programming it with a different software program.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 4

One microcontroller can often replace a number of separate parts, or even a complete electronic circuit. Some of the advantages of using microcontrollers in a product design are:

• increased reliability and reduced stock inventory (as one microcontroller replaces several parts)

• simplified product assembly and smaller end products

• greater product flexibility and adaptability since features are programmed into the microcontroller and not built into the electronic hardware

• rapid product changes or development by changing the program and not the electronic hardware

Applications that use microcontrollers include household appliances, alarm systems, medical equipment, vehicle subsystems, and electronic instrumentation. Although microprocessor systems (such as those based around the Intel Pentium™ processor) tend to be more widely publicised (mainly via personal computer systems), microcontroller manufacturers actually sell hundreds of microcontrollers for every microprocessor sold.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 5

Microcontroller Architecture

The main features of the microcontroller are shown in the block diagram.

520

352*5$0

0(025<

352*5$0

&2817(5

5$0

5(*,67(5

),/(6

'$7$

%86

$/8

352*5$0

%86

,2

32576

7,0(56

´5($/µ

:25/'

&/2&.

6,03/,),(' 3,& 0,&52&21752//(5

%/2&. ',$*5$0

Microcontrollers contain all these features within a single package, as opposed to the microprocessor system where each block in the diagram above is normally a separate integrated circuit. In general the only component that needs to be added to a microcontroller is a clock resonator, which sets the operating speed of the microcontroller.

Arithmetic / Logic Unit (ALU) and Clock

The processing unit (full name arithmetic and logic unit (ALU)) is the 'brain' of the microcontroller. It operates by reading instructions from the read only memory ROM

(permanent program memory) and then carrying out the mathematical operations for each instruction. The speed at which these operations occur is controlled by the clock circuit.

The clock circuit within the microcontroller 'synchronises' all the internal blocks (ALU,

ROM, RAM etc.) so that the system remains stable. The clock circuit is built into the microcontroller, but an external crystal or resonator is required to set the clock frequency. A typical clock frequency for use with a microcontroller is 4MHz, but speeds as high as 20MHz can also be achieved. With a clock frequency of 4MHz the microcontroller completes one million instructions a second!

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 6

Memory (ROM and RAM)

Microcontrollers contain both ROM (permanent memory) and RAM (temporary memory).

The ROM (Read Only Memory) contains the operating instructions (i.e. the 'program') for the microcontroller. The ROM is 'programmed' before the microcontroller is installed in the target system, and the memory retains the information even when the power is removed. Most microcontrollers are one-time-programmable types, which means the ROM can only be programmed once. If you make a mistake, and have to change the program, the chip has to be thrown away and a new chip programmed with the revised program. To overcome this problem some microcontrollers now use

FLASH EEPROM memory instead. This type of 'erasable-permanent' memory allows the ROM to be re-programmed if a mistake is made.

The RAM (Random Access Memory) is 'temporary' memory used for storing information whilst the program is running. This memory is 'volatile', which means that as soon as the power is disconnected the contents of the memory is lost.

Buses.

Information is carried between the various blocks of the microcontroller along 'groups' of wires called buses. The 'data bus' carries the 8-bit data between the ALU and RAM

/ Input-Output registers, and the 'program bus' carries the 13-bit program instructions from the ROM.

The size of the data bus provides a description for the microcontroller. Therefore an '8 bit microcontroller' has a data bus '8-bits' wide. Microcontrollers with 16-bit and 32-bit data buses are also available.

Input/Output Circuitry

Microcontrollers communicate with the outside world via pins which are grouped together in 'ports', with up to eight pins in each port. Smaller microcontrollers may only have one port, whilst larger devices may have five or more. Generally each pin within the port can be configured as an output or as an input, or can even be multiplexed to change functions as the program is run!

The CMOS fabrication techniques used to build modern microcontrollers provides a relatively high current capability (approx. 20mA) for each pin. However further

'interfacing' circuits are required for most output devices.

Timers

Most microcontrollers have one or more 'timers' built into the system. The 'watchdog timer' is the most common type of timer. This is a special timer that 'resets' the microcontroller if it stops processing for any reason (e.g. a 'bug' in the program). This ensures that the microcontroller continues working at all times - which is essential in some applications, for instance medical monitoring equipment.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 7

Understanding the Basic Stamp System

In industry microcontroller programs are normally developed using the 'assembler' or

'C' programming languages. Unfortunately these languages are not particularly easy for the beginner to understand, and it can take a great deal of time and study before a programmer is skilled enough to construct a complex program.

For this reason it is easier for the beginner to program with 'user friendly' languages such as BASIC (Beginners' All Purpose Symbolic Instruction Code). This language is specifically designed to be 'easily understood' and so primarily uses standard 'English language' words as instructions. However, before the microcontroller can understand the BASIC instructions, these instructions must be processed by an 'interpreter' into machine code assembler. The extra processing time involved in this conversion results in a BASIC program running slower than an equivalent machine code assembler program. However, as microcontrollers can process over one million assembler code instructions a second, the extra processing time required by the BASIC program is negligible in most cases!

The 'Basic Stamp' system was developed in the early 1990s (by Parallax, Inc., USA) to enable design engineers to quickly prototype systems using microcontrollers by programming in a modified BASIC language (called PBASIC - short for Parallax

BASIC) rather than assembler or C. The Basic Stamp system is an ideal compromise for rapid prototyping - all the power and versatility of a microcontroller combined with a simple programming language.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 8

The 'Basic Stamp' system consists of three main components - the 'Basic Stamp' software, a download cable and the Stamp module itself. The Stamp module contains two main integrated circuits - a PIC microcontroller pre-programmed with the

PBASIC interpreter, and an EEPROM memory chip.

+267 &20387(5

5811,1*

67$03 62)7:$5(

'2:1/2$' &$%/(

((3520

%$6,&

,17(535(7(5

&/2&.

,1387

287387

3,16

The program instructions are written on a host computer in the simple PBASIC language. The download cable is then connected from the computer to the module, and the program is downloaded into the EEPROM memory chip. The download cable is then removed, and the program (now stored in the memory chip) is carried out sequentially by the microcontroller 'interpreter' chip.

Therefore the primary difference between programming standard microcontrollers and programming the Basic Stamp is that, when you 'download' a program to the Basic

Stamp, you are actually programming the external EEPROM, rather than the microcontroller ROM. However when you build electronic systems you are still connecting directly to the 'microcontroller' input/output pins, and so the electronic connections are identical to those made to standard microcontrollers.

The original Parallax Basic Stamp module consisted of a small printed circuit board

(PCB) with battery clip and 'prototyping areas'. Although suitable for prototyping work, this module is not so appropriate for classroom exercises, and so the Stamp

Controller has been developed for educational use. This uses identical 'chips' to the original module, but is configured on a larger PCB with all the necessary connectors etc.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 9

The memory chip used on the Stamp Controller to store the program is the EEPROM type. This type of memory can be reprogrammed when desired, but also retains the program when the power supply is removed. This means the Stamp Controller will start to run the program currently in memory whenever the power supply is connected.

Summary - Programming Procedure.

1.

Write the program on a host computer using the Stamp software.

2.

Connect the download cable from the computer to the Stamp Controller.

3.

Connect the power supply to the Stamp Controller.

4.

Use the Stamp software to download the program. The download cable can be removed (if desired) after the download.

The program will start running on the Stamp Controller automatically. However the program can also be restarted at any time by pressing the reset switch.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 10

Assignments:

1.1) List the advantages of using a microcontroller within a product design.

1.2) Describe the input sensors and output transducers that may be linked to a microcontroller in the following common household appliances:

- microwave oven

- washing machine

- electronic bicycle speedometer

1.3) Explain the following microcontroller terms: ALU, bus, clock

1.4) Explain the differences between the following types of memory:

- RAM, ROM, EEPROM

1.5) Describe the similarities and differences between programming, and constructing interfacing circuits for, a 'true' microcontroller and the 'Basic

Stamp' system.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 11

Section 2 - Number Systems

The purpose of this section is to introduce the main number systems used within programmable systems for the processing of information.

When you have completed this section you should be able to:

Use the following terms correctly: decimal, binary.

Describe contexts when it is appropriate to use the two different number systems.

Convert between decimal and binary number systems.

Before you start this section you should have a basic understanding of:

No previous knowledge required.

To complete the exercises in this section you require:

No equipment required.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 12

Number Systems

A microcontroller operates by performing a large number of mathematical calculations in a very short space of time. This is possible because each piece of information can be expressed as a series of electronic signals. These signals are recognised as being in one of two states, which are described as high and low (or "on" and "off").

The counting system used in everyday activities is the decimal system. This number system uses the ten familiar digits 0 to 9 to express the magnitude of the number.

However, as the microcontroller only recognises the two electronic states high and low, it uses the binary number system. This number system uses just two digits 0 and

1. An electrical signal which is low is represented by 'logic 0', and a signal which is high is represented by a 'logic 1'.

The first sixteen numbers in the decimal and binary systems are shown in the table below: decimal

0

1

2

3

7

8

9

4

5

6

13

14

15

10

11

12 binary

0000

0001

0010

0011

0100

0101

0110

0111

1000

1001

1010

1011

1100

1101

1110

1111

A single binary digit is referred to a bit (binary digit). Different systems carry out calculations using different quantities of bits, and so systems are often referred to as 8bit, 16-bit or 32-bit systems. The most common microcontrollers use the 8-bit system, although 32-bit microcontrollers are also now becoming more readily available.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 13

Notation

When using a number of different counting systems it is important to distinguish which counting system you are using. For instance the number '10' means different values in the two different counting systems!

Therefore the following notations are used within PBASIC programs:

Decimal values are written as usual:

Binary values are preceded by a % symbol:

10 ( = 10 in decimal)

%10 ( = 2 in decimal)

Bits and Bytes

Eight bits grouped together are described as a byte. The decimal value of a byte is calculated by adding together the corresponding decimal value of each of the individual bits. The eight bits in a byte are labelled bits 0 to 7, from right to left. The right most bit is called the Least Significant Bit (LSB) and the left most bit is called the Most

Significant Bit (MSB). The decimal value of each bit is given in the table below: bit number decimal value

7

128

6

64

5

32

4

16

3

8

2

4

The binary number %10010111 when converted into decimal would be:

1

2

0

1

1

1

0

1

0

1

1

0 x x x x x x x x

128

64

32

16

8

4

2

1

=

=

=

=

=

=

=

=

Total:

128

0

0

16

2

1

0

4

151

Note that when writing binary numbers it is quite common to write all 8 bits, even if the first bits are equal to zero (unlike the decimal system, where leading zeros are not normally written).

Assignments:

Convert each of the following binary numbers into decimal:

2.1) %11110000

2.2) %11000011

2.3) %01010101

2.4) %10101010

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 14

Converting Decimal to Binary

To convert any decimal number into binary repeatedly divide the decimal number by two and record the remainder after each division. The decimal number 29 is used as an example.

7

3

1

29

14

÷

÷

÷

÷

÷

2

2

2

2

2

=

=

=

14

7

= 3

= 1

0 rem 1 rem 0 rem 1 rem 1 rem 1

Therefore the decimal number 29 equals the binary number %00011101

Assignments:

Convert each of these decimal numbers into binary:

2.5) 17

2.6) 23

2.7) 11

2.8) 38

2.9) 33

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 15

Section 3 – PBASIC Commands

The purpose of this section is to introduce the PBASIC commands used in developing control program listings.

When you have completed this section you should be able to:

• understand the use of flowcharts

• understand the most common PBASIC commands

Before you start this section you should have a basic understanding of:

The architecture of a microcontroller.

The decimal and binary number systems.

Flowcharts

To complete the exercises in this section you require:

Stamp Controller

Input Module or MFA Sensor Module and Sensors

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 16

Beginning Programming

Control operations are often represented by flowcharts. A flowchart provides a clear graphical method of explaining how a program functions. A simple control operation is represented by the flowchart shown below.

67$57

6:,7&+ 3,1

+,*+

:$,7 6(&21'6

6:,7&+ 3,1

+,*+

:$,7 6(&21'

6:,7&+ 3,16

+,*+

:$,7 6(&21'6

6:,7&+ $//

2))

6723

A PBASIC program which would achieve this control operation is: let dirs = %11110000 ' set 0-3 inputs, 4-7 outputs high 7 pause 2000 high 6 pause 1000 high 5 high 4 pause 3000 low 7 low 6 low 5 low 4 end

' set pin 7 high

' wait for 2 seconds (= 2000 ms)

' set pin 6 high

' wait for 1 second

' set pin 5 high

' set pin 4 high

' wait for 3 seconds

' switch pin 7 low

' switch pin 6 low

' switch pin 5 low

' switch pin 4 low

' end the program

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 17

Activity 3.1

Key in the program listed above, and then download it to the Stamp Controller.

The LED indicator on pin 7 should light first, followed by the indicators on pin 6, and then indicators 4 and 5. The program will then stop. To re-run the program simply press the ‘reset switch’ on the Stamp Controller.

Read through the program carefully, and make sure you understand exactly what each program line achieves.

The let dirs = %00001111 statement is explained in more detail later in this section, but it’s purpose in this case is to tell the Stamp Controller to make pins 4 to 7 outputs.

A high command switches an output pin on (logic level 1 = 5V). A low command switches an output pin low (logic level 0 = 0V). A pause command creates a delay in milliseconds (there are 1000 ms in a second).

Note the 'comments' at the end of each line. A comment starts after an apostrophe (') and continues to the end of the line. Although the comments are not needed to make the program work, they are an essential part of the program as they explain in 'plain language' what the program is doing. You should always add a comment to every line of your program, particularly if the program is to be studied by someone else at a later date.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 18

Assignment 3.2

Explain the function of the following PBASIC commands:

- high, low, pause, end

Assignment 3.3

Explain the operation of the PBASIC program listing below, by adding comments to each line.

let dirs = %11110000 high 7 pause 2000 high 6 pause 1000 low 7 low 6 end

' set pins 4-7 as outputs

' ….

' ….

' ….

' ….

' ….

' ….

' ….

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 19

Labels and Addressing

67$57

6:,7&+ 3,1

+,*+

:$,7 6(&21'6

6:,7&+ 3,1

+,*+

:$,7 6(&21'

6:,7&+ 3,16

+,*+

:$,7 6(&21'6

6:,7&+ $//

2))

:$,7 6(&21'

Sometimes it is necessary to create programs that loop 'forever', as shown by this flowchart. In this case it is necessary to add labels to the program, and to use the

'goto' command to jump to the line marked by the label.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 20

A PBASIC program which would achieve this control operation is listed below.

init: let dirs = %11110000 main: high 7 pause 2000 high 6 pause 1000 high 5 high 4 pause 3000 low 7 low 6 low 5 low 4 pause 1000 goto main

' set pins 4-7 as outputs

' set pin 7 high

' wait for 2 seconds (= 2000 ms)

' set pin 6 high

' wait for 1 second

' set pin 5 high

' set pin 4 high

' wait for 3 seconds

' switch pin 7 low

' switch pin 6 low

' switch pin 5 low

' switch pin 4 low

' wait 1 second

' loop forever

Activity 3.4

Key in, download and run the program listed above.

After the first line (which simply sets pins 4 to 7 as outputs), a label called 'main' has been added to the listing. Note that all address labels must end with a colon (:) when they are first defined. It is also a good programming technique to use tabs (or spaces) at the start of lines without labels so that all the commands are neatly aligned. The term

'white-space' is used by programmers to define tabs, spaces and blank lines, and the correct use of white-space can make the program listing much easier to read and understand.

The last line 'goto main' causes program flow to 'jump back' to the line labelled 'main'.

This means that this program will loop 'forever'. Note that when ‘main’ is typed here it does not need a colon.

Note:

Some early BASIC languages used 'line numbers' rather than labels for 'goto' commands. Unfortunately this line number system can be inconvenient to use, because if you modify your program by later adding, or removing, lines of code you then have to modify all the line numbers within the 'goto' commands accordingly. The label system, as used in most modern BASIC languages, overcomes this problem automatically.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 21

Assignment 3.5

What is meant by the term "white-space"? Why is it important to use white-space and comments when writing programs?

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 22

Port Addressing and the Data Direction Register

Microcontrollers communicate with the outside world by input/output pins which are grouped together in 'ports'. The Stamp Controller has one input/output port, which contains eight input/output pins.

Each pin can be addressed individually, or all eight pins in the port can be addressed simultaneously. In the PBASIC language the pins are labelled 0 to 7, and the whole port address is allocated the label 'pins'.

Each pin is referenced to by a single bit in the port address called 'pins'.

input/output pin bit of address 'pins' decimal value

7 6

7 6

128 64

5

5

32

4

4

16

3

3

8

2

2

4

1

1

2

0

0

1

By using the let pins = command the output pins can be switched on or off in different combinations in a single PBASIC line (rather than using lots of high and low commands).

To switch all pins 'high' the command would be let pins = 255

To switch all pins 'low' the command would be let pins = 0

To switch pins 0-2 'high' and pins 3-7 'low' the command would be let pins = %00000111

Note how the use of the binary number system can be used on this occasion to clearly illustrate which pins are switched high (=1) or low (=0).

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 23

Each Stamp Controller pin can be configured to be an output (to send digital signals) or an input (to receive digital signals). The Data Direction Register (DDR) is used to configure the port, and in the PBASIC language the DDR is allocated the label 'dirs'.

If all the bits in the DDR are set high then all the pins will be set as outputs. If all the bits are set low each pin will be set as an input.

For example, let dirs = 255 let dirs = 0 let dirs = %11110000

' set all pins as outputs

' set all pins as inputs

' set 0-3 inputs, 4-7 outputs

Every PBASIC program listing should always begin with a 'let dirs =' statement to correctly setup the DDR. By default all pins are set to inputs when the Stamp

Controller is reset.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 24

67$57

6:,7&+ 3,1

+,*+

:$,7 6(&21'6

6:,7&+ 3,1

+,*+

:$,7 6(&21'

6:,7&+ 3,16

+,*+

:$,7 6(&21'6

6:,7&+ $//

2))

6723

A PBASIC program which would achieve this control operation is: let dirs = %11110000 let pins = %10000000 pause 2000 let pins = %11000000 pause 1000 let pins = %11110000 pause 3000 let pins = 0 end

' set pins 0-3 inputs, 4-7 outputs

' switch pin 7 high

' wait for 2 seconds (= 2000 ms)

' switch pins 7 and 6 high

' wait for 1 second

' switch pins 4 to 7 high

' wait for 3 seconds

' switch all pins low

' end the program

Activity 3.6

Key in, download and run the program listed above. This program switches outputs on and off without the use of the high or low command.

When writing programs there is often more than one solution to a problem. This program could have been written using high and low commands to do exactly the same thing!

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 25

Assignment 3.7

What is the function of the Data Direction Register (DDR)?

Assignment 3.8

A fountain in a garden centre is to be used to attract visitors to a new range of plastic ponds. The garden centre owner wishes to develop a microcontroller based system that cane be programmed to switch the fountain pump, and an external lighting system, on and off at regular intervals.

The following PBASIC program will switch the pump on and off every 60 seconds.

The lights come on 10 seconds after the pump has started, and go off 10 seconds before the pump is stopped.

Draw a flowchart for the control sequence and add the missing comments to the program listing.

init: let dirs = %11110000 main: high 7 pause 10000 high 6 pause 40000 low 6 pause 10000 low 7 pause 60000 goto main

' set pins 6 and 7 as outputs

' switch the pump on

' wait 10 seconds

' switch the lights on

' ….

' ….

' ….

' ….

' ….

' ….

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 26

For...Next Loops

67$57

6(7 &2817(5

6:,7&+ 3,1

+,*+

:$,7 6(&21'

6:,7&+ 3,1

/2:

:$,7 6(&21'

+$9( :(

/223('

7,0(6"

1

6723

<

A for...next loop is used when you wish to repeat a section of code a number of times.

The number of times the program runs for is set by a variable. A variable is a number that is stored in the RAM memory of the Stamp Controller. There are 14 memory locations that byte variables can be stored in. These locations are labelled b0 to b13, but can also be 'renamed' to more appropriate names by use of the 'symbol' command.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 27

Activity 3.9

Key in, download and run the following program.

symbol counter = b0 symbol red = 7

' define the variable "counter"

' define pin 7 with the name "red" init: let dirs = %10000000 main: for counter = 1 to 5

high red

pause 1000

low red

pause 1000 next counter end

' set up pin 7 as an output

' start a for...next loop

' switch pin 7 high

' wait for 1 second

' switch pin 7 low

' wait for 1 second

' end of for...next loop

' end program

Note again how white-space (extra spaces) has been used to clearly illustrate all the commands that are contained between the for and next commands. The 'symbol' command is also used to label pins and variables to make them easier to use.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 28

Assignment 3.10

Explain why the symbol command may be used in a program.

Assignment 3.11

67$57

6:,7&+ $//

3,16 +,*+

:$,7 6(&21'6

6:,7&+ $//

3,16 /2:

:$,7 6(&21'6

6:,7&+ $//

3,16 +,*+

:$,7 6(&21'6

+$6 7+,6 %((1

'21( 7,0(6"

<

6:,7&+ $//

3,16 /2:

6723

1

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 29

The following PBASIC program will carry out the instructions shown in the flowchart above.

Add the missing comments to complete the program listing.

symbol counter = b0 ' define the variable "counter" init: let dirs = %11111111 ' set all pins as outputs main: let pins = %11111111 pause 5000

' ….

' ….

for counter = 1 to 10 ' ….

let pins = %00000000 ' ….

pause 500 ' ….

let pins = %11111111 ' ….

pause 500 next counter

' ….

' ….

let pins = %00000000 end

' ….

' stop the program

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 30

If...Then...

67$57

6:,7&+ 3,1

+,*+

,6 3,1

+,*+"

1

<

6:,7&+ $//

/2:

6723

The if...then programming structure allows the Stamp Controller to make a decision based on information received from an input pin.

The following program switches pin 7 high, and then waits for an input connected to pin 3 to go high. When the input switch is pushed the output pin is switched low

Activity 3.12

Key in, download and run the program listed below.

init: let dirs = %10000000 ' setup the DDR main: let pins = %10000000 ' switch pin 7 high if pin3 = 1 then skip ' jump to 'skip' if input 3 is high goto main ' loop skip: let pins = 0 end

' switch all pins off

' end the program

To test the program you will need to connect the sensors module to the Stamp

Controller, and connect a micro-switch to sensor 3 on the sensor module.

Note:

Unlike some other BASIC languages, the then command can only be followed by a label to jump to. You cannot add extra commands on the same line within the PBASIC language.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 31

Assignment 3.13

As part of a Christmas decoration in a shop, a lighting sequence is to be controlled by a microcontroller. The output connections are shown below.

Input Connection

Pressure Mat 3

2

1

0

Pin

7

6

5

4

Output Connection

Red Light

Yellow Light

Green Light

When a visitor treads on a pressure mat under the carpet, the 3 lights should flash on and off in sequence three times.

The following PBASIC program will carry out the instructions shown in the table above.

Add the missing comments to complete the program listing.

symbol counter = b0 init: let dirs = %11110000

' .…

' set pins 4-7 as outputs main: if pin3 = 1 then flash ' ….

goto main ' ….

flash:for counter = 1 to 3 ' ….

let pins = %10000000 ' ….

pause 500 ' ….

let pins = %01000000 ' ….

pause 500 ' ….

let pins = %00100000 ' ….

pause 500 ' ….

next counter ' ….

let pins = %00000000 goto main

' ….

' ….

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 3 32

TECHNOLOGICAL STUDIES

INTERMEDIATE 2

SYSTEMS AND CONTROL

STUDENTS’ NOTES

OUTCOME 4

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 1

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 2

Outcome 4 – Developing Control Sequences for Mechatronic Systems

The purpose of this unit is to develop microcontroller control sequences for simple mechatronic control systems.

When you have completed this unit you should be able to:

• develop flowcharts for control sequences

• develop PBASIC programs for control sequences

• select appropriate input transducers for control applications

• select appropriate output transducers for control applications

• use PWM to control the speed of a DC motor

Before you start this section you should have a basic understanding of:

The architecture of a microcontroller.

The decimal and binary number systems.

Flowcharts

PBASIC commands

To complete the exercises in this section you require:

Stamp Controller

Output Drivers Module (or MFA Movement Module)

Solar motor with propeller

Buggy (with microswitch sensors)

Input Module or MFA Sensor Module and Sensors

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 3

Introduction

The first part of this outcome contains a number of assignments that involve combining all the skills learnt in outcomes 1 to 3 to solve practical control problems.

The general procedure for solving microcontroller control problems is:

1.

Draw a control diagram, identifying the ‘real-world’ inputs and outputs of the control system.

2.

Identify the input / output transducers and interfacing circuits required. Assign each transducer to a microcontroller pin.

3.

Develop the control procedure in ‘sentences’ and then draw up a flowchart.

4.

Develop a PBASIC program from the flowchart.

5.

Key in and test the program.

6.

Modify the program as necessary.

The second part of this outcome introduces the principle of PWM speed control of DC motors.

The final part of this outcome outlines a number of project briefs for practical assignments.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 4

Assignment 1

A set of temporary traffic lights are required for a system of road-works.

red red and amber green amber

10 sec

2 sec

10 sec

2 sec

Draw a flowchart for the lights sequence shown by one set of the traffic lights. Use the times shown in the table for each stage.

Write a PBASIC program, using high and low commands, to achieve this operation.

Use the following pin configuration - red (7), amber (6) and green (5).

Write a second PBASIC program, without the use of high or low commands, to achieve this operation.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 5

Assignment 2

S TA M P

C O N T RO LLE R

O UT P U T

D RIV ER

M O D ULE

Connect a buggy to the output driver module (or MFA movement module) as shown in the diagram.

67$57

M O VE FO R WA R D

WA IT 3 SEC .

TU R N LEF T

WA IT 1 SEC .

M O VE FO R WA R D

WA IT 3 SEC .

6723

Write a high level program in PBASIC to control the movement of the buggy as shown by the flowchart above.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 6

Assignment 3

S TA M P

C O N T RO LLE R

O UT P U T

D RIV ER

M O D ULE

Connect a buggy to the output driver module (or MFA movement module) as shown in the diagram.

3

3 3

3

The buggy should follow the movement path as shown in the diagram above.

Draw a flowchart for the movement of the buggy, making use of a for...next command structure.

Write a high level program in PBASIC to control the movement of the buggy as shown by your flowchart. (It will be necessary to experiment with time delays to establish how quickly your buggy moves and turns).

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 7

Assignment 4

A motor, connected to pin 7, is to run when a 'start' switch (connected to pin 2) is momentarily pressed. The motor continues to run until another 'stop' switch (connected to pin 3) is pressed - at which point the motor switches off. The system should then reset to wait for another 'start' signal.

Draw a flowchart and write a PBASIC program for this sequence.

Assignment 5

S TA M P

C O N T RO LLE R

O UT P U T

D RIV ER

M O D ULE

Connect a buggy to the output driver module (or MFA movement module) as shown in the diagram. Connect the micro-switch 'bumpers' to pins 0 and 1 on the Stamp

Controller via the screw terminals as shown below (or via the inputs module).

V+

0

1

2

3

0V

SHOWS HOW TO WIRE 2 SWITCHES TO

THE SCREW TERMINALS ON THE

STAMP CONTROLLER

The buggy should continue in a forward direction until either of the two micro-switch bumpers is activated. At this point the buggy should reverse for 3 seconds, rotate 90 degrees clockwise, and then continue in a forwards direction.

Draw a flowchart and write a PBASIC program to control the movement of the buggy as described above.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 8

Assignment 6

67$57

G R EE N LED O N

SW IT C H

PU S H ED ?

YE S

G R EE N LED O FF

AM BE R LED O N

WA IT 3 sec.

AM BE R LED O FF

R ED LED O N

WA IT 4 sec.

AM BE R LED O N

WA IT 2 sec..

R ED /AM BE R LED O FF

G R EE N LED O N

N O

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 9

Develop a PBASIC program that will carry out the instructions shown in the flowchart above. Use the following pin configuration.

Input Connection

Start Switch

5

4

3

Pin

7

6

2

1

0

Output Connection

Red Light

Amber Light

Green Light

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 10

DC Motor Speed Control - Pulse Width Modulation

The simplest way to control the speed of a DC motor is to vary the voltage applied to the motor coils - the lower the voltage the slower the motor will spin (within the motor operating limits). However the current flowing through the motor coils also decreases as the voltage falls, and so the output torque (turning moment) of the motor also decreases.

Therefore this solution is often unsatisfactory for controlling DC motors due to the undesirable loss of motor torque. Pulse Width Modulation (PWM) is a digital method which can be used to vary the motor speed. In this method the full voltage is applied to the motor, but it is rapidly pulsed on and off. By varying the on and off ratio of the pulses the speed of the motor can be varied. As the full voltage is applied to the motor during the 'on' pulses the torque of the motor remains high.

9

0$5.

63$&(

W

The graph shows how the technique is applied. The 'on' time for the motor is called the mark, the 'off' time is called the space. When the voltage is applied to the motor it accelerates to top speed. However before the top speed is reached the motor is switched off, thus slowing it down. By increasing the frequency of the pulses this acceleration/deceleration becomes negligible, and the motor rotates constantly at a slower speed.

The PWM technique does have certain limitations. It cannot be used with mechanical relays, as the rapid switching would damage the mechanical contacts. The frequency of the pulses must also be carefully selected - if the frequency is too slow the motor will stall.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 11

Activity 7

Build the circuit as shown. This is most simply achieved by connecting the dc solar motor across the 'V+' and '7' Darlington Driver terminals on the Output Driver module.

Connect a propeller to the output shaft of the dc solar motor to make the rotational speed easier to see.

Key in, download and run the program listed below. This program drives the motor at approximately half speed, as the space is twice the length of the mark.

symbol mark = b1 symbol space = b2 symbol motor = 7 init: let dirs = %11110000 let mark = 10 let space = 20 main: high motor pause mark low motor pause space goto main

' pin 4-7 outputs

' set mark to 10ms

' set space to 20ms

' output high

' pause for mark time

' output low

' pause for low time

' loop

Try out different speeds (by experiment) by altering the values of 'mark' and 'space'.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 12

Soft Start of DC Motors

9

W

In some devices, such as electric drills, it is desirable for the motor to start rotating slowly and then build up speed, rather than rapidly 'accelerating' up to full speed. This is called 'soft starting' the motor, and the use of PWM is often appropriate in these situations. The motor is started at a low speed and then gradually accelerated by varying the mark to space ratio over a period of time.

Assignment 8

Explain the terms ‘mark’ and ‘space’ in relation to PWM control of a dc motor.

Assignment 9

Describe the advantages and disadvantages of using PWM control. Explain the term

‘soft starting’ of a motor.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 13

Activity Assignments.

For the following practical assignments students are expected to:

1.

Draw a control diagram of the system.

2.

Select suitable input and output transducers, explaining the reason a particular transducer was selected.

3.

Build a model of the system, correctly connecting the transducers via appropriate interfacing circuits.

4.

Develop a flowchart of the control sequence.

5.

Use the flowchart to develop and test a Pbasic program for the control sequence.

Project Briefs

1.

Design and build a warning light for shipping that will come on automatically as sunset and will remain on until dawn. The light must flash on and off and revolve around 270°.

2.

Design and build a lift suitable for a two story warehouse. The lift will run unmanned but must not be able to operate unless a safety grill has been closed first.

The lift should be able to be controlled from both floors.

3.

A heavy duty, industrial tumble dryer is required by a local cleaning contractor.

The drum should be given by gears due to the load it will be expected to cope with.

The system should also include a fan to circulate hot air and a method the ensure that the door has been closed before the machine starts. The drum should also rotate in both directions during the process.

4.

Design and build a mechanism and control system to model a microwave oven.

Your design should also include a method of preventing the microwave form being started unless the door has been closed first. It should also include a fan and a rotating turntable.

5.

Design and build a device which will tell the difference between a real bank note and a forgery by detecting the presence of the metal security strip in the correct position in a real note.

6.

Design and build an audible levelling device suitable for indicating when a caravan is level.

7.

Car theft has become a major problem. After careful consideration, design and build a possible burglar alarm for cars left unattended.

8.

Design and build a small three-wheeled remotely controlled, electrically powered buggy which can be controlled to follow a figure of eight course.

9.

Design and build a machine that will revolve to face a light source.

10.

Design and build a model of an automatic railway level crossing.

11.

Design and build an automatic curtain control which operates at dusk and dawn.

There should also be provision for manual override.

Technological Studies: Systems and Control Students’ Notes (Int 2) Outcome 4 14

Download