Beruflich Dokumente
Kultur Dokumente
VoltageComparators
VoltageComparatorInformationAndCircuits
Thispageprovidesbasicinformationaboutvoltagecomparatorintegratedcircuitsandistoactasreference
materialforothercircuits.ThecircuitsshownarebasedontheLM339QuadVoltageComparatorchiporthe
LM393DualVoltageComparatorchip.Thesedevicesarefunctionallythesame.TheLM311Voltage
Comparatorcanbeusedfortheseapplicationsaswellbutitalsohasanumberofuniquefeatures.
VoltageComparatorOpenCollectorOutputs
Theoutputsofvoltagecomparatorsareopencollectoroutputs.
Opencollectortypeoutputscanonlysinkcurrent.Thismeansthatthereisnotrueoutputfromacollector
butaratheracurrentorvoltagemustbesuppliedtotheoutputterminalfromasourceelsewhereinthelarger
circuit.
Insomecircuitsapullupresistorisusedattheoutputofacomparatortoprovideanoutputvoltagesignalto
theinputofanotherdevice.
NOTE:OperationalAmplifiers(OPAMPS)suchasLM324,LM358andLM741arenotnormallyused
voltagecomparatorcircuitsduetotheirbipolaroutputs.However,OPAMPScanbeusedasvoltage
comparatorsifadiodeortransistorisaddedtotheamplifiersoutputtocreateandopencollectortypeoutput.
Adiagramshowingthisadditionisfurtherdownthispage.
InputsVs.OutputRules
1. CurrentWILLflowthroughtheopencollectorwhenthevoltageatthePLUSinputislowerthanthe
voltageattheMINUSinput.
2. CurrentWILLNOTflowthroughtheopencollectorwhenthevoltageatthePLUSinputishigherthan
thevoltageattheMINUSinput.
PinDiagramForAnLM339
http://home.cogeco.ca/~rpaisley4/Comparators.html
1/19
12/25/2015
VoltageComparators
PrintthediagraminthecentreofasheetofpaperandthendrawacircuitusingtheICspinlocations.
PinDiagramForAnLM393
PrintthediagraminthecentreofasheetofpaperandthendrawacircuitusingtheICspinlocations.
PinDiagramForAnLM311
http://home.cogeco.ca/~rpaisley4/Comparators.html
2/19
12/25/2015
VoltageComparators
PrintthediagraminthecentreofasheetofpaperandthendrawacircuitusingtheICspinlocations.
ComparatorEquivalentCircuits
ForSinglePowerSupplies
Anintegratedcircuit"VoltageComparator"isequivalenttoanOperationalAmplifier,SuchastheLM358or
LM324,withtwoNPNtransistorsaddedtotheoutputofeachamplifier.(Refertotheaboveschematic.)This
arrangementproducesan"OpenCollector"outputforeachofthefourcomparatorsinanLM339chip.Each
outputcansink15Milliampsandcanwithstandvoltagesofupto50Volts.
TheoutputisswitchedONorOFFdependingontherelativevoltagesatthePLUSandMINUSinputsofthe
comparator,seetherulesbelow.Theinputsarequitesensitiveandadifferenceofonlyafewmillivolts
betweenthemwillcausetheoutputtoturnonoroff.
TheLM339,LM393andLM311comparatorchipscanoperatefromasingleordualpowersupplyofupto
32voltsmaximum.
WhenoperatedfromDualorSplitpowersuppliesthebasicoperationofcomparatorchipsisunchanged
exceptthatformostdevicestheemitteroftheoutputtransistorisconnectedtothenegativesupplyrailandnot
thecircuitcommon.AnexceptiontothisistheLM311whichhasaseparateemitterterminalthatcanbe
connectedtoeithertheminusorneutralofthesupply.
DualSupplyComparatorEquivalentschematic
http://home.cogeco.ca/~rpaisley4/Comparators.html
3/19
12/25/2015
VoltageComparators
WhenoperatedfromDualorSplitpowersuppliestheinputvoltagescanbeaboveorbelowthecommonor
zerovoltageofthesupply.Also,oneofthecomparator'sinputscanbeconnectedtothecommonsothata
'ZeroCrossing'detectoriscreated.
ComparatorOperation
Thefollowingdrawingshowthetwosimplestconfigurationsforvoltagecomparators.Thediagramsbelow
thecircuitsgivetheoutputresultsinagraphicalform.
ForthesecircuitstheREFERENCEvoltageisfixedatonehalfofthesupplyvoltagewhiletheINPUT
voltageisvariablefromzerotothesupplyvoltage.
IntheorytheREFERENCEandINPUTvoltagescanbeanywherebetweenzeroandthesupplyvoltagebut
therearepracticallimitationsontheactualrangedependingontheparticulardeviceused.
InputVs.OutputResults
1. CurrentWILLflowthroughtheopencollectorwhenthevoltageatthePLUSinputislowerthanthe
voltageattheMINUSinput.
2. CurrentWILLNOTflowthroughtheopencollectorwhenthevoltageatthePLUSinputishigherthan
http://home.cogeco.ca/~rpaisley4/Comparators.html
4/19
12/25/2015
VoltageComparators
thevoltageattheMINUSinput.
InputOffsetVoltage
Voltagecomparatorsarenotperfectdevicesandtheirperformancemaysufferfromtheeffectsofa
parameterknownastheInputOffsetVoltage.TheInputOffsetVoltageformanycomparatorsisonlyafew
millivoltsandinmostcircuitscanbeignored.
ProblemsrelatedtotheInputvoltagenormallyoccurwhentheInputvoltagechangesveryslowly.
ThenetresultoftheInputOffsetVoltageisthattheoutputtransistordoesnotfullyturnonoroffwhenthe
inputvoltageisclosetothereferencevoltage.
Thefollowingdiagramattemptstoillustratetheeffectoftheinputoffsetvoltagewithaslowlychanging
inputvoltage.ThiseffectincreasesastheoutputtransistorcurrentincreasessokeepingthevalueofRLhigh
willhelpreducetheproblem.
Theeffectsoftheinputoffsetvoltagecanbecounteredbyaddinghysteresistothecircuit.Thiscausesthe
referencevoltagetochangewhenthecomparatorsoutputgoeshighorlow.
InputOffsetVoltageAndHysteresis
FormostcomparatorcircuitsHysteresisisthedifferencebetweentheinputsignalvoltagesatwhicha
comparator'soutputiseitherfullyONorfullyOFF.Hysteresisincomparatorsisgenerallyundesirablebutit
canalsobeaddedtoacircuittoreducethesensitivitytonoiseoraslowlymovinginputsignal.
InternalhysteresisthatisnormalforcomparatorscausestheoutputofthecomparatortogofromOFFtoON
andviceversarelativelyslowly.
Externalhysteresisusespositivefeedbackfromtheoutputtothenoninvertinginputofthecomparator.The
resultingSchmitttriggertypecircuitgivesadditionalnoiseimmunityandacleaneroutputsignal.
Theeffectofaddedhysteresisisthatastheinputvoltageslowlychanges,thereferencevoltagewillquickly
changeintheoppositedirection.Thisgivesthecomparator'soutputa"snap"action.
Amechanicalanalogofaddedhysteresiscanbefoundinmanytoggleswitches:Asthehandlemovespastits
centerpoint,aspringintheswitchforcesthecontactsoftheswitchtoopenorclose,ensuringthattheswitch's
contactssnaptotheONorOFFposition.
http://home.cogeco.ca/~rpaisley4/Comparators.html
5/19
12/25/2015
VoltageComparators
ThewidthoftheloopoutlinedbyanOFFONOFFcycleistheinputhysteresisvoltage.
Theinherenthysteresisvoltageformostcomparatorsisonlyafewmillivoltsandusuallyonlyaffectscircuits
wheretheinputvoltagerisesorfallsveryslowlyorhasvoltagespikesknownas"noise".
AddingHysteresisToAComparatorCircuit
Acomparator'sHysteresisrangecanbeincreasedbyaddingaresistorbetweenthecomparator'soutputand
thePLUSinputterminal.Thiscreatesafeedbackloopsothatwhentheoutputmakesatransitionthefeedback
changesthevoltageatthepositivewhichincreasesthevoltagedifferencebetweenthePLUSandMINUS
inputs.
ThefeedbackcanonlybemadetothePLUSinputterminal.
http://home.cogeco.ca/~rpaisley4/Comparators.html
6/19
12/25/2015
VoltageComparators
IncreasingTheInput'sHysteresisRange
Ifthecomparator'soutputisinitially'OFF',theMINUSinputvoltagehastobecomeabovethePLUSinput
voltagebythehysteresisvoltagerangebeforethecomparatoroutputturns'ON'.
Ifthecomparatoris'ON',theMINUSinputvoltageneedstodropslightlybelowthePLUSinputvoltageby
thehysteresisvoltagerangebeforeitturns'OFF'.
Thehysteresisvoltagerangecanbemadelargeinordertoforcethecomparator'soutputtochangeasquickly
aspossible.TheFLIPFLOPcircuitsshownlateronthispagemakeuseofalargehysteresistocreatethe
memoryeffectwithlargeinputvoltagechangesneededtotriggerachangeintheoutput.
HysteresisResistorCalculatorPageAtAKAWAElectricDesign
('Vref'isthesupplyvoltageinthisexample.)
http://home.cogeco.ca/~rpaisley4/Comparators.html
7/19
12/25/2015
VoltageComparators
OtherHysterysisSchemes
AddingSeparatingDiodesToAComparator'sOutput
AdiodecanbeaddedtotheoutputofacomparatortoallowaLEDtoindicateiftheoutputofthe
comparatorisHIGHorLOWwithoutaffectingthecircuitthatthecomparatorisconnectedto.
Diodescanalsobeusedtoseparatemultiplecircuitsconnectedtoasinglecomparator.
OutputDiodes
VoltageWindowDetectorCircuit
http://home.cogeco.ca/~rpaisley4/Comparators.html
8/19
12/25/2015
VoltageComparators
ComparatorswithOpenCollectoroutputssuchastheLM339orLM393mustbeconfiguredsotheboth
outputsareHIGHwhenthevoltageiswithinthedesiredlimits.TheLM311comparatorcanhaveotheroutput
arrangementsasithasbothanopencollectorandopenemitterontheoutputtransistor.
WindowComparator
ComparatorOscillatorCircuit
Comparatorscanalsobeusedasoscillatorsbutarenotwellsuitedforthistypeofapplication.
OscillatorMadeFromAComparator
BasicComparatorCircuits
Thefollowingdiagramsareofsomebasiccomparatorcircuits.MosthaveaCadmiumSulfidephotocell
inputbutcouldjustaseasilyuseaphototransistororavoltagesignalfromanothercircuitasaninput.The
resistancevaluesarenotcriticalbutshouldbeusedasaguide.Inmostcomparatorcircuitstheratioofthe
resistancesismoreimportantthantheiractualvalues.
http://home.cogeco.ca/~rpaisley4/Comparators.html
9/19
12/25/2015
VoltageComparators
PhotocellCircuits
PhotocellCircuitsSchematic
IfhighercurrentloadsaretobedrivenaPNPtransistorcanbeaddedtothecomparatorsoutputthiswill
allowloadsofupto300Ma.tobecontrolled.
RelayDriverOutputSchematic
TimeDelayCircuits
Shorttimingfunctionssuchasapulsedoutputsortimedelayscanalsobecreatedwithoneortwo
comparatorsections.
ComparatorTimeDelaySchematic1
http://home.cogeco.ca/~rpaisley4/Comparators.html
10/19
12/25/2015
VoltageComparators
Noticethatthesecondcomparatorsectioninthetimedelaycircuitsharesthesamereferencevoltageinputas
thefirst.Inmostcasesanynumberofcomparatorscanhavethesamevoltagesourceatoneinput,thiscan
makecircuitsmuchlesscomplicated.
MoreDelaycircuits.
ComparatorTimerDelaySchematic2
http://home.cogeco.ca/~rpaisley4/Comparators.html
11/19
12/25/2015
VoltageComparators
ComparatorTimerDelaySchematic3
http://home.cogeco.ca/~rpaisley4/Comparators.html
12/19
12/25/2015
VoltageComparators
ComparatorPowerOnDelayCircuit
BasicMemoryFunctions
Comparatorscanbemadetoperformabasicmemoryfunctionbywiringthemasa'SET/RESET'typeof
FLIP/FLOP.Thistypeofcircuitcanbeusedinunplugablewalkaroundthrottlestorememberthedirectionof
thetrainwhenthecontrollerisdisconnected.Inthenextdiagramthecomparatorwillrememberwhichswitch
waspushedlast.Ifthe'SET'buttonispushedtheLEDwillbeon,the'RESET'buttonwillturntheLEDoff.A
highercurrentversionisalsoshown.
http://home.cogeco.ca/~rpaisley4/Comparators.html
13/19
12/25/2015
VoltageComparators
ComparatorFLIP/FLOPSchematic
HowtheFlipFlopworks.Averybasicdescription.
1. WhentheoutputofthecomparatorisoffthevoltageatthePLUSinputwillbethesameasthesupply
voltage.WiththePLUSinputvoltagehigherthantheMINUSinputvoltagetheoutputwillremainoff.
2. WhentheSETbuttonispushedthevoltageatthePLUSinputwillgotozeroandtheoutputwillturn
on.
3. WhentheSETbuttonisreleasethevoltageatthePLUSinputwillriseto1/2ofthesupplyvoltageand
theoutputwillremainturnedonbecausethevoltageatthePLUSinputisremainsbelowthevoltageat
theMINUSinput.
4. WhentheRESETbuttonispressedvoltageattheMINUSinputwillgotozerofromitsnormallevel
of3/4ofthesupplyvoltage.TheoutputwillturnoffbecausethevoltageattheMINUSinputisbelow
thevoltageatthePLUSinput.WhentheoutputturnsoffthevoltageatthePLUSinputwillrisetothe
supplyvoltagelevel.
5. WhentheRESETbuttonisreleasedthevoltageattheMINUSinputwillriseto3/4ofthesupply
voltage.ThePLUSinputvoltagewillstayabovethevoltageattheMINUSinputandtheoutputwill
stayturnedoff.
OpenCollectorOutputTransistors
Becausetheoutputtransistorofthecomparatorhasanopencollectorthesupplyandloadvoltagesdonot
havetobethesame.Thismeansthatthecomparatorcouldusea12Voltpowersupplywhiletheloadcould
bea24Voltrelayor5VoltLEDcircuit.
ThefollowingthreediagramsaresomeexamplesofDualvoltagecircuits.Inthefirsttwothevoltageatthe
outputofthecomparatorscouldevenbefullwavedirectcurrent.
http://home.cogeco.ca/~rpaisley4/Comparators.html
14/19
12/25/2015
VoltageComparators
DualVoltageOutputSchematic
DualVoltageRelayDriverOutputSchematic
DualVoltageFLIP/FLOPSchematic
4LevelVoltageDetector
Thiscircuitcansequentiallyindicate4voltagelevels.ThevoltagesthattheLEDsturnonataredetermined
bythevaluesofresistorsR1throughR5arrangedinasimplevoltagedividercircuit.
http://home.cogeco.ca/~rpaisley4/Comparators.html
15/19
12/25/2015
VoltageComparators
4LevelDetectorSchematic
Thiscircuitlacksastablereferencevoltageandisthereforenotsuitableforindicatingthevoltagesof
batteriesasthereferencevoltageswilldecreaseasthethebatteryvoltagedecreases.
AnICthatisdesignedforvoltagelevelindicationistheLM3914Dot/BarDisplayDriver.TheLM3914is
amonolithicintegratedcircuitthatsensesanalogvoltagelevelsanddrives10LEDs,providingalinearanalog
display.
ThereisalsotheLM3915Dot/BarDisplayDriver.TheLM3915isamonolithicintegratedcircuitthat
sensesanalogvoltagelevelsanddrivestenLEDs,LCDsorvacuumfluorescentdisplays.
4LevelBidirectionalDelay
ThiscircuitturnstheLEDsonoroffinroughlyequalstepsinbothdirections.ForexampleON1234
andthenOFF4321.
http://home.cogeco.ca/~rpaisley4/Comparators.html
16/19
12/25/2015
VoltageComparators
BidirectionDelaySchematic
ThisresistornetworkatS1bringsthereferencevoltageclosertothethresholdvoltagestominimizethe
charging/dischargingdelayinC1whenS1isswung.
ExclusiveORcircuit
InthiscircuitonlyoneLEDcanbeonatatime.
http://home.cogeco.ca/~rpaisley4/Comparators.html
17/19
12/25/2015
VoltageComparators
ExclusiveORSchematic
UsingAnOPAMPAsAComparator
OperationalAmplifierscanbeusedascomparatorsbyaddingadiodeortransistortotheOPAMP'soutput.
Usingatransistorallowsforagreateroutputcurrentcapacitythanthatofatypicalcomparator.
ComparatorMadeFromAnOperationalAmplifier
SomeOtherCircuits
LM311ComparatorUsedToControlAn'HBridgeCircuit
LightActivatedRelayWith5SecondReleaseDelay
VoltageComparatorPageOnWikipedia
ComparatorHysteresisNetworkCalculatorPage
ReturntotheMainPage
http://home.cogeco.ca/~rpaisley4/Comparators.html
18/19
12/25/2015
VoltageComparators
PleaseReadBeforeUsingTheseCircuitIdeas
Theexplanationsforthecircuitsonthesepagescannothopetocovereverysituationoneverylayout.
Forthisreasonbepreparedtodosomeexperimentingtogettheresultsyouwant.Thisisespeciallytrue
ofcircuitssuchasthe"AcrossTrackInfraredDetection"circuitsandanyothercircuitthatrelieson
otherthandirectelectronicinputs,suchasswitches.
Ifyouuseanyofthesecircuitideas,askyourpartssupplierforacopyofthemanufacturersdata
sheetsforanycomponentsthatyouhavenotusedbefore.Thesesheetscontainawealthofdataand
circuitdesigninformationthatnoelectronicorprintarticlecouldapproachandwillsavetimeand
perhapsdamagetothecomponentsthemselves.Thesedatasheetscanoftenbefoundonthewebsiteof
thedevicemanufacturers.
Althoughthecircuitsarefunctionalthepagesarenotmeanttobefulldescriptionsofeachcircuitbut
ratherasguidesforadaptingthemforusebyothers.Ifyouhaveanyquestionsorcommentsplease
sendthemtotheemailaddressontheCircuitIndexpage.
ReturntotheMainPage
26February,2015
http://home.cogeco.ca/~rpaisley4/Comparators.html
19/19