1 - Theory of Computer Science / Input Devices (Automatic)
|
|
Input Devices
Input devices (and output) are things that we all take for granted with regards to the functionality of computers. Without both Input and output devices, our computers would be useless... after all what could you do without a mouse keyboard or monitor??
An input device is a piece of hardware that allows the transfer of data from the outside (Real) world, into the computer. Essentially it allows he user (or sometimes environment) to IN PUT information into the computer
An input device is a piece of hardware that allows the transfer of data from the outside (Real) world, into the computer. Essentially it allows he user (or sometimes environment) to IN PUT information into the computer
Automatic Input Devices
What is an automatic Input device?
An automatic input device is a piece of hardware that allows data to be transferred from the outside world into the computer. This will occur automatically with minimal or no human interaction.
|
Sensors
A sensor is a hardware device that will take measurement of physical properties like temperature, pressure or acidity.
The data that is taken in / measured by a sensor is usually in analogue form.
There are many different sensors available each designed to measure different physical properties. Some of these sensors are included in the table below:
The data that is taken in / measured by a sensor is usually in analogue form.
There are many different sensors available each designed to measure different physical properties. Some of these sensors are included in the table below:
Type of Sensor |
Property Measured |
Gas |
Oxygen, Carbon dioxide... levels |
Infra-red |
Motion / Heat sources |
Light |
Light levels |
Temperature |
Level of temperature |
Pressure |
Pressure |
Moisture / Humidity |
Humidity |
Acoustic |
Sound levels |
PH |
Acidity |
Magnetic Field |
Magnetism |
Control / Monitoring Systems
Sensors play an important role in most computing devices these days, even within your smart phone you are likely to find 10 + sensors that will serve numerous purposes within many different applications.
Two important systems which use sensors are known as Control systems and Monitoring systems.
Control Systems
Control systems can take control and alter how a process is altering e.g. turning up fans on an air-conditioning machine because the temperature has become too high.
Examples:
Air conditioning / heating systems
Traffic light control
Automatically turning street lights on and off at night
Monitoring systems
Monitoring systems do not make any changes to the process, instead it simply reports the information / values to the user e.g. a life support system in a hospital will sound an alarm if the patients heart stops...it will not take action to re start the heart, it only informs doctors that they need to take action.
Examples
Monitoring a patients vitals in intensive care
Checking for intruders in an alarm system
Monitoring pollution levels
Two important systems which use sensors are known as Control systems and Monitoring systems.
Control Systems
Control systems can take control and alter how a process is altering e.g. turning up fans on an air-conditioning machine because the temperature has become too high.
Examples:
Air conditioning / heating systems
Traffic light control
Automatically turning street lights on and off at night
Monitoring systems
Monitoring systems do not make any changes to the process, instead it simply reports the information / values to the user e.g. a life support system in a hospital will sound an alarm if the patients heart stops...it will not take action to re start the heart, it only informs doctors that they need to take action.
Examples
Monitoring a patients vitals in intensive care
Checking for intruders in an alarm system
Monitoring pollution levels
How to answer Control / Monitoring system questions
In general these questions can be tackled by following a specific formula. Be careful to to stick to the formula too rigidly though. If a certain sensor is described or if preset acceptable values are mentioned then you must incorporate them into the answer.
With that in mind, here is a formula for you to follow when attempting these questions.
The Basics
1.The (Name the sensor) Sensor is reading the (Insert property) at a (set rate or constantly)
2.The data is converted with an ADC and sent to the micro processor
3.The microprocessor will compare this data against the pre defined values that are know to be acceptable. (If the question gives you these values, you must use them in your answer!)
4.If the sensors reading and the pre defined values do not match. The microprocessor will send a signal to the (Insert device) to adjust the physical properties. This signal must go through a DAC
5.The system will continue until it is switched off or programmed to do so
Example answer for the control of street lights:
Light sensors constantly read the light of the surrounding area.
Data from the sensors is sent to a microprocessor and is converted into digital using an ADC
The microprocessor checks data from light sensors against pre-set values
If light levels < pre-set values then a signal is sent to switch on the street lamp. If light levels >= pre-set values then a signal is sent to switch off the street lamp
The microprocessor begins checking data again after two hours
With that in mind, here is a formula for you to follow when attempting these questions.
The Basics
1.The (Name the sensor) Sensor is reading the (Insert property) at a (set rate or constantly)
2.The data is converted with an ADC and sent to the micro processor
3.The microprocessor will compare this data against the pre defined values that are know to be acceptable. (If the question gives you these values, you must use them in your answer!)
4.If the sensors reading and the pre defined values do not match. The microprocessor will send a signal to the (Insert device) to adjust the physical properties. This signal must go through a DAC
5.The system will continue until it is switched off or programmed to do so
Example answer for the control of street lights:
Light sensors constantly read the light of the surrounding area.
Data from the sensors is sent to a microprocessor and is converted into digital using an ADC
The microprocessor checks data from light sensors against pre-set values
If light levels < pre-set values then a signal is sent to switch on the street lamp. If light levels >= pre-set values then a signal is sent to switch off the street lamp
The microprocessor begins checking data again after two hours
Barcode Scanners
How does the Scanner work?
As you can see from the image above, barcodes consist of black and white lines. So how can this information be inputted into a computer?
First the barcode scanner will fire a red light at the barcode. When the light hits the barcode, it will reflect differently based on whether it hits a black or white part of the bar code This light will reflect back to sensors built into the scanner. Based on how much light reflects back to the sensor at certain points, the scanner can determine where the black and white lines of the code are. |
Understanding the Barcode
There are many different types of bar code system out there, each system has its own way of representing data with black and white lines, to find out about the many different systems check out this site - SCANDIT.
There are two types that we need to concentrate on, these are Universal Product Code Version A (PC-A) and Code 128.
The main difference between the two systems is that code 128 can represent letters and numbers but UPC-A is only able to represent numbers.
There are two types that we need to concentrate on, these are Universal Product Code Version A (PC-A) and Code 128.
The main difference between the two systems is that code 128 can represent letters and numbers but UPC-A is only able to represent numbers.
UPC-A
The Universal product code version A (UPC-A) barcode system is a very common one, it is used world wide to store and label retail products.
These barcodes are common place in our lives, but rarely do people stop to understand how they work. The barcode itself is separated into different sections each with their own purpose in representing data. See the image below.
These barcodes are common place in our lives, but rarely do people stop to understand how they work. The barcode itself is separated into different sections each with their own purpose in representing data. See the image below.
Guard Bars (Green, Blue and Red Lines) - These are two long lines placed at the start middle and end of the bar code, their purpose is to help distinguish the left and right sides of the bar code.
Left side (Pink Line) - The left side of the barcode is used to store information about the manufacturer of a product
Right side (Orange line) - The right side of a barcode is used to store the products unique id number.
Check Digit (Green) - This is an error checking number that is used to make sure that the barcode has been scanned correctly. Once the code is scanned, an algorithm will be followed with all of the numbers, if the result matches the check digit you can be sure that the scan was correct. To read more about this check please refer to the error checking section of Unit 2.
Left side (Pink Line) - The left side of the barcode is used to store information about the manufacturer of a product
Right side (Orange line) - The right side of a barcode is used to store the products unique id number.
Check Digit (Green) - This is an error checking number that is used to make sure that the barcode has been scanned correctly. Once the code is scanned, an algorithm will be followed with all of the numbers, if the result matches the check digit you can be sure that the scan was correct. To read more about this check please refer to the error checking section of Unit 2.
Bars and Numbers
So now that we know what each part of the barcode represents, it is time to think about how different numbers are represented with black and white lines.
It may not look like it to the untrained eye but each line can be broken down into 7 small segments, each of these segments are colored either black or white in correspondence to a pre set system of number representation. below you can see the different patterns that represent each number.
IMPORTANT NOTE - The right side of the bar code is the inverse (Opposite) of the left side.
Binary understanding - As with anything in a computer, everything will boil down to binary. With regards to bar codes each of the 7 sections required for each numbers is represented by using a 0 for white and 1 for black.
Example - Using the image above we can see that the LEFT side code for 5632 in binary would be:
0110001 - 0101111 - 011101 - 0010011
Binary understanding - As with anything in a computer, everything will boil down to binary. With regards to bar codes each of the 7 sections required for each numbers is represented by using a 0 for white and 1 for black.
Example - Using the image above we can see that the LEFT side code for 5632 in binary would be:
0110001 - 0101111 - 011101 - 0010011
Review your understanding
Take the quiz below to check your understanding. Click submit at the end to see answer feedback.
Scanners
Scanners are hardware devices that are used to convert hard copies of documents / objects into a digital format that is readable by computers. We will be looking at both 2D and 3D scanners.
2D Scanners
2D scanners are used to convert a physical paper copy of a document (Known as hard copy) into a digital format that can be stored and processed by a computer.
Operation - A scanner works by following these steps.
- The user opens the lid and places the document face down on the glass pane
- The user will close the lid and press scan
- A bright light is shone on the document, the light will move from one side of the document to the other
- From the light passing through the paper an image is produced and sent to a lens
- This image will then be placed onto a light sensitive sheet which is made up of many pixels, each pixel will record the amount of light or colour that is appearing on it.
- This data will be stored on the computer as a file in its memory.
Optical Character Recognition - OCR
OCR is the process of converting a scanned image file into a text document that can be edited using a word processor.
When an image is scanned it is normally stored as a bitmap file. This means that we can view it as an image, however, it is not very useful if you wish to alter some of the text. OCR solves this problem by converting the document into an editable one. How does it work? - OCR works by looking at each line of the document and checking to see if the black and white dots match any characters in the reference file. Each time it detects a match it will add that character to the outputted document. |
Facial Recognition
In an increasingly security conscious world, scanning has become a very important technology in ensuring peoples identity. Facial recognition software is now used with scanners in may airports to ensure that people are using the correct passports.
How it works -
|
3D Scanners
Existing3D scanning is an exciting new technology that has had a positive impact in both medical and industrial fields.
Medical - Scanning the human body/ parts allows doctors to take a closer look an possible problems virtually which can aid in giving a correct diagnosis e.g. taking an MRI scan of your knee to look for a small tendon tear.
Industrial - Existing tools or parts can be scanned into digital format. Once scanned in the object can be altered and tested using specialist 3d software.
How do they work? - 3D scanners work by using a process called Tomography. This means that it will take images of the object in very thin slices. If you wish to read about this in more detail, click here.
Medical - Scanning the human body/ parts allows doctors to take a closer look an possible problems virtually which can aid in giving a correct diagnosis e.g. taking an MRI scan of your knee to look for a small tendon tear.
Industrial - Existing tools or parts can be scanned into digital format. Once scanned in the object can be altered and tested using specialist 3d software.
How do they work? - 3D scanners work by using a process called Tomography. This means that it will take images of the object in very thin slices. If you wish to read about this in more detail, click here.
Camera Sensors
Without cameras... selfies would be impossible and without selfies why would we need cameras in our phones!
Taking photos has become an important part of our daily lives and this is due to the invention of digital cameras. Digital cameras are able to take an image from the real world and instantly save it into a binary file.
How it works -
Taking photos has become an important part of our daily lives and this is due to the invention of digital cameras. Digital cameras are able to take an image from the real world and instantly save it into a binary file.
How it works -
- The camera will break up what it sees through its lens into a grid of pixels
- A shutter will open letting light onto a CCD sensor that is at the back of the lens
- The intensity of the light colour is measured but the millions of sensors arranged in the grid on the CCD sensor
- This information is interpreted as digital information and stored in the cameras memory.
QR - Quick Response Codes
A QR code is another type of barcode which can be read by cameras on tablets and smartphones. QR codes are becoming increasingly useful on the internet, however they have been around for a long time. QR codes were actually invented in 1974 to allow Japanese car makers to track car parts.
QR codes are square rather than rectangle shape and they consist of many smaller squares rather than using lines.
Advantages of QR codes
There are 3 main advantages of QR codes over traditional bar codes, these are:
Example uses of QR codes
QR codes can be very useful as they can be used to store the following information:
Links to websites
Business cards
Link to an App
Provide a buildings WIFI password
Allow for a discount in a retail environment
V contacts - Adds contact to phone
Advertisements
Travel boarding passes.
To explore more that can be done with bar codes, try creating your own HERE.
QR codes are square rather than rectangle shape and they consist of many smaller squares rather than using lines.
Advantages of QR codes
There are 3 main advantages of QR codes over traditional bar codes, these are:
- QR codes can store approximately 100 times more information than a normal barcode
- QR codes can be scanned in any direction (e.g. it does not matter if it is upside down
- They can be easily scanned by everybody that has a smartphone and a QR app
Example uses of QR codes
QR codes can be very useful as they can be used to store the following information:
Links to websites
Business cards
Link to an App
Provide a buildings WIFI password
Allow for a discount in a retail environment
V contacts - Adds contact to phone
Advertisements
Travel boarding passes.
To explore more that can be done with bar codes, try creating your own HERE.
Alignment
One of the advantages of a QR code is that it can be scanned from any direction. Once the QR is scanned the scanning software will identify the three large squares placed in three corners of the code. These larger squares server the purpose of allowing the software to determine the orientation of the code before reading the data.
One of the advantages of a QR code is that it can be scanned from any direction. Once the QR is scanned the scanning software will identify the three large squares placed in three corners of the code. These larger squares server the purpose of allowing the software to determine the orientation of the code before reading the data.