Tkool Electronics

IDescriptionThisblogintroducestheworkingprincipleoftheL298-baseddirectPWMspeedcontrolsystem.Atthesametime,thesoftwareandhardwarecomponentsofthesystemarealsogiven.TherunningtestinthelatterpartoftheblogshowsthatthisL298-baseddirectPWMspeedcontrolsystemworksstablyandreliably.Moreover,thespeedregulationrequirementsofDCmotorscanbemet.L298MotorControlArduinoTutorialCatalogIDescriptionIIIntroductionIIIWorkingPrincipleofDCHouseholdWMSpeedControlSystemIVIntroductiontoL298VSoftwareImplementationofPWMSpeedRegulationVIConclusionFAQOrdering&QuantityIIIntroductionForalongtime,becauseDCmotorshavethefollowingcharacteristics:Goodlinearspeedregulationcharacteristics;Simplecontrolfunction;HigherefficiencyExcellentdynamiccharacteristics.Therefore,theDCmotoriswidelyusedinspeedcontrol.Especiallywiththedevelopmentofcomputersinthefieldofhumancontrolandthedevelopmentofhighswitchingfrequency,fullycontrolledsecond-generationpowersemiconductordevices(GTR,GTO,MOSinkstoneT,IGBT,etc.),thepulsewidthmodulation(PWM)DCspeedcontrolsystemisinItismoreandmorecommonlyusedinspeedcontrol.IIIWorkingPrincipleofDCHouseholdWMSpeedControlSystemThePWMspeedcontroldeviceusestheswitchingcharacteristicsofhigh-powertransistorstomodulateafixed-voltageDCpowersupply,andswitchesonandoffatafixedfrequency.Then,changethelengthoftheonandofftimeinacycleasneeded.BychangingthedutycycleofthevoltageonthearmatureoftheDCservomotor,theaveragevoltagecanbechangedtocontrolthemotorspeed.Therefore,thisdeviceisalsocalledaswitchdrivedevice.Figure1.PWMcontroldiagramTheschematicdiagramofPWMcontrolisshowninFigure1.ThecontrollableswitchSisrepeatedlyturnedonandoffatcertaintimeintervals.WhenSisconnected,thepowersupplyUsisappliedtobothendsofthemotorthroughtheswitchS,thepowersupplyprovidesenergytothemotor,andthemotorstoresenergy.WhentheswitchSisoff,thepowersupplyUsisinterruptedtoprovideelectricalenergytothemotor.ButtheenergystoredinthearmatureinductanceduringtheswitchSison.Atthistime,themotorcurrentcontinuestoflowthroughthefreewheelingdiodeVD.ThevoltagewaveformobtainedatbothendsofthemotorisshowninFigure2,andtheaveragevoltageUavcanbeexpressedbythefollowingformula:Whereton:Thetimewhentheswitchisturnedoneachtime;T:Shorttimeperiodwhentheswitchison;:Dutycycle.Itcanbeseenfromtheaboveformulathatchangingtheratiooftheswitch-ontimetontotheswitchingperiodT,thatis,changingthedutycycleofthepulse.Theaveragevoltageacrossthemotoralsochangesaccordingly.Thus,themotorspeediscontrolled.Figure2.PWMcontrolwaveformTherearetwomodulationmethodsforchangingthedutycycle:Oneisthattheswitchingperiodisconstant,andthedutycycleischangedbychangingtheon-pulsewidth.Thatispulsewidthmodulation.Anotherwayistohaveaconstantturn-onpulsewidthandchangethedutycyclebychangingtheswitchingfrequency(f=1/T).Thatispulsefrequencymodulation.SincePFMcontrolreliesonthepulsefrequencytochangethedutycycle,whenitencountersamechanicalresonanceataparticularfrequency,itoftenresultsinsystemvibrationandaudiowhistling.ThisseriousshortcomingmakesPFMcontrolunsuitableinservosystems.Atpresent,thecontrolofDCmotorsismainlybasedontheapplicationofPWMcontrol.IVIntroductiontoL298L298isadualH-bridgehigh-voltagehigh-currentpowerintegratedcircuit,whichdirectlyusesITLlogiclevelcontrol.Itcanbeusedtodriveinductiveloadssuchasrelays,coils,DCmotors,andsteppingmotors.Itsdrivingvoltagecanreach46V,andthetotalDCcurrentcanreach4A.TherearetwoidenticalPWMpoweramplifiercircuitsinside.TheinternalstructureofL298isshowninFigure3.Figure3.HardwarecompositiondiagramofPWMspeedcontrollerAccordingtotheinputandoutputrelationshipofL298,theenablecontrolterminalEnAisconnectedtotheP1.0portoftheAT89C52.ForthePWMsignal,theinputterminalIn2islowlevel,themotorrotatesforward;theinputterminalIn2isthePWMsignal,inputterminalIn1isrecordedaslowlevel,themotorreverses).Whenitislowlevel,the4transistorsonthedrivebridgeareallcutoff,sothatthearmaturecurrentoftherunningmotorisreversedandthemotorstopsfreely.ThespeedofthemotorisrealizedbyadjustingthedutyratioofthePWMsignalbythesingle-chipmicrocomputer.VSoftwareImplementationofPWMSpeedRegulationIntermsofprogramdesign,thegenerationofthePWMpulsesignaloftheMCUcanusethefollowingtwomethods:softwaredelayandtimerdelay.Althoughsoftwaredelayiseasiertoimplement,intheory,itoccupiestoomuchsystemresourcesandisinconvenienttouse.ThePWMspeedcontrollerusesthetimer0interruptmodetogeneratePWMpulse,andthePWMcontrolsubroutineistheinterruptserviceroutineoftimer0.Atthesametime,italsogeneratesasamplingperiod,thatis,theAnzhaosamplingperiodstartsA/Dconversion.ItsprogramflowchartisshownasinFig.4.Figure4.ProgramflowchartVIConclusionBasedontheL298DCmotorPWMspeedregulator,the1/0portoftheA8T9C52microcontrolleroutputsthePWMsignal,anddirectlyusestheTTLleveltocontrolthedrivechipL298toadjustthemotorspeed.Itissimpleandconvenienttocontrol.Andtheexperimentshowsthatthesystemworksstablyandreliably,satisfiesthefunctionalrequirementsofspeedregulation,andhasgreattheoreticalandpracticalvalue.FAQWhatisl298n?ThisL298NMotorDriverModuleisahighpowermotordrivermodulefordrivingDCandStepperMotors.ThismoduleconsistsofanL298motordriverICanda78M055Vregulator.L298NModulecancontrolupto4DCmotors,or2DCmotorswithdirectionalandspeedcontrol.Whatistheuseofl298n?TheL298NisadualH-BridgemotordriverwhichallowsspeedanddirectioncontroloftwoDCmotorsatthesametime.ThemodulecandriveDCmotorsthathavevoltagesbetween5and35V,withapeakcurrentupto2A.Howdoesl298ncontrolDCmotorspeed?1.IfyousendaHIGHsignaltotheenable1pin,motorAisreadytobecontrolledandatthemaximumspeed;2.IfyousendaLOWsignaltotheenable1pin,motorAturnsoff;3.IfyousendaPWMsignal,youcancontrolthespeedofthemotor.Themotorspeedisproportionaltothedutycycle.Whatisl298nmotordrivermodule?ThisL298NMotorDriverModuleisahighpowermotordrivermodulefordrivingDCandStepperMotors.ThismoduleconsistsofanL298motordriverICanda78M055Vregulator.L298NModulecancontrolupto4DCmotors,or2DCmotorswithdirectionalandspeedcontrol.Howdoesl298nmotordriverwork?TheL298NisadualH-BridgemotordriverwhichallowsspeedanddirectioncontroloftwoDCmotorsatthesametime.ThemodulecandriveDCmotorsthathavevoltagesbetween5and35V,withapeakcurrentupto2A.Howdoiuseal298motordriverwithArduino?Startbyconnectingpowersupplytothemotors.InourexperimentweareusingDCGearboxMotors(alsoknownasTTmotors)thatareusuallyfoundintwo-wheel-driverobots.Theyareratedfor3to12V.So,wewillconnectexternal12VpowersupplytotheVCCterminal.WhatisthefunctionofHbridge?AnH-bridgeisanelectroniccircuitthatswitchesthepolarityofavoltageappliedtoaload.ThesecircuitsareoftenusedinroboticsandotherapplicationstoallowDCmotorstorunforwardsorbackwards.Whatisthedifferencebetweenl293dandl298n?L293isquadruplehalf-HdriverwhileL298isdualfull-Hdriver,i.e,inL293allfourinput-outputlinesareindependentwhileinL298,ahalfHdrivercannotbeusedindependently,onlyfullHdriverhastobeused....Hence,heatsinkisprovidedinL298.

T18NEXTBUS

IDescriptionThisblogintroducestheworkingprincipleoftheL298-baseddirectPWMspeedcontrolsystem.Atthesametime,thesoftwareandhardwarecomponentsofthesystemarealsogiven.TherunningtestinthelatterpartoftheblogshowsthatthisL298-baseddirectPWMspeedcontrolsystemworksstablyandreliably.Moreover,thespeedregulationrequirementsofDCmotorscanbemet.L298MotorControlArduinoTutorialCatalogIDescriptionIIIntroductionIIIWorkingPrincipleofDCHouseholdWMSpeedControlSystemIVIntroductiontoL298VSoftwareImplementationofPWMSpeedRegulationVIConclusionFAQOrdering&QuantityIIIntroductionForalongtime,becauseDCmotorshavethefollowingcharacteristics:Goodlinearspeedregulationcharacteristics;Simplecontrolfunction;HigherefficiencyExcellentdynamiccharacteristics.Therefore,theDCmotoriswidelyusedinspeedcontrol.Especiallywiththedevelopmentofcomputersinthefieldofhumancontrolandthedevelopmentofhighswitchingfrequency,fullycontrolledsecond-generationpowersemiconductordevices(GTR,GTO,MOSinkstoneT,IGBT,etc.),thepulsewidthmodulation(PWM)DCspeedcontrolsystemisinItismoreandmorecommonlyusedinspeedcontrol.IIIWorkingPrincipleofDCHouseholdWMSpeedControlSystemThePWMspeedcontroldeviceusestheswitchingcharacteristicsofhigh-powertransistorstomodulateafixed-voltageDCpowersupply,andswitchesonandoffatafixedfrequency.Then,changethelengthoftheonandofftimeinacycleasneeded.BychangingthedutycycleofthevoltageonthearmatureoftheDCservomotor,theaveragevoltagecanbechangedtocontrolthemotorspeed.Therefore,thisdeviceisalsocalledaswitchdrivedevice.Figure1.PWMcontroldiagramTheschematicdiagramofPWMcontrolisshowninFigure1.ThecontrollableswitchSisrepeatedlyturnedonandoffatcertaintimeintervals.WhenSisconnected,thepowersupplyUsisappliedtobothendsofthemotorthroughtheswitchS,thepowersupplyprovidesenergytothemotor,andthemotorstoresenergy.WhentheswitchSisoff,thepowersupplyUsisinterruptedtoprovideelectricalenergytothemotor.ButtheenergystoredinthearmatureinductanceduringtheswitchSison.Atthistime,themotorcurrentcontinuestoflowthroughthefreewheelingdiodeVD.ThevoltagewaveformobtainedatbothendsofthemotorisshowninFigure2,andtheaveragevoltageUavcanbeexpressedbythefollowingformula:Whereton:Thetimewhentheswitchisturnedoneachtime;T:Shorttimeperiodwhentheswitchison;:Dutycycle.Itcanbeseenfromtheaboveformulathatchangingtheratiooftheswitch-ontimetontotheswitchingperiodT,thatis,changingthedutycycleofthepulse.Theaveragevoltageacrossthemotoralsochangesaccordingly.Thus,themotorspeediscontrolled.Figure2.PWMcontrolwaveformTherearetwomodulationmethodsforchangingthedutycycle:Oneisthattheswitchingperiodisconstant,andthedutycycleischangedbychangingtheon-pulsewidth.Thatispulsewidthmodulation.Anotherwayistohaveaconstantturn-onpulsewidthandchangethedutycyclebychangingtheswitchingfrequency(f=1/T).Thatispulsefrequencymodulation.SincePFMcontrolreliesonthepulsefrequencytochangethedutycycle,whenitencountersamechanicalresonanceataparticularfrequency,itoftenresultsinsystemvibrationandaudiowhistling.ThisseriousshortcomingmakesPFMcontrolunsuitableinservosystems.Atpresent,thecontrolofDCmotorsismainlybasedontheapplicationofPWMcontrol.IVIntroductiontoL298L298isadualH-bridgehigh-voltagehigh-currentpowerintegratedcircuit,whichdirectlyusesITLlogiclevelcontrol.Itcanbeusedtodriveinductiveloadssuchasrelays,coils,DCmotors,andsteppingmotors.Itsdrivingvoltagecanreach46V,andthetotalDCcurrentcanreach4A.TherearetwoidenticalPWMpoweramplifiercircuitsinside.TheinternalstructureofL298isshowninFigure3.Figure3.HardwarecompositiondiagramofPWMspeedcontrollerAccordingtotheinputandoutputrelationshipofL298,theenablecontrolterminalEnAisconnectedtotheP1.0portoftheAT89C52.ForthePWMsignal,theinputterminalIn2islowlevel,themotorrotatesforward;theinputterminalIn2isthePWMsignal,inputterminalIn1isrecordedaslowlevel,themotorreverses).Whenitislowlevel,the4transistorsonthedrivebridgeareallcutoff,sothatthearmaturecurrentoftherunningmotorisreversedandthemotorstopsfreely.ThespeedofthemotorisrealizedbyadjustingthedutyratioofthePWMsignalbythesingle-chipmicrocomputer.VSoftwareImplementationofPWMSpeedRegulationIntermsofprogramdesign,thegenerationofthePWMpulsesignaloftheMCUcanusethefollowingtwomethods:softwaredelayandtimerdelay.Althoughsoftwaredelayiseasiertoimplement,intheory,itoccupiestoomuchsystemresourcesandisinconvenienttouse.ThePWMspeedcontrollerusesthetimer0interruptmodetogeneratePWMpulse,andthePWMcontrolsubroutineistheinterruptserviceroutineoftimer0.Atthesametime,italsogeneratesasamplingperiod,thatis,theAnzhaosamplingperiodstartsA/Dconversion.ItsprogramflowchartisshownasinFig.4.Figure4.ProgramflowchartVIConclusionBasedontheL298DCmotorPWMspeedregulator,the1/0portoftheA8T9C52microcontrolleroutputsthePWMsignal,anddirectlyusestheTTLleveltocontrolthedrivechipL298toadjustthemotorspeed.Itissimpleandconvenienttocontrol.Andtheexperimentshowsthatthesystemworksstablyandreliably,satisfiesthefunctionalrequirementsofspeedregulation,andhasgreattheoreticalandpracticalvalue.FAQWhatisl298n?ThisL298NMotorDriverModuleisahighpowermotordrivermodulefordrivingDCandStepperMotors.ThismoduleconsistsofanL298motordriverICanda78M055Vregulator.L298NModulecancontrolupto4DCmotors,or2DCmotorswithdirectionalandspeedcontrol.Whatistheuseofl298n?TheL298NisadualH-BridgemotordriverwhichallowsspeedanddirectioncontroloftwoDCmotorsatthesametime.ThemodulecandriveDCmotorsthathavevoltagesbetween5and35V,withapeakcurrentupto2A.Howdoesl298ncontrolDCmotorspeed?1.IfyousendaHIGHsignaltotheenable1pin,motorAisreadytobecontrolledandatthemaximumspeed;2.IfyousendaLOWsignaltotheenable1pin,motorAturnsoff;3.IfyousendaPWMsignal,youcancontrolthespeedofthemotor.Themotorspeedisproportionaltothedutycycle.Whatisl298nmotordrivermodule?ThisL298NMotorDriverModuleisahighpowermotordrivermodulefordrivingDCandStepperMotors.ThismoduleconsistsofanL298motordriverICanda78M055Vregulator.L298NModulecancontrolupto4DCmotors,or2DCmotorswithdirectionalandspeedcontrol.Howdoesl298nmotordriverwork?TheL298NisadualH-BridgemotordriverwhichallowsspeedanddirectioncontroloftwoDCmotorsatthesametime.ThemodulecandriveDCmotorsthathavevoltagesbetween5and35V,withapeakcurrentupto2A.Howdoiuseal298motordriverwithArduino?Startbyconnectingpowersupplytothemotors.InourexperimentweareusingDCGearboxMotors(alsoknownasTTmotors)thatareusuallyfoundintwo-wheel-driverobots.Theyareratedfor3to12V.So,wewillconnectexternal12VpowersupplytotheVCCterminal.WhatisthefunctionofHbridge?AnH-bridgeisanelectroniccircuitthatswitchesthepolarityofavoltageappliedtoaload.ThesecircuitsareoftenusedinroboticsandotherapplicationstoallowDCmotorstorunforwardsorbackwards.Whatisthedifferencebetweenl293dandl298n?L293isquadruplehalf-HdriverwhileL298isdualfull-Hdriver,i.e,inL293allfourinput-outputlinesareindependentwhileinL298,ahalfHdrivercannotbeusedindependently,onlyfullHdriverhastobeused....Hence,heatsinkisprovidedinL298.

IntroductionLM339(Quaddifferentialcomparator)consistoffourindependentvoltagecomparators.Itisacommonintegratedcircuitandismainlyusedinhigh-voltagedigitallogicgatecircuits.UsingLM339caneasilyformvariousvoltagecomparatorcircuitsandoscillatorcircuits.CatalogIntroductionCatalogICircuitofSingleLimitComparatorIIOverheatDetectionandProtectionCircuitIIIHysteresisComparatorIVOver-voltageDetectionCircuitVDoubleLimitComparatorVIUsingLM339toformanOscillatorFAQOrdering&QuantityICircuitofSingleLimitComparatorFigure(a)showsabasicsinglelimitcomparator.AddtheinputsignalUIN(i.e.voltagetobecompared)tothein-phaseinputterminal,andconnectareferencevoltageUrattheanti-phaseinputterminal.WhentheinputvoltageUinUr,theoutputishighlevelUOH.Figure(b)showsitstransmissioncharacteristics.Figure1.CircuitofSingleLimitComparatorIIOverheatDetectionandProtectionCircuitItispoweredbyasinglepowersupply.Afixedreferencevoltageisaddedtotheanti-phaseinputterminalof1/4LM339,anditsvaluedependsonR1andR2.UR=R2/(R1+R2)*UCC.Thevoltageatthein-phaseterminalisequaltothevoltagedropofthethermistorRT.Whenthetemperatureinsidethemachineisbelowthesetvalue,the+terminalvoltageisgreaterthanthe-terminalvoltage,andUoisahighpotential.Whenthetemperaturerisesabovethesetvalue,the-terminalvoltageisgreaterthanthe+terminal,andtheUooutputisatzeropotential,whichcausestheprotectioncircuittooperate.AdjustingthevalueofR1canchangethethresholdvoltage,whichsetsthetemperaturevalue.Figure2.OverheatDetectionandProtectionCircuitIIIHysteresisComparatorThehysteresiscomparatorcanalsoberegardedasasinglelimitcomparatorwithpositivefeedback.Inthesinglelimitcomparatordescribedabove,iftheinputsignalUinhasslightinterferencenearthethreshold,theoutputvoltagewillproducecorrespondingundulation.Thisshortcomingcanbeovercomebyintroducingpositivefeedbackintothecircuit..Figure(a)showsahysteresiscomparator.ThefamiliarSchmidtcircuitisacomparatorwithhysteresis.Figure(b)showsthetransmissioncharacteristicsofthehysteresiscomparator.Figure3.HysteresisComparatorItisnotdifficulttoseethatoncetheoutputstateischanged,theoutputvoltagewillbestableaslongastheinterferencenearthejumpvoltagevaluedoesnotexceedthevalueofU.Accordingly,itcomestoareductioninresolution.Forthehysteresiscomparator,itcantdistinguishtwoinputvoltageswhosedifferenceislessthanU.Thehysteresiscomparatorwithpositivefeedbackcanacceleratetheresponsespeedofthecomparator,whichisoneofitsadvantages.Inaddition,sincethepositivefeedbackaddedbythehysteresiscomparatorisverystrongandmuchstrongerthantheparasiticcouplinginthecircuit,thehystericcomparatorcanalsoavoidtheself-oscillationcausedbytheparasiticcouplingofthecircuit.IVOver-voltageDetectionCircuitFigure4showsthepartofover-voltagedetectioncircuitinaninductioncookercircuit.Whenthegridvoltageisnormal,1/4lm339u42.8v,thecomparatorturnsover.Theoutputis0VandBG1iscutoff.ThevoltageofU5iscompletelydeterminedbythepartialvoltagevalueofR1andR2,whichis2.7V.ItmakesU4largerthanU5,whichmakesthestateafteroverturningextremelystableandavoidstheinstabilitycausedbythesmallfluctuationofgridvoltageneartheover-voltagepoint.Duetocertainhysteresis,afterovervoltageprotection,theinductioncookerstartstoworkagainwhenthegridvoltagedropsto242-5=237vandU4U3.Figure4.Over-voltageDetectionCircuitVDoubleLimitComparatorThecircuitinFigure5consistsoftwoLM339toformawindowcomparator.WhenthecomparedsignalvoltageUinisbetweenthethresholdvoltages(UR1UinUR2),theoutputishighpotential(UO=UOH).WhenUinisnotbetweenthethresholdpotentialrange,(UinUR2orUinUR1)theoutputislowpotential(UO=UOL),andthewindowvoltageU=UR2-UR1.Itcanbeusedtojudgewhethertheinputsignalpotentialisbetweenthespecifiedthresholdpotential.Figure5.DoubleLimitComparatorVIUsingLM339toformanOscillatorFigure6showsthecircuitofanaudiosquarewaveoscillatorcomposedof1/4LM339.ChangingC1canchangethefrequencyoftheoutputsquarewave.Inthiscircuit,whenC1=0.1uF,f=53Hz;whenC1=0.01uF,f=530Hz;whenC1=0.001uF,f=5300Hz.LM339canalsoformahigh-voltagedigitallogicgatecircuit,andcandirectlyinterfacewithTTLandCMOScircuits.Figure6.LM339OscillatorFAQWhatisLM339?LM339isavoltagecomparatorICfromLMx39xseriesandismanufacturedbymanyindustries.Thedevicesconsistoffourindependentvoltagecomparatorsthataredesignedtooperatefromasinglepowersupply.WhatisthedifferencebetweenLM324andLM339?TheLM324hasacomplementaryoutputwhiletheLM339isopencollector.Inthecomplementaryoutput,currentcanflowineitherdirectionasrequired(eithersourceorsink)whiletheopencollectoroutputcanonlysinkcurrent.HowdoesLM339comparatorwork?TheLM339isaquadopampcomparator.Acomparatorworksbyasimpleconcept.Eachopampofacomparatorhas2inputs,ainvertinginputandanoninvertinginput.Iftheinvertinginputvoltageisgreaterthanthenoninvertinginput,thentheoutputisdrawntoground.Whatiscomparatoric?Acomparatorisanelectroniccircuit,whichcomparesthetwoinputsthatareappliedtoitandproducesanoutput.Theoutputvalueofthecomparatorindicateswhichoftheinputsisgreaterorlesser.Pleasenotethatcomparatorfallsundernon-linearapplicationsofICs.WhatisthereplacementforLM339?LM311,LM324,LM397,LM139,LM239,LM2901Whatisacomparatorcircuit?Acomparatorcircuitcomparestwovoltagesandoutputseithera1(thevoltageattheplusside;VDDintheillustration)ora0(thevoltageatthenegativeside)toindicatewhichislarger.Comparatorsareoftenused,forexample,tocheckwhetheraninputhasreachedsomepredeterminedvalue.WhatistheuseofLM339?LM339isusedinapplicationswhereacomparisonbetweentwovoltagesignalsisrequired.Inadditionwithfourofthosecomparatorsonboardthedevicecancomparefourpairsofvoltagesignalsatatimewhichcomesinhandyinsomeapplications.IIntroductionInthisblog,wecomparetheLM339andLM339NproducedbyTI.Thecontentofcomparisonincludescomponentparameters,packaging,applicationareas,andtheircircuitdiagrams,etc.HopethisblogishelpfultothoseinterestedinLM339orLM339N.LM339NCatalogIIntroductionIIComponentDatasheetIIIDifferenceBetweenLM339andLM339NIVParametersVFeaturesVIApplicationsVIIPinoutFAQOrdering&QuantityIIComponentDatasheetComponentDatasheet1LM339NDatasheetComponentDatasheet2LM339DatasheetIIIDifferenceBetweenLM339andLM339N◾LM339Nisaquadvoltagecomparator.Itadoptsdualin-line14-pinpackage.Themaximumoperatingvoltageis18Vandthepowerconsumptionis265mW.Itisusedininductioncookersandotherproducts.◾LM339(Quaddifferentialcomparator)consistoffourindependentvoltagecomparators.Itisacommonintegratedcircuitandismainlyusedinhigh-voltagedigitallogicgatecircuits.LM339commonmoderangeisverylarge,from0vtothepowersupplyvoltage-1.5v;widesupplyvoltagerange:singlepowersupplyis2-36V;dualpowersupplyvoltageis1V~18V.IVParametersParametersLM339NLM339Numberofchannels(#)44OutputtypeOpen-collector,Open-drainOpen-collectorPropagationdelaytime(s)0.70.3Vs(Max)(V)3630Vs(Min)(V)22Vos(offsetvoltage@25C)(Max)(mV)55Iqperchannel(Typ)(mA)0.20.2Inputbiascurrent(+/-)(Max)(nA)25050Rail-to-railOutOutRatingCatalogCatalogOperatingtemperaturerange(C)0to700to70FeaturesStandardcomparatorStandardcomparatorVICR(Max)(V)3428.5VICR(Min)(V)00Approx.price(US$)1ku|0.241ku|0.05VFeaturesLM339NLM339WideSupplyVoltageRangeLM139/139ASeries2to36VDCor1to18VDCLM2901-N:2to36VDCor1to18VDCLM3302-N:2to28VDCor1to14VDCVeryLowSupplyCurrentDrain(0.8mA)IndependentofSupplyVoltageLowInputBiasingCurrent:25nALowInputOffsetCurrent:5nAOffsetVoltage:3mVInputCommon-ModeVoltageRangeIncludesGNDDifferentialInputVoltageRangeEqualtothePowerSupplyVoltageLowOutputSaturationVoltage:250mVat4mAOutputVoltageCompatibleWithTTL,DTL,ECL,MOS,andCMOSLogicSystemsWideSupplyRangesSingleSupply:2Vto36V(Testedto30VforNon-VDevicesand32VforV-SuffixDevices)DualSupplies:1Vto18V(Testedto15VforNon-VDevicesand16VforV-SuffixDevices)LowSupply-CurrentDrainIndependentofSupplyVoltage:0.8mA(Typical)LowInputBiasCurrent:25nA(Typical)LowInputOffsetCurrent:3nA(Typical)(LM139)LowInputOffsetVoltage:2mV(Typical)Common-ModeInputVoltageRangeIncludesGroundDifferentialInputVoltageRangeEqualtoMaximum-RatedSupplyVoltage:36VLowOutputSaturationVoltageOutputCompatibleWithTTL,MOS,andCMOSOnProductsComplianttoMIL-PRF-38535,AllParametersAreTestedUnlessOtherwiseNoted.OnAllOtherProducts,ProductionProcessingDoesNotNecessarilyIncludeTestingofAllParameters.VIApplicationsLM339NLM339High-PrecisionComparatorsReducedVOSDriftOvertemperatureEliminatesNeedforDualSuppliesAllowsSensingNearGNDCompatibleWithAllFormsofLogicPowerDrainSuitableforBatteryOperationIndustrialAutomotiveInfotainmentandClustersBodyControlModulesPowerSupervisionOscillatorsPeakDetectorsLogicVoltageTranslationVIIPinoutLM339andLM339NsharethesamepinoutdiagramFAQWhatisLM339?LM339isavoltagecomparatorICfromLMx39xseriesandismanufacturedbymanyindustries.Thedevicesconsistoffourindependentvoltagecomparatorsthataredesignedtooperatefromasinglepowersupply.WhatisthedifferencebetweenLM324andLM339?TheLM324hasacomplementaryoutputwhiletheLM339isopencollector.Inthecomplementaryoutput,currentcanflowineitherdirectionasrequired(eithersourceorsink)whiletheopencollectoroutputcanonlysinkcurrent.HowdoesLM339comparatorwork?TheLM339isaquadopampcomparator.Acomparatorworksbyasimpleconcept.Eachopampofacomparatorhas2inputs,ainvertinginputandanoninvertinginput.Iftheinvertinginputvoltageisgreaterthanthenoninvertinginput,thentheoutputisdrawntoground.Whatiscomparatoric?Acomparatorisanelectroniccircuit,whichcomparesthetwoinputsthatareappliedtoitandproducesanoutput.Theoutputvalueofthecomparatorindicateswhichoftheinputsisgreaterorlesser.Pleasenotethatcomparatorfallsundernon-linearapplicationsofICs.WhatisthereplacementforLM339?LM311,LM324,LM397,LM139,LM239,LM2901Whatisacomparatorcircuit?Acomparatorcircuitcomparestwovoltagesandoutputseithera1(thevoltageattheplusside;VDDintheillustration)ora0(thevoltageatthenegativeside)toindicatewhichislarger.Comparatorsareoftenused,forexample,tocheckwhetheraninputhasreachedsomepredeterminedvalue.WhatistheuseofLM339?LM339isusedinapplicationswhereacomparisonbetweentwovoltagesignalsisrequired.Inadditionwithfourofthosecomparatorsonboardthedevicecancomparefourpairsofvoltagesignalsatatimewhichcomesinhandyinsomeapplications.

T18NEXTBUS

IDescriptionThisblogmainlydiscussesandsolvesthefollowingproblem:HowtouseLM339voltagecomparatortomakeareservoirwaterlevelgauge?Accordingtowaterlevel,thisdesignperformssignalprocessingandcontrolsthepotentialofmultiplevoltagecomparators,sotheoutputwillchangeaccordingly.Therefore,underitsdrive,LEDcannotonlyemitlight,butalsoachievetheeffectofindicatingthewaterlevel.Figure1.LM339CatalogIDescriptionIIIntroductionIIIWokingPrincipleIVDeviceselectionandComponentProduction4.1deviceselection4.2PartProductionVInstallationandDebugging5.1DetectionPart5.2DisplayPartVIConclusionFAQOrdering&QuantityIIIntroductionDuetoinsufficientwatersupplyinsomeresidentialareas,pumpworkersmustfirststorewaterinthereservoirandthensupplywaterinaregularmanner.Inthisway,thepumpworkermustknowthewaterlevelofthereservoiratanytimeinthepumproom.Inthepast,electrodessuchascopperrodsorstainlesssteelwereusedtodetectthewaterlevelofthepool.However,duetoelectriccorrosion,thefunctionoftheelectrodeislostsoonafteruse.Forthisreason,thisblogusesLM339voltagecomparatortomakewaterlevelgauge.Thisnotonlyeliminatesthepainofoftenchangingelectrodes,butalsosimpleandeasy.Howsimpleisit?Onlytwowiresneedtobeconnectedfromthereservoirtothepumproom.Aftermorethantwoyearsofoperation,itsperformancehasbeenstableandreliable,achievingtheexpectedresults.IIIWokingPrincipleThemaincircuitofthewaterlevelgaugeiscomposedof4LM339voltagecomparators.Thiskindofintegratedcircuithasthecharacteristicsofeasypurchase,lowprice,singlepowersupplyoperationandwidedifferentialrange.EachLM339has4independentvoltagecomparators(15inthisdesign).Aslongasthepotentialdifferencebetweenthepositiveandnegativeinputterminalsis10mV,theoutputterminalcanbereliablyswitchedfromonestatetoanother.Whenthepositiveinputterminalis10mVhigherthanthenegativeinputterminal,itsoutputterminalishigh;Whenthenegativeinputis10mVhigherthanthepositiveinput,itsoutputislow.Inaddition,LEDscanbedrivendirectly.ThenhowtomaketheoutputendofLM339havehighandlowlevelchanges?Inspecificuse,anappropriateresistanceisgenerallyaddedbetweentheoutputterminalandthepositivepowersupply.Thisresistoriscalledapull-upresistor.Thatis,whentheoutputterminalofLM339isinahighimpedancestate,thepotentialoftheoutputterminalispulledupbytheresistor.Figure2.BlockDiagramofWaterLevelGaugeTheprincipleblockdiagramofthedeviceisshowninFigure2.Thevoltagesignalmeasurementconsistsofareedswitchandavoltagedividerresistor.Theringmagnetssuspendedinthewaterareindifferentpositions.Duetotheprincipleofelectromagneticinduction,notonlythecorrespondingdryreedswitchnormallyopencontactsareclosed,butalsothecorrespondingvoltagedividerresistorisconnected.Therefore,thecircuitwillpickupdifferentvoltagesignals.Thepotentialofthenegativeinputterminalofthecomparatorisformedbyafixedvoltagedividerresistor.Themeasuredvoltagesignaliscomparedwiththesetpotential.TheresultofthisisthattheLEDdisplaysthewaterlevelwhendriven.Inaddition,analarmisissuedwhenthehighestwaterlevelisreachedtoremindthepumpertostopwaterinjectiontopreventwateroverflow.TheconcretecircuitisshownasinFig.3.Figure3.WaterLevelGaugeCircuitDiagramInFigure3,thepowersupplyis+12V,andthedepthofthepoolisdividedinto15segmentsfordisplay.Inthispicture:A1~A15arevoltagecomparatorscomposedofLM339;GK1~GK15aredryreedswitches,thenormallyopencontactisclosedwhentheringmagnetisclosetoacertaindryreedswitch;ThevoltagedividercircuitcomposedofresistorsR1toR15determinesthepotentialofthepositiveinputterminalofeachcomparator.ThevoltageofthepositiveinputterminalofLM339changesduetothedifferentpositionsofthemagneticsteel.ThevoltagedividercircuitcomposedofresistorsR01~R030determinesthepotentialofthenegativeinputterminalofeachcomparator.Thepotentialofeachnegativeinputterminalisfixedafterdetermination.Whenthemagneticsteelfloatingonthewatersurfaceisclosetoacertaindryreedswitch,duetothepartialpressureofR1,R2,,R15,thepositiveinputterminalsofthecomparatorsA1,A2,,A15havedifferentinputs.Afterthissignaliscomparedwiththepotentialsetatthenegativeinputofthecomparator,therewillbeacorrespondingoutput.FromFigure3,whenGK1pullsin,itisequivalenttoholdingthemagneticsteelfloatattheupperlimitwaterlevel.Thepositiveinputofeachcomparatorisequaltothegroundpotential,whichislowerthantheirnegativeinput.Therefore,theoutputterminalsarealllowlevel,sothatallLEDsarelit.Atthistime,theoutputofA1dropsfromhighleveltolowlevel,andNE555istriggeredthroughcapacitorC.NE555isconnectedasamonostablecircuit.Oncetriggered,its3pinwilloutputahighlevel,whichwilldrivethebuzzertoalarm.ItsdurationisdeterminedbytheRCcomponentsconnectedtothe6and7pins.WhenGK2isclosed,LED2~LED15shouldbeonandLED1shouldbeoff.Atthistime,thepotentialofthepositiveinputterminalofeachcomparatorishigherthanthepotentialofthenegativeinputterminalofA1andlowerthanthepotentialofthenegativeinputterminalofA2~A15,andsoon.IVDeviceselectionandComponentProduction4.1deviceselectiona.SetthenegativeinputpotentialofeachcomparatortoVsh.Thenegativeinputpotentialofeachcomparatorissetartificiallyaccordingtothenumberofsegmentsdividedintopowersupplyandwaterdepth.Becausethepooldepthhasbeendividedinto15segmentsfordisplay,startingfrom2.0V,thedifferencebetweeneachadjacentnegativeinputterminalis0.4V.AsshowninthefirstrowinTable1.b.Selecttheresistancebetweenthenegativeinputterminalofeachcomparatorandthepowersupply,thatis,thevoltagedividerresistanceR01=R03==R029=20k,settoR.c.CalculatethegroundresistanceR02,R04,...,R030,whichisRr.SupposetheresistanceofthenegativeinputterminaltogroundisRr,andthepotentialofeachnegativeinputterminalisVsh,accordingtocircuitdiagram3:(1)Fromthisformula:(2)Forexample,tomakethepotentialofthenegativeinputterminalofthevoltagecomparatorA1Vsh=2V,accordingtoequation(2),wecangetAsshowninthesecondrowandthefirstcolumninTable1.TheselectionoftheotherresistorsR04,R06,,R030canbecalculatedaccordingtotheaboveformula(theresultisatheoreticalvalue,seethedatashowninthesecondrowinTable1fordetails).d.DeterminethenominalresistanceRbfromRr.Infact,thenominalvalueofcommerciallyavailableresistorsisdifferentfromthiscalculatedvalue.Inspecificapplications,anominalresistanceRbwithasimilarresistancevaluecanbeselected.ThespecificvalueisshowninthethirdrowofTable1.e.DeterminethepotentialVofthenegativeinputterminalofeachcomparatorAbyRb.WhenthenominalvalueofresistanceRbisselected,usethefollowingformulatocheckthepotentialVgeneratedbythisresistance.(3)Thespecificpotentialvalueisshowninthe4throwofTable1,comparedwiththesetvalueinthe1strow,aslongasitdoesnotexceed0.1V.f.DeterminetheresistancesR1,R2,,R15ofthepositiveinputterminalsofeachcomparatorandsetthemasRzh.FirstfindR1,setthepositiveinputpotentialofeachcomparatorasVzh,whenGK1pullsin,itcanbeseenfromTable1that2VVzh2.4V,setVzh=2.2V,R=20k,accordingtoformula(3),itcanbelistedThesolutionisthatRzh=R14.5k.Thisresistanceisnotthenominalvalue.Chooseasimilarnominalvalueof4.8k.ThenfindtheotherresistancesR2,R3,,R15,whichcanallbecalculatedbythismethod.Theresultisthetheoreticalvalue,whichhasaslightdeviationinpractice.Aftercorrection,thevalueisshowninthefifthrowofTable1.Aftertheaboveparametersareselectedinthisway,itcanbeensuredthatwhenthewaterlevelinthepoolreachesthelowestlimitandthefloatholdingthemagneticsteelsinkstothelowestposition,themagneticsteelseparatesfromallthereedswitchesandtheLEDsareallextinguished;AndwhenthefirstreedswitchGK1isclosed(equivalenttothewaterlevelinthepoolreachesthehighestlimit,thefloatholdingthemagneticsteelrisestothehighestposition)LEDsareallon.Whenthefloatisatacertainpositioninthemiddle,thecorrespondingLEDandtheLEDsbelowareallon,andtheLEDaboveitisoff,toshowthewaterlevel.Aftertheabovecalculation,thespecificdatashowninTable1isobtained.4.2PartProductionItisnecessarytomeasuretheheightfromthelowestwaterlevelofthereservoirtothelimitwaterlevel,anddividethisheightinto15segments.Thedistanceofeachsegmentislessthan200mm,thisdistancecanensurethatthemagneticsteelcanalwaysattractanadjacentdryreedswitch,soastoavoiddisplaybreakpoints.Thatistopreventthemagneticsteelfromnotattractingtheupperdryreedpipeorthelowerdryreedpipeduringoperation,sothattheLEDdisplayisallextinguished,causingtheillusionofwaterlessness.FortheconnectionsofGK1,R1~GK15,R15,firstsolderthemtoasmallprintedcircuitboardwithawidthlessthanorequalto20mm,andthenusewirestoconnectthematadistanceoflessthanorequalto200mm,andencapsulatethemina25mmhardplastictube..Theupperandlowermouthsofthepipeshouldbetightlysealedtopreventwaterleakage.Thetubeiscoveredwitharing-shapedmagnet.Afterdroppinganon-ferromagneticheavyobjectonthelowerendofthehardplasticpipe,theplasticpipeisverticallysunkintothebottomofthereservoir.Aringfloatisplacedunderthemagneticsteelandissleevedonthetube,andtheupperendofthetubeisfixedontheobservationportabovethereservoir.Duetothefunctionofthefloat,themagneticsteelisalwayssuspendedonthewatersurface,risingandfallingwiththewatersurface.Notethattheplaneofthemagneticsteelshouldalwaysbeparalleltothewatersurface,andtheplasticpipeshouldbeverticaltothewatersurfacetopreventthemagneticsteelfrombeingstuckbyfrictionwiththepipewallwhenthewaterlevelrisesandfalls.VInstallationandDebuggingThewholedeviceconsistsoftwoparts:Itisadetectionpartcomposedofareedswitchandvariousvoltagedividers;ItisthesignalprocessingdisplaypartcomposedofLM339.5.1DetectionPartBeforeencapsulatingtheplastictube,putsomesilicagelinthetubetoabsorbthemoistureinthetubeandpreventthelineinthetubefromgettingdamp.Ifring-shapedmagneticsteelisusedasthedetectionelement,thereedpipeconnectedinseriesintheplastictubeshouldberealizedbytwostaggeredreedpipes.Accordingtotheelectromagneticinductiontheory,theanalysisofthemagneticfieldlinesofthemagneticsteelshowsthatthereareasmallsectionofmagneticfieldlinesparalleltotheplaneofthemagneticsteelattheupperandloweropeningsofthemagneticsteel.Whenthissectionisclosetothereedswitch,thedirectionofitsmagneticfieldlineisperpendiculartothedirectionofthereedofthereedswitch.Atthistime,althoughthereedswitchisveryclosetothemagneticsteel,thecontactisstillreleasedanddisconnected,whichwillmakealltheLEDsgoout.Iftwostaggeredreedpipesareusedinstead,theproblemcanbesolved,andthestaggereddistancecanbedeterminedinexperiments.5.2DisplayPartThewaterlevelofeachsegmentisdisplayedbygreen10LED,andthelimitwaterlevelisdisplayedbyeye-catchingredLED.IftheLEDsarearrangedneatlytogether,thewaterlevelinthepoolcanbeclearlyseenaccordingtotheonoroffoftheLEDs.Equippedwithabuzzer,itwillgivethepumpworkeraclearerreminder.Note:Fromthedetectorinthepooltothecircuitboardofthepumproom,itisbesttouseshieldedwiretopreventinterferencesignalsfromentering.Weshouldalsonotethatthepowersupplymustberegulated.Fugure4.lm339VIConclusionThenegativeinputpotentialofthevoltagecomparatorA1~A15composedofLM339shouldbesetaccordingtoacertainrule,andthepotentialintervalbetweeneachotherdependsonthedepthofthecell.Ifthewaterlevelisdeeper,theintervalcanbesmaller,andthenumberofsectionscanbeselectedmore.Thepotentialdifferencebetweenadjacentcomparatorsisgenerally0.4V.Ifthepotentialdifferenceislarge,theselectionoftheresistanceiseasy;ifthepotentialdifferenceissmall,becausethenominalvalueintervalofthegeneralresistanceislarge,itisnecessarytouseanadjustableresistortoadjustthepotential.Ofcourse,inthecaseofsmallintervals,thesmallestpotentialdifferencebetweeneachothershouldbegreaterthan10mV,otherwisetheinputcharacteristicsofLM339willnotbeabletodistinguishthepotentialbetweeneachother.Inaddition,thevoltageofthepowersupplyandthenominalvalueofeachresistancemustbeconsidered.Thismethodcanalsobeappliedtootherfields.Suchasmonitoringthewaterdepthofrivers,rivers,lakes,andbays,theoillevelofgasstations,andthedepthofwatertanksinwaterplants.FAQWhatisLM339?LM339isavoltagecomparatorICfromLMx39xseriesandismanufacturedbymanyindustries.Thedevicesconsistoffourindependentvoltagecomparatorsthataredesignedtooperatefromasinglepowersupply.WhatisthedifferencebetweenLM324andLM339?TheLM324hasacomplementaryoutputwhiletheLM339isopencollector.Inthecomplementaryoutput,currentcanflowineitherdirectionasrequired(eithersourceorsink)whiletheopencollectoroutputcanonlysinkcurrent.HowdoesLM339comparatorwork?TheLM339isaquadopampcomparator.Acomparatorworksbyasimpleconcept.Eachopampofacomparatorhas2inputs,ainvertinginputandanoninvertinginput.Iftheinvertinginputvoltageisgreaterthanthenoninvertinginput,thentheoutputisdrawntoground.Whatiscomparatoric?Acomparatorisanelectroniccircuit,whichcomparesthetwoinputsthatareappliedtoitandproducesanoutput.Theoutputvalueofthecomparatorindicateswhichoftheinputsisgreaterorlesser.Pleasenotethatcomparatorfallsundernon-linearapplicationsofICs.WhatisthereplacementforLM339?LM311,LM324,LM397,LM139,LM239,LM2901Whatisacomparatorcircuit?Acomparatorcircuitcomparestwovoltagesandoutputseithera1(thevoltageattheplusside;VDDintheillustration)ora0(thevoltageatthenegativeside)toindicatewhichislarger.Comparatorsareoftenused,forexample,tocheckwhetheraninputhasreachedsomepredeterminedvalue.WhatistheuseofLM339?LM339isusedinapplicationswhereacomparisonbetweentwovoltagesignalsisrequired.Inadditionwithfourofthosecomparatorsonboardthedevicecancomparefourpairsofvoltagesignalsatatimewhichcomesinhandyinsomeapplications.I.IntroductionThe74HC595isan8-bitserial-inorparallel-outshiftregisterwithastorageregisterand3-stateoutputs.74HC595withthecharacteristicsofhighspeed,lowpowerconsumptionandsimpleoperation,canbeeasilyusedinMCUinterfacetodriveLEDoperation.ThisarticleintroducesthecircuitdesignofLEDdisplaydrivedby74HC595.CatalogI.IntroductionII.BasicDescription2.1LEDDisplay2.274HC595III.CircuitDesign3.1HardwareCircuit3.2DisplayDriverIV.ConclusionFAQOrdering&QuantityII.BasicDescription2.1LEDDisplayA7SegmentLEDDisplay,alsoknownasLEDdisplay,hasbeenwidelyusedinvariousinstrumentsbecauseofitslowprice,lowpowerconsumptionandreliableperformance.TherearemanytypesofLEDdriversonthemarket,andmostofthemhavemultiplefunctions,butthepriceiscorrespondinglyhigher.Ifusedinasimplesystemwithlowcost,itisnotonlyawasteofresources,butalsoincreasesthecostofproducts.Using74HC595chiptodriveLEDhasvariousdisadvantages.Highspeed,lowpowerconsumption,unlimitednumberofLEDs.ItcancontrolboththecommoncathodeLEDdisplayandthecommonanodeLEDdisplay.Thecircuitdesignedwith74HC595isnotonlysimple,butalsolowinpowerconsumptionandstrongindrivingability.Itisalowcostandflexibledesignscheme.2.274HC595The74HC595isan8-bitserial-in/serialorparallel-outshiftregisterwithastorageregisterand3-stateoutputs.Boththeshiftandstorageregisterhaveseparateclocks.Thedevicefeaturesaserialinput(DS)andaserialoutput(Q7S)toenablecascadingandanasynchronousresetMRinput.ALOWonMRwillresettheshiftregister.DataisshiftedontheLOW-to-HIGHtransitionsoftheSHCPinput.ThedataintheshiftregisteristransferredtothestorageregisteronaLOW-to-HIGHtransitionoftheSTCPinput.Ifbothclocksareconnectedtogether,theshiftregisterwillalwaysbeoneclockpulseaheadofthestorageregister.Datainthestorageregisterappearsattheoutputwhenevertheoutputenableinput(OE)isLOW.AHIGHonOEcausestheoutputstoassumeahigh-impedanceOFF-state.OperationoftheOEinputdoesnotaffectthestateoftheregisters.Inputsincludeclampdiodes.ThisenablestheuseofcurrentlimitingresistorstointerfaceinputstovoltagesinexcessofVCC.Figure1.74HC595FunctionalDiagramFigure2.74HC595LogicSymbolIII.CircuitDesign3.1HardwareCircuitFigure3isadisplaypanelcircuitdesignedwithAT89C2051and74HC595interface.Figure3.CircuitofDisplayPanelTheP115,P116,andP117oftheP1portareusedtocontrolthedisplayoftheLED,andtheyareconnectedtotheSLCK,SCLKandSDApinsrespectively.Threedigitaltubesareusedtodisplaythevoltagevalue.Onthecircuitboard,LED3isonthefarleftandLED1isonthefarright.Whensendingdata,firstsendthedisplaycodeofLED3,andfinallysendthedisplaycodeofLED1.ThebrightnessoftheLEDiscontrolledbytheresistanceofPR1toPR3.2.2DisplayDriverUseDISP1,DISP2,andDISP3tostoredisplaydata.AftertheCPUinitializationiscomplete,calltheLRDISPsubroutinetocleartheregisterof74HC595.ThereisnoneedtocalltheclearsubroutinebeforecallingthedisplaysubroutineDISPLAY.Nowwritethetwosubroutinesasfollows.①CLRDISP:MOVR2 ,#24CLRBIT:CLRSCLKCLRCMOVSDA,what is eepromCSETBSCLKDJNZR2,how to test diodeCLRBITRET②Display:CLRSLCKMOVR3,types of diodes#3MOVR0,5srd#DISP3DISP1:MOVA,surface mount resistor sizes@R0MOVR2 ,types of diode#8DISP2:CLRSCLKRLCAMOVSDA,CSETBSCLKDJNZR2,DISP2DECR0DJNZR3,DISP1SETBSLCKRETIV.ConclusionItcanbeseenfromtheaboveexamplesthattherearenocomplicatedtechnicalproblemsinthedesignofhardwareandsoftwarewhen74HC595isusedtodesignLEDdrivercircuit.Inaddition,74HC595canbeusednotonlytodriveLEDdisplays,butalsotodrivelight-emittingdiodes.Each74HC595candrive8LEDssimultaneously.Thissolutionisidealwhenthevolumerequirementsoftheproductarenothighandwanttoreducethecost.FAQWhatis74HC595?74HC595isashiftregisterwhichworksonSerialINParallelOUTprotocol.Itreceivesdataseriallyfromthemicrocontrollerandthensendsoutthisdatathroughparallelpins.Wecanincreaseouroutputpinsby8usingthesinglechip.Whatisa74hc595n?8-bitShiftRegister74HC595NAshiftregisterisachipyoucanusetocontrolmanyoutputs(8here)atthesametimewhileonlyusingafewpins(3here)ofyourArduino.Howdoesashiftregisterwork?Shiftregistersholdthedataintheirmemorywhichismovedorshiftedtotheirrequiredpositionsoneachclockpulse.Eachclockpulseshiftsthecontentsoftheregisteronebitpositiontoeithertheleftortheright.How74HC595ShiftRegiesterworks?The595hastworegisters(whichcanbethoughtofasmemorycontainers),eachwithjust8bitsofdata.ThefirstoneiscalledtheShiftRegister.TheShiftRegisterliesdeepwithintheICcircuits,quietlyacceptinginput.Howdoesan8bitshiftregisterwork?TheSN74HC595Nisasimple8-bitshiftregisterIC.Simplyput,thisshiftregisterisadevicethatallowsadditionalinputsoroutputstobeaddedtoamicrocontrollerbyconvertingdatabetweenparallelandserialformats.YourchosenmicroprocessorisabletocommunicatewiththeTheSN74HC595Nusingserialinformationthengathersoroutputsinformationinaparallel(multi-pin)format.Essentiallyittakes8bitsfromtheserialinputandthenoutputsthemto8pins.DescriptionLED,asthefirstbasicfunctiontobecompletedinMCUlearning,playsaveryimportantroleinMCUlearners,whichalsocalledmagiclampbyMCUlearners.IbelievethateveryoneseesmostandthesimplestLEDcircuitisthefigureshownbelow.Asshowninthefigure,notonlythecircuitissimple,butalsoitsoperationisverysimple.GiveselectricalleveltoI/OcorrespondingtoeightLEDs,andthecorrespondingLEDcanbeonoroff.Figure1.simpleLEDcircuitCatalogDescription74HC595Drives8BitsLEDSFAQOrdering&Quantity74HC595Drives8BitsLEDSButnotallLEDcircuitsaresosimple.Somecircuitswilluse74HC595chiptodrive8LEDsordrivethe8-bitdigitaltubesegmentcode,asshowninthefigurebelow.Figure2.74HC595drives8LEDsWhyisasimplecircuitsocomplicated?Thereasonisobvious.BeforetheeightLEDneedeightI/O,nowonlythreeI/OcandriveeightLED.Letsbrieflyintroduce74CH595anduseitsuccessfullytodriveeightLEDlights.The74HC595isan8-bitserial-inorparallel-outshiftregisterwithastorageregisterand3-stateoutputs.Boththeshiftandstorageregisterhaveseparateclocks.Thedevicefeaturesaserialinput(DS)andaserialoutput(Q7S)toenablecascadingandanasynchronousresetMRinput.SIisitsserialdatainput.Q0toQ7aredataoutput.SCK,istheclockfortheshiftregister.The595isclock-drivenontherisingedge.Thismeansthatinordertoshiftbitsintotheshiftregister,theclockmustbeHIGH.Andbitsaretransferredinontherisingedgeoftheclock.RCK,isaveryimportantpin.WhendrivenHIGH,thecontentsofShiftRegisterarecopiedintotheStorage/LatchRegister;whichultimatelyshowsupattheoutput.Sothelatchpincanbeseenaslikethefinalstepintheprocesstoseeingourresultsattheoutput.SQHisserialdataoutput.Whatwewanttoachievenowistomovethe8-bitsdataofSIinto74HC595onebyoneundertheactionofSCKandRCKandpresenttheminparallelonQ0-Q7.Figure3.How74HC595ShiftRegisterworksWheneverweapplyaclockpulsetoa595,thebitsintheShiftRegistermoveonesteptotheleft.Belowisitscode.FAQWhatis74HC595?74HC595isashiftregisterwhichworksonSerialINParallelOUTprotocol.Itreceivesdataseriallyfromthemicrocontrollerandthensendsoutthisdatathroughparallelpins.Wecanincreaseouroutputpinsby8usingthesinglechip.Whatisa74hc595n?8-bitShiftRegister74HC595NAshiftregisterisachipyoucanusetocontrolmanyoutputs(8here)atthesametimewhileonlyusingafewpins(3here)ofyourArduino.Howdoesashiftregisterwork?Shiftregistersholdthedataintheirmemorywhichismovedorshiftedtotheirrequiredpositionsoneachclockpulse.Eachclockpulseshiftsthecontentsoftheregisteronebitpositiontoeithertheleftortheright.How74HC595ShiftRegiesterworks?The595hastworegisters(whichcanbethoughtofasmemorycontainers),eachwithjust8bitsofdata.ThefirstoneiscalledtheShiftRegister.TheShiftRegisterliesdeepwithintheICcircuits,quietlyacceptinginput.Howdoesan8bitshiftregisterwork?TheSN74HC595Nisasimple8-bitshiftregisterIC.Simplyput,thisshiftregisterisadevicethatallowsadditionalinputsoroutputstobeaddedtoamicrocontrollerbyconvertingdatabetweenparallelandserialformats.YourchosenmicroprocessorisabletocommunicatewiththeTheSN74HC595Nusingserialinformationthengathersoroutputsinformationinaparallel(multi-pin)format.Essentiallyittakes8bitsfromtheserialinputandthenoutputsthemto8pins.Whatisadigitaltube?Lightemittingdiodeconnectstheanodetogetherandthenconnectedtothepowerofpositiveiscalledcommonanodedigitaltube,lightemittingdiodeconnectedtothecathodeandthenconnectedtothepowerofthecathodeiscalledcommoncathodedigitaltube.Whatisthedifferencebetweenshiftregisterandcounter?Inashiftregister,theinputofelementNistheoutputofelementN-1,andallelementsusethesameclock.Inacounter,theinputofelementNistheinverseofitsoutput,andtheclockofelementN+1istheoutputofelementN.

T18NEXTBUS

IDescriptionDoyouknowwhattheDigitalTubeDisplayneeds?Thedisplayofthedigitaltuberequiresadigitaltubeandacontrolcircuitofmultipledigitaltubes.Takethesingle-chipmicrocomputercontrolcircuitofan8-bitdigitaltubeasanexample.Thesingle-chipmicrocomputerneedstoprovidean8-bitsegmentcodeandan8-bitcode.Thus,weusuallychoosetwoofthefourparallelI/Oportsinthe51single-chipmicrocomputertoprovidesegmentcodesandbitcodesrespectively.Althoughthiscircuithardwareconnectionandsoftwareprogrammingarerelativelysimple,therearealsoproblems.Thatis:ToomanyI/Oportsareoccupied,whichaffectstheoveralluseofthemicrocontroller,andisnotconducivetotheaccessofotherdevices.Howtosolvethisproblem?Wecanuseatypeofshiftregisterforauxiliarycontrol.Here,thisblogusesthe74HC595chip.Figure1.74HC595CatalogIDescriptionIIIntroductionto74HC595III74HC595DisplayControlofMulti-digitDigitalTube3.1HardwareConnection3.2SoftwareProgramming3.3SimulationDebuggingIVConclusionFAQOrdering&QuantityIIIntroductionto74HC59574HC595isaCMOSshiftregisterwithopen-drainoutput.Theoutputportisacontrollablethree-stateoutput.Itcanalsocontrolthenext-levelcascadedchipserially.Itsstructureisusuallya16-pinDIPpackageorSOpackage.The74HC595pinoutisshowninFigure2,andthecorrespondingpinfunctionsareshowninTable1.Figure2.74HC595PinoutThemainfeaturesof74HC595are:8-bitserialinput/8-bitparallelorserialoutput;Three-stateoutputregister(three-stateoutput:agatecircuitwiththreeoutputstatesofhighlevel,lowlevelandhighimpedance);High-speedlow-powerconsumption,high-speedshiftclockfrequencyFmax25MHz.Table1.74HC595PinFunctionPinNumberPinNamePinFunction15,1~7Q0~Q7Paralleltri-stateoutputpin8GNDPowerground9Q7Serialdataoutputpin10/MRClearendofshiftregister(activelow)11SH_CPSerialdatainputclockline12ST_CPOutputmemorylatchclockline13/OEOutputenable(activelow)14DSSerialdatainputline16VCCPowerendIII74HC595DisplayControlofMulti-digitDigitalTubeHere,thisblogtakesthesingle-chipmicrocomputercontrolmulti-digitdigitaltubeasanexample.Tousethechipcorrectly,youmustfirstcorrectlyunderstandthetimingdiagramortruthtableofthechip.Thetruthtableof74HC595isshowninTable2.InputPinOutputPinDSSHCP/MRSTCP/OEHQ0~Q7outputhighimpedanceLQ0~Q7outputeffectivevalueLClearshiftregisterLRisingEdgeHShiftregisterstorelowlevelHRisingEdgeHShiftregisterstorehighlevelFallingEdgeHShiftregisterstateretentionRisingEdgeStatevalueinoutputshiftregisterFallingEdgeOutputmemorystateretentionItcanbefoundthattheserialdataisconnectedtotheDSpin,butitisonlyinputtotheshiftregisterwhenSH_CPisarisingedge,andentersthestorageregisterwhenST_CPisarisingedge.Ifthetwoclocksareconnectedtogether,theshiftregisterisalwaysonepulseearlierthanthestorageregister.Theshiftregisterhasaserialshiftinput(Ds),aserialoutput(Q7),andanasynchronouslow-levelreset.Thestorageregisterhasaparallel8-bit,three-statebusoutput.WhenOEisenabled(lowlevel),thedataofthestorageregisterisoutputtothebus.3.1HardwareConnectionSincethe8-bitdigitaltubeneedstoprovideatotalof16bitsofsegmentcodeandbitcodeatthesametime,itcannotberealizedbyusingone74HC595.Tosolvethisproblem,weusetwo595chipstocascadeseriallytoprovidean8-bitsegmentcode(providedbyU2)andan8-bitcode(providedbyU3).ThesimulationhardwarecircuitisshowninFigure3.Theinputsignalof595isconnectedtothethreeI/OportsofP2.0~P2.2respectively.Amongthem,P2.0providesserialinputsignals,P2.1andP2.2provideoutputandinputclocksignalsrespectively.Figure3.SimulationHardwareCircuitDiagram3.2SoftwareProgrammingHere,weuse2piecesof74HC595chipsforserialcascading.Therefore,youmustpayattentiontothesequenceofserialdataoutputwhenprogramming.Theusualpracticeisasfollows:First,writethedata(iebitcode)ofthe74HC595chipatthenextlevel;Then,writethedata(iesegmentcode)ofthefirst-level74HC595chip;Finally,releasetheparalleloutputpinstogetheratonce.Thesampleprogramisasfollows(partial):voidOneLed_Out(uchari,ucharLocation){ucharj;OutByte=Location;for(j=1;j=8;j++){DS=Bit_Out;SH_CP=0;SH_CP=1;SH_CP=0;OutByte=OutByte1;}OutByte=~Segment[i];for(j=1;j=8;j++){DS=Bit_Out;SH_CP=0;SH_CP=1;SH_CP=0;OutByte=OutByte1;}ST_CP=0;ST_CP=1;ST_CP=0;}3.3SimulationDebuggingWecandrawthehardwarecircuitdiagramontheProteus7platform,andthenwritethesoftwareprogramontheKeil4.0platformandcompileanddebugit.Then,loadthegeneratedHEXfileintothesimulationchipandrunthesimulation.Ifallgoeswell,theresultswillbedisplayedcorrectly.Accordingtothedisplayrequirements,itcanrealize8-bitdigitaltubeshiftdisplayor8-bitdigitaltubesimultaneousdisplay.ThesimulationresultsareshowninFigures4and5.Figure4.ShiftDisplayof8-bitDigitalTubeFigure5.SimultaneousDisplayof8-bitDigitalTubesIVConclusionThetestresultsofthisblogshowthattherearemanyadvantagestothedisplaycontrolofmulti-digitdigitaltubesthroughthecascadeof74HC595chips.Thesebenefitsaremainlyreflectedinthefollowingaspects:Itcangreatlyreducethedisplaycontrolofthesingle-chipdigitaltube;ItcangreatlyreducetheoccupancyoftheMCUI/Oportline;Thecircuitissimpleandeasytoprogram.Themethodintroducedinthisblog,whetheritistoconductsimulationteachingonacomputer,ortobuildactualhardwarecircuits.Ingeneral,Thecurrent74HC595chipiscost-effective,andthecostofbuildingacircuitislow,makingitverysuitableforgeneraluse.FAQWhatis74HC595?74HC595isashiftregisterwhichworksonSerialINParallelOUTprotocol.Itreceivesdataseriallyfromthemicrocontrollerandthensendsoutthisdatathroughparallelpins.Wecanincreaseouroutputpinsby8usingthesinglechip.Whatisa74hc595n?8-bitShiftRegister74HC595NAshiftregisterisachipyoucanusetocontrolmanyoutputs(8here)atthesametimewhileonlyusingafewpins(3here)ofyourArduino.Howdoesashiftregisterwork?Shiftregistersholdthedataintheirmemorywhichismovedorshiftedtotheirrequiredpositionsoneachclockpulse.Eachclockpulseshiftsthecontentsoftheregisteronebitpositiontoeithertheleftortheright.How74HC595ShiftRegiesterworks?The595hastworegisters(whichcanbethoughtofasmemorycontainers),eachwithjust8bitsofdata.ThefirstoneiscalledtheShiftRegister.TheShiftRegisterliesdeepwithintheICcircuits,quietlyacceptinginput.Howdoesan8bitshiftregisterwork?TheSN74HC595Nisasimple8-bitshiftregisterIC.Simplyput,thisshiftregisterisadevicethatallowsadditionalinputsoroutputstobeaddedtoamicrocontrollerbyconvertingdatabetweenparallelandserialformats.YourchosenmicroprocessorisabletocommunicatewiththeTheSN74HC595Nusingserialinformationthengathersoroutputsinformationinaparallel(multi-pin)format.Essentiallyittakes8bitsfromtheserialinputandthenoutputsthemto8pins.Whatisadigitaltube?Lightemittingdiodeconnectstheanodetogetherandthenconnectedtothepowerofpositiveiscalledcommonanodedigitaltube,lightemittingdiodeconnectedtothecathodeandthenconnectedtothepowerofthecathodeiscalledcommoncathodedigitaltube.Whatisthedifferencebetweenshiftregisterandcounter?Inashiftregister,theinputofelementNistheoutputofelementN-1,andallelementsusethesameclock.Inacounter,theinputofelementNistheinverseofitsoutput,andtheclockofelementN+1istheoutputofelementN.IDescriptionTheinstrumentationamplifiercircuithasthefollowingfeatures:HighInputImpedance;HighCommon-modeRejectionRatio;LowDrift;...Theabovefeaturesmakeitwidelyusedinfieldsofsmallsignalamplificationofsensoroutput.Thisblogwillintroduce4implementationoptionsofinstrumentationamplifiercircuits.These4optionsaredesignedbasedondifferentelectroniccomponents.Andtheyarealsoonthebasisofexplainingthecircuitstructureandprincipleoftheinstrumentamplifier.Theelectroniccomponentsdiscussedinthisbloginclude:LM741,OP07,LM324,AD620.Wewillsummarizefeaturesofthe4circuitthroughtesting,analysisandcomparison.Ibelievethisblogcanprovideacertainreferenceforcircuitdesignbeginners.WhatAreInstrumentationAmpilfiers?CatalogIDescriptionIIIntroduction2.1InstrumentationAmplifierOverview2.2InstrumentationAmplifierStuctureandPrincipleIIIInstrumentationAmplifierCircuitDesign3.1LM741CircuitOption3.2OP07CircuitOption3.3LM324CircuitOption3.4AD620CircuitOptionIVPerformanceTestandAnalysisFAQOrdering&QuantityIIIntroduction2.1InstrumentationAmplifierOverviewThesignalsinputbysmartmetersthroughsensorsgenerallyhavethecharacteristicsofsmallsignals:Thesignalamplitudeisverysmall(millivoltorevenmicrovoltmagnitude);Oftenaccompaniedbyloudnoise.Forsuchsignals,thefirststepofcircuitprocessingisusuallytoamplifysmallsignalswithaninstrumentationamplifier.Themainpurposeofamplificationisnottogain,buttoimprovethesignal-to-noiseratioofthecircuit.Atthesametime,fortheinstrumentationamplifiercircuit,thesmallertheinputsignalthatcanberesolved,thebetter;thewiderthedynamicrange,thebetter.Therefore,theperformanceoftheinstrumentationamplifiercircuitdirectlyaffectstherangeoftheinputsignalthatthesmartinstrumentcandetect.2.2InstrumentationAmplifierStuctureandPrincipleThetypicalstructureoftheinstrumentamplifiercircuitisshownasinFig.1.Itismainlycomposedoftwo-stagedifferentialamplifiercircuit.Figure1.StructureofInstrumentationAmplifierAmongthem,theoperationalamplifierA1,A2arein-phasedifferentialinputmodes.Non-invertinginputcangreatlyincreasetheinputimpedanceofthecircuit.Atthesametime,itcanalsoreducetheattenuationofweakinputsignalsbythecircuit;Differentialinputcanmakethecircuitonlyamplifythedifferentialmodesignal,andonlyfollowthecommonmodeinputsignal.Inthisway,theratiooftheamplitudeofthedifferentialmodesignaltothecommonmodesignal(ie,thecommonmoderejectionratioCMRR)senttothesubsequentstageisimproved.Inthisway,inthedifferentialamplifiercircuitcomposedofoperationalamplifierA3asthecorecomponent,undertheconditionthattheCMRRrequirementsremainunchanged,theaccuracymatchingrequirementsforresistorsR3andR4,RfandR5canbesignificantlyreduced.Asaresult,theinstrumentationamplifiercircuithasbettercommonmoderejectioncapabilitythanasimpledifferentialamplifiercircuit.UndertheconditionsofR1=R2,R3=R4,Rf=R5,thegainofthecircuitinFigure1is:G=(1+2R1/Rg)(Rf/R3)ItcanbeseenfromtheformulathattheadjustmentofthecircuitgaincanbeachievedbychangingtheRgresistance.IIIInstrumentationAmplifierCircuitDesignAtpresent,theimplementationmethodsofinstrumentationamplifiercircuitsaremainlydividedintotwocategories:Thefirstcategoryiscomposedofdiscretecomponents;Thesecondcategoryisdirectlyimplementedbyasingleintegratedchip.Intheblog,withsingleopampLM741andOP07,integratedfouropampLM324andmonolithicintegratedchipAD620asthemainelectroniccomponents,4kindsofinstrumentationamplifiercircuitoptionsaredesigned.3.1LM741CircuitOptionConsistsofthreegeneral-purposeoperationalamplifiersLM741toformathreeoperationalamplifierinstrumentamplifiercircuitform.Andsupplementedbyrelatedresistorperipheralcircuits.Atthesametime,addthebridgesignalinputcircuitofthenon-invertinginputterminalsofA1andA2,asshowninFigure2.Figure2.SingleOpAmpInstrumentationAmplifierA1~A3inFigure2canbereplacedwithLM741respectively.Theworkingprincipleofthecircuitisexactlythesameasthatofatypicalinstrumentationamplifiercircuit.3.2OP07CircuitOptionComposedof3precisionoperationalamplifiersOP07,thecircuitstructureandprinciplearethesameasinFig.2(3OP07sareusedtoreplaceA1~A3inFig.2respectively).3.3LM324CircuitOptionTakeafouroperationalamplifierintegratedcircuitLM324asthemaincomponent,asshowninFigure3.Itscharacteristicistointegrate4functionallyindependentoperationalamplifiersintothesameintegratedchip.WhataretheadvantagesofusingLM324?Thatis,itispossibletogreatlyreducethedifferenceindeviceperformanceofeachopampduetodifferentmanufacturingprocesses.Inaddition,theuseofaunifiedpowersupplyisconducivetothereductionofpowersupplynoiseandtheimprovementofcircuitperformanceindicators.Andthebasicworkingprincipleofthecircuitremainsunchanged.Figure3.LM324InstrumentationAmplifier3.4AD620CircuitOptionThecircuitconsistsofamonolithicintegratedchipAD620asthemainelectroniccomponents,asshowninFigure4.Itischaracterizedbyasimplecircuitstructure:anAD620,againsettingresistorRg,andaworkingpowersupply.Therefore,thedesignefficiencyisveryhigh.ThecircuitgaincalculationformulainFig.4is:G=49.4K/Rg+1.Figure4.AD620InstrumentationAmplifierIVPerformanceTestandAnalysisThefouroptionsoftheinstrumentationamplifiercircuitalladopttheformofabridgecircuitcomposedof4resistors,whichchangesthedouble-endeddifferentialinputintoasingle-endedsignalsourceinput.Theperformancetestismainlytocarryoutsimulationandactualcircuitperformancetestfromthefollowingaspects:1.ThemaximuminputofthesignalsourceVs;2.VsminimuminputofsignalsourceVs;3.Themaximumgainofthecircuit;4.Commonmoderejectionratio.ThetestdataareshowninTable1andTable2.Amongthem,themaximum(small)inputofVsreferstothemaximum(small)inputofthesignalsourcewhenthecircuitoutputisnotdistortedundergiventestconditions.Themaximumgainreferstothemaximumgainvalueofthecircuitthatcanbeachievedwhentheoutputisnotdistortedunderthegiventestconditions.ThecommonmoderejectionratioiscalculatedbytheformulaKCMRR=20|g|AVd/AVC|(dB).Note:fisthefrequencyofVsinputsignal;Thevoltagemeasurementdatainthetableareallexpressedbypeak-to-peakvalue;Duetothesimulationdevice,thesimulationofoption3withMultisimfailedintheexperiment,and-inTable1indicatesthefailuredata;Options1to4inthetablerespectivelyrepresenttheinstrumentationamplifiercircuitcomposedofLM741,OP07,LM324andAD620respectively.FromthemeasureddatainTable2,wecanseefromit:Foroption2,ithasthebestperformanceintermsofsignalinputrange(thatis,themaximumandminimuminputofVs),circuitgain,andcommon-moderejectionratio.Intermsofcomponentprice,itisalittlehigherthanthecostoftheLM741option1andtheLM324option3,butitismuchcheaperthantheAD620option4.Therefore,amongthefouroptions,option2ofOP07hasthehighestcostperformance.Foroption4,inadditiontoitsrelativelysmallmaximumgain,itsotherperformanceissecondonlytooption2.option4hastheadvantagesofsimplecircuit,superiorperformance,andsavingdesignspace.However,thehighcostisitsbiggestdisadvantage.Foroption1andoption3,thereislittledifferenceintheirperformance.option3isslightlybetterthanoption1,andtheyalsohaveabsolutepriceadvantages,buttheirperformanceisnotasgoodasoption2andoption4.Basedontheaboveanalysis,option2andoption4aresuitableforoccasionswithhigherperformancerequirementsforinstrumentamplifiercircuits.Amongthem:Option2ofOP07isthemostcost-effectiveOption4ofAD620issimpleandefficient,butthecostishigh.Option1ofLM741andOption3ofLM324aresuitableforoccasionswhereperformancerequirementsarenothighandcostsavingsareneeded.Accordingtospecificcircuitdesignrequirements,differentoptionsareselectedtoachieveoptimalresourceutilization.Figure5.InstrumentationAmplifierICInaddition,afterthecircuitdesignplanisdetermined,thefollowingaspectsshouldbepaidattentiontointhespecificcircuitdesignprocess:1.Payattentiontotheselectionofkeycomponents.Forexample,forthecircuitshowninFigure2,thereareafewthingstopayattentionto:MakethecharacteristicsofopampA1andA2asconsistentaspossible;Whenselectingresistors,resistorswithalowtemperaturecoefficientshouldbeusedtoobtainthelowestpossibledrift;TheselectionofR3,R4,R5andR6shouldmatchasmuchaspossible.2.Payattentiontoaddingvariousanti-interferencemeasuresinthecircuit.suchas:Thepowersupplydecouplingcapacitorshouldbeaddedatthelead-inendofthepowersupply;RClow-passfilteringshouldbeaddedtothesignalinputterminalorhigh-frequencynoisecancelingcapacitorsshouldbeaddedtothefeedbackloopoftheoperationalamplifierA1andA2;ThePCBdesignshouldbecarefullylaidoutandroutedreasonably,andgroundwiresshouldbehandledcorrectly.FAQWhatislm324?LM324isaQuadop-ampICintegratedwithfourop-ampspoweredbyacommonpowersupply.Thedifferentialinputvoltagerangecanbeequaltothatofpowersupplyvoltage....Generally,op-ampscanperformmathematicaloperations.Whichisthedifferencebetweenlm324andlm339?TheLM324hasacomplementaryoutputwhiletheLM339isopencollector.Inthecomplementaryoutput,currentcanflowineitherdirectionasrequired(eithersourceorsink)whiletheopencollectoroutputcanonlysinkcurrent.Whatisopampusefor?OperationalamplifiersarelineardevicesthathaveallthepropertiesrequiredfornearlyidealDCamplificationandarethereforeusedextensivelyinsignalconditioning,filteringortoperformmathematicaloperationssuchasadd,subtract,integrationanddifferentiation.Howdoesanopampwork?Whatislm324usedfor?LM324ICApplicationsTheapplicationsofICLM324includethefollowing.ByusingthisIC,theconventionalop-ampapplicationscanbeimplementedverysimply.ThisICcanbeusedasoscillators,rectifiers,amplifiers,comparatorsetc.

T18NEXTBUS

I.IntroductionAsweallknow,theionnitridingprocessrequiresrelativelyhighcontrolofthepressureinsidethefurnace,sothispaperdesignsagasflowcontrollerbasedontheL298NchipdrivenDCmotorcontrol,whichcanbeusedtocontrolthegasflowofthereactor.Soletsfirstunderstandtheionnitridingtheory.CatalogI.IntroductionII.IonNitridingTheoryIII.SystemFlowandPressureMeasurementandControlBlockDiagramIV.L298NChipIntroductionV.ControllerPrincipleVI.ConclusionFAQOrdering&QuantityII.IonNitridingTheoryNitridingisachemicalheattreatmentmethodtostrengthenthemetalsurface.Itistoplacemetalpartsinanactivenitrogenmedium,andatacertaintemperatureandholdingtime,thenitrogenelementcanpenetrateintothemetalsurface,therebychangingthechemicalcompositionofthemetallayertomakeithavehighwearresistance,fatiguestrength,corrosionresistanceandburnresistance,etc.,soitiswidelyusedinindustry.Ionnitridingiscarriedoutinalow-temperatureplasma.Thelow-pressuregasisionizedundertheactionofanelectricfieldtoproducehigh-energyionsandhigh-energyneutralatoms.Thesehigh-energyparticlescanimprovethestructureoftheinfiltrationlayer,promotethechemicalreactionprocess,andacceleratethenitridinglayerformation.Ionnitridingiscarriedoutinglowdischarge.Intheprocessofionnitriding,thepressurecontrolaccuracyofthefurnaceisrelativelyhigh,andthecontroldeviationreachesseveraltensofPa.AccordingtoPaschensLaw:Amongthem:Pisthegaspressure;Disthedistancebetweenparallelplateelectrodes;Visthecathodesecondaryelectronemissioncoefficient;BisStolevsconstant;Aisaconstant.Takingthederivativeofformula(1),thebreakdownvoltageexpression(2)canbeobtained:Itcanbeseenfromformula(2)thatthebreakdownvoltageVisrelatedtothegaspressureandd,andingeneralexperiments,disfixed,soionnitridingisextremelyimportantforpressurecontrol.III.SystemFlowandPressureMeasurementandControlBlockDiagramTheflowmetercontrolsthegasflowattheinlet.Whentheinletandexhaustflowsarebalanced,thefurnacepressureremainsstable.Duetotheinternalinfluenceoffurnacegasleakageandotherinterferencefactors,theinternalpressureofthefurnacefluctuatesupanddown,andthesystemdeviatesfromtheequilibriumstate,whichaffectstheplasmaprocessinseverecases.WeuseanordinaryDCmotortodrivetheDCmotorthroughtheL298N,andthemotordrivestheconetorotatethroughthereductionlever.Whentheconeisscrewedin,thegaspumpedoutperunittimeisreduced;whenitisscrewedout,thegaspumpedoutincreases,sothatthepressureinsidethefurnaceisstabilizedattherequiredvalue.Thechangeoffurnacepressureismeasuredbythepressuresensorandpassedthroughthetransmitter,whichsendsthegasflowcontrollertothefeedbackvoltage.Theelectricvacuumbutterflyvalveusedforthesuctionportisexpensive,asshowninFigure1.Figure1BlockdiagramofsystemflowandpressuremeasurementandcontrolIV.L298NChipIntroductionL298NcanacceptstandardTTLlogiclevelsignalVSS,andVSScanbeconnectedto4.5~7Vvoltage.4pinVSisconnectedtothepowersupplyvoltage,andtheVSvoltagerangeVIHis+2.5~46V.Theoutputcurrentcanreach2.5A,whichcandriveinductiveloads.Theemittersofpin1andpin15areseparatelyledouttoconnectthecurrentsamplingresistortoformacurrentsensingsignal.L298candrivetwomotors,OUT1,OUT2andOUT3,OUT4canbeconnectedtoeachmotor,thisexperimentaldevicewechoosetodriveonemotor.Pins5,7,10and12areconnectedtotheinputcontrolleveltocontroltheforwardandreverserotationofthemotor.EnAandEnBareconnectedtothecontrolpotentialenergyendtocontrolthestallingofthemotor.Figure2istheL298Nfunctionallogicdiagram,Table1istheL298Ninternalfuntionalmodule.Figure2L298NfunctionallogicdiagramEnAIn1In2OperativeCondition0Stop110Rotatingforward101Inversion111Brake100StopTable1L298NinternalfunctionalmoduleThefunctionalmoduleofIn3andIn4isthesameasTable1.ItcanbeseenfromTable1thatwhenEnAislowlevel,theinputlevelhasaneffectonmotorcontrol.WhenEnAishighlevel,whenEnAishigh,theinputlevelisonehighandonelow,andthemotorrotatesforwardorreverse.Iftheyarebothlowlevel,themotorwillstop,andiftheyarebothhighlevel,themotorwillbrake.V.ControllerPrincipleFigure3istheschematicdiagramofthecontroller,composedof3dashedblockdiagrams:Figure3TheschematicdiagramofthecontrollerThefollowingarethefunctionsofthe3dashedblockdiagrams:(1)Thedashedblockdiagram1controlstheforwardandreverserotationofthemotor,U1AandU2Aarecomparators,andVIcomesfromthevoltageofthefurnacepressuresensor.WhenVIVRBF1,U1Aoutputshighlevel,U2Aoutputhighlevelturnsintolowlevelthroughinverter,andthemotorrotatesforward.Similarly,whenVIVRBF1,themotorreverses.Theforwardandreverserotationofthemotorcancontroltheflowofgasextractedbytheairextractor,therebychangingthepressureinsidethefurnace.(2)Inthedashedblockdiagram2,twocomparatorsU3AandU4Aformadual-limitcomparator.WhenVBVIVA,itoutputslowlevel,andwhenVIVA,VIVB,itoutputshighlevel.VA,VBaretheupperandlowerlimitsofthevoltageconvertedbythefurnacepressuretransducer,thatis,thecontrolrangeofthereactionfurnacepressure.Accordingtoprocessrequirements,wecanspecifythevaluesofVAandVBbyourselves,aslongasthefurnacepressureiswithintherangedeterminedbyVAandVB,themotorstops(notethatVB<VRBF1<VA,ifitisnotinthisrange,thesystemisunstable).(3)Thedashedblockdiagram3isalongdelaycircuit.U5Aisacomparator,Rs1isthesamplingresistor,VRBF2isthemotorovercurrentvoltage.ThevoltageonRs1isgreaterthanVREF2,themotorisovercurrent,andU5Aoutputslowlevel.Itcanbeseenfromtheabovethatblock1controlstheforwardandreverserotationofthemotor,andblock2controlsthesizeoftherippleofthefurnacepressure.Whenthefurnacepressureistoosmallortoolarge,themotorturnstoafixedpositionatbothendstostop,accordingtothesteady-stateoperatingequationoftheDCmotor:Amongthem:Фisthemagneticfluxofeachpoleofthemotor;Ceistheelectromotiveforceconstant;Nisthenumberofmotorrevolutions;Iaisthearmaturecurrent;Raisthearmatureloopresistance.WhenthenumberofrevolutionsofthemotorNis0,thecurrentofthemotorincreasessharply,andthemotorwillburnoutifthetimeistoolong.Butwhenthemotorstarts,thecurrentinthecoilinthemotoralsoincreasessharply,sowemustseparatethesetwostates.Thelongdelaycircuitcandistinguishthesetwostates.Theworkingprincipleofthelong-delaycircuit:WhentheRs1overcurrentU5Ageneratesanegativepulseandisdifferentiated,thepulsetriggerspin2of555,thecircuitisset,andpin3outputshighlevel.Becausethedischargeterminal7pinisopen,C1,R5andU6Aformedasanintegration,thenstartworking,thechargingvoltageonthecapacitorC1riseslinearly,andtheintegrationconstantofthedelayoperationalamplifieris100R5C1.WhenthechargingvoltageonC1,thatis,thevoltageonpin6exceeds2/3VCC,the555circuitresetsandoutputsalowlevel.Themotorgenerallystart-upinlessthan0.8s,andtheC1chargingtimeisgenerally0.8~1s.TheoutputlevelofU5AisORedwiththeoutputlevelofpin3of555viaU7.IftheoutputlowlevelofU5AislongerthanthechargingtimeofC1,U7outputslowlevelafterC1ischarged.TheANDgateU8inputstothe6pinENAterminalofL298N.Themotorstops.IftheoutputlevelofU5AislessthanthechargingtimeofC1,pin6willnotactandthemotorwillstartnormally.Thelongdelaycircuitabsorbsthemotorstart-upovercurrentvoltagewaveform,sothatthemotorstartsnormally.VI.ConclusionThisarticlesummarizesthedesignschemeforthepressurecontrolofionnitridingbasedontheL298Nchip.Ithasbeenprovedthattheuseofthiscontrollertocontrolthegasflowcanreduceproductioncosts,increasethesystemcostperformance,andimprovethecontroldynamicperformanceandstabilityoftheentiresystemcontrol.FAQWhatisl298n?ThisL298NMotorDriverModuleisahighpowermotordrivermodulefordrivingDCandStepperMotors.ThismoduleconsistsofanL298motordriverICanda78M055Vregulator.L298NModulecancontrolupto4DCmotors,or2DCmotorswithdirectionalandspeedcontrol.Whatistheuseofl298n?TheL298NisadualH-BridgemotordriverwhichallowsspeedanddirectioncontroloftwoDCmotorsatthesametime.ThemodulecandriveDCmotorsthathavevoltagesbetween5and35V,withapeakcurrentupto2A.Howdoesl298ncontrolDCmotorspeed?1.IfyousendaHIGHsignaltotheenable1pin,motorAisreadytobecontrolledandatthemaximumspeed;2.IfyousendaLOWsignaltotheenable1pin,motorAturnsoff;3.IfyousendaPWMsignal,youcancontrolthespeedofthemotor.Themotorspeedisproportionaltothedutycycle.Whatisl298nmotordrivermodule?ThisL298NMotorDriverModuleisahighpowermotordrivermodulefordrivingDCandStepperMotors.ThismoduleconsistsofanL298motordriverICanda78M055Vregulator.L298NModulecancontrolupto4DCmotors,or2DCmotorswithdirectionalandspeedcontrol.Howdoesl298nmotordriverwork?TheL298NisadualH-BridgemotordriverwhichallowsspeedanddirectioncontroloftwoDCmotorsatthesametime.ThemodulecandriveDCmotorsthathavevoltagesbetween5and35V,withapeakcurrentupto2A.Howdoiuseal298motordriverwithArduino?Startbyconnectingpowersupplytothemotors.InourexperimentweareusingDCGearboxMotors(alsoknownasTTmotors)thatareusuallyfoundintwo-wheel-driverobots.Theyareratedfor3to12V.So,wewillconnectexternal12VpowersupplytotheVCCterminal.WhatisthefunctionofHbridge?AnH-bridgeisanelectroniccircuitthatswitchesthepolarityofavoltageappliedtoaload.ThesecircuitsareoftenusedinroboticsandotherapplicationstoallowDCmotorstorunforwardsorbackwards.Whatisthedifferencebetweenl293dandl298n?L293isquadruplehalf-HdriverwhileL298isdualfull-Hdriver,i.e,inL293allfourinput-outputlinesareindependentwhileinL298,ahalfHdrivercannotbeusedindependently,onlyfullHdriverhastobeused....Hence,heatsinkisprovidedinL298.

I.IntroductionDCmotorsarewidelyusedinvariousfieldsduetotheirgoodspeedregulationperformance,largestartingtorqueandstrongoverloadcapacity.Inrecentyears,thestructureandcontrolmethodsofDCmotorshaveundergonegreatchanges.Withcomputersenteringthecontrolfieldandthecontinuousemergenceofnewpowerelectronicpowercomponents,PWM(pulsewidthmodulation)speedregulationhasbecomeanewwayofDCmotorspeedregulation.Andwiththeadvantagesofhighswitchingfrequency,stablelow-speedoperation,excellentdynamicperformance,andhighefficiency,itiswidelyusedinDCmotorspeedregulation.Therefore,thispaperproposesthedesignofaDCmotorPWMcontrolsystembasedon80C196KCandL298N.CatalogI.IntroductionII.PrincipleofPWMSpeedControlSystemIII.ControlSystemHardwareDesign3.1IntroductiontoPowerIntegratedCircuitL298N3.2DCMotorControlSystemHardwareCircuit3.3Anti-interferenceandElectromagneticCompatibilityDesignIV.ControlSystemSoftwareRealizationV.ConclusionFAQOrdering&QuantityII.PrincipleofPWMSpeedControlSystemPWM,orpulsewidthmodulation,referstotheuseoftheswitchingcharacteristicsofhigh-powertransistorstomodulateafixedvoltageDCpowersupply,whichisturnedonandoffatafixedfrequency,andthelengthoftheonandofftimeinacycleischangedasneeded.BychangingthedutycycleofthevoltageonthearmatureoftheDCservomotor,theaveragevoltageischangedtocontrolthespeedofthemotor.Therefore,itisoftencalledaswitchdrivedevice.TheschematicdiagramofPWMcontrolisshowninFigure1.Figure1PWMcontrolschematicdiagramThereareusuallytwowaystochangethedutycycle:PWMandPFM(pulsefrequencymodulation).PWMisbychangingthewidthoftheon-pulse,whichiscommonlyreferredtoasthefixedfrequencywidthmodulationmethod.PFMmeansthattheon-pulsewidthisconstantandthedutycycleischangedbychangingtheswitchingfrequency.Becausewhenitencountersmechanicalresonanceataparticularfrequency,itoftenresultsinsystemvibrationandhowling.Therefore,inthecontrolofDCmotors,thePWMcontrolmethodismainlyused.III.ControlSystemHardwareDesignTheDCmotorspeedcontrolsystembasedon80C196KCandL298Niscomposedofthesmallestsingle-chipmicrocomputersystem,R/Dconverter,PWMpoweramplifiercircuit,A/DandD/Aconversioncircuit,andreceivingcommandinterfacecircuit.Theminimumsystemofthesingle-chipmicrocomputeradoptsthe16-bitsingle-chip80C196KCexternalexpansioninterfacecircuit,whichismainlyusedtorealizethefunctionsofdataacquisitionandPWMsignalgeneration.TheblockdiagramofthespeedcontrolsystemisshowninFigure2.Figure2BlockdiagramofPWMspeedcontrolsystem3.1IntroductiontoPowerIntegratedCircuitL298NInordertoimprovesystemefficiencyandreducepowerconsumption,thepoweramplifierdrivecircuitadoptstheintegratedcircuitL298NbasedonthebipolarH-bridgepulsewidthmodulationmethod.L298Nisahigh-performancepulse-widthmodulationpoweramplifierproducedbySGS,whichhasthecharacteristicsofsmallsizeandstrongdrivingability.ItcontainstwoH-bridgehigh-voltageandhigh-currentbridgedrivers,whichcanrealizethefull-bridgedriveofthemotorwithasinglechip,whichcandrivemotorsbelow46Vand2A.TheinternalstructureofL298NisshownasinFigure3.Figure3L298Ninternalstructureblockdiagram3.2DCMotorControlSystemHardwareCircuitL298NcandrivetwoDCmotors,becausethespeedcontrolsystemisasingle-axisstructure,inordertomakefulluseoftheloadcapacityofthepoweramplifiercircuit,sothatthesystemstartsatthemaximumaccelerationandbrakesatthemaximumacceleration,inthedesign,theinputterminalandtheoutputterminalareconnectedinparalleltocontroltheDCmotor.Thesingle-chip80C196KCgivesaPWMsignalaccordingtothecalculationresultsofthepositionloopandthespeedloop.ThePWMsignalisdirectlyoutputtotheIN1(IN3)terminal,andthePWMsignalisinvertedandoutputtoIN2(IN4)through7406.WhenthedutycycleofthePWManalogsignalis50%,thepositiveandnegativevoltagesatbothendsofthemotorareappliedforthesametime.Themotorisinastateoftremoratthisposition,thatis,inthepowerlubricationstate.Whenthedutycycleisgreaterthan50%,thesignalvoltageOUTAisgreaterthanOUTB,andthemotorrotatesforward,otherwisereverse.Therefore,theoutputpolarityofeachlinkmustbestraightenedouttoformnegativefeedbackandcompleteclosed-loopcontrol.RelyingonchangingthePWMdutycycletocontrolthemotorspeedcanalsochangethemotorrotationdirection,thecontrolmethodissimpleandreliable.Inaddition,becausethemotorisofelectriccoiltype,reverseelectromotiveforcewillbeformedwhenthemotorhasanemergencystopandsuddencommutation.ToensurethenormaloperationoftheL298Ndrivechip,twopairsofcontinuationsareaddedbetweentheoutputterminalsOUTA,OUTBandtheDCmotor.TheflowdiodeshuntsthecurrenttothepositiveorgroundterminalofthepowersupplytopreventbackelectromotiveforcefromdamagingtheL298N.3.3Anti-interferenceandElectromagneticCompatibilityDesignWhenthemotorisdriven,therapidon-offofthepowermainswitchingelementleadstoalargerateofchangeofpowercurrentandvoltage,whichnotonlyaffectsthedrivecircuitbutalsoentersthecontrolcircuitthroughthepowersupplyandground.Inaddition,whenthemotorstartsandbrakes,thetransientvoltageisgeneratedatthesuddenchangeoftheload,itsamplitudewillbehigherthanthepowersupplyvoltage,andtheleadingedgeissteep,thefrequencybandisverywide,anditentersthecontrolcircuitthroughtheDCpowersupply.Therefore,anti-interferenceandelectromagneticcompatibilitydesignisalsoveryimportant.Thesystemhasadoptedmeasuressuchascurrentsmoothing,deburringandshielding.Currentsmoothing:BecausetheinstantaneousenergyofthePWMswitchisrelativelylarge,theRCfilterisusedattheoutputofthePWMpoweramplifiertofilter.Byselectingtheappropriateresistanceandcapacitancevalues,high-frequencyharmonicsareeffectivelysuppressedandthepeakvoltageofthePWMpoweramplifierisabsorbed.Therebyreducingtheinterference;Deburring:Thesystemincreasesthefiltercapacitoronthepowersupplyside,andusesonelargeandonesmallcapacitorinparallel.Thelargecapacitorisresponsibleforthedecoupling,filtering,andsmoothingoflow-frequencyalternatingsignals,andthesmallcapacitoreliminatesmid-andhigh-frequencyparasiticscouplinginthecircuitnetwork,whicheffectivelyreducesspikesandburrs;Shielding:Themotordrivecableadoptsdouble-shieldedcables,andthewiringshouldbeseparatedfromothercablesasmuchaspossible.Figure4DrivehardwarecircuitdiagramIV.ControlsystemsoftwarerealizationThecontrolsystemadoptsthespeed-positionclosed-loopcombinationmethod,takingthepositioncontrolmethodasanexampletointroducetherealizationmethodofthesoftware.ThepositioncontrolisbasedontheclassicPIcontrolalgorithm,andtheproportionalandintegralparametersaresimplifieddesign,andthesegmentedPIcontrolisintroduced.,Thatis,thecalculatederrorisdividedintosections,anddifferentproportionalandintegralparametersparticipateintheadjustmentwithintheerrorrangeofeachsection,whichensuresthesmootherandmorestableoperationofthesystem.ThederivationandsimplificationprocessofPIformulaisasfollows:ThespecificsoftwareimplementationflowchartisshowninFigure5.Thatis,afterreceivingagivenanglecommand,firstcalculatethedifferencebetweenthesampledpositioninformationandthegivenangle,andthendividethedifferenceintonequalparts,andeachsegmentcorrespondstoasetofparametersKp1andki1participateinmediationcontrol,calculatetheoutputofPIcontrolandthenconvertitintothecorrespondingPWMnumericaloutput.Figure5ThespecificsoftwareimplementationflowchartV.ConclusionThisarticlesumsupthedesignschemeoftheDCmotorPWMcontrolsystembasedon80C196KCandL298N.Thesingle-chipmicrocomputergeneratesPWMsignaltothepowerintegratedcircuitL298N.TheclassicPIsegmentcontrolisusedtocontrolthemotor.Ithasthecharacteristicsofsimplecircuitandconvenientcontrol.Theoperatingtestresultsshowthatthesystemworksstablyandreliably,meetstherequirementsofthespeedregulationfunction,andhasbeensuccessfullyappliedtomanyairborneproducts.FAQWhatisl298n?ThisL298NMotorDriverModuleisahighpowermotordrivermodulefordrivingDCandStepperMotors.ThismoduleconsistsofanL298motordriverICanda78M055Vregulator.L298NModulecancontrolupto4DCmotors,or2DCmotorswithdirectionalandspeedcontrol.Whatistheuseofl298n?TheL298NisadualH-BridgemotordriverwhichallowsspeedanddirectioncontroloftwoDCmotorsatthesametime.ThemodulecandriveDCmotorsthathavevoltagesbetween5and35V,withapeakcurrentupto2A.Howdoesl298ncontrolDCmotorspeed?1.IfyousendaHIGHsignaltotheenable1pin,motorAisreadytobecontrolledandatthemaximumspeed;2.IfyousendaLOWsignaltotheenable1pin,motorAturnsoff;3.IfyousendaPWMsignal,youcancontrolthespeedofthemotor.Themotorspeedisproportionaltothedutycycle.Whatisl298nmotordrivermodule?ThisL298NMotorDriverModuleisahighpowermotordrivermodulefordrivingDCandStepperMotors.ThismoduleconsistsofanL298motordriverICanda78M055Vregulator.L298NModulecancontrolupto4DCmotors,or2DCmotorswithdirectionalandspeedcontrol.Howdoesl298nmotordriverwork?TheL298NisadualH-BridgemotordriverwhichallowsspeedanddirectioncontroloftwoDCmotorsatthesametime.ThemodulecandriveDCmotorsthathavevoltagesbetween5and35V,withapeakcurrentupto2A.Howdoiuseal298motordriverwithArduino?Startbyconnectingpowersupplytothemotors.InourexperimentweareusingDCGearboxMotors(alsoknownasTTmotors)thatareusuallyfoundintwo-wheel-driverobots.Theyareratedfor3to12V.So,wewillconnectexternal12VpowersupplytotheVCCterminal.WhatisthefunctionofHbridge?AnH-bridgeisanelectroniccircuitthatswitchesthepolarityofavoltageappliedtoaload.ThesecircuitsareoftenusedinroboticsandotherapplicationstoallowDCmotorstorunforwardsorbackwards.Whatisthedifferencebetweenl293dandl298n?L293isquadruplehalf-HdriverwhileL298isdualfull-Hdriver,i.e,inL293allfourinput-outputlinesareindependentwhileinL298,ahalfHdrivercannotbeusedindependently,onlyfullHdriverhastobeused....Hence,heatsinkisprovidedinL298.S8050isalow-powerNPNsilicontubewithamaximumcollector-base(Vcbo)voltageof40Vandacollectorcurrent(Ic)of0.5A.S8050isoneofthemostcommonlyusedsemiconductortransistormodelsincircuithardwaredesign.Name:S8050Type:NPNDissipatedpower:0.625W(SMD:0.3W)Collectorcurrent:0.5ABasevoltage:40VCatalogS8050PinoutS8050CircuitS8050ApplicationS8050FeaturesS8050AdvantageS8050AlternativesS8050EquivalentsWhereHowtouseS8050HowtoSafelyLongRunS8050inCircuitS8050PinoutPinNumberPinNameSymbolDescription1EmitterECurrentDrainsoutthroughemitter2BaseBControlsthebiasingoftransistor3CollectorCCurrentflowsinthroughcollectorS8050ApplicationAudioamplificationcircuitsClassBamplifiersPushpulltransistorsCircuitswherehighgainisrequiredLowsignalapplicationsS8050FeaturesLowVoltage,HighCurrentNPNTransistorSmallSignalTransistorMaximumPower:2WattsMaximumDCCurrentGain(hFE)is400ContinuousCollectorcurrent(IC)is700mABase-EmitterVoltage(VBE)is5VCollector-EmitterVoltage(VCE)is20VCollector-BaseVoltage(VCB)is30VHighUsedinpush-pullconfigurationdoeClassBamplifiersAvailableinTo-92PackageNote:CompleteTechnicalDetailscanbefoundattheS8050datasheetgivenattheendofthispage.S8050AdvantageS8050npntransistorS8050isaNPNtransistorhencethecollectorandemitterwillbeleftopen(Reversebiased)whenthebasepinisheldatgroundandwillbeclosed(Forwardbiased)whenasignalisprovidedtobasepin.Ithasamaximumgainvalueof400;thisvaluedeterminestheamplificationcapacityofthetransistornormallyS8050.Sinceitisveryhighitisnormallyusedforamplificationpurposes.However,atanormaloperatingcollectorcurrentthetypicalvalueofgainwillbe110.ThemaximumamountofcurrentthatcouldflowthroughtheCollectorpinis700mA,hencewecannotdriveloadsthatconsumemorethan700mAusingthistransistor.Tobiasatransistorwehavetosupplycurrenttobasepin,thiscurrent(IB)shouldbelimitedto5mA.Whenthistransistorisfullybiasedthenitcanallowamaximumof700mAtoflowacrossthecollectorandemitter.ThisstageiscalledSaturationRegionandthetypicalvoltageallowedacrosstheCollector-Emitter(VCE)orCollector-Base(VCB)couldbe20Vand30Vrespectively.Whenbasecurrentisremovedthetransistorbecomesfullyoff,thisstageiscalledastheCut-offRegion.S8050Alternatives2N3904,2N3906,2N2369,2N3055,S9014,MPSA42,SS8050,BC547S8050Equivalents2N5830,S9013S8050CircuitThisisavideointroducingtransistorsstereoamplifierS8050andS8550.WhereHowtouseS8050S8050transistorisageneral-purposetransistor,itisaperfecttransistortoperformsmallandgeneraltasksinelectroniccircuits.Youcanuseitasaswitchinelectroniccircuitstoswitchonloadsunder700mA.700mAisenoughtohandlevarietyofloadsforexamplerelays,LEDs,bulbsetc.Itcanalsobeusedasamplifierinsmallamplificationstagesorasaseparatesmallsignalamplifier.HowtoSafelyLongRunS8050inCircuitTosafelyrunS8050transistorinyourcircuitorelectronicprojectsdonotoperatethistransistorfromvoltagehigherthan20Vanddonotoperateanyloadmorethan700mAor0.7A.Useasuitablebaseresistorwhichwilllimitsthebasecurrenttoitsrequiredlevel.Donotexposeittoheatover150centigradeandbelow-60Centigrade.

LM3914isamonolithicicthatsensesanalogvoltagelevelsanddrives10LEDs,providingalinearanalogdisplay.Asinglepinchangesthedisplayfromamovingdottoabargraph.ThisisanoverviewofLM3914dot/bardisplaydriver,wewillprovidetheinformationofitspinout,datasheet,parameter,andwherehowtousethisdeviceandsomuchmore.Top5electronicsProjectsusingLM3914-15IC|lm3914lm3915circuitsCatalogLM3914DescriptionLM3914PinoutLM3914FeaturesLM3914ParameterLM3914EquivalentWheretouseLM3914ICHowtouseLM3914ICLM3914CircuitLM3914PackageLM3914ApplicationComponentDatasheetLM3914DescriptionTheLM3914isamonolithicintegratedcircuitthatsensesanalogvoltagelevelsanddrives10LEDs,providingalinearanalogdisplay.Asinglepinchangesthedisplayfromamovingdottoabargraph.CurrentdrivetotheLEDsisregulatedandprogrammable,eliminatingtheneedforresistors.Thisfeatureisonethatallowsoperationofthewholesystemfromlessthan3V.TheLM3914isveryeasytoapplyasananalogmetercircuit.A1.2Vfull-scalemeterrequiresonly1resistorandasingle3Vto15Vsupplyinadditiontothe10displayLEDs.Ifthe1resistorisapot,itbecomestheLEDbrightnesscontrol.Thesimplifiedblockdiagramillustratesthisextremelysimpleexternalcircuitry.Wheninthedotmode,thereisasmallamountofoverlaporfade(about1mV)betweensegments.ThisassuresthatatnotimewillallLEDsbeOFF,andthusanyambiguousdisplayisavoided.Variousnoveldisplaysarepossible.TheLM3914isratedforoperationfrom0Cto+70C.TheLM3914N-1isavailableinan18-leadPDIP(NFK)package.LM3914PinoutLM3914LM3914PinoutPinNumberPinNameDescription1and10to18LED1,LED2,LED3.....LED10The10LEDswhichhastobecontrolledisconnectedtothesepins2V-/GroundGroundpinoftheIC3V+/VccSupplyVoltage(3-18)V4RLOLowlevelvoltageforpotentialdivider5SignalAnalogsignalInputpinbasedonwhichtheLEDiscontrolled.6RHIHighLevelvoltageforpotentialdivider7REFOUTOutputReferenceVoltageforLEDcurrentlimiting8REFADJAdjustpinforvoltagereference9ModeSelectbetweenDot/BarModeLM3914FeaturesAnalogControlledLEDDriverICNumberofcontrollableLEDs:10OperatingVoltage:3Vto18VInputAnalogvoltagerange:1.2Vto12VLEDsinkcurrent:2mAto30mA(programmable)BothDot/BarmodeavailableCanbecascadedtocontrolupto100LEDsAvailablein18-pinDIP,PLCCpackageItcandriveLCDs,LEDsotherwisevacuumfluorescents.Thedototherwisebotdisplaymodecanbeselectedbytheuserexternally.Itcanbeexpandableupto100displays.LM3914ParameterManufacturer:TexasInstrumentsSeries:-Packaging:TubePartStatus:ObsoleteDisplayType:LEDLCDVacuumFluorescent(VF)Configuration:Dot/BarDisplayInterface:-DigitsorCharacters:10StepsCurrent-Supply:6.1mAVoltage-Supply:3V~20VOperatingTemperature:0C~70CMountingType:ThroughHolePackage/Case:18-DIP(0.3007.62mm)SupplierDevicePackage:18-PDIPBasePartNumber:LM3914LM3914EquivalentLM3914EquivalentLEDDriver:LM3916AlternativeLEDDriverICs:CD4511,MAX7219,CD4054WheretouseLM3914ICTheLM3914isananalogcontrolledLEDdriverIC,whichmeansthatitcancontrol(turnonoroff)10LEDlightsusingananaloginputvoltage.Thisintegratedcircuiteliminatestheneedforamicrocontrollerandprogramming,aswellasthehardwarerequiredtocontroltenLEDs.Theanaloginputvoltagecanrangefrom3Vto18V,andtheLEDcurrentcanbecontrolledwithasingleresistoronpin7.(RefOut).TheICalsohastwooperatingmodes:DOTmodeandBARmode,andupto100LEDscanbecontrolledbycascadingmultipleICs.TheseICsarecommonlyusedinvisualalarmsandothermetering/monitoringapplicationsbecausetheLEDscanbecontrolledwithoutflickeringandflawlesslywithequalbrightness.So,ifyourelookingforanICtopoweryourbarLEDlightsoranother10-LEDsequence,thisICmightbeofinteresttoyou.HowtouseLM3914ICThebenefitofusingLM3914isthatitrequireslittlehardwareandissimpletosetup.Simplyconnectthe10LEDstotheIC,setthereferencevoltagesfortheinputvoltage,andlimitthecurrentthroughtheLED,andweredone.ThecircuitbelowisanexampleofanLM3914applicationcircuit.SimplyconnecttheV+andV-topowertheIC,andtheanalogsignalvoltageisconnectedtopin5.Inthiscase,weused9VtopowertheICandmonitorananalogyvoltagerangingfrom0to5V.AlwayskeepinmindthatthevoltageusedtopowertheIC(inthiscase,9V)shouldbeatleast1.5Vhigherthanthemonitoringvoltage(here5V).Becausewearemonitoring0-5Vhere,wesetthelowreferencevoltage(pin4)to0Vandthehighreferencevoltage(pin6)to5V.Asyoumayhavenoticed,weconnectedalltenLEDsdirectlytotheICwithoutusinganycurrentlimitingresistors.ThisisbecausetheIChasaninternalcurrentlimiterandthecurrentvaluecanbesetusingthepinVRO(pin7).Thecurrentcalculationformulasaregivenbelow,whereIisthecurrentflowingthrougheachLEDandRListheresistorconnectedtopin7.I=12.5/RLIntheprecedingexample,weuseda470ohmresistorasRl,sothecurrentthrougheachLEDwillbearound25mA;youcanchangethevalueasneeded.Also,thecathodeoftheLEDisconnectedtotheIC,whiletheanodeisconnectedto+5V.ThisisduetothefactthattheICoutputpinscanonlysinkcurrentandnotsourceit.Theintegratedcircuit(IC)canoperateintwomodes:dotmodeandbarmode.Indotmode,themodepin(pin9)mustbeleftfloating;inthismode,basedontheinputvoltage,onlyoneLEDwillbeturnedon.InBarmode,connectthemodepin(pin9)toV+,andtheLEDwillturnonandoffsequentiallybasedontheinputvoltage.Boththemodesareshowninthegiffileabove.LM3914CircuitThecircuitdiagramforICLM3914isshownbelow.Thecircuitcanbeconstructedusingbothbasicelectricalandelectroniccomponents.TheICLM3914isacriticalcomponentofthiscircuit.AnalarmdrivingswitchforoverrangecanbeconnectedtoabartypeLMseriesLEDdrivingdisplaycircuitinthefollowingcircuit.Thiscircuitissuitableforbardisplays.LM3914BasedAlarmDriverCircuitThecircuithereemploysaPNPtransistor,denotedbyQ1.ThistransistorcanbeconnectedbetweentheLEDpositiveandnegativeterminals,andthebaseterminalofthetransistorisconnectedtotheICspin-10todrivetheLED10.Inseries,analarmunitisconnectedtothetransistorscollectorterminal.Normally,Q1transistor,LED10,andthealarmunitareallturnedoff;however,ifLED10isactivated,itpullsQ1transistorthroughresistorR2andthusactivatesthealarmunit,indicatingthattheconditionisoutofrange.Intheabovecircuit,analarmunitgeneratesanacousticalarmsoundusingapiezosirenunit,otherwiseagatedastableswitchunitthatcontinuouslyactivatestheLEDbrightnessbetweenhighandlowlevelsbeneaththeover-rangestate,oracombinationofboth.Ifdesired,theunitcanbeswitchedtoanyoftheLEDdisplays,andthealarmwillsoundifthatoranyotherhighLEDisenergized.LM3914PackageLM3914ApplicationBatteryMeterforRobotMonitoringof12VCarBatteryTesterCircuitforSoilMoistureMonitoringofLeadAcidBatteryChargerChargeMonitoringCircuitforAtmosphericKitchenExhaustFanforControllingTemperatureMeterCircuitforTemperatureDigitalgaugesElectronicdisplaysLow-costmonitordevicesCrudeBatterylevelindicatorsFadebarsComponentDatasheetLM3914DatasheetIDescriptionThisblogusestheuniversalintegratedchipTL494toconvertanalogsignalsintoPWM(pulsewidthmodulation)signals.Intheoutputpart,N-channelMOSFETandP-channelMOSFETareusedtoformaswitchingpoweramplifier.CatalogIDescriptionIIIntroduction2.1SwitchingPowerAmplifierOverview2.2TL494IntroductionIIISchemeDesign3.1DutyCycleAdjustmentCircuit3.2InputSignalCompressionCircuit3.3MOSFETDriveCircuit3.4WorkingPrincipleofOutputPartIVExperimentalResultsVConclusionFAQOrdering&QuantityIIIntroduction2.1SwitchingPowerAmplifierOverviewWiththerapiddevelopmentofhigh-speedpowerMOSFETproductiontechnology,theoperatingfrequencyofMOSFETisgettinghigherandhigher,thedrivingmethodisgettingsaferandthepriceisgettinglower.Therefore,alargenumberofswitchingpoweramplifiersappliedtovarioushouseholdappliancesandindustrialalarmshaveappearedonthemarketinrecentyears.Comparedwiththelinearpoweramplifier,althoughthecircuitoftheswitchingpoweramplifierisslightlymorecomplicated.Butitisveryefficientandcanreducethesizeoftheheatsink,evenwithoutusingtheheatsink.Therefore,thevolumeoftheproductcanbegreatlyreduced.2.2TL494IntroductionTL494isaswitchingpowersupplypulsewidthmodulation(PWM)controlchip.Formanyyears,asthecheapestdouble-endedPWMchip,TL494hasbeenwidelyusedindouble-endedtopologiessuchaspush-pullandhalf-bridge.Becauseofitsloweroperatingfrequencyandsingle-endedoutputportcharacteristics.Itisoftenusedwithpowerbipolartransistors(BJT).IfusedwithpowerMOSFET,anexternalcircuitisrequired.TL494worksinawidevoltagerangefrom7Vto40V,withamaximumoperatingfrequencyof200kHz,withtheinternalsawtoothgenerator,PWMgenerator,andlagtimeadjustmentfunctions.IIISchemeDesignFigure1isablockdiagramofaTL494-basedswitchingpoweramplifier.Thekeytothecircuitdesignisthedutycycleadjustmentcircuit,inputsignalcompressioncircuit,andMOSFETdrivecircuit.Figure1.TL494SwitchingPowerAmplifier3.1DutyCycleAdjustmentCircuitThedutycycleisthekeytoimprovingvoltageutilizationduringPWMsignalmodulation.BecauseTL494isanintegratedchipforswitchingpowersupply.Therefore,theminimumlagtimeissetto0.1Vinternally.Themaximumdutycycleisapproximately96%attheoutputofthetransmitterstage.Figure2showstheinputpartandpartofthecircuitforPWMsignalmodulation.Figure2.SignalInputsectionandPWMGeneratorInFigure2,whenC4=1000pFandR4=24k,theoperatingfrequencyisabout78kHz.IfthereisnodutycycleadjustmentcircuitD8,D17,R23,becausethecomparisonpointoftheinternaldelaytimecomparatoris0.1V.Sotheminimumon-timeisabout1.52s,andtheminimumdutycycleisD=1.52/1312%.Therefore,thevoltageutilizationratewilldecreaseduringPWM.IfD8,D17,andR23areused,a0.82VbiasvoltagewillbegeneratedatthepointEofthecapacitorC4forthesawtoothwavegeneration,andthestartingpointofthesawtoothwavewillbeincreasedfrom0Vto0.82V.Therefore,theon-timeisreducedto0.64s,andtheminimumdutycycleisreducedtoD=0.64/134.9%.Thiscansignificantlyimprovethevoltageutilization.Figure3istheoutputwaveformwhenthereisnodutycycleadjustmentcircuit.Figure4istheoutputwaveformwhenthereisadutycycleadjustmentcircuit.Figure3.OutputWaveformwithoutDutyCycleAdjustmentCircuitFigure4.OutputWaveformwithDutyCycleAdjustmentCircuit3.2InputSignalCompressionCircuitBecausetheinputsignalofthealarmhasalargevariationrange,itisnecessarytocompressthesignalwithalargeamplitudeaccordingtoacertainratio.InFigure2,R6,R16,D10,D11constitutetheinputsignalcompressioncircuit,anditskeyistousetheinputcharacteristicsofthediode.Figure5showsitsinputcharacteristics.Amongthem,D10andD11areconnectedinparalleltocompresssignalsinbothpositiveandnegativedirections.Figure5.OutputCharacteristicsofInputSignalCompressionCircuitThecompressionratiodependsonthevaluesofR6andR16.Thelargerthevalue,thelargerthecompressionratio.ByadjustingthevaluesofR6andR16,thechangerangeofthecompressedsignalissetto-0.82V~0.82V.Theamountofchangeis1.64V.WecanseeFigure4,thesawtoothvoltagevariationrangeis0.82V~3.25V.SotheoutputsignalvariationrangeoftheTL494internalerroramplifieris2.43V.ThegainoftheinternalerroramplifierdependsonR7andR20.Byadjustingtheirvalues,whentheamountofchangeofthecompressedsignalis1.64V,theoutputsignalchangerangeoftheinternalerroramplifiercanbesetto2.43V.Sincemostalarmsusetweeters,thebasswithalargeamplitudecanbegreatlyreduced.3.3MOSFETDriveCircuitP-channelMOSFETusesIRF9540.Ithasthecharacteristicsofthemaximumoperatingvoltageof100V,themaximumoperatingcurrentof18A,andsaturationwhenVGSvoltageis5V~15V.N-channelMOSFETusesIRF540.Ithasthecharacteristicsofthemaximumoperatingvoltageof100V,themaximumoperatingcurrentof27A,andsaturationwhenVGSvoltageis5V~15V.ThedrivingtransistorQ3adoptsNPNtypeC8050,andQ7adoptsPNPtypeC8550.Bothofthesetwodrivetransistorshavethecharacteristicsofamaximumoperatingvoltageof30V,amaximumoperatingcurrentof1A,andaVBEof12V.Figure6showstheMOSFETdrivecircuit.Figure6.MOSFETDriveCircuitFigure7showstheMOSFETdrivingprinciplewaveform.WhenthepulsevoltageatpointAislow,thecurrentflowsthroughthereversebiasoftheZenerdiodeD7andthetransistorQ3toformaVGSvoltage,andQHisturnedon.WhenthepulsevoltageatpointAishigh,thecurrentflowsthroughthereversebiasoftheZenerdiodeD9andthetransistorQ7toformaVGSvoltage,andQListurnedon.Inaddition,Figure7alsoshowsdetaileddrivingwaveforms.lWhenthepulsevoltageislow,thevoltageislowerthanVLtomakeQHturnon.lWhenthepulsevoltageishigh,itsvoltageishigherthanVHtomakeQLturnon.IttakesacertainamountoftimetochangefromVLtoVH.Atthistime,QHandQLwillbecutoffatthesametime.Therefore,thepulsechangeprocessisverysafe.Figure7.MOSFETDrivingPrincipleWaveformTheVGSofQHandQLisdeterminedbythefollowingformula:Where:VGSisthedrivingvoltageofMOSFET;VCisthepowersupplyvoltage;VDistheregulatedvoltageofZenertubesD7andD9(usuallythesameZenertubeisused);VBEisthecounterbreakdownvoltageofC8050andC8550.Figure8isthemeasureddrivewaveform.Whenthepulsevoltagechangesfromlowtohigh,thetimeforQHandQLtocutoffatthesametimeisabout100~300ns.Figure8.MeasuredDriveWaveform3.4WorkingPrincipleofOutputPartAsshowninFigure6,theoutputpartconsistsofQH,QLandL3,C8,C5,andC7.TheoutputvoltageistransmittedtotheloadafterfilteringhighfrequencywavesthroughL3andC8.Generally,anelectrolyticcapacitorisusedattheoutputend,butthiscircuitusesC5andC7toformahalfbridge,andthenconnectthemidpointtotheload.Theadvantageofthisconnectionmethodisthatthetwocapacitorsarenotonlythetransmissionpathoftheoutputsignal(thecapacitancevalueistheparallelvalueofthetwocapacitors),butalsohasafilteringeffectonthepowersupply(thecapacitancevalueistheseriesvalueofthetwocapacitorsatthistime),andreducetheinternalpressureofthecapacitorbyhalf.IVExperimentalResultsTable1showsthequiescentcurrentwhentheinputvoltageis35Vandtheoperatingfrequencyis78kHzwhenusingdifferentvoltageregulatordiodes.ItcanbeseenfromTable1:Whenthevoltageregulationvalueofthevoltagestabilizingdiodeis0V,5V,thedistancebetweentheconductionpointsofVLandVHistooclose,andtheconductiontimeistoolong,andthereisalargerstaticcurrent.Althoughthecurrentisrelativelysmallat20V,theMOSFETgeneratessevereheat.AscanbeseenfromTable1,whentheoperatingvoltageis35V,theselectionrangeoftheZenerdiodeis7.5V~15V.VConclusionTheexperimentalresultsshowthatthePWMsignalofTL494isusedforN-channelMOSFETandP-channelMOSFETtoformaswitchingpoweramplifierwithauniquedrivingmodetoovercometheshortcomingsofsimultaneousconductionoftwopowerMOSFETs.Notonlythat,italsohasidealdrivewaveforms,efficiencygreaterthan95%,goodbandwidthandlowprice,whichfullymeetstherequirementsofindustrialalarms.Andunder18Woutputpower,comparedwiththepoweramplifiercomposedofTDA7481,thereisnotmuchdifference,andthereisbasicallynoheatingphenomenon,andtheheatsinkcanberemoved.Ifyouwanttogetmoreoutputpower,youonlyneedtoincreasetheworkingvoltagetomorethan35VandfitaproperZenerdiode.FAQWhatisTL494?TL494isaPWMcontrollerICusedforpowerelectronicscircuits.Itcomprisesofon-chiptwoerroramplifiersanoscillatorwithadjustablefrequencyfeature,anoutputflip-flophavingpulsesteeringcontrol,andanoutputcontrolcircuitwithfeedback.WhatisthedetaileddescriptionofTL494?TheTL494deviceincorporatesallthefunctionsrequiredintheconstructionofapulse-width-modulation(PWM)controlcircuitonasinglechip.Designedprimarilyforpower-supplycontrol,thisdeviceofferstheflexibilitytotailorthepower-supplycontrolcircuitrytoaspecificapplication.TheTL494devicecontainstwoerroramplifiers,anon-chipadjustableoscillator,adead-timecontrol(DTC)comparator,apulse-steeringcontrolflip-flop,a5-V,5%-precisionregulator,andoutput-controlcircuits.Theerroramplifiersexhibitacommon-modevoltagerangefrom0.3VtoVCC2V.Thedead-timecontrolcomparatorhasafixedoffsetthatprovidesapproximately5%deadtime.Theon-chiposcillatorcanbebypassedbyterminatingRTtothereferenceoutputandprovidingasawtoothinputtoCT,oritcandrivethecommoncircuitsinsynchronousmultiple-railpowersupplies.Theuncommittedoutputtransistorsprovideeithercommon-emitteroremitter-followeroutputcapability.TheTL494deviceprovidesforpush-pullorsingle-endedoutputoperation,whichcanbeselectedthroughtheoutput-controlfunction.Thearchitectureofthisdeviceprohibitsthepossibilityofeitheroutputbeingpulsedtwiceduringpush-pulloperation.WhatareTL494productfeatures?CompletePWMPower-ControlCircuitryUncommittedOutputsfor200-mASinkorSourceCurrentOutputControlSelectsSingle-EndedorPush-PullOperationInternalCircuitryProhibitsDoublePulseatEitherOutputVariableDeadTimeProvidesControlOverTotalRangeWhatisPWMIC?TheTL494fixedfrequencyPWMControllercanbeusedforDCtoDCconversionregardlessofbuckorboosttopology....ThisICfeatureanoutputcontrolcircuit,aflipflop,adeadtimecomparator,twodifferenterroramplifiers,a5Vreferencevoltage,anoscillator,andaPWMcomparator.HowdoesPWMICwork?Asitsnamesuggests,pulsewidthmodulationspeedcontrolworksbydrivingthemotorwithaseriesofON-OFFpulsesandvaryingthedutycycle,thefractionoftimethattheoutputvoltageisONcomparedtowhenitisOFF,ofthepulseswhilekeepingthefrequencyconstant.WhichICisbetterforabuckconverter,TL494orUC3843?TheymainlydifferintypeofcontrolTL494=voltagemodecontrol(Oneloopcontrol).whileUC3843usescurrentmodecontrol(Nestedloopcontrol,withainner/fastcurrentloopandanotherouter/slowervoltageloop)Typicallyvoltagemodeareusedinmultipleoutputconverterswithgoodcross-regulation.CurrentmodewhenyouwanttoparallelmultipleconverterstomakeasingleconverterwithhighercurrentratingTL494isaverypopularIC.IfyouhavesimplerequirementsTL494isrecommendedHowdoIproperlysetthefeedbackpinonaTL494SMPSIC?Thefeedbackpinistheoutputofbotherroramplifiers,usedincomparingandadjustingtheoutputpulsewidthtotheDCcontrolvoltage.OnvariouscircuitsIhavelookedup,theop-ampconnectedtopins23areusedtosetthegainofthefeedbackloop,using2resistorswithoneresistorconnectingto2.5Vpotentialdivideron5Vreferencevoltage.Withtheotherconnectingtotheoutput(viasuitableisolation)Thegainappearstobesetat101,usinga51kfeedbackwith510ohmstothe2.5Vreference.Itisusedtocontrolthegainofthefeedbackvoltage.NoliteratureIhaveyetfound,givesanindicationonhowthisgainbeset,exceptagraphshowinganopenloopgainof1000,presumablythegainissetforthebeststability,althoughtherewillalsobeatimeconstant.WhyistherenofrequencycompensationrequiredinTIsTL494examplebuckregulatordesign(operationalamplifier,buckphase,shiftphase,margin,TL494,electronics)?ItsafixedfrequencyPWMcontrollerwithinternaldeadtimetimer.Frequencycompensationisnotrequired.Takealookatthedatasheet.HowtouseTL494?

IDescriptionTL494,isaswitchingpowersupplypulse-widthmodulation(PWM)controlchip.DesignedandintroducedbyTexasInstrumentsintheearly1980s,theTL494gainedimmediateandwidespreadmarketacceptance,especiallyinATXhalf-bridgepowersuppliesforPCcomputers.TL494PWMControllerTL494hasbecomeanindustry-standardchip,producedbymanyintegratedcircuitmanufacturers.Widelyusedinsingle-endedforwarddual-tube,half-bridge,andfull-bridgeswitchingpowersupplies.TL494hastwopackagingforms,SO-16andPDIP-16,tomeettherequirementsofdifferentoccasions.CatalogIDescriptionIITL494FeaturesIIITL494InternalStructure3.15VReferenceSource3.2SawtoothOscillator3.3OperationalAmplifier3.4Comparator3.5PulseTrigger3.6QuietTimeComparatorIVTL494WorkingPrincipleVConclusionFAQOrdering&QuantityIITL494FeaturesCompletePWMPower-ControlCircuitryUncommittedOutputsfor200-mASinkorSourceCurrentOutputControlSelectsSingle-EndedorPush-PullOperationInternalCircuitryProhibitsDoublePulseatEitherOutputVariableDeadTimeProvidesControlOverTotalRangeInternalRegulatorProvidesaStable5-VReferenceSupplyWith5%ToleranceCircuitArchitectureAllowsEasySynchronizationIIITL494InternalStructureFigure1.TL494InternalStructure3.15VReferenceSourceTL494hasabuilt-inreferencesourcebasedonthebandgapprinciple.Thestableoutputvoltageofthereferencesourceis5V.TheconditionisthattheVCCvoltageisabove7V.Theerroriswithin100mV.Theoutputpinofthereferencesourceisthe14thpinREF.3.2SawtoothOscillatorTL494hasabuilt-inlinearsawtoothwaveoscillator,whichgeneratesa0.3~3Vsawtoothwave.TheoscillationfrequencycanbeadjustedbyanexternalresistorRtandacapacitorCt.Itsoscillationfrequencyis:f=1/Rt*CtAmongthem:TheunitofRtisohm;TheunitofCtisfarad.ThesawtoothwavecanbemeasuredattheCtpin.3.3OperationalAmplifierTL494integratestwooperationalamplifierspoweredbyasinglepowersupply.Thetransferfunctionoftheoperationalamplifierisft(ni,inv)=A(ni-inv),butitcannotexceedtheoutputswing.Ingeneralpowercircuits,theop-ampisconnectedtooperateinaclosed-loop.Open-loopisusedinafewspecialcases,andthesignalisinputfromtheoutside.Theoutputterminalsofthetwooperationalamplifiersarerespectivelyconnectedtoadiode,whichisconnectedtotheCOMPpinandthesubsequentcircuit(comparator).Thisensuresthatthehigheroutputofthetwoop-ampsentersthesubsequentcircuit.3.4ComparatorThesignal(COMPpin)outputbytheoperationalamplifierentersthepositiveinputterminalofthecomparatorinsidethechipandiscomparedwiththesawtoothwaveenteringthenegativeinputterminal.WhenthesawtoothwaveishigherthanthesignaloftheCOMPpin,thecomparatoroutputs0,otherwise,itoutputs1.3.5PulseTriggerThepulseflip-flopturnsonatthefallingedgeofthesawtoothwaveandthecomparatoroutputs1.Thismakesoneofthetwooutputs(inturn)on-chiptransistorsareturnedonandcutoffwhenthecomparatoroutputdropstozero.3.6QuietTimeComparatorThedeadzonetimeissetbyDeadTimeControlpin4.Itusesacomparatortointerferewiththepulsetriggerandlimitthemaximumdutycycle.Theupperlimitofthedutycycleofeachendcanbesetupto45%,andtheupperlimitofthedutycycleisabout42%whentheoperatingfrequencyishigherthan150KHz.(WhentheDTCpinlevelissetto0).IVTL494WorkingPrincipleTL494isafixedfrequencypulsewidthmodulationcircuitwithabuilt-inlinearsawtoothoscillator.Theoscillationfrequencycanbeadjustedbyanexternalresistorandacapacitor.Theoscillationfrequencyisasfollows:ThewidthoftheoutputpulseisachievedbycomparingthepositivesawtoothvoltageonthecapacitorCTwiththeothertwocontrolsignals.ThepoweroutputtubesQ1andQ2arecontrolledbyaNORgate.Itwillbestrobedwhentheclocksignaloftheflip-flopislow.Thatis,itwillbegatedonlywhenthesawtoothvoltageisgreaterthanthecontrolsignal.Whenthecontrolsignalincreases,theoutputpulsewidthwilldecrease.Wecantakealookatthepicturebelow.Figure2.TL494PulseControlWaveform​Thecontrolsignalisinputfromtheoutsideoftheintegratedcircuit.Oneissenttothedeadtimecomparator,andoneissenttotheinputoftheerroramplifier.Thedead-timecomparatorhasaninputcompensationvoltageof120mV,whichlimitstheminimumoutputdead-timetoapproximately4%ofthesawtoothperiod.Whentheoutputterminalisgrounded,themaximumoutputdutycycleis96%.Whentheoutputterminalisconnectedtothereferencelevel,thedutycycleis48%.Whenthedeadtimecontrolinputisconnectedtoafixedvoltage(rangebetween0-3.3V),additionaldeadtimecanbegeneratedontheoutputpulse.Thepulsewidthmodulationcomparatorprovidesameansfortheerroramplifiertoadjusttheoutputpulsewidth.Whenthefeedbackvoltagechangesfrom0.5Vto3.5,theoutputpulsewidthdropstozerofromthemaximumon-percentagetimedeterminedbythedeadzone.Thetwoerroramplifiershaveacommonmodeinputrangefrom-0.3Vto(Vcc-2.0),whichmaybedetectedfromtheoutputvoltageandcurrentofthepowersupply.Theoutputoftheerroramplifierisalwaysatahighlevel.ItperformsORoperationwiththeinvertinginputterminalofthepulsewidthmodulator.Itisthiscircuitstructurethattheamplifiercandominatethecontrolloopwithminimaloutput.WhenthecomparatorCTdischarges,apositivepulseappearsattheoutputofthedeadzonecomparator,andtheflip-flopconstrainedbythepulseistimed.AtthesametimestoptheworkoftheoutputtubesQ1andQ2.Iftheoutputcontrolterminalisconnectedtothereferencevoltagesource,themodulatedpulseisalternatelyoutputtothetwooutputtransistors,andtheoutputfrequencyisequaltohalfofthepulseoscillator.Ifitworksinasingle-endedstateandthemaximumdutycycleislessthan50%,theoutputdrivesignalisobtainedfromthetransistorQ1orQ2respectively.Afeedbackwindinganddiodeoftheoutputtransformerprovidefeedbackvoltage.Insingle-endedoperatingmode,whenahigherdrivecurrentoutputisrequired,Q1andQ2canalsobeusedinparallel.Atthistime,theoutputmodecontrolpinneedstobegroundedtoturnofftheflip-flop.Inthisstate,theoutputpulsefrequencywillbeequaltotheoscillatorfrequency.VConclusionThisblogsummarizesthecharacteristics,internalstructureandworkingprincipleofTL494.AlthoughthearchitectureofTL494hasbeenproventobeextremelyexcellentinhistory,itisfacingeliminationinthehigh-endmarketduetoitsoldtechnology,lowfrequency,andlackofnewenergy-savingfeatures.However,itisworthmentioningthatTL494isstillwidelyadoptedinthelow-endandmid-endmarkets.FAQWhatisTL494?TL494isaPWMcontrollerICusedforpowerelectronicscircuits.Itcomprisesofon-chiptwoerroramplifiersanoscillatorwithadjustablefrequencyfeature,anoutputflip-flophavingpulsesteeringcontrol,andanoutputcontrolcircuitwithfeedback.WhatisthedetaileddescriptionofTL494?TheTL494deviceincorporatesallthefunctionsrequiredintheconstructionofapulse-width-modulation(PWM)controlcircuitonasinglechip.Designedprimarilyforpower-supplycontrol,thisdeviceofferstheflexibilitytotailorthepower-supplycontrolcircuitrytoaspecificapplication.TheTL494devicecontainstwoerroramplifiers,anon-chipadjustableoscillator,adead-timecontrol(DTC)comparator,apulse-steeringcontrolflip-flop,a5-V,5%-precisionregulator,andoutput-controlcircuits.Theerroramplifiersexhibitacommon-modevoltagerangefrom0.3VtoVCC2V.Thedead-timecontrolcomparatorhasafixedoffsetthatprovidesapproximately5%deadtime.Theon-chiposcillatorcanbebypassedbyterminatingRTtothereferenceoutputandprovidingasawtoothinputtoCT,oritcandrivethecommoncircuitsinsynchronousmultiple-railpowersupplies.Theuncommittedoutputtransistorsprovideeithercommon-emitteroremitter-followeroutputcapability.TheTL494deviceprovidesforpush-pullorsingle-endedoutputoperation,whichcanbeselectedthroughtheoutput-controlfunction.Thearchitectureofthisdeviceprohibitsthepossibilityofeitheroutputbeingpulsedtwiceduringpush-pulloperation.WhatareTL494productfeatures?CompletePWMPower-ControlCircuitryUncommittedOutputsfor200-mASinkorSourceCurrentOutputControlSelectsSingle-EndedorPush-PullOperationInternalCircuitryProhibitsDoublePulseatEitherOutputVariableDeadTimeProvidesControlOverTotalRangeWhatisPWMIC?TheTL494fixedfrequencyPWMControllercanbeusedforDCtoDCconversionregardlessofbuckorboosttopology....ThisICfeatureanoutputcontrolcircuit,aflipflop,adeadtimecomparator,twodifferenterroramplifiers,a5Vreferencevoltage,anoscillator,andaPWMcomparator.HowdoesPWMICwork?Asitsnamesuggests,pulsewidthmodulationspeedcontrolworksbydrivingthemotorwithaseriesofON-OFFpulsesandvaryingthedutycycle,thefractionoftimethattheoutputvoltageisONcomparedtowhenitisOFF,ofthepulseswhilekeepingthefrequencyconstant.WhichICisbetterforabuckconverter,TL494orUC3843?TheymainlydifferintypeofcontrolTL494=voltagemodecontrol(Oneloopcontrol).whileUC3843usescurrentmodecontrol(Nestedloopcontrol,withainner/fastcurrentloopandanotherouter/slowervoltageloop)Typicallyvoltagemodeareusedinmultipleoutputconverterswithgoodcross-regulation.CurrentmodewhenyouwanttoparallelmultipleconverterstomakeasingleconverterwithhighercurrentratingTL494isaverypopularIC.IfyouhavesimplerequirementsTL494isrecommendedHowdoIproperlysetthefeedbackpinonaTL494SMPSIC?Thefeedbackpinistheoutputofbotherroramplifiers,usedincomparingandadjustingtheoutputpulsewidthtotheDCcontrolvoltage.OnvariouscircuitsIhavelookedup,theop-ampconnectedtopins23areusedtosetthegainofthefeedbackloop,using2resistorswithoneresistorconnectingto2.5Vpotentialdivideron5Vreferencevoltage.Withtheotherconnectingtotheoutput(viasuitableisolation)Thegainappearstobesetat101,usinga51kfeedbackwith510ohmstothe2.5Vreference.Itisusedtocontrolthegainofthefeedbackvoltage.NoliteratureIhaveyetfound,givesanindicationonhowthisgainbeset,exceptagraphshowinganopenloopgainof1000,presumablythegainissetforthebeststability,althoughtherewillalsobeatimeconstant.WhyistherenofrequencycompensationrequiredinTIsTL494examplebuckregulatordesign(operationalamplifier,buckphase,shiftphase,margin,TL494,electronics)?ItsafixedfrequencyPWMcontrollerwithinternaldeadtimetimer.Frequencycompensationisnotrequired.Takealookatthedatasheet.HowtouseTL494?IDescriptionThisblogintroducesapulsewidthmodulationtechnologywithTL494asthecontrolcore.AnditisappliedtoDCmotorcontrolsystem.Theworkingprincipleofthesystem,therealizationcircuitandthestructureandspecificapplicationofthePWMcontrolchipareanalyzedindetail.CatalogIDescriptionIIWorkingPrincipleandRealizationofControlSystem2.1HowSystemWorks2.2SelectionofPWMControlChip2.3RealizationCircuitofSystemIIISimulationResultsIVConclusionFAQOrdering&QuantityIIWorkingPrincipleandRealizationofControlSystem2.1HowSystemWorksThebasicdesignideaofthiscontrolsystemistouseastep-downchoppercircuitasshowninFigure1.Figure1.Step-downChopperCircuitanditsWaveformInthefigure,theDCpowersupplyisUd,andtheloadisamotor(M).Whentheswitchingdevice(VT)istriggeredandturnedon,theDCvoltageisappliedtothemotorforadurationoft1.Whenthefieldswitchingdeviceisturnedoff,thevoltageontheloadiszeroandlastsfort2time.IfwedefinethedutycycleT=t1+t2,andthedutycyclek=t/T,thewaveformdiagramandtheprincipleoftheDCchoppercircuitareasfollows:Theaveragevalue(Uo)ofthesystemoutputvoltageis:Theeffectivevalue(U)ofitsoutputvoltageis:Thepulsewidthmodulation(PWM)workingmodeadoptedbythissystemkeepsTunchangedandt1changes.TheprincipleblockdiagramofthecontrolsystemisshowninFigure2.Figure2.ControlSystemBlockDiagramThepowersupplyinthissystemmakesthemotorworkthroughthepowerdrivecircuit.Theon-offofthepowerdrivecircuitiscontrolledbythePWMcontrolchip.ThesystemsamplesthemotorcurrentfeedsitbacktothePWMcontrolchipandcomparesitwiththecurrentvalueofthecurrentcomparisoncircuit.TocontrolthePWMsignaloutputtoachievethepurposeofspeedregulation.ThesystemalsosamplesthepowersupplyvoltageandfeedsitbacktothePWMcontrolchip.Inthisway,itcanbecomparedwiththevoltagevalueofthevoltagecomparisoncircuittocontrolthePWMsignaloutputandachievetheeffectofUndervoltageprotection.WeusethecommonBUCKcircuitforthepowerdrivecircuitandPowerMOSFETfortheswitchtube.Theregulationofitsoutputvoltageisrealizedbycontrollingtheturn-ontimeofthedevice.Consideringtheinfluenceoftheinductanceofthemotor,theoutputcurrentisrelativelystableandtheenergyconsumptionislow.2.2SelectionofPWMControlChipInthecontrolcircuitofthemotorPWMcontrolsystem,theTL494chipisselected.TL494chiphasthefeaturesofstronganti-interferenceability,simplestructure,highreliabilityandlowprice.TheinternalcircuitofTL494(Figure3)consistsofthefollowingparts:Thereferencevoltagegeneratingcircuit;Oscillationcircuit;Intermittentadjustmentcircuit;Twoerroramplifiers;Pulsewidthmodulationcomparator;Outputcircuit;...Figure3.TL494InternalStructureAmongthem:Forpins1and2,theyarethenon-invertingandinvertinginputterminalsoferroramplifier1.Forpin3,itisphasecorrectionandgainscontrol.Forpin4,itisanintermittentperiodofconditioning,andthecut-offtimecanbechangedfrom2%to100%whenavoltageof0~3.3Visappliedtoit.Forpins5and6,theyareusedtoconnectexternaloscillationresistorRTandoscillationcapacitorCTtodeterminethefrequencyfoscofthesawtoothwavegeneratedbytheoscillator.Where:ThevaluerangeofRTandCT:RT=5~100kQ,CT=0.001~0.1F.Pin7isthegroundterminal;Forpins8,9and11,10,theyarethecollectorandemitterofthetwofinaloutputtransistorsinsideTL494;For12feet,itisthepowersupplyterminal;Forpin13,itistheoutputcontrolterminal.Whenthispinisgrounded,itisaparallelsingle-endedoutputmode.Whenpin14isconnected,itisapush-pulloutputmode;For14feet,itisthe5Vreferencevoltageoutputterminal,themaximumoutputcurrentis10mA;For15and16pins,theyaretheinvertingandnon-invertinginputterminalsoftheerroramplifier2.2.3RealizationCircuitofSystemTheconcreterealizationcircuitofthiscontrolsystemisshowninFig.4.Thesystemusescurrentnegativefeedbacktotrackthespeedofthemotor.Atthesametime,throughthenegativefeedbackofthevoltageofthepowersupply,thesystemhasthefunctionofundervoltageprotection.Figure4.SystemImplementationCircuitThemotorcurrentisdetectedandfedbacktopin1oftheerroramplifier1oftheTL494,comparedwiththecurrentreferencesignalofpin2tocontrolthePWMoutputofTL494.Soastorealizethefunctionofregulatingthespeedofthemotor.Byadjustingtheresistancevalueoftheadjustableresistor(RES1).Thatis,changethesizeofthesetcurrentreferencesignaltoadjustthedutycycleofthePWMoutputsignal.Soastoachievethepurposeofadjustingthemotorspeed.Bysamplingthevoltageofthepowersupply,itisfedbacktopin15oftheinternalerroramplifier2ofTI494.Thencomparewiththevoltagereferencesignalofpin16tocontrolthePWMoutputofTL494.Soastorealizetheundervoltageprotectionfunctionofthesystem.ThesystempowerisdrivenbyPowerMOSFET,whichhasahighinputimpedanceandcanbedirectlydrivenbyatransistor.Pin13ofTI494isusedtocontroltheoutputmode.Inthissystem,choosetoinputthisendaslowlevel.Atthistime,theflip-flopsQ1andQ2intheTL494donotwork,thetwooutputsarethesame,thefrequencyisthesameastheoscillatorfrequency,andthemaximumdutycycleis98%.IIISimulationResultsInordertoverifytheeffectivenessofthesystem,wecansimulatethecircuitoftheabove-mentionedDCmotorcontrolsystembasedonPWMtechnologybycomputer.WesetthesystemspowersupplyvoltageUcc=12V,DCmotorratedparameters:Un=12V,In=15A,4poles,armatureresistanceRa=0.21Q,momentofinertiaJ=0.57kg㎡.ThroughchangingtheadjustableresistanceRES1ofthecontrolcircuittorealizethedifferentdutyratioofthesystemoutput.Whentheoutputdutyratiois0.2,0.65/0.8,thevoltageandcurrentwaveformsofthemotorareshowninFigure5.Figure5.MotorVoltageandCurrentWaveformItcanbeseenfromFigure5thatwhenoutputtingdifferentdutyratios,thevoltageandcurrentwaveformsofthemotorarestable,whichisconducivetothelong-termstableoperationofthemotor.ThisshowsthattheTL494-basedPWMcontroltechnologyintroducedinthisarticleisfeasibleinpracticalapplicationsandrunsstably.IVConclusionThisblogsummarizesaPWMcontroltechnologybasedontheTL494chip.Thesimulationresultsshowthatthesystemhasasimplestructure,lowenergyconsumption,andstableoperation.AndthecharacteristicsoftheTL494chiphavebeenfullyutilizedsothatthesystemhastheadvantagesofundervoltageprotection.FAQWhatisTL494?TL494isaPWMcontrollerICusedforpowerelectronicscircuits.Itcomprisesofon-chiptwoerroramplifiersanoscillatorwithadjustablefrequencyfeature,anoutputflip-flophavingpulsesteeringcontrol,andanoutputcontrolcircuitwithfeedback.WhatisthedetaileddescriptionofTL494?TheTL494deviceincorporatesallthefunctionsrequiredintheconstructionofapulse-width-modulation(PWM)controlcircuitonasinglechip.Designedprimarilyforpower-supplycontrol,thisdeviceofferstheflexibilitytotailorthepower-supplycontrolcircuitrytoaspecificapplication.TheTL494devicecontainstwoerroramplifiers,anon-chipadjustableoscillator,adead-timecontrol(DTC)comparator,apulse-steeringcontrolflip-flop,a5-V,5%-precisionregulator,andoutput-controlcircuits.Theerroramplifiersexhibitacommon-modevoltagerangefrom0.3VtoVCC2V.Thedead-timecontrolcomparatorhasafixedoffsetthatprovidesapproximately5%deadtime.Theon-chiposcillatorcanbebypassedbyterminatingRTtothereferenceoutputandprovidingasawtoothinputtoCT,oritcandrivethecommoncircuitsinsynchronousmultiple-railpowersupplies.Theuncommittedoutputtransistorsprovideeithercommon-emitteroremitter-followeroutputcapability.TheTL494deviceprovidesforpush-pullorsingle-endedoutputoperation,whichcanbeselectedthroughtheoutput-controlfunction.Thearchitectureofthisdeviceprohibitsthepossibilityofeitheroutputbeingpulsedtwiceduringpush-pulloperation.WhatareTL494productfeatures?CompletePWMPower-ControlCircuitryUncommittedOutputsfor200-mASinkorSourceCurrentOutputControlSelectsSingle-EndedorPush-PullOperationInternalCircuitryProhibitsDoublePulseatEitherOutputVariableDeadTimeProvidesControlOverTotalRangeWhatisPWMIC?TheTL494fixedfrequencyPWMControllercanbeusedforDCtoDCconversionregardlessofbuckorboosttopology....ThisICfeatureanoutputcontrolcircuit,aflipflop,adeadtimecomparator,twodifferenterroramplifiers,a5Vreferencevoltage,anoscillator,andaPWMcomparator.HowdoesPWMICwork?Asitsnamesuggests,pulsewidthmodulationspeedcontrolworksbydrivingthemotorwithaseriesofON-OFFpulsesandvaryingthedutycycle,thefractionoftimethattheoutputvoltageisONcomparedtowhenitisOFF,ofthepulseswhilekeepingthefrequencyconstant.WhichICisbetterforabuckconverter,TL494orUC3843?TheymainlydifferintypeofcontrolTL494=voltagemodecontrol(Oneloopcontrol).whileUC3843usescurrentmodecontrol(Nestedloopcontrol,withainner/fastcurrentloopandanotherouter/slowervoltageloop)Typicallyvoltagemodeareusedinmultipleoutputconverterswithgoodcross-regulation.CurrentmodewhenyouwanttoparallelmultipleconverterstomakeasingleconverterwithhighercurrentratingTL494isaverypopularIC.IfyouhavesimplerequirementsTL494isrecommendedHowdoIproperlysetthefeedbackpinonaTL494SMPSIC?Thefeedbackpinistheoutputofbotherroramplifiers,usedincomparingandadjustingtheoutputpulsewidthtotheDCcontrolvoltage.OnvariouscircuitsIhavelookedup,theop-ampconnectedtopins23areusedtosetthegainofthefeedbackloop,using2resistorswithoneresistorconnectingto2.5Vpotentialdivideron5Vreferencevoltage.Withtheotherconnectingtotheoutput(viasuitableisolation)Thegainappearstobesetat101,usinga51kfeedbackwith510ohmstothe2.5Vreference.Itisusedtocontrolthegainofthefeedbackvoltage.NoliteratureIhaveyetfound,givesanindicationonhowthisgainbeset,exceptagraphshowinganopenloopgainof1000,presumablythegainissetforthebeststability,althoughtherewillalsobeatimeconstant.WhyistherenofrequencycompensationrequiredinTIsTL494examplebuckregulatordesign(operationalamplifier,buckphase,shiftphase,margin,TL494,electronics)?ItsafixedfrequencyPWMcontrollerwithinternaldeadtimetimer.Frequencycompensationisnotrequired.Takealookatthedatasheet.HowtouseTL494?

访客,请您发表评论:

Powered By Tkool Electronics

Copyright Your WebSite.sitemap