Académique Documents
Professionnel Documents
Culture Documents
com
Transistors
CONTRIBUTORS: JIMB0
FAVORITE 29
ApplicationsI:Switches
Oneofthemostfundamentalapplicationsofatransistorisusingittocontroltheflowofpowertoanotherpartofthecircuitusingitasanelectricswitch.Drivingitin
eithercutofforsaturationmode,thetransistorcancreatethebinaryon/offeffectofaswitch.
Transistorswitchesarecriticalcircuitbuildingblockstheyreusedtomakelogicgates,whichgoontocreatemicrocontrollers,microprocessors,andotherintegrated
circuits.Belowareafewexamplecircuits.
TransistorSwitch
Letslookatthemostfundamentaltransistorswitchcircuit:anNPNswitch.HereweuseanNPNtocontrolahighpowerLED:
Ourcontrolinputflowsintothebase,theoutputistiedtothecollector,andtheemitteriskeptatafixedvoltage.
Whileanormalswitchwouldrequireanactuatortobephysicallyflipped,thisswitchiscontrolledbythevoltageatthebasepin.AmicrocontrollerI/Opin,likethoseonan
Arduino,canbeprogrammedtogohighorlowtoturntheLEDonoroff.
Whenthevoltageatthebaseisgreaterthan0.6V(orwhateveryourtransistorsVthmightbe),thetransistorstartssaturatingandlookslikeashortcircuitbetween
collectorandemitter.Whenthevoltageatthebaseislessthan0.6VthetransistorisincutoffmodenocurrentflowsbecauseitlookslikeanopencircuitbetweenCand
E.
Thecircuitaboveiscalledalowsideswitch,becausetheswitchourtransistorisonthelow(ground)sideofthecircuit.Alternatively,wecanuseaPNPtransistorto
createahighsideswitch:
SimilartotheNPNcircuit,thebaseisourinput,andtheemitteristiedtoaconstantvoltage.Thistimehowever,theemitteristiedhigh,andtheloadisconnectedtothe
transistoronthegroundside.
https://learn.sparkfun.com/tutorials/transistors/applicationsiswitches 1/5
11/19/2016 Transistorslearn.sparkfun.com
ThiscircuitworksjustaswellastheNPNbasedswitch,buttheresonehugedifference:toturntheloadonthebasemustbelow.Thiscancausecomplications,
especiallyiftheloadshighvoltage(VCCinthispicture)ishigherthanourcontrolinputshighvoltage.Forexample,thiscircuitwouldntworkifyouweretryingtousea5V
operatingArduinotoswitchona12Vmotor.InthatcaseitdbeimpossibletoturntheswitchoffbecauseVBwouldalwaysbelessthanVE.
BaseResistors!
Youllnoticethateachofthosecircuitsusesaseriesresistorbetweenthecontrolinputandthebaseofthetransistor.Dontforgettoaddthisresistor!Atransistorwithouta
resistoronthebaseislikeanLEDwithnocurrentlimitingresistor.
Recallthat,inaway,atransistorisjustapairofinterconnecteddiodes.Wereforwardbiasingthebaseemitterdiodetoturntheloadon.Thediodeonlyneeds0.6Vto
turnon,morevoltagethanthatmeansmorecurrent.Sometransistorsmayonlyberatedforamaximumof10100mAofcurrenttoflowthroughthem.Ifyousupplya
currentoverthemaximumrating,thetransistormightblowup.
Theseriesresistorbetweenourcontrolsourceandthebaselimitscurrentintothebase.Thebaseemitternodecangetitshappyvoltagedropof0.6V,andtheresistor
candroptheremainingvoltage.Thevalueoftheresistor,andvoltageacrossit,willsetthecurrent.
Theresistorneedstobelargeenoughtoeffectivelylimitthecurrent,butsmallenoughtofeedthebaseenoughcurrent.1mAto10mAwillusuallybeenough,butcheck
yourtransistorsdatasheettomakesure.
DigitalLogic
Transistorscanbecombinedtocreateallourfundamentallogicgates:AND,OR,andNOT.
(Note:ThesedaysMOSFETSaremorelikelytobeusedtocreatelogicgatesthanBJTs.MOSFETsaremorepowerefficient,whichmakesthemthebetterchoice.)
Inverter
Heresatransistorcircuitthatimplementsaninverter,orNOTgate:
https://learn.sparkfun.com/tutorials/transistors/applicationsiswitches 2/5
11/19/2016 Transistorslearn.sparkfun.com
Aninverterbuiltoutoftransistors.
Hereahighvoltageintothebasewillturnthetransistoron,whichwilleffectivelyconnectthecollectortotheemitter.Sincetheemitterisconnecteddirectlytoground,the
collectorwillbeaswell(thoughitwillbeslightlyhigher,somewherearoundVCE(sat)~0.050.2V).Iftheinputislow,ontheotherhand,thetransistorlookslikeanopen
circuit,andtheoutputispulleduptoVCC
(Thisisactuallyafundamentaltransistorconfigurationcalledcommonemitter.Moreonthatlater.)
ANDGate
Hereareapairoftransistorsusedtocreatea2inputANDgate:
2inputANDgatebuiltoutoftransistors.
Ifeithertransistoristurnedoff,thentheoutputatthesecondtransistorscollectorwillbepulledlow.Ifbothtransistorsareon(basesbothhigh),thentheoutputofthe
circuitisalsohigh.
ORGate
And,finally,heresa2inputORgate:
https://learn.sparkfun.com/tutorials/transistors/applicationsiswitches 3/5
11/19/2016 Transistorslearn.sparkfun.com
2inputORgatebuiltoutoftransistors.
Inthiscircuit,ifeither(orboth)AorBarehigh,thatrespectivetransistorwillturnon,andpulltheoutputhigh.Ifbothtransistorsareoff,thentheoutputispulledlow
throughtheresistor.
HBridge
AnHbridgeisatransistorbasedcircuitcapableofdrivingmotorsbothclockwiseandcounterclockwise.Itsanincrediblypopularcircuitthedrivingforcebehind
countlessrobotsthatmustbeabletomovebothforwardandbackward.
Fundamentally,anHbridgeisacombinationoffourtransistorswithtwoinputslinesandtwooutputs:
CanyouguesswhyitscalledanHbridge?
(Note:theresusuallyquiteabitmoretoawelldesignedHbridgeincludingflybackdiodes,baseresistorsandSchmidttriggers.)
Ifbothinputsarethesamevoltage,theoutputstothemotorwillbethesamevoltage,andthemotorwontbeabletospin.Butifthetwoinputsareopposite,themotorwill
spininonedirectionortheother.
TheHbridgehasatruthtablethatlooksalittlelikethis:
InputAInputBOutputAOutputBMotorDirection
0 0 1 1 Stopped(braking)
0 1 1 0 Clockwise
1 0 0 1 Counterclockwise
1 1 0 0 Stopped(braking)
Oscillators
Anoscillatorisacircuitthatproducesaperiodicsignalthatswingsbetweenahighandlowvoltage.Oscillatorsareusedinallsortsofcircuits:fromsimplyblinkinganLED
totheproducingaclocksignaltodriveamicrocontroller.Therearelotsofwaystocreateanoscillatorcircuitincludingquartzcrystals,opamps,and,ofcourse,
transistors.
Heresanexampleoscillatingcircuit,whichwecallanastablemultivibrator.Byusingfeedbackwecanuseapairoftransistorstocreatetwocomplementing,oscillating
signals.
https://learn.sparkfun.com/tutorials/transistors/applicationsiswitches 4/5
11/19/2016 Transistorslearn.sparkfun.com
Asidefromthetwotransistors,thecapacitorsaretherealkeytothiscircuit.Thecapsalternativelychargeanddischarge,whichcausesthetwotransistorstoalternatively
turnonandoff.
Analyzingthiscircuitsoperationisanexcellentstudyintheoperationofbothcapsandtransistors.Tobegin,assumeC1isfullycharged(storingavoltageofaboutVCC),
C2isdischarged,Q1ison,andQ2isoff.Hereswhathappensafterthat:
IfQ1ison,thenC1sleftplate(ontheschematic)isconnectedtoabout0V.ThiswillallowC1todischargethroughQ1scollector.
WhileC1isdischarging,C2quicklychargesthroughthelowervalueresistorR4.
OnceC1fullydischarges,itsrightplatewillbepulleduptoabout0.6V,whichwillturnonQ2.
Atthispointweveswappedstates:C1isdischarged,C2ischarged,Q1isoff,andQ2ison.Nowwedothesamedancetheotherway.
Q2beingonallowsC2todischargethroughQ2scollector.
WhileQ1isoff,C1cancharge,relativelyquicklythroughR1.
OnceC2fullydischarges,Q1willbeturnbackonandwerebackinthestatewestartedin.
Itcanbehardtowrapyourheadaround.Youcanfindanotherexcellentdemoofthiscircuithere.
BypickingspecificvaluesforC1,C2,R2,andR3(andkeepingR1andR4relativelylow),wecansetthespeedofourmultivibratorcircuit:
So,withthevaluesforcapsandresistorssetto10Fand47krespectively,ouroscillatorfrequencyisabout1.5Hz.ThatmeanseachLEDwillblinkabout1.5timesper
second.
Asyoucanprobablyalreadysee,therearetonsofcircuitsouttherethatmakeuseoftransistors.Butwevebarelyscratchedthesurface.Theseexamplesmostlyshow
howthetransistorcanbeusedinsaturationandcutoffmodesasaswitch,butwhataboutamplification?Timeformoreexamples!
PREVIOUSPAGE NEXTPAGE
VIEWASASINGLEPAGE
OPERATIONMODES APPLICATIONSII:AMPLIFIERS
https://learn.sparkfun.com/tutorials/transistors/applicationsiswitches 5/5