41
Lecture #2 Lecture #2 Basic Electricity Basic Electricity

Lecture #2 Basic Electricity. Why learn electronics? Ability to understand information sensor is providing Ability to understand information sensor is

Embed Size (px)

Citation preview

Lecture #2 Lecture #2 Basic ElectricityBasic Electricity

Why learn electronics?Why learn electronics? Ability to understand Ability to understand

information sensor information sensor is providingis providing

Be able to read a Be able to read a wring diagramwring diagram

Basic understanding Basic understanding of what some of what some components are components are doing in the circuitdoing in the circuit

Troubleshooting!!!Troubleshooting!!!

BasicsBasics• Electricity is the flow of electronsElectricity is the flow of electrons

• Many similarities with the flow of waterMany similarities with the flow of water

• Water flows Water flows

because of a because of a

pressure pressure

differencedifference

• Bigger pipes Bigger pipes

allow more allow more

flowflow

• A complete circuit is A complete circuit is required for current to required for current to flowflow

• Also required:Also required:– A source of “pressure” A source of “pressure”

(voltage)(voltage)

• Optional:Optional:– SwitchSwitch– Something to do workSomething to do work

TermsTerms

• VoltageVoltage– Electrical potential differenceElectrical potential difference– Electrical “pressure”Electrical “pressure”– UnitsUnits

•Volts (v)Volts (v)

• CurrentCurrent– Flow of electron charge (phenomenon)Flow of electron charge (phenomenon)– Rate of Flow of Electron charge (quantity)Rate of Flow of Electron charge (quantity)– Units Units

•Ampere (A)Ampere (A)

• Resistance: the resistance to flowResistance: the resistance to flow

• Friction in the pipeFriction in the pipe

• Units Units – Ω – OhmΩ – Ohm

• SymbolSymbol

• -WW--WW-

Terms (cont)Terms (cont)

Simple EquationsSimple Equations

• Ohm's LawOhm's LawE=IRE=IR

•E– Voltage (volts)E– Voltage (volts)

• I – Current (amps)I – Current (amps)

•R – Resistance (ohm)R – Resistance (ohm)

• PowerPowerP=IEP=IE

•WattsWatts

Components: ResistorsComponents: Resistors

• Electronic component that provides Electronic component that provides resistance to the flow of electronsresistance to the flow of electrons

• Come in variety of sizes and ability to Come in variety of sizes and ability to handle powerhandle power

ResistorsResistors

• In SeriesIn Series– Resistance values (Ohms) add up to give Resistance values (Ohms) add up to give

total resistancetotal resistance

– RR11+R+R22+R+R33...=R...=Rtotaltotal

• In ParallelIn Parallel– Each have same potential differenceEach have same potential difference

– 1/R1/R11+1/R+1/R22...=1/R...=1/Rtotaltotal

Using resistorsUsing resistors

• Voltage dividerVoltage divider

• Use Ohm’s law to calculate:Use Ohm’s law to calculate:– CurrentCurrent– Voltage between A and BVoltage between A and B– Voltage Between B and CVoltage Between B and C

• Assume:Assume:– RR11 is 1000 is 1000 ΩΩ and R and R22 is 1000 is 1000 ΩΩ

– RR11 is 2000 is 2000 ΩΩ and R and R22 is 3000 is 3000 ΩΩ

A

C

B

Special resistorsSpecial resistors

• Variable resistor: 2 terminalsVariable resistor: 2 terminals– ExamplesExamples

•Audio controlAudio control

• JoysitckJoysitck

•RheostatRheostat

• Potentiometer: 3 terminalsPotentiometer: 3 terminals– Voltage dividerVoltage divider

DiodesDiodes

• One-way valvesOne-way valves– Allow current to flow in one directionAllow current to flow in one direction

• There is a drop in voltage across a diodeThere is a drop in voltage across a diode– Drop is ~ 0.7VDrop is ~ 0.7V

• Two main typesTwo main types– Single diodeSingle diode

•Up to 100mAUp to 100mA

– Rectifier diodeRectifier diode•Large CurrentsLarge Currents

• SymbolSymbol

DiodesDiodes

• Used to separate battery packsUsed to separate battery packs

• Also used to “idiot proof” Also used to “idiot proof” connectionsconnections

• Called “diode isolation”Called “diode isolation”

• More later….More later….

DiodesDiodes

• Light Emitting Diodes (LED)Light Emitting Diodes (LED)– Color is determined by the Color is determined by the

semiconductor material usedsemiconductor material used– Still need to be connected in the Still need to be connected in the

correct directioncorrect direction•Current flow long to shortCurrent flow long to short

– Easy to blow upEasy to blow up•Limit voltage/currentLimit voltage/current

CapacitorsCapacitors

• Passive Electronic componentPassive Electronic component

• A pair of conductor separated by a dielectricA pair of conductor separated by a dielectric

• When a voltage is applied a charge builds upWhen a voltage is applied a charge builds up– Acts like a little batteryActs like a little battery

• Why when you shut off certain things the light stays lit Why when you shut off certain things the light stays lit for a little even with no powerfor a little even with no power

• Eg. Computer power supplyEg. Computer power supply

• Units: Units: F - Farad F - Farad

• Symbol: -||-Symbol: -||-

• Be very careful of very big ones……Be very careful of very big ones……

CapacitorsCapacitors

• In SeriesIn Series– The energy stored is equal to that of the The energy stored is equal to that of the

other capacitors in the seriesother capacitors in the series•1/C1+1/C2...=1/Ceq1/C1+1/C2...=1/Ceq

• In ParallelIn Parallel– Add up the capacitanceAdd up the capacitance

•C1+C2+C3...=CtotalC1+C2+C3...=Ctotal

• Opposite that of ResistorsOpposite that of Resistors

• Using Using capacitorcapacitors:s:

• Absorb Absorb voltage voltage spikesspikes

MultimetersMultimeters

• Tool used to test electronics (Main tool)Tool used to test electronics (Main tool)– VoltageVoltage

•Straight forward touch ends to terminalsStraight forward touch ends to terminals

– CurrentCurrent•Need to put in sequenceNeed to put in sequence

•Be sure you won’t exceed rating!!!!Be sure you won’t exceed rating!!!!

– Validity of a cableValidity of a cable•““Ohm out”Ohm out”

•Used to Identify the same Used to Identify the same

wire in a cablewire in a cable

DC vs AC DC vs AC

• Alternating Current (AC)Alternating Current (AC)– Polarity changes over timePolarity changes over time

• Basic form is a sine waveBasic form is a sine wave– Other wave forms existOther wave forms exist

– Better for long distance transmission of Better for long distance transmission of powerpower• High voltages – Low currentHigh voltages – Low current

• PPll=I=I22RR– If current is doubled then 4x greater lossIf current is doubled then 4x greater loss

– Easily generated by a generator/alternatorEasily generated by a generator/alternator• Polarity changes as magnet spinsPolarity changes as magnet spins

– Can be “stepped up” and down using a Can be “stepped up” and down using a transformer (more later)transformer (more later)

– Not used in Oceanographic instrumentation*Not used in Oceanographic instrumentation*• AC to DC converter almost always neededAC to DC converter almost always needed

*Not often, anyway

DC vs ACDC vs AC

• Direct Current (DC)Direct Current (DC)– Unidirectional flow of electric chargeUnidirectional flow of electric charge– SourcesSources

•BatteriesBatteries

•Solar PanelsSolar Panels

– Used in low voltage applicationsUsed in low voltage applications– More complicated then ACMore complicated then AC– AC can be converted to DC AC can be converted to DC

• using a rectifierusing a rectifier

http://electronicsprojects.mediadir.in/category/hobby-circuits/page/84/

DC vs ACDC vs AC

http://electronicsprojects.mediadir.in/category/hobby-circuits/page/84/

What is Electro-Magnetism?What is Electro-Magnetism?• Until 1821, only one kind of Until 1821, only one kind of

magnetism was known, the magnetism was known, the one produced by iron magnets. one produced by iron magnets.

• Then a Danish scientist, Hans Then a Danish scientist, Hans Christian Oersted discovered Christian Oersted discovered electromagnetism:electromagnetism:

– He noticed that the flow of He noticed that the flow of electrical current in a wire electrical current in a wire caused a nearby compass caused a nearby compass needle to move. needle to move.

– The new phenomenon was The new phenomenon was studied in France by Andre-studied in France by Andre-Marie Ampere, Marie Ampere,

– He concluded that the nature He concluded that the nature of magnetism was quite of magnetism was quite different from what everyone different from what everyone had believed. had believed.

All magnetism is related to All magnetism is related to electricityelectricity

• There thus exists There thus exists two kinds of forcestwo kinds of forces associated with electricity:associated with electricity:

– electricelectric

– magnetic. magnetic.

• In 1864 In 1864 James Clerk MaxwellJames Clerk Maxwell demonstrated a subtle connection demonstrated a subtle connection between the two types of forcebetween the two types of force

– The connection involves the velocity of The connection involves the velocity of light. light.

– From this connection sprang the idea that From this connection sprang the idea that light was an electric phenomenon, light was an electric phenomenon,

– This led to the discovery of radio waves, This led to the discovery of radio waves, the theory of relativity and a great deal of the theory of relativity and a great deal of present-day physics.present-day physics.

• A Changing A Changing magnetic field will magnetic field will “induce” a “induce” a voltage.voltage.

• Or, you can Or, you can rotate a wire rotate a wire inside a inside a magnetic field.magnetic field.

• Generators Generators and alternatorsand alternators

ElectromagnetismElectromagnetism• If you use one wire to If you use one wire to

generate a changing field generate a changing field (AC), it will induce voltage (AC), it will induce voltage in a nearby coilin a nearby coil

• You can isolate circuits this way

– Works through plastic, glass, aluminum, water

• But AC will also induce noise into adjacent wires

– Shielding helps

– Twisting wires helps

• The voltage induced is determined by the ratio of the number of winds on the coil

– So you can step up or step down

– Only with AC

SwitchesSwitches

• Used to turn things on and off (duh!)Used to turn things on and off (duh!)

• But come in lots of flavors:But come in lots of flavors:– MomentaryMomentary– ToggleToggle– RotaryRotary– polespoles

•SPST: single pole single throwSPST: single pole single throw

•SPDT: Single pole, double throughSPDT: Single pole, double through

•DPST: double pole, single throwDPST: double pole, single throw

•DPDT: double pole, double throwDPDT: double pole, double throw

•Etc.Etc.

RelaysRelays

• Electrically operated Electrically operated switchesswitches

• Generally use an Generally use an electromagnet to close electromagnet to close a switcha switch

• End result: use a small End result: use a small switch (limited current switch (limited current capability) to operate a capability) to operate a larger switch (with larger switch (with larger current larger current capacity)capacity)

Relay applicationsRelay applications

• CarsCars– HornHorn– LightsLights– StarterStarter

• Ocean:Ocean:– Sensor powerSensor power– Burn wiresBurn wires– Controller powerController power– motorsmotors

TransistorsTransistors

• ““relays” made of relays” made of semiconductorssemiconductors

• Used to control circuitsUsed to control circuits

• Used to amplify signalsUsed to amplify signals

• Replaced vacuum tubesReplaced vacuum tubes

• Gazillions of them in a Gazillions of them in a computercomputer– We’ll learn later how they are We’ll learn later how they are

used in digital logicused in digital logic

How transistors workHow transistors work(Don’t sweat the details)(Don’t sweat the details)

• Like two diodes back to backLike two diodes back to back– No current can flowNo current can flow

• But if you apply voltage to the But if you apply voltage to the middle layer, it ionizes (semi-middle layer, it ionizes (semi-conducts), allowing current throughconducts), allowing current through

• More voltage = more flowMore voltage = more flow

• Variable “switch”Variable “switch”– more like a valvemore like a valve

Typical transistor circuitTypical transistor circuit

• Apply voltage to VApply voltage to Vin in to to

make current flowmake current flow

• Note resistorNote resistor– Combines with transistor to Combines with transistor to

create a voltage dividercreate a voltage divider

– Result is using VResult is using Vinin to control to control VVoutout

– But VBut Vinin may have VERY may have VERY small voltage fluctuations small voltage fluctuations while Vwhile Voutout has large has large fluctuationsfluctuations

Analogue SignalAnalogue Signal

• Continuous signalContinuous signal– As that current changes the signal changesAs that current changes the signal changes– Usually 0-5v, but can varyUsually 0-5v, but can vary

• Important when using analogue that your datalogger can Important when using analogue that your datalogger can handle the voltage produced by the sensorhandle the voltage produced by the sensor

• AdvantagesAdvantages– Infinite signal resolutionInfinite signal resolution– Can be processed by analog componentsCan be processed by analog components

• DisadvantagesDisadvantages– NoisyNoisy

• Shielded cable can help diminish the noiseShielded cable can help diminish the noise

– Subject to loss in cables and connectorsSubject to loss in cables and connectors

Digital SignalDigital Signal

• Non-continuous signalNon-continuous signal

• Two amplitude levels Two amplitude levels

called nodescalled nodes– Digital logicDigital logic

•0 or 10 or 1

•True or false, yes or no, on or offTrue or false, yes or no, on or off

• Fixed number of digits or bitsFixed number of digits or bits

• Sent as binary and needs a program Sent as binary and needs a program to convert to “readable” valuesto convert to “readable” values

Analog to Digital ConversionAnalog to Digital Conversion

• All analogue signals are converted to digital All analogue signals are converted to digital for processingfor processing– Resolution of the data depends on the A/D Resolution of the data depends on the A/D

converter usedconverter used• Signal is placed into bitsSignal is placed into bits

– Stored in binaryStored in binary

• Example – 12bit A/D converterExample – 12bit A/D converter– Range 0-5vRange 0-5v– A/D resolution 12bits: 212 =4096 quantization A/D resolution 12bits: 212 =4096 quantization

levelslevels– Analog voltage resolution is: 5V/4096Analog voltage resolution is: 5V/4096

• Meaning each “level” is equal to ~1.22mV/“level”Meaning each “level” is equal to ~1.22mV/“level”

Communications types Communications types • AnalogueAnalogue

– Direct signalDirect signal

• DigitalDigital– SerialSerial

• RS 232RS 232– Most commonMost common– 15m max length15m max length– 20kbs max speed20kbs max speed

• RS 485RS 485– 1200 max length1200 max length– 100kbs @ 1200m100kbs @ 1200m– 35 Mbs @ 15m35 Mbs @ 15m

– Parallel: almost obsoleteParallel: almost obsolete– EthernetEthernet

• Large data transferLarge data transfer

Instruments require PowerInstruments require Power

No Power No dataNo Power No data– All sensors require power to operate, All sensors require power to operate,

some more than otherssome more than others How long with the sensor last?How long with the sensor last? How many sensors can I run off one How many sensors can I run off one

datalogger?datalogger? Which batteries should I go with?Which batteries should I go with?

– Rechargeable or primary (one time use)Rechargeable or primary (one time use) How many batteries do I need?How many batteries do I need?

Powering Marine InstrumentationPowering Marine Instrumentation

• Two main optionsTwo main options– BatteriesBatteries– Sea cableSea cable

• Power from ship or shorePower from ship or shore• Usually allows data to be “Live Feed” Usually allows data to be “Live Feed”

as wellas well

Sea CablesSea Cables

• DC Power from shipDC Power from ship– Usually 12-15 voltsUsually 12-15 volts– Power limited due to:Power limited due to:– Slip ringsSlip rings– DistanceDistance– Surface power supplySurface power supply

– Usually not limited by voltageUsually not limited by voltage• Depends on what is at the other end of the cable for Depends on what is at the other end of the cable for

interfacing the sensorinterfacing the sensor

• Majority of ship deployment setups use Sea CablesMajority of ship deployment setups use Sea Cables

Sea CablesSea Cables• What if your sensor What if your sensor

requires more power or requires more power or higher voltage higher voltage – Use a battery Use a battery – but data may still be able to but data may still be able to

be sent up the sea cablebe sent up the sea cable

• What if the ship only has What if the ship only has one sea cable?one sea cable?– (Usually hooked to the CTD)(Usually hooked to the CTD)– Bring your own sea cableBring your own sea cable– Use a batteryUse a battery