Computer-Based Instrumentation 11/12/01 ISAT 300
The generalized measurement system – Figure 2.1 Sensing element Signal modification subsystem Indicator or recorder Measurand Computer E.g., for temperature measurement, could be a thermocouple or a thermistor
Computer-Based Instrumentation Connection Module Computer Thermocouple or thermistor
Computer-Based Instrumentation
Measurand Sensing element Signal modification subsystem Indicator or recorder
Computerized Data Acquisition System – Fig. 4.1 What we want to know about
What’s a MUX? (Multiplexer) – Fig. 4.4 What if we want to monitor several measurands? (several temperatures, pressure, humidity, illumination,etc.) We need to monitor several sensors. In most cases, each sensor is connected to a separate channel of the computerized data acquisition system. The computer reads information from the various channels one at a time using a device called a multiplexer (MUX). The MUX is an electronic switch.
What’s a MUX? (Multiplexer) – Fig. 4.4 The computer instructs the MUX to select a particular channel and the data are then read and processed. The computer then instructs the MUX to select a another channel …
Computerized Data Acquisition System – Fig. 4.1 What we want to know about
Computerized Data Acquisition Information in computers is stored in bistable devices, called “flip-flops”. Flip-flops can have two possible states. The “on” state is assigned a numerical value of 1. The “off” state is assigned a numerical value of 0. We need to know a little bit about binary. The analog-to-digital converter converts an analog signal (generally a voltage) to a digital (binary) code.
Everything I need to know I learned in kindergarten “Sing a song of sixpence, a pocket full of rye, Four and twenty blackbirds baked in a pie” 24 2 tens + 4 ones
Another example (decimal system) digits = 10 possibilities 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Binary system digits = 2 possibilities 0, 1
Binary numbers--what’s it worth? b = 15 d b = 255 d b = 4095 d b = 65,535 d 8 bits = 1 byte
Examples: converting binary to decimal b = ? d b = ? d b = ? d b = ? d
Adding in binary
Subtracting in binary 0 1 1
More adding in binary compare to decimal:
Converting decimal to binary least significant bit (lsb) most significant bit (msb) “zero padding” 92 d = b
Examples: converting decimal to binary 12 d = ? b 75 d = ? b 1215 d = ? b
Representing negative numbers – 2’s complement bits of numbers 3 bits of numbers, 1 bit of sign
2’s complement--hard for us, easy for the computer 1) Convert the magnitude of the number to binary-- have at least one “leading zero” 2) Invert all of the bits--0’s become 1’s, 0’s become 1’s 3) Add 1 to the result To get positive numbers: 1) Convert the magnitude to binary--but you must have at least one “leading zero” To get negative numbers:
1) Convert the magnitude of the number to binary-- have at least one “leading zero” 2) Leave it alone--it’s positive! 2’s complement--hard for us, easy for the computer Example:
1) Convert the magnitude of the number to binary-- have at least one “leading zero” 2) Invert all of the bits--0’s become 1’s, 0’s become 1’s 3) Add 1 to the result 2’s complement--hard for us, easy for the computer Example:
2’s complement--example +19 d = ? b -19 d = ? b Use one byte = 8 bits for both