Survey of Electronics ET 100B • Overview • Circuits and Time Constants • RC and R/L Circuits • Photo Sensors used with the Boe Bot • Basic Stamp 2 Input and Output Characteristics • Testing a simple photo resister Circuit w/ the Boe Bot • Analog to Digital Converters (ADCs) • Build a more complex ADC for light levels using a circuit with a RC time constant and a Boe Bot Capacitor • Characteristics • Two parallel plates separated by an insulator • In the neutral state, both plates have an equal number of free electrons • When a voltage source is connected to the capacitor, electrons are removed from Q one plated and V deposited on the other C Coulombs VoltageCap Farads Capacitor • Characteristics • No electrons flow through the dielectric • When the supply is removed from the capacitor, the capacitor retains the charge • The amount of charge that a capacitor can store per volt across the plates is its capacitance (C). • The unit of capacitance is the farad (F). • One farad is the amount of capacitance when one coulomb of charge is stored with one volt across the plates. • Most capacitors in electronics work have capacitance values of F (10 -6 F) or F (10-12 F) • A capacitor stores energy in the form of an electric field that is established by the opposite charges on the two plates Capacitor • Characteristics kQ1Q2 F 2 d W 1 / 2 CV F =force in Newtons Q’s are charge in Columbs D= distance in meters 2 W = Energy in Joules Capacitance in Farads Voltage in volts • A capacitor obeys Coulomb’s Law: A force exists between two point-source charges that is directly proportional to the product of the two charges and inversely proportional to the square of the distance between the charges. • Capacitor Ratings • The voltage rating specifies the • Maximum dc voltage that can be applied without risk of damage • a.k.a. breakdown or working voltage • Determined by the dielectric strength Capacitor • Capacitor Ratings • The voltage rating specifies the • Maximum dc voltage that can be applied without risk of damage • Temperature coefficient indicates the amount and direction of a change of capacitance with temp • Positive coefficient means that capacitance increases with increasing temp, Negative coefficient means capacitance decreases with increasing temp • Capacitance • Directly proportional to physical size of the plates • Specifically plate area • Inversely proportional to the distance between the plates Capacitor • Capacitance • The measure of a materials’ ability to establish an electric field is called the dielectric constant ( ) • Capacitance is directly proportional to the dielectric constant 2 Ar 0 C d A = Area in m gr = dielectic constent (relative permittivity) g0 = Permittivity of a vacuum D = distance in meters • Fixed Capacitors • Stacked-foil mica capacitors are made of alternate layers of metal foil and thin sheets of mica. • Silver mica are formed by stacking mica sheets with silver electrode material screened on them Fixed Capacitors • Ceramic dielectrics provide very high dielectric constants, and relatively large capacitance in a small physical size. • Capacitance ranges from 1pF to 2.2F. Electrolytic Capacitors • Electrolytic capacitors are polarized so that one plate is positive, and the other negative. • They come in capacitance values from 1F to 200,000 F, with voltage ratings to 350 V. Capacitors in DC Circuits • A capacitor will charge up when it is connected to a dc voltage source. • When a capacitor is fully charged, there is no current. • There is no current through the dielectric of the capacitor because the dielectric is an insulating material. • A capacitor blocks constant dc. RC Time Constant • The buildup of charge across the plates occurs in a predictable manner that is dependent on the capacitance and the resistance in a circuit. • The time constant of a series RC circuit is a time interval that equals the product of the resistance and the capacitance. = RC Charging and Discharging • The charging curve is an increasing exponential. • The discharging curve is an decreasing exponential. Transient time • It takes 5 time constants to change the voltage by 99% (charging or discharging), this is called the transient time. • General Equations Charging from zero • For RC circuits J= RC v VF (Vi VF )e i I F ( I i I F ) e t v VF (1 e t Discharging to zero t v Vi e t RC RC ) The Basic Inductor • When a length of wire is formed onto a coil, it becomes a basic inductor. • Magnetic lines of force around each loop in the winding of the coil effectively add to the lines of force around the adjoining loops, forming a strong electromagnetic field within and around the coil. • The unit of inductance is the henry (H), defined as the inductance when one amp per second through the coil, induces one volt across the coil. Physical Characteristics • Inductance is directly proportional to • The permeability of the core material • The cross-sectional area of the core • The square of # turns of wire • Inductance is inversely proportional to • The length of the core material L = N2A/l L = Inductance in henries N = # of wire turns A = Cross-sectional area in m2 l = core length in meters μ= pereability in henries/m Faraday’s and Lenz’s Laws • Recall Faraday’s law: • The amount of voltage induced in a coil is directly proportional to the rate of change of the magnetic field with respect to the coil. • Recall Lenz’s law: • When the current through a coil changes, an induced voltage is created as a result of the changing electromagnetic field, and the direction of the induced voltage is such that it always opposes the change in current. Typical Inductors Inductors in DC Circuits • When there is constant current in an inductor, there is no induced voltage. • There is a voltage drop in the circuit due to the winding resistance of the coil. • Inductance itself appears as a short to dc. RL Time Constant • Because the inductor’s basic action opposes a change in its current, it follows that current cannot change instantaneously in an inductor. = L/R where: is in seconds L is in henries (H) R is in ohms Energizing Current in an Inductor • In a series RL circuit, the current will increase to approximately 63% of its full value in one time-constant interval after the switch is closed. • The current reaches its final value in approximately 5 . De-energizing Current in an Inductor • In a series RL circuit, the current will decrease to approximately 63% of its fully charged value one time-constant interval after the switch is closed. • See Percentages on the drawing • The current reaches 1% of its initial value in approximately 5 . Considered to be equal to 0. Induced Voltage in the Series RL Circuit • Walk-Through • At the instant of switch closure, the inductor effectively acts as an open with all the applied voltage across it. • During the first 5 time constants, the current is building up exponentially, and the induced coil voltage is decreasing. • The resistor voltage increases with current. Induced Voltage in the Series RL Circuit • Walk-Through • After 5 time constants, all of the applied voltage is dropped across the resistor and none across the coil. • The general formulas for RL circuits are: v =VF+(Vi - VF)e-Rt/L i =IF+(Ii - IF)e-Rt/L Where VF & IF are final values of voltage & current. Vi and Ii are initial values of voltage and current. v and i are instantaneous values of voltage and current Increasing/Decreasing Current • The special formula for an RL circuit charging from zero is: i =IF (1 - e-Rt/L ) • The special formula for an RL circuit discharging to zero is: i =Iie-Rt/L Basic Stamp 2 Input and Output Characteristics • Recommended Maximum current • From any I/O pin – 20 mA • Per 8 I/O pins – 40 mA • Threshold Voltages • The voltage at which the Basic Stamp sees either a logic “1” or logic “0” • Default level per TTL logic levels • Input Characteristics • High input resistance – • Minimal effect on input signals Testing a simple photo resister Circuit • Characteristics of Photoresisters • Have no PN junction like phototransistors or photodiodes. • Uses bulk resistivity which decreases with increasing illumination, allowing more photocurrent to flow. • Signal current from the detector can be varied over a wide range by adjusting the applied voltage. • Thin film devices made by depositing a layer of a photoconductive material on a ceramic substrate. Testing a simple photo resister Circuit • Photoresisters • Metal contacts with external connection. These thin films have a high sheet resistance. Therefore, the space between the two contacts is made narrow for low cell resistance at moderate light levels. • Photoresister used with the Boe Bot • VT935G Group B • Data Sheet Links on the Learning Module Testing a simple photo resister Circuit • Photoresisters • Metal contacts with external connection. These thin films have a high sheet resistance. Therefore, the space between the two contacts is made narrow for low cell resistance at moderate light levels. • Build the Circuits Shown Testing a simple photo resister Circuit • How the Circuit works • Stamp Inputs • Above 1.4 V yields the input register for I/O pin with a 1. • Below 1.4 V yields the input register for I/O pin with a 0. • When a BASIC Stamp I/O pin is an input, the circuit behaves as if neither the I/O pin nor 220 Ωresistor is present • As the photoresistor’s resistance changes with light exposure, so does the voltage at Input Pins • As R gets larger, Vo gets smaller, • As R gets smaller, Vo gets larger. • Testing a simple photo resister Circuit Testing • Load the program on page 198 and test the sensors • When shaded the sensor should yield a logic “0” • When under enough light the sensor will yield a logic “1” • Circuit & program converts the analog input voltage levels to digital information stored in the Basic Stamp • Questions • What happens if the ambient level of light in the room is lower or higher? • Will the voltage divider network consisting of the 2K ohm resister and the photo resister still work? • Or will it be necessary to have different resistors for each different level of ambient light? Analog to Digital Converters • Analog and Digital • Real world processes produce analog signals • Voices and music • Pictures • Letters and Decimal numbers • Digital systems use binary signals • ASCII code for “a” =>> 1100001 • Relative Strengths of Digital Data • Simplified Storage, retrieval of information stored in digital form • Analog Systems - Cumbersome & Expensive • Devices • Digital to Analog Converters DACs • Analog to Digital Converters ADCs • The last circuit & program functioned as a very simple one Analog to Digital Converters • Types of ADCs • Integrating • Usually for slowly changing Analog Inputs • Usually needs approximately 300 ms • Successive Approximation • Converges in a few microseconds • Flash Converters • More costly • Much faster - can be used to digitize video signals • Implementations using Micro-controllers/Microprocessors • The last circuit was a very simple one bit ADC • Only provides whether the input voltage is less than/greater than approximately 1.4V DC • Can become much more sophisticated and use many I/O ports Analog to Digital Converters • Basic Stamp RC-time constant based ADC • Key aspects • I/O characteristics of the Basic Stamp • Discharge time of a charged parallel RC circuit • PBASIC command for measuring the RC decay time on a connected circuit • I/O characteristics of the Basic Stamp • • • • Same pins used for both Input and Output Mode can be quickly switched Can supply 20 mA/pin when in the Output mode Very high input impedance when in the input mode • Usually an unnoticeable effect on the input circuit • Discharge time of a charged parallel RC circuit Analog to Digital Converters • Basic Stamp RC-time constant based ADC • PBASIC command for measuring the RC decay time on a connected circuit • RCTIME command is designed to measure RC decay time on a circuit like the one below. Here is the syntax for the RCTIME command: • RCTIME Pin, State, Duration » Pin argument is the number of the I/O pin that you want to measure » State argument - 1 if the voltage across the capacitor starts above 1.4 V and decays downward. 0 if the voltage across the capacitor starts below 1.4 V and grows upward » Duration argument has to be a variable that stores the time measurement, which is in 2 μs units Build a complex ADC for light levels using a circuit with a RC time constant and a Boe Bot • Build the circuit below Complex ADC for light levels using a a Boe Bot • Test the Sensor circuit • Load the program on page 212 and 213 • Test the Sensors in the ambient light levels • timeRight ________________ • timeLeft _______________ • Turn the Boe Bot by 1800 and retest the light levels • timeRight ________________ • timeLeft _______________ • Now test with a Flash light directly on the sensors – maintain 3” distance • timeRight ________________ • timeLeft _______________ • Conclusions ?? . Note: save this sheet for next week