Grade 9 Computer Science - Chapter 3 - NPS International School PDF
Document Details
Uploaded by VictoriousJade3053
NPS International School
Mr. Vijay Raj
Tags
Summary
This document is a chapter about computer science, focusing on the central processing unit (CPU) and Von Neumann architecture for grade 9 students at NPS International School. It includes diagrams and descriptions.
Full Transcript
GRADE 9 Computer Science What is a CPU? CENTRAL UNIT PROCESSING (CPU) Mr. Vijay Raj NPS International School THE CENTRAL PROCESSING UNIT (CPU) The CPU is central to all modern computer systems. It is very often installed as an integrated circuit on a single microch...
GRADE 9 Computer Science What is a CPU? CENTRAL UNIT PROCESSING (CPU) Mr. Vijay Raj NPS International School THE CENTRAL PROCESSING UNIT (CPU) The CPU is central to all modern computer systems. It is very often installed as an integrated circuit on a single microchip. The CPU has the responsibility for the execution or processing of all the instructions and data in a computer application. INTRODUCING THE VON NEWMANN ARCHITECTURE Early computers were fed data while the machines were actually running; it wasn’t possible to store programs or data, which meant they couldn’t operate without considerable human intervention. In the mid-1940s, John von Neumann developed the concept of the ‘stored program computer’, which has been the basis of computer architecture ever since. The von Neumann architecture had the following main novel features the concept of a central processing unit (CPU or processor) The CPU was able to access the memory directly Computer memories could store programs as well as data Stored programs were made up of instructions which could be executed in sequential order. VON NEUMANN ARCHITECTURE CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) MAR CU PC MDR CIR ALU ACC Input Memory Unit (RAM) Output keyboards, touch screens and printers, monitors and loudspeakers microphones VON NEUMANN ARCHITECTURE CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) Input Output keyboards, touch screens and printers, monitors and loudspeakers microphones VON NEUMANN ARCHITECTURE CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) ALU Input Output keyboards, touch screens and printers, monitors and loudspeakers microphones Input 1 Input 2 ARITHMETIC & LOGIC UNIT (ALU) Enables processor to carry out mathematical operations 1 on data (adding, subtracting, multiplying and dividing) 2 Enables logical operations to be carried out ALU It is possible for a computer to have more than one ALU 3 to carry out specific function. Multiplication and division are carried out by a sequence of addition, subtraction and left or right logical shift operations Output VON NEUMANN ARCHITECTURE CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) ALU Input Memory Unit (RAM) Output keyboards, touch screens and printers, monitors and loudspeakers microphones RANDOM ACCESS MEMORY (BRIEF) MEMORY UNIT The memory unit (RAM) of the CPU stores instructions 1 and processes that the computer needs regularly when processing data. The CPU takes data and programs held in a hard disk 2 drive and puts them into RAM temperorily. Read and Write operations carried out using the RAM RAM is a type of volatile memory, in that it does not 3 are considerably faster than read/write operations to a 4 retain its contents when the computer is powered hard disk drive. off. VON NEUMANN ARCHITECTURE CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) MAR PC MDR CIR ALU ACC Input Memory Unit (RAM) Output keyboards, touch screens and printers, monitors and loudspeakers microphones One of the most fundamental components of REGISTERS the von Neumann architecture. There are 5 of them (Special purpose registers) FUNCTIONS This register stores the current instruction being decoded and 1 Current Instruction Register CIR executed This register is used when carrying out ALU calculations; it stores 2 Accumulator ACC data temporarily during the calculations This register stores the address of the memory location currently 3 Memory Address Register MAR being read from or written to This register stores data which has just been read from memory or 4 Memory Data (Buffer) Register MDR data which is about to be written to memory This register stores the address where the next instruction to be 5 Program Counter PC read can be found VON NEUMANN ARCHITECTURE CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) MAR CU PC MDR CIR ALU ACC Input Memory Unit (RAM) Output keyboards, touch screens and printers, monitors and loudspeakers microphones CONTROL UNIT Coordinator Reads an instruction (from input device) from memory. The address of the location where the instruction can be 1 found is stored in the program counter. This instruction is then interpreted during the Fetch- 2 Decode-Execute cycle. The Control Unit (CU) is responsible for making sure all these components follow the instructions it has During that process, signals are generated along the processed from the input. 3 control bus to tell the other components in the computer what to do. VON NEUMANN ARCHITECTURE CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) MAR CU PC MDR CIR ALU ACC Input Memory Unit (RAM) Output SYSTEM BUSES *width of the address bus and data bus is important. Several buses, otherwise known as connections, carry data around a The wider the bus, the larger the word length that can computer. be transported. Carries the address between the memory unit and 1 Address Bus CPU Carries the data between the memory unit and CPU 2 Data Bus and to and from from input/output devices. Control Bus It carries signals from the control unit (CU) to all the 3 other computer components. VON NEUMANN ARCHITECTURE CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) MAR CU PC MDR CIR ALU ACC Input Memory Unit (RAM) Output PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N YEAR 10 COMPUTER SCIENCE CPU (2) FETCH-DECODE- EXECUTE CYCLE by Mr. James VON NEUMANN ARCHITECTURE RECAP CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) MAR CU PC MDR CIR ALU ACC Input Memory Unit (RAM) Output Fetch-Decode-Execute Cycle All modern computers with the Von Neumann Architecture use a method of processing data known as the fetch-decode-execute cycle. This cycle happens in a matter of milliseconds and enables a computer to logically process the data it receives in the correct order for the user's requirement. All the components of the Central Processing Unit (CPU) are used to make the cycle work. Fetch-Decode-Execute Cycle Both data and instruction can be stored in The CPU passes the MDR. In the Fetch–Decode–Execute cycle, The instruction is then decoded instruction as a the next instruction is fetched from the decoded so that it can be set of control signals to memory address currently stored in the interpreted in the next part the appropriate MAR and the instruction is stored in the of the cycle. components within the MDR. The contents of the MDR are then computer system. This copied to the Current Instruction Register allows each instruction (CIR). The PC is then incremented (increased by 1) so that the next instruction to be carried out in its can be then be processed. logical sequence. Fetch-Decode-Execute Step by Step The program counter stores the address location of the next instruction to be carried out. This location number is copied into the memory address register. The program counter is incremented by one and this register now stores the next instruction to be processed. The control unit (CU) makes a request to the RAM for the instruction and obtains the address of the instruction from the MAR by sending a signal along the address bus. The data that is being held in the RAM in the correct address is carried along the data bus to the memory register (MDR). Once the instruction arrives at the MDR, it is copied into the current instruction register (CIR). The instruction is then decoded in the CIR using the arithmetic logic unit (ALU) and then carried out. The result of this processing is stored in the accumulator. Clock Speed, Cache Memory and Cores Other components make up part of the CPU and can make a significant difference to the overall operating speed of a computer. While the CPU processes instructions and data extremely quickly, other factors can affect a computer's performance. Clock Speed Clock speed is an important measure in terms of CPU performance capabilities. This refers to the number of electrical pulses that the clock inside the CPU can produce every second. This measurement is made in hertz, and modern clock speeds are usually measured in gigahertz. By increasing clock speed, the processing speed of the computer is also increased (a typical current value is 3.5GHz – which means 3.5 billion clock cycles (Fetch-Decode-Execute a second) Overclocking - using a clock speed higher than the computer was designed for. Problems: Lead to seriously unsynchronised operations (i.e. an instruction is unable to complete in time before the next one is due to be executed) – the computer would frequently crash and become unstable Serious overheating of the CPU leading to unreliable performance. Cores The use of a different number of cores can improve computer performance. One core is made up of an ALU, a control unit and the registers. Many computers are dual core (the CPU is made up of two cores) or quad core (the CPU is made up of four cores). The idea of using more cores alleviates the need to continually increase clock speeds. One Core Central Processing Unit (CPU) MAR CU PC MDR CIR ALU ACC Dual Core Central Processing Unit (CPU) Central Processing Unit (CPU) MAR MAR CU CU PC PC MDR MDR CIR CIR ALU ACC ALU ACC However, doubling the number of cores doesn’t necessarily double the computer’s performance since we have to take into account the need for the CPU to communicate with each core; this will reduce overall performance. Multi Core - 8 cores Central Processing Unit (CPU) Central Processing Unit (CPU) Central Processing Unit (CPU) MAR MAR MAR CU CU CU PC PC PC MDR MDR MDR CIR CIR CIR ALU ACC ALU ACC ALU ACC Central Processing Unit (CPU) Central Processing Unit (CPU) Central Processing Unit (CPU) MAR MAR MAR CU CU CU PC PC PC MDR MDR MDR CIR CIR CIR ALU ACC ALU ACC ALU ACC Central Processing Unit (CPU) Central Processing Unit (CPU) MAR MAR CU CU PC PC MDR MDR CIR CIR ALU ACC ALU ACC Cache The use of cache memories can also improve CPU performance. Unlike RAM, cache memory is located within the CPU itself, which means it has much faster data access times than RAM. Cache memory stores frequently used instructions and data that need to be accessed faster, which improves CPU performance. When a CPU wishes to read memory, it will first check out the cache and then move on to main memory/RAM if the required data isn’t there. The larger the cache memory size the better the CPU performance. PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N 0100 01101011 I NSTRUC TION SET AND EMBEDDED SYSTEMS MR JAMES Instruction Set A set of common instructions have been developed by processor manufacturers so that CPUs operate as efficiently as possible. This instruction set is all the commands that can be processes by a CPU. The instructions are the most basic types of command a computer can respond to and execute, and these are referred to as operations. These operations ensure that the control unit and arithmetic logic unit can carry out their respective jobs easily. Instruction Set Operations are made up of opcodes and operands. Load 10 Add 11 Store 12 Fetch-Decode-Execute Recap Load 10 101 Add 11 102 Store 12 103 Instruction Set Operations are made up of opcodes and operands. Opcode: - Operational Code - Gives the CPU a precise job Load 10 job that is required to happen Add 11 Store 12 The opcode are stored on a computer's hard disk and would usually be copied into the main memory RAM when the computer is powered on. The most regularly used opcodes would then be moved from the RAM to the cache memory. Instruction Set Operations are made up of opcodes and operands. Load 10 Add 11 Store 12 An operand is the data that is required for the specific job as detailed by the opcode. The operand may be a piece of data itself, or it may be an address location within the main RAM or register. Instruction Set Example : X86 Instruction Set 1503 Used by Intel Pentium and AMD Athlon CPU Instruction Set is not programming code. Instruction sets are the low-level language instructions that instruct the CPU how to carry out an operation Example: Python Code -> Instruction Set -> Computer EMBEDDED SYSTEMS Processors and Computer System Traditionally, we would think of computers as desktop and laptop computers. They are referred to as general purpose computers, capable of providing a wide range of different activities. Discussion: Where could we find a processor, besides a computer or a laptop. Embedded System A type of computer system that carry out rather more specific tasks and jobs. With an embedded system. a device would use a small built-in computer to carry out its functions in a more effective way. In other words, it's a combination of hardware and software which is designed to carry out a specific set of functions. The computer system usually has a very specific job, and only carries out that job when required. General Idea of an Embedded System User Interface Sensors, actuators Analogue or Some form digital input Software and hardware on of Output an embedded system Vending Machine Inputs to this system come from the keypad (item selection) and from sensors (used to count the coins inserted by the customer, the temperature inside the machine and a ‘tilt sensor’ for security purposes). The outputs are: - Signals to operate the cooling system if the temperature is too high - Item description and any change due shown on an LCD display panel - Data sent back to the vending machine company so that they can remotely check sales activity (which could include instructions to refill the machine) without the need to visit each machine. Lightning System An embedded system can automatically control the lighting using a number of inputs (such as light sensors) and key data stored in memory The time of day or day of the week is important data in an office environment since energy is saved if the system switches to low lighting levels when unoccupied. Some lighting systems use Bluetooth light bulbs. This allows the embedded system to control each bulb independently. Many of the bulbs available today use LEDs and many come in a number of colours to change the mood. Embedded System Embedded system tends to be low power devices. Calculator uses battery Depending on the device, embedded systems are either programmable or non- programmable. Non-programmable devices need, in general, to be replaced if they require a software upgrade. Programmable devices permit upgrading by two methods: connecting the device to a computer and allowing the download of updates to the software (for example, this is used to update the maps on a GPS system used in a vehicle) automatic updates via a Wi-Fi, satellite or cellular (mobile phone network) link (for example, many modern cars allow updates to engine management systems and other components via satellite link). Amazon Smart Warehouse https://www.youtube.com/watch?v=IMPbKVb8y8 s&ab_channel=VISION Amazon Go https://www.youtube.com/watch?v=zdbumR 6Bhd8&ab_channel=TechInsider Input Devices VON NEUMANN ARCHITECTURE RECAP CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) MAR CU PC MDR CIR ALU ACC Input Memory Unit (RAM) Output Our Focus this week! Input Keyboards What it It has a selection of keys that has all perform different tasks. Entering and typing letters and What it numbers. Used to given data does and instruction to the computer. Connected to the computer How to using either a universal serial use bus port or wirelessly using a Bluetooth connection. Other types of keyboards How does it work? Central Processing Unit (CPU) MAR CU PC MDR CIR 01101000 ALU ACC Input Memory Unit (RAM) Note this down: Each character on a key board has an ASCII value. Each character pressed is converted into a digital signal, interpreted by the computer Negatives Relatively slow method of data entry and are also prone to errors Frequent use of these devices can lead to injuries, such as, repetitive strain injury (RSI) in the hands and wrists. Optical Mouse What it It has a left and right button, and a jog has wheel in between button for easy scrolling What it It is used as a pointing device does (Able to interact with the computer) How to Connected to the computer using a USB port or a Bluetooth connection use How does it work? A red LED is used in the base of the mouse and the red light is bounced off the surface and the reflection is picked up by a complementary metal oxide semiconductor (CMOS). The CMOS generates electric pulses to represent the reflected red light and these pulses are sent to a digital signal processor (DSP). The processor can now work out the coordinates of the mouse based on the changing image patterns as it is moved about on the surface. The computer can then move the on-screen cursor to the coordinates sent by the mouse. Other types of pointing device Touch pad Stylus Gaming Controller Benefits of optical mouse over mechanical mouse No moving parts, which makes it more reliable Dirt cannot get trapped in any of the mechanical components Can work on any surface, eliminates the need for a special surface Benefits of wired mouse over Bluetooth connectivity No signal loss Cheaper to operate (eliminated need to change batteries) Fewer environmental issues (no need to dispose of old batteries) PA S T Y E A R Q U E S T I O N Touch Screens What it A touch screen is made of glass and reacts has to a finger press. What it They allow the user to carry out the same does functions as they would with a pointing device, such as mouse. 3 types Capacitive touch screens of Resistive touch screens touch Infrared touch screens screens Capacitive touch screens Capacitive touch screens are composed of a layer of glass (protective layer), a transparent electrode (conductive) layer and a glass substrate. Since human skin is a conductor of electricity, when bare fingers touch the screen, the electrostatic field of the conductive layer is changed. The installed microcontroller is able to calculate where this change took place and hence determine the coordinates of the point of touching. Capacitive touch screens There are two main types of capacitive touch screens Surface Projective Surface Capacitive screens Sensors are placed at the corners of a screen Small voltages are applied at the corners, creating an electric field The finger touching the screen surface will draw current, reducing capacitance. Microcontroller measures the decrease in capacitance and determines the point where the finger touched the screen Capacitive touch screens Projective Capacitive screens Transparent conductive layer is now in the form of an X-Y matrix, which creates a 3D electrostatic field When the finger touches the screen, it disturbs the 3D electrostatic field allowing the microcontroller to determine the coordinates of the point of contact Works with bare fingers, stylus, thin gloves Also allows multi-touch facility (Pinching or sliding) Capacitive touch screens Advantage Disadvantage Better image More expensive to clarity than manufacture resistive Works with bare screens, fingers or a special stylus Multitouch PA S T Y E A R Q U E S T I O N Answer to Question Electrical charge is spread across the screen. Sensors are located around the screen, to read the electric field. Since the human skin is a conductor of electricity, when the bare finger touches the screen, the electrostatic field of the conductive layer is changed. Thus, the coordinates of touch is determined by the micro-controller. Part (b): If Remy is wearing a glove, why would his touch not be registered by the touch screen? Wearing gloves restricts the flow of electricity from the touchscreen device to your body. Capacitive touchscreen devices, work by measuring capacitance, therefore, if gloves are worn, Remy’s finger would not be able to absorb the capacitive touchscreen device’s electrostatic charge. Therefore, the device would not register his touch. Resistive touch screens The name resistive relates to resistance - the amount of downward pressure made on the screen by the user. The pressure causes a change in the resistance, or an increase in voltage. The layers of the screen detects the voltage change and calculates the coordinates of where the pressure change has happened. This then enables the processor to react to the pressure and display the item the user requires. Resistive touch screens Advantage Disadvantage Can be used in Low touch bare fingers, stylus sensitivity and gloved hand No multitouch Good resistance to dust and water Poor visibility under strong light Infrared touch screens They emit a constant grid of lights underneath the top surface layer. The technology works when this light grid is interrupted, and a touch on the infra-red screen causes a disturbance. The disturbance is then located by the processor and translated into co-ordinates. Infrared touch screens Advantage Disadvantage Allows multi- Screen can be touch sensitive to water or moisture Good screen durability Sensitive to light interference Scanner What it Scanner are used to convert text or images has on paper into digital information. A paper document is placed on the What it scanner and a beam of light is shone does onto the paper. This light reflects onto a sensor, which determines the colour of the text or image on the paper. The information is used by the computer, as an input, to create a digital copy of the document Optical character recognition Computers equipped with optical character recognition (OCR) software allow the scanned text from the document to be converted into a text file format. This means the scanned image can now be edited and manipulated by importing it into a word processor. If the original document was a photograph or image, then the scanned image forms an image file such as JPEG. 3D Scanner Scanners can also work in three dimensions and use reflected laser light to build up a 3D model of a scanned object. These images can then be used with a 3D printer to create a model. Application of 2D and 3D Scanner 2D scanners are used at airports to read passports They make use of OCR technology to produce digital images which represent the passport pages. Because of the OCR technology, these digital images can be manipulated in a number of ways. For example, the OCR software is able to review these images, select the text part, and then automatically put the text into the correct fields of an existing database Computed tomographic (CT) scanners are used to create a 3D image of a solid object. This is based on tomography technology, which basically builds up an image of the solid object through a series of very thin ‘slices’. Each of these 2D ‘slices’ make up a representation of the 3D solid object. Barcode Reader What it The Barcode uses infra-red light to read the has bars in the code. What it It accesses information about a product within the store. does The Barcode The barcode holds information such as the product identification number, country of origin and manufacturer. It does not store the price of products, which is held in a database.. During the purchase process the computer scans the barcode information and matches the data to the database to check the most up-to-date price. How does the Barcode Reader work? The Barcode uses infra-red light to read the bars in the code. The light is reflected back to the device and is converted into digital data. After the barcode has been read, what happens? The barcode number is looked up in the stock database ( the barcode also known as the key field, uniquely identifies each stock item) When the barcode number is found, the stock item record is looked up. The price and other stock items details are sent back to the checkpoint The number of stock items in the record is reduced by 1. Quick Response Scanner What it Consists of a block of small squares has (light and dark) known as pixels What it It allows characters, digits and also does internet addresses to be encoded. Avoid the user from having to remember long telephone numbers and website Benefits addresses, because the QR Reader will quickly convert the QR code into the information QR Code Barcode They can hold much more More than one QR information format is available, whereas QR codes are easier to QR codes can be read; they don’t need expensive laser or LED used to transmit malicious codes It is also possible to encrypt QR codes which gives them greater protection than traditional barcodes. Digital Camera (Webcam) It takes a digital image of the view in What it front of its lens. If the camera set images does one after the other at a high enough frame rate, this can be viewed on a computer screen as a video feed. How does it work? The image is captured when light passes through the lens on to a light-sensitive cell; this cell is made up of millions of tiny sensors which are acting as photodiodes (i.e. charge couple devices (CCD) which convert light into electricity) Each of the sensors are often referred to as pixels (picture elements) since they are tiny components that make up the image The image is converted into tiny electric charges which are then passed through an analogue to digital converter (ADC) to form a digital image array Cameras are controlled by an embedded system To carry out some, of the following tasks: Adjust the shutter speed Focus on the image automatically Adjust the size of the image Adjust the aperture size Microphones Either built into the computer or are Description external devices connected through the USB port or using Bluetooth connectivity. It converts sound analogue signals into digital information. It is mainly used with webcams for What it video-conferencing. does The digital signal are sent to another computer user and can be heard as a sound. 1000 0001 1100 0101 0100 1001 Digital Hut information Questions to attempt (Workbook) Question 5 (a) – (c) [Page 46] Question 6 (a) – (b) [Page 47] Questions 7 and 8 [Page 48] PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N Output Devices VON NEUMANN ARCHITECTURE RECAP CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) MAR CU PC MDR CIR ALU ACC Input Memory Unit (RAM) Output Our Focus this week! Output Output Devices Output devices are the hardware a computer uses to display or send out the data that has been processed. Input devices that provide the computer with the instructions are linked to the output devices, so the user can see or hear the results of those instructions. The choice of output device depends on the most appropriate use of the data that has been processed. Output Devices Monitor Touch Screens Projector ⚬ DLP Projector ⚬ LCD Projector Printer ⚬ Laser Printer ⚬ Inkjet Printer ⚬ 3D Printer Speaker Actuator Output Devices Monitor Touch Screens Projector ⚬ DLP Projector ⚬ LCD Projector Printer ⚬ Laser Printer ⚬ Inkjet Printer ⚬ 3D Printer Speaker Actuator Monitor Monitor can display a certain number of pixels depending on the quality - more pixels mean a better quality of picture output. The larger the monitor the more expensive they tend to be. Size in inch Modern monitors connect to a computer using high- definition multimedia interface (HTML) connector) ⚬ Display high definition image and sound using one cable. ⚬ HDMI is a standard connection port for audio/visual devices in computers. Monitor - LED vs LCD LCD - Liquid Crystal Display LED - Liquid Emitting Diode - made up of tiny liquid crystals - made up of tiny light-emitting diodes - These tiny crystals make up an array of - each LED is either red, blue and green pixels that are affected by changes in applied - By varying the electric current sent to each LED, electric fields its brightness can be controlled, producing a vast - Because LCD’s don’t produce any light, LCD range of colours. screens are back-lit using light-emitting diode (LED) technology Monitor - OLED OLED - Organic Liquid Emitting Diode - These use organic materials (made up of carbon compounds) to create semi-conductors that are very flexible - The important aspect of OLED technology is how thin this makes the screen. It is possible, using OLED technology, to bend screens to any shape Some benefits of OLED Output Devices Monitor Touch Screens Projector ⚬ DLP Projector ⚬ LCD Projector Printer ⚬ Laser Printer ⚬ Inkjet Printer ⚬ 3D Printer Speaker Actuator Touch Screen A touch screen can be used as an input device and an output device. Touch screens are used on smartphones and tablets. Once the user has made a selection with a finger press, the screen reacts by displaying a different screen. Output Devices Monitor Touch Screens Projector ⚬ DLP Projector ⚬ LCD Projector Printer ⚬ Laser Printer ⚬ Inkjet Printer ⚬ 3D Printer Speaker Actuator Digital Lightning Processing (DLP) Projector A digital light processing (DLP) projector is a device that connects to a computer and a monitor to project the video output from the computer onto a wall or a whiteboard. The video can be viewed at a much larger size when projected. They are often used in school classrooms or home cinemas for showing video or presentations. They are connected to a computer with a HDMI connector. DLPs can be large and use powerful bulbs to project the image. Liquid Crystal Display (LCD) Projector A LCD projector works in a similar way to a DLP projector. However, the key difference is that red, green and blue lights are shone through three prisms, then brought together, or converged, through a second prism to produce the image. LCD projectors tend to display more vivid images than DLP projectors, however they are often larger and heavier. DLP Projector vs LCD Projector - Higher reliability/longevity - Better colour saturation - Quieter than LCD - Poorer longevity - High contrast ratio - More efficient in their use of energy - Less efficient in their use of energy (generate more heat Output Devices Monitor Touch Screens Projector ⚬ DLP Projector ⚬ LCD Projector Printer ⚬ Laser Printer ⚬ Inkjet Printer ⚬ 3D Printer Speaker Actuator Laser Printer A laser printer produces a printed output by transferring powdered toner onto paper using heat. The printer connects to a computer using a universal serial bus (USB) interface, or wirelessly across a network. It prints quickly and produces good quality results. The quality of output and the low noise levels make laser printers popular choices for workplaces. Inkjet Printer Inkjet printers are the cheapest type of printer. They work by spraying ink directly onto paper as it is heated by the printer. The ink follows from a cartridge through tiny holes and when the paper is fed out from the printer the ink is still slightly wet. Inkjet printers can produce either black and white or colour output and are popular choices for use at home and for printing photographs. The printer connects to a computer using a universal serial bus interface, or wirelessly across a network. 3D printer Three dimensional or 3D printers are output devices that can create objects rather than printed piece of paper. 3D printers often use heated liquid such as plastic or metal. The type of liquid used depends on the item being produced. This liquid is given instructions by the computer to create a surface and then it solidifies. The printer uses several layers of this liquid material to create the shape. 3D printers are used mainly by designers to create prototypes of objects and have been used in car manufacturing for many years. Output Devices Monitor Touch Screens Projector ⚬ DLP Projector ⚬ LCD Projector Printer ⚬ Laser Printer ⚬ Inkjet Printer ⚬ 3D Printer Speaker Actuator Speaker Speakers are used to output music, sound and video soundtracks for a high quality multimedia experience. The sound quality of the speaker depends on the type of speaker used. The internal speakers supplied as standard within a computer tend to produce lower quality sound, but externally powered speakers connected to a computer's sound card through an audio port produce better quality output. Sound card: An internal device of a computer that provides a method of input and output of audio signals for use with multimedia applications. Output Devices Monitor Touch Screens Projector ⚬ DLP Projector ⚬ LCD Projector Printer ⚬ Laser Printer ⚬ Inkjet Printer ⚬ 3D Printer Speaker Actuator Actuator An actuator is a mechanical motor that carries out an action when a computer gives it an instruction. For example, a digital camera has an actuator built into the lens and the motor moves the lens in and out depending on the level of zoom required. It is the actuator that control this movement. Actuator can be small, as in the case of a camera, or can be large, such as those that control duty computer-controlled drills. PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N PA S T Y E A R Q U E S T I O N Sensor VON NEUMANN ARCHITECTURE CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) MAR CU PC MDR CIR ALU ACC Input Memory Unit (RAM) Output VON NEUMANN ARCHITECTURE CONTROL BUS DATA BUS ADDRESS BUS Central Processing Unit (CPU) MAR CU PC MDR CIR ALU ACC Sensor (Automatic Memory Unit (RAM) Output Input) Function of a sensor Read and measure physical properties from their surrounding. Function of a sensor Read and measure physical properties from their surrounding. Acidity Temperature Pressure Length Level Analogue to Digital Converter (ADC) Reason ADC is needed Computer cannot make sense of physical quantities (Boiling point etc) Function of an ADC Convert physical quantities to a digital format. It convert physical values (analogue data) into digital data. Extra: Digital to Analogue Converter (DAC) Analogue to Digital Converter (ADC) Analogue data Temperature sensors, FM radio signals, Photocells, Light sensor Digital data Binary code Extra: Digital to Analogue Converter (DAC) Feedback Sensor readings may cause microprocessor to alter a valve or motor that will then change the next reading taken by the sensor. So the output from the microprocessor will impact on the next input received as it attempts to bring the system within the desired parameters. Feedback Input Ouput: Release cold air 40 celcius 00101000 ADC Microprocessor Sensor This will run constantly! Input Ouput: Release cold air ADC Microprocessor Sensor Exam Question Why is analogue to digital converter (ADC) needed? Read data is analogue is nature, this means that it is constantly changing and does not have a single discrete value and needs some form of interpretation by the user. Computer cannot make sense of these physical quantities so the data needs to be converted into a digital format. This is usually achieved by an analogue to digital converter (ADC). Brainstorming What are the types of sensors available? Brainstorming What are the applications of these sensors? Common Sensors (Page 112) SENSOR T E M P E R AT U R E MOISTURE Measures temperature Measures water levels in, for example, FUNCTION of the surrounding by soil sending signal. control/monitor moisture levels in soil in a control of a central heating system greenhouse APPLICATION control/monitor a chemical process monitor the moisture levels in a food processing control/monitor temperature in a greenhouse factory Common Sensors SENSOR HUMIDITY LIGHT This is slightly different to moisture; this These use photoelectric cells that produce an output (in measures the amount of water vapour in, for the form of an electric current) depending on the FUNCTION example, a sample of air. brightness of the light monitor humidity levels in a factory switching street lights on or off depending on light manufacturing microchips levels APPLICATION monitor/control humidity levels in the air switch on car headlights automatically when it gets in a greenhouse dark Common Sensors SENSOR INFRARED PRESSURE These use an invisible beam of infrared radiation picked up by a A pressure sensor is a transducer and generates detector; if the beam is broken, then there will be a change in FUNCTION different electric currents depending on the pressure the amount of infrared radiation reaching the detector. applied turn on car windscreen wipers automatically when it detects weighing of lorries at a weighing station rain on the windscreen APPLICATION measure the gas pressure in a nuclear reactor security alarm system (intruder breaks the infra- red beam) Common Sensors SENSOR SOUND GAS These are basically microphones that Most common ones are oxygen or carbon dioxide sensors; they use various methods to detect the gas being monitored and FUNCTION convert detected sound into electric produce outputs that vary with the oxygen or carbon dioxide signals/pulses levels present pick up the noise of footsteps in a security system monitor oxygen and carbon dioxide detect the sound of liquids dripping at a faulty APPLICATION levels in a greenhouse pipe joint Common Sensors SENSOR PH MAGNETIC FIELD These measure acidity through These sensors measure changes in magnetic fields – FUNCTION changes in voltages in, for example, the signal output will depend on how the magnetic soil field changes monitor/control acidity levels in the soil in a greenhouse Detect magnetic field changes (for example, in APPLICATION control acidity levels in a chemical process mobile phones and CD players) Common Sensors SENSOR ACCELEROMETER P ROX IMI T Y These are sensors that measure acceleration and These sensors detect the presence of a nearby motion of an application, i.e. the change in velocity. object. FUNCTION Used in cars to measure rapid deceleration and apply Detect when a face is close to a mobile phone air bags in a crash APPLICATION screen and switches off screen when held to the ear Used by mobile phones to change between portrait and landscape mode Common Sensors SENSOR FLOW LEVEL These sensors measure the flow rate of a moving liquid or These sensors use ultrasonics (to detect gas and produce an output based on the amount of liquid FUNCTION changing liquid levels in, for example, a tank) or or gas passing over the sensor. capacitance/ conductivity Used in respiratory devices and inhalers in hospitals Monitor levels in a petrol tank in a car Measure gas flows in pipes (for example, natural gas) APPLICATION Leak detection in refrigerant (air conditioning) S E N S O RS A R E U S E D I N B OT H M O N I TO R I N G A N D CO N T RO L A P P L I C AT I O N S. Monitoring Controlling Application Application 1. Security System 1. Control of Street Lighting 2. Monitoring of patients in a hospital 2. Anti-lock braking system 3. Control Heating Systems 4. Chemical Process Control 5. Greenhouse Environmental Control F LOWC H A RT O F H OW M O N I TO R I N G A N D CO N T RO L A P P L I C AT I O N WO R K M O N I TO R I N G A P P L I C AT I O N - JUST SEND WA R N I N G Monitoring system (1) - Security System Sensors The infrared sensor will pick up the movement of an intruder in the building The acoustic sensor will pick up sounds such as footsteps or breaking glass The pressure sensor will pick up the weight of an intruder coming through a door or through a window The sensor data is passed through an ADC if it is in an analogue form to produce digital data. The computer/microprocessor will sample the digital data coming from these sensors at a given frequency. The data is compared with the stored values by the computer/microprocessor If any of the incoming data values are outside the acceptable range, then the computer sends a signal Siren to sound alarm Light to start flashing 6. A DAC is used if devices need analogue values to operate them. 7. The alarm continues to sound/lights continue to flash until the system is reset with a password. Monitoring system (2) - Monitoring of patients in a hospital Sensors Sensors are attached tto the patient to measure temperature, heart rate, breathing rate, etc. These sensors are all attached to a computer system. It constantly send data back to the computer system. The sensor data is passed through an ADC if it is in an analogue form to produce digital data. The computer samples the data at frequent intervals. The range of acceptable values for each parameter is keyed into the computer. The data is compared with the keyed in values by the computer/microprocessor. If any of the incoming data values are outside the acceptable range, then the computer sends a signal To sound an alram If data from the sensors is within range, the values are shown in either graphical form on a screen and/or a digital read out. Monitoring continues until the sensors are disconnected from the patient. M O N I TO R I N G A P P L I C AT I O N - JUST SEND WA R N I N G CO N T RO L L I N G A P P L I C AT I O N - DO SOMETHING Controlling system (1) - Control of Street Lighting The light sensor sends data to the ADC interface. This changes the data into digital form and sends it to the microprocessor. The microprocessor samples the data every minute/5 minutes. If the data from the sensor < value stored in memory a signal is sent from the microprocessor to the street lamp. and the lamp is switched on The lamp stays switched on for 30 minutes before the sensor readings are sampled again If the data from the sensor >= value stored in memory a signal is sent from the microprocessor to the street lamp the lamp is switched off The lamp stays switched off for 30 minutes before sensor readings are sampled again. Controlling system (2) - Anti-lock braking (ABS) systems Anti-lock braking systems (ABS) on cars use magnetic field sensors to stop the wheels locking up on the car if the brakes have been applied too sharp. One of the car wheels rotates too slowly (i.e. it is locking up), The sensor data is first sent to an ADC to convert the analogue data into digital data. The microprocessor checks the rotation speed of the other three wheels. If they are different (i.e. rotating faster), the microprocessor sends a signal to the braking system. The braking pressure to the affected wheel is reduced. The wheel’s rotational speed is then increased to match the other wheels. The checking of the rotational speed using these magnetic field sensors is done several times a second. The braking pressure to all the wheels can be constantly changing to prevent any of the wheels locking up under heavy braking. Controlling system (3) - Central Heating Systems The required temperature is keyed in and this is stored in the microprocessor memory (this is called the pre-set value). The temperature sensor is constantly sending data readings to the microprocessor. The sensor data is first sent to an ADC to convert the analogue data into digital data. The digital data is sent to the microprocessor. The microprocessor compares this data with the pre-set value. If the temperature reading >= pre-set value then no action is taken. If the temperature reading < pre-set value, then a signal is sent To an actuator (via a DAC) to open the gas valve to the heater To an actuator (via a DAC) to turn on the water pump The process continues until the central heating is switched off. Controlling system (4) - Chemical process control Requirement: A certain chemical process only works if the temperature is above 70°C and the pH (acidity) level is less than 3.5. Sensors are used as part of the control system. A heater is used to heat the reactor and valves are used to add acid when necessary to maintain the acidity. Steps: Temperature and pH sensors read data from the chemical process. This data is converted to digital using an ADC and is then sent to the computer The computer compares the incoming data with pre-set values stored in memory Temperature: If the temperature < 70°C, a signal is sent to switch on the heater. If the temperature >= 70°C, a signal is sent to switch off the heaters PH If the pH > 3.5, then a signal is sent to open a valve and acid is added If the pH