Survey of Electronics ET 100B

advertisement
Survey of Electronics ET 100B
• Overview
• Linear Approximation of last week’s test results
• Use the RC time constant based ADC for light levels to
make a Boe Bot that will follow a flash light or roam
towards a brighter light
• Digital Logic Electronics
• Overview
• Construction
• Basic Logic Gates
• Recent Developments
Survey of Electronics ET 100B
• Linear Approx of last week’s test results
• You probably got different times for each or the two
photo-resisters and there are a number of reasons
• The stated value of the capacitors is 0.01 μF, but the actual
value of capacitors can be very different.
• Many common ceramic capacitors are rated with a
tolerance of +80/-20%
» Meaning that the actual value of the capacitor could be up
to 20% larger or 20% smaller than 0.01 μF.
» This means that your measured decay time could also be
between 20% larger and 20% smaller.
• The photoresistors themselves can also behave differently
• If they come from different manufacturing batches
• If they have smudged or chipped light collecting surfaces.
Survey of Electronics ET 100B
• Linear Approx of last week’s test results
• You probably got different times for each or the two
photo-resisters and there are a number of reasons
• The photo-resistor is often referred to as a non-linear device
• In other words, if it returns one measurement at one
brightness, that doesn’t mean that the measurement will
be five times as large when the light is five times as bright.
• However, in cases where the measurements are confined
over a narrow range of the sensors overall detection
abilities, the sensor can be treated like it’s a linear device.
• Linear Approximation Process
• You can take a couple of measurements, and then assume that
linearly between the measured data points
• In other words. Other measurements in its range could
be plotted in a straight line.
Survey of Electronics ET 100B
• Linear Approx of last week’s test results
• Linear Approximation Process
• You can take a couple of measurements, and then assume that
linearly between the measured data points
• Other measurements in its range could be plotted in a
straight line.
• In fact, if you have one linear device that has larger
measurements than the other for ambient and low light
• You can use a linear approximation for making the
sensors return approximately the same values for the same
light levels
» For every reading from one sensor, (we’ll call that one
x), you can multiply it by a scale factor (m), and add it to
a constant (b) to get a value in the same range the other
sensor would report (y).
Survey of Electronics ET 100B
• Linear Approx of last week’s test results
• Linear Approximation Process
• y = mx + b
• Make y = the left or right sensor that consistently has the
larger time reading in your data from last week
• Make x the value for the other sensor
• Make one version of the equation using the low light
values and one with the normal light values
• Subtract the equation with smaller x and y values from the
other
• This eleminates the “b” from both and yields one
equation with m as the unknown
• Solve for m
• Use the derived value of m and solve one of the orginal
equations for b
Survey of Electronics ET 100B
• Linear Approx of last week’s test results
• Linear Approximation Process
• Solve the other equation for b – both should yield the same b
See page 323 for an Example
• Implementing the linearization equation in PBASIC
• Almost always m will be a fractional value
• The Basic Stamp cannot do fractional multiplication
without a preprocessing step
• “m” is adjusted for use with the “*/n ” operator
m * 256 = n
» The “b” is added after the multiplication
EXAMPLE: timeLeft = [timeLeft */n] + b
» The function is applied to the smaller time variable
Survey of Electronics ET 100B
• Roaming Towards the Light
• Adjust your sensors as shown
• Notice the separation of the sensors
• Also the vertical angle
Survey of Electronics ET 100B
• Roaming Towards the Light
• Enter the program
• Starts on page 223
• Place your linear approximation equation in the program
• After the “GOSUB Test_Photoresistors” line
• Watch the video on the learning module & test your Boe Bot
using a flash light
• Digital Logic Electronics
• Micro controllers and micro processors
• Very complex implementations of digital electronics
• The first personal computer was built before the first
micro processor was built in 1971
» The Kenbak-1 is considered by the Computer History
Museum to be the world's first ever "personal computer"
Survey of Electronics ET 100B
• Digital Logic Electronics
• Overview
• Digital electronics are electronics systems that use digital
signals
• Digital electronics are representations of Boolean algebra
• Boolean algebra (or Boolean logic) is a logical calculus of
truth values, developed by George Boole
• Boolean algebra is customarily based on logical
counterparts to those addition, subtraction, and
multiplication operations, namely conjunction (AND),
disjunction (OR), and complement or negation (NOT)
• Boolean algebra is the algebra of two values. These are
usually taken to be 0 and 1, as we shall do here, although F
and T, false and true, etc. are also in common use
» Regardless of nomenclature, the values are customarily
thought of as essentially logical in character and are
therefore referred to as truth values
Survey of Electronics ET 100B
• Digital Logic Electronics
• Overview
• Other Boolean operations are derivable from these
• For example the exclusive-or (XOR) operation
• Construction
• Types of digital systems
• Combinatorial logic systems
» No timing or prior knowledge
» Representation of a set of logic functions
» Usually only limited by gate operation speed
• Sequential logic systems
» A synchronous sequential circuit is a digital circuit in
which the parts are synchronized by a clock signal
» A synchronous sequential circuit is a digital circuit in
which the parts are synchronized by a clock signal
Survey of Electronics ET 100B
• Digital Logic Electronics
• Construction
• Types of digital systems
• Sequential logic systems
» Asynchronous sequential logic circuit propagate changes in
sequence whenever inputs change
» Micro controllers are a very complex example
• Simple implementations of both are still used
• Logic Families
• Relay logic
» Relay logic was relatively inexpensive and reliable & slow
» Most famous mechanical failure , a moth was caught in an
early relay computer, and gave rise to the terms "bug in the
program", and "Debugging.
» Fanouts were typically about ten, limited by the resistance
of the coils and arcing on the contacts from high voltages.
Survey of Electronics ET 100B
• Digital Logic Electronics
• Construction
• Logic Families
• Vacuum tubes
» Fast, but generated heat
» Unreliable because the
filaments burn out
• Resistor-transistor logic (RTL)
» More reliable and cooler,
» Used less power,
» Low fan-in of three
• Diode-transistor logic (DTL)
» Fanout up to about seven
» Reduced power usage
Survey of Electronics ET 100B
• Digital Logic Electronics
• Construction
• Logic Families
• Transistor transistor logic (TTL)
» Fanout of up to twenty
» TTL was also fast, with some
variations achieving
switching times as low as
twenty nanoseconds
» TTL is still used in some designs
• Emitter coupled logic (ECL)
» This is very fast but uses a lot
of power
» Now used mostly in radio-frequency circuits
Survey of Electronics ET 100B
• Digital Logic Electronics
• Construction
• Logic Families
• Complementary
metal–oxide–semiconductor (CMOS)
» Fast, very small and uses very
little power
» Fanouts of forty or more are possible
• Basic Logic Gates
• Types such as:
• AND gates
• OR Gates
• Exclusive OR Gates
Survey of Electronics ET 100B
• Digital Logic Electronics
• Basic Logic Gates
• Types such as:
• D Flip-Flops
• AND Gates
Boolean algebra
• Implements logical conjunction - it behaves according to the
truth table to the right.
» A HIGH output (1) results
only if both the inputs to
the AND gate are HIGH (1).
» If neither or only one input to the AND gate is HIGH, a is
High a LOW output results.
Survey of Electronics ET 100B
• Digital Logic Electronics
• Basic Logic Gates
• AND Gates
• 7408 Gate
Survey of Electronics ET 100B
‘ AND Gate Test
' {$STAMP BS2}
' {$PBASIC 2.5}
• Digital Logic Electronics
• Basic Logic Gates
HIGH 15
• AND Gates
HIGH 14
• Build the Test Circuit
END
• Load the Program
• Use the Multi-meter to check AND Gate Inputs and outputs
Pin 15
1
Pin 14
2
3
7408
+5 V
14
7
Common Or
Ground
Survey of Electronics ET 100B
• Digital Logic Electronics
• Basic Logic Gates
‘ AND Gate Test
' {$STAMP BS2}
' {$PBASIC 2.5}
HIGH 15
• AND Gates
LOW 14
• Change the program and set 14 low
END
• How did the Inputs and outputs change
• OR Gates
• The OR gate is a digital logic gate that implements logical
disjunction - it behaves according to the truth table
» A HIGH output (1) results if one or both the inputs to the
gate are HIGH (1). If neither input is HIGH, a LOW output
(0) results.
Boolean algebra
A+B
Survey of Electronics ET 100B
• Digital Logic Electronics
• Basic Logic Gates
• OR Gates
• 7432 Gate
Survey of Electronics ET 100B
‘ OR Gate Test
' {$STAMP BS2}
' {$PBASIC 2.5}
• Digital Logic Electronics
• Basic Logic Gates
HIGH 15
• OR Gates
LOW 14
• Build the Test Circuit
END
• Load the Program
• Use the Multi-meter to check OR Gate Inputs and outputs
Pin 15
1
Pin 14
2
3
7432
+5 V
14
7
Common Or
Ground
Survey of Electronics ET 100B
• Digital Logic Electronics
• Basic Logic Gates
‘ OR Gate Test
' {$STAMP BS2}
' {$PBASIC 2.5}
• OR Gates
LOW 15
• Change the program and set 15 low
• How did the Inputs and outputs change LOW 14
• Try the same for pins 24 and 15 HIGH END
• Exclusive OR Gates
• The XOR gate (sometimes EOR gate) is a digital logic gate
that implements exclusive disjunction - it behaves according
to the truth table
» A HIGH output (1) results if one, and only one, of the inputs to
the gate is HIGH (1).
» If both inputs are LOW (0) or both are HIGH (1), a LOW output
(0) results.
Boolean algebra
Survey of Electronics ET 100B
• Digital Logic Electronics
• Basic Logic Gates
• Exclusive OR Gates
• 7486 Gate
Survey of Electronics ET 100B
‘ XOR Gate Test
' {$STAMP BS2}
' {$PBASIC 2.5}
• Digital Logic Electronics
HIGH 15
LOW 14
• Basic Logic Gates
• Exclusive OR Gates (XOR)
END
• Build the Test Circuit & load the program
• Use the Multi-meter to check XOR Gate Inputs and outputs
• Change the inputs to both LOW, then both HIGH and check
output
• Try LOW 15 and HIGH 14 and check the output
Pin 15
1
Pin 14
2
3
7486
+5 V
14
7
Common Or
Ground
Survey of Electronics ET 100B
• Digital Logic Electronics
• Basic Logic Gates
• D Flip-Flop
• In digital circuits, a flip-flop
is a bistable-multivibrator
» An electronic circuit which
has two stable states and
thereby is capable of serving as one bit of memory
• D is a Special Case of Flip-Flops
» The Q output always takes on the state of the D input at the
moment of a rising clock edge, and never at any other time
» Output matches the D input , but delays it by one clock
count
Survey of Electronics ET 100B
• Digital Logic Electronics
• Basic Logic Gates
• D Flip-Flop
• 74273 Gate
Survey of Electronics ET 100B
• Digital Logic Electronics
‘ XOR Gate Test
' {$STAMP BS2}
' {$PBASIC 2.5}
• Basic Logic Gates
• D Flip-Flop
• Build the Test Circuit & load the
program
• Use the Multi-meter to check
XOR Gate Inputs and outputs
• Test the Input and output pins
Pin 15
2
Pin 14
11
Reset - Pin 13
Active LOW
+5 V
LOW 15
LOW 14
LOW 13 ‘ Clear
Pause 1
HIGH 13
END
3
1
74273
20
10
Common Or
Ground
Survey of Electronics ET 100B
• Digital Logic Electronics
• Basic Logic Gates
• D Flip-Flop
• Put a HIGH on the Pin 2 the D input
• Measure the output pin –any change?
• Add a clock pulse code for Pin14 –
Clock input (after HIGH 2)
HIGH 15
LOW 15
HIGH 15
LOW 15
• Check the output
‘ XOR Gate Test
' {$STAMP BS2}
' {$PBASIC 2.5}
LOW 15
LOW 14
LOW 13 ‘ Clear
Pause 1
HIGH 13
HIGH 2 ‘ Set D input
HIGH
END
Survey of Electronics ET 100B
• Digital Logic Electronics
• Recent Developments
• The discovery of superconductivity has enabled the development
of Rapid Single Flux Quantum (RSFQ) circuit technology
• Uses Josephson junctions instead of transistors
• Attempts are being made to construct purely optical computing
systems capable of processing digital information using optical
elements
Download