Tkool Electronics

IIntroduction1.1WhatisLM2596?TheLM2596seriesofregulatorsaremonolithicintegratedcircuits.Thesecircuitscanprovidealltheactivefunctionsforastep-down(buck)switchingregulator,capableofdrivinga3-Aloadwithexcellentlineandloadregulation.Thesedevicesarealsoavailableinfixedoutputvoltagesof3.3V,5V,12V,andanadjustableoutputversion.1.2WhatisLM2577?TheLM2577ismonolithicintegratedcircuitthatprovideallofthepowerandcontrolfunctionsforstep-up(boost),flyback,andforwardconverterswitchingregulators.Thedeviceisavailableinthreedifferentoutputvoltageversions:12V,15V,andadjustable.Figure1.LM2596CatalogIIntroduction1.1WhatisLM2596?1.2WhatisLM2577?IICircuitStructure2.1PowerTransformer2.2RectifierCircuit2.3FilterCircuit2.4VoltageRegulatorCircuitIIIPowerSupplyOverview3.1IntroductiontoPowerSupply3.2Comparisonof2TypesofPowerSupplies3.3ThePowerSupplySelectionIVPerformanceIndicators4.1WorkingMode4.2PCBandPrintedCircuitBoardFAQOrdering&QuantityIICircuitStructure2.1PowerTransformerWeneedDCpower.Byadoptingastep-downtransformer,thegridACvoltage220VistransformedintoacompositeACpowersource.AfterthisACvoltageisrectified,theDCvoltagerequiredbytheelectronicdevicecanbeobtained.2.2RectifierCircuitUseasingle-phasebridgerectifiercircuit.Byusingthiscircuit,itispossibletoconvert50Hzalternatingcurrentwithvaryingdirectionandmagnitude.Here,weneedtotransformitintodirectcurrentinthesamedirectionbutstillpulsatinginmagnitude.Sowhatarethebenefitsofdoingthis?Theyareasfollows:Highervoltage;Smallerripplevoltage;MakethemaximumreverseACcurrentthattherectifierdiodebearsflow;Highutilizationrateofthetransformer.2.3FilterCircuitWecanusethepropertiesofthecapacitorC(theenergystorageelement).Thatis,thevoltageacrossthecapacitorcannotchangesuddenly.Inthisway,byusinganRCfiltercircuittofilteroutmostofthepulsatingcomponentsoutputbytherectifiercircuit,wecangetarelativelysmoothdirectcurrent.2.4VoltageRegulatorCircuitTherectifiedandfilteredDCvoltagedoesnotchangewiththedisturbanceoftheACpowergridandload.Here,duetotheadoptionofalargenumberofhigh-performanceintegratedmodules,thecircuitstructureissimplified.Theresultofthisisthat,thekeypartofthepowerconversionproblemishighlighted.Throughharddebuggingandtesting,theoverallcircuitperformanceisgoodandthedesignpurposecanbebetterachieved.Asavariablevoltagestabilizerorcurrentstabilizersource,thispowersupplycannotonlybeusedalone,butalsocanbeplacedinotherelectronicequipment.IIIPowerSupplyOverview3.1IntroductiontoPowerSupplyThepowersupplyistheheartofelectronicequipment.Thequalityofthepowersupplydirectlyaffectsthereliabilityofelectronicequipment.Since60%ofthefailuresofelectronicequipmentcomefromthepowersupply,asthebasiccomponentoftheelectronicequipment,thepowersupplyhasreceivedmoreandmoreattention.Thepowersuppliesusedinmodernelectronicequipmentroughlyfallinto2categories:linearregulatedpowersuppliesandswitchingregulatedpowersupplies.3.2Comparisonof2TypesofPowerSupplies3.2.1LinearRegulatedPowerSupplyTheso-calledlinearregulatedpowersupplyhasthefollowingmeaning.Theregulatortubeintheregulatedpowersupplycircuitworksinthelinearamplificationarea.Afterthe220V,50Hzpowerfrequencyvoltageissteppeddownbyalineartransformer,itisrectified,filtered,andstabilizedtooutputaDCvoltage.Advantages:Highpowersupplystabilityandloadstability;Smalloutputripplevoltage;Fasttransientresponsespeed;Thelinestructureissimpleandeasytomaintain;Noswitchinterference.Disadvantages:Highpowerconsumptionandlowefficiency,theefficiencyisgenerallyonly35~60%;Bigvolume,heavyweight,andcannotbeminiaturized;Musthavealargercapacityfiltercapacitor.Amongthem,thelowswitchingefficiencyisanimportantshortcoming,causingaseriouswasteofresources.Inthiscontext,theswitchingpowersupplycameintobeing.AnyelectronicdeviceneedsaDCpowersupplytosupplythecircuittowork.Especiallyelectronicproductspoweredbythepowergrid.Nowthattherearegridvoltagefluctuationsandchangesintheworkingstateofthecircuit,weneedtofindwaystoadapt.Intermsofpowersupply,itisnecessarytohaveaDCregulatedpowersupplythatadaptstothischange.Withthedevelopmentofelectronictechnology,peoplehaveenteredin-depthresearchonhowtoimprovethepowerconversionefficiency.Thusenhancingtheadaptabilitytothepowergrid,reducethevolume,andreducetheweight.Sotheswitchingpowersupplycameintobeing.3.2.2SwitchingRegulatedPowerSupplyAdvantage:Highexchangeefficiency.Theregulatortubeoftheswitchingregulatedpowersupplyworksintheswitchstate.Itsmainadvantageisthattheexchangeefficiencycanbeashighas70-95%.Lowpowerconsumptionandhighefficiency.Undertheexcitationoftheexcitationsignal,thetransistorsalternatelyworkintheon-offswitchingstate.Atthesametime,theswitchingspeedisveryfast,andthefrequencyisgenerallyabout50kHz.Thepowerconsumptionoftheswitchingtransistorisverysmall,andtheefficiencycanbeimprovedtoover80%.Smallsizeandlightweight.Nobulkypowerfrequencytransformerisusedintheswitchingpowersupply.Afterthepowerdissipationontheadjustmenttubeisgreatlyreduced,alargerheatsinkisomitted.Widevoltageregulationrange.Theoutputvoltageoftheswitchingpowersupplyisadjustedbythedutycycleoftheexcitationsignal.Thechangeoftheinputsignalvoltagecanbecontrolledbyfrequencymodulationorwidthmodulation.Whenthepowerfrequencygridvoltagechangesgreatly,itcanstillensureaneffectiveandstableoutputvoltage.Therearealsomanymethodsforswitchingregulatedpowersuppliestoachievevoltageregulation.Accordingtoactualapplicationrequirements,wecanchoosedifferenttypesofswitchingregulatedpowersupplies.Disadvantages:Thecircuitismorecomplicated.Theoutputripplevoltageishighandthetransientresponseispoor.Thereisalsomoreseriousswitchinginterference.Nowadays,difficultiesinfurtherpromotionandapplicationofswitchingregulatedpowersuppliesareasfollows:First,theproductiontechnologyisdifficult;Second,themaintenanceistroublesome;Last,thecostishigh.Highrequirementsforcircuitcomponents.Theefficiencyoftheswitchingpowersupplyisproportionaltotheswitchingspeedoftheswitchingtube.Aswitchingtransformerisusedintheswitchingpowersupply.Theswitchingtransformercanbeinputbyonegroup,andgetmultipleoutputswithdifferentpolarityandsize.Tofurtherimproveefficiency,theoperatingfrequencyofthepowersupplymustbeincreased.However,whenthefrequencyisincreased,therequirementswouldhavebeenfurtherimproved.Affectthenormaloperationofnearbyelectronicequipment.Thestabilizedpowersupplyhasthedualfunctionsofvoltagestabilizationandfiltering.Therefore,theserieslinearregulatedpowersupplydoesnotproduceswitchinginterference.Andtheripplevoltageoutputcanalsobesmall.However,whentheswitchtubeintheswitchingregulatedpowersupplyisintheon-offstate,thingshavechanged.Itsalternatingvoltageandoutputcurrentwillproducestrongspikeinterferenceandresonanceinterferencethroughthecomponents.Theseinterferenceswillenterthemainsgridandaffectthenormaloperationofnearbyelectronicdevices.3.3ThePowerSupplySelectionAccordingtothecomparison,wechoosealinearpowersupply.MostelectroniccircuitsrequireaDCpowersourcetowork.TheDCpowersupplyistheguaranteeoftheworkingstateofelectroniccircuitsandtheproviderofenergy.Butmostfixedpowersuppliesallowtheoutputvoltagetovarywithin10%,whichstillcannotmeettherequirementsofsomecircuits.Sowedesignedapowersupplywithadjustableoutputorallowingalargerrangeofvariation.Theperformanceofthispowersupply:Ontheonehand,itisdesignedandmadewithallintegratedcircuitsandhasthefunctionofautomaticshort-circuitandoverloadprotection.Ontheotherhand,ithashighaccuracy,stablecurrentperformance,andcontinuousadjustment.Besides,itcanbeusedformultipleexperimentalpower.IVPerformanceIndicators4.1WorkingModeTheoutputvoltagecanbeadjustedandchangedthroughoutthecurrentrange.ThispowersupplycanalsoworkinaDCsourcemodewithinacertainrange.Letsintroducetheworkproducedbyanetizen.First,the18VACoutputfromthetransformerisconvertedinto20VDCthrougharectifierfiltercircuit.Asshownbelow.Figure2.RectifierFilterCircuitAndthentheadjustablestep-downregulatorcircuitcomposedofLM2596-ADJoutputsavoltageof1.25to19V.Thecircuitisshowninthefigurebelow.AdjustingRW1canchangetheoutputvoltage,andincreasingtheinputvoltagecanincreasetheoutput.Themaximumsupplyvoltageis45V.Figure3.LM2596AdjustableStep-downRegulatorCircuitThenthroughthestep-upvoltageregulatorcircuitcomposedofLM2577,theoutputvoltageofLM2596isincreasedby1to11times.Thatistosay,ifRW1isadjustedtomakeLM2596output3V,RW2inLM2577isadjustedtooutputvoltageof3to33V.Thefigureofthecircuitisshownbelow.ChangingtheresistanceofRW2andtheinputvoltageofLM2577canoutputavoltageof3to100V.Figure4.LM1577Step-upVoltageRegulatorCircuitUndertheconditionoftheinputvoltageof220V,50HZandthevoltagerangeof+15%~-20%ofthemodifiedregulatedpowersupply:Theadjustablerangeofoutputvoltageis+1.25V~inputvoltage;Themaximumoutputcurrentis5A;Thevoltageadjustmentrateisnotmorethan0.5%;Theloadadjustmentrateisnotmorethan2%;Thehighestinputvoltageandoutputripplevoltageatfullloadarenotmorethan10mV.DC-DCconverter,undertheconditionofinputvoltage+2.6V~+18V:Theoutputvoltageisadjustablefrom+2.6Vto100V;Themaximumoutputcurrentis3A;Voltageregulationrateisnotmorethan1.5%,theloadregulationrateisnotmorethan3%;Thepowersupplyalsohasover-currentandshort-circuitprotectionfunctions.Aftereliminatingtheshort-circuitfault,itwillautomaticallyreturntothenormalstate.Anti-reverseconnection,diodesformavoltageindicator.4.2PCBandPrintedCircuitBoardThepicturesbelowarethePCBdrawnbyanetizenandtheprintedcircuitboard.Figure5.PCBandPrintedCircuitBoardFAQWhatislm2596?TheLM2596seriesofregulatorsaremonolithicintegratedcircuitsthatprovidealltheactivefunctionsforastep-down(buck)switchingregulator,capableofdrivinga3-Aloadwithexcellentlineandloadregulation.WhatisthedifferencebetweenLM2596andLM2595?LM2596:Thehighestoutputcurrentis3A,1PIN-VOUT,2PIN-VIN;LM2595:Thehighestoutputcurrentis1A,1PIN-VIN,2PIN-VOUT.WhatisthevoltageofeachpinofLM2596-12?Whatisthefunctionofeachpin?Pin1istheinputterminal,12V,thenormalworkingvoltagerangeshouldbe14V~37Vundertheoutputcondition;pin2istheoutputterminal,hereisthehigh-frequencyoscillationoutput,notDCvoltage,sothereisnodefinitevoltage;pin3isgrounded,0V;Pin5istheenablecontrolterminal,LM2596worksnormallywhenconnectedtoalowlevel,andnooutputisturnedoffwhenconnectedtoahighlevel,usuallydirectlygrounded;Pin4isthefeedbackcontrolsignalinputterminal,connectedtothemiddleconnectionpointoftheproportionalresistor,wherethevoltageItisproportionaltotheactualoutput.CanLM2596outputnegativevoltage?LM2596canoutputnegativevoltage.LM2596hasdifferentapplicationcircuits,whichcanoutputpositivevoltageornegativevoltage,butithasnoboostfunction,andtheabsolutevalueofitsoutputvoltagemustbelessthantheabsolutevalueoftheinputvoltage.Inthecircuitwithadjustableoutputvoltageoflm2596,cantheoutputvoltagebegreaterthantheinputvoltage?TheLM2596switchingvoltageregulatorisastep-downpowermanagementmonolithicintegratedcircuit,whichcanoutput3Adrivecurrentandhasgoodlinearityandloadregulationcharacteristics.Theoutputvoltagewillnotbegreaterthantheinputvoltage.Iftheoutputvoltageisgreaterthantheinputvoltage,itisbesttouseastep-uppowerchip.SuchasXL6009,VT1050.

STPSC4H065D-ST

IIntroduction1.1WhatisLM2596?TheLM2596seriesofregulatorsaremonolithicintegratedcircuits.Thesecircuitscanprovidealltheactivefunctionsforastep-down(buck)switchingregulator,capableofdrivinga3-Aloadwithexcellentlineandloadregulation.Thesedevicesarealsoavailableinfixedoutputvoltagesof3.3V,5V,12V,andanadjustableoutputversion.1.2WhatisLM2577?TheLM2577ismonolithicintegratedcircuitthatprovideallofthepowerandcontrolfunctionsforstep-up(boost),flyback,andforwardconverterswitchingregulators.Thedeviceisavailableinthreedifferentoutputvoltageversions:12V,15V,andadjustable.Figure1.LM2596CatalogIIntroduction1.1WhatisLM2596?1.2WhatisLM2577?IICircuitStructure2.1PowerTransformer2.2RectifierCircuit2.3FilterCircuit2.4VoltageRegulatorCircuitIIIPowerSupplyOverview3.1IntroductiontoPowerSupply3.2Comparisonof2TypesofPowerSupplies3.3ThePowerSupplySelectionIVPerformanceIndicators4.1WorkingMode4.2PCBandPrintedCircuitBoardFAQOrdering&QuantityIICircuitStructure2.1PowerTransformerWeneedDCpower.Byadoptingastep-downtransformer,thegridACvoltage220VistransformedintoacompositeACpowersource.AfterthisACvoltageisrectified,theDCvoltagerequiredbytheelectronicdevicecanbeobtained.2.2RectifierCircuitUseasingle-phasebridgerectifiercircuit.Byusingthiscircuit,itispossibletoconvert50Hzalternatingcurrentwithvaryingdirectionandmagnitude.Here,weneedtotransformitintodirectcurrentinthesamedirectionbutstillpulsatinginmagnitude.Sowhatarethebenefitsofdoingthis?Theyareasfollows:Highervoltage;Smallerripplevoltage;MakethemaximumreverseACcurrentthattherectifierdiodebearsflow;Highutilizationrateofthetransformer.2.3FilterCircuitWecanusethepropertiesofthecapacitorC(theenergystorageelement).Thatis,thevoltageacrossthecapacitorcannotchangesuddenly.Inthisway,byusinganRCfiltercircuittofilteroutmostofthepulsatingcomponentsoutputbytherectifiercircuit,wecangetarelativelysmoothdirectcurrent.2.4VoltageRegulatorCircuitTherectifiedandfilteredDCvoltagedoesnotchangewiththedisturbanceoftheACpowergridandload.Here,duetotheadoptionofalargenumberofhigh-performanceintegratedmodules,thecircuitstructureissimplified.Theresultofthisisthat,thekeypartofthepowerconversionproblemishighlighted.Throughharddebuggingandtesting,theoverallcircuitperformanceisgoodandthedesignpurposecanbebetterachieved.Asavariablevoltagestabilizerorcurrentstabilizersource,thispowersupplycannotonlybeusedalone,butalsocanbeplacedinotherelectronicequipment.IIIPowerSupplyOverview3.1IntroductiontoPowerSupplyThepowersupplyistheheartofelectronicequipment.Thequalityofthepowersupplydirectlyaffectsthereliabilityofelectronicequipment.Since60%ofthefailuresofelectronicequipmentcomefromthepowersupply,asthebasiccomponentoftheelectronicequipment,thepowersupplyhasreceivedmoreandmoreattention.Thepowersuppliesusedinmodernelectronicequipmentroughlyfallinto2categories:linearregulatedpowersuppliesandswitchingregulatedpowersupplies.3.2Comparisonof2TypesofPowerSupplies3.2.1LinearRegulatedPowerSupplyTheso-calledlinearregulatedpowersupplyhasthefollowingmeaning.Theregulatortubeintheregulatedpowersupplycircuitworksinthelinearamplificationarea.Afterthe220V,50Hzpowerfrequencyvoltageissteppeddownbyalineartransformer,itisrectified,filtered,andstabilizedtooutputaDCvoltage.Advantages:Highpowersupplystabilityandloadstability;Smalloutputripplevoltage;Fasttransientresponsespeed;Thelinestructureissimpleandeasytomaintain;Noswitchinterference.Disadvantages:Highpowerconsumptionandlowefficiency,theefficiencyisgenerallyonly35~60%;Bigvolume,heavyweight,andcannotbeminiaturized;Musthavealargercapacityfiltercapacitor.Amongthem,thelowswitchingefficiencyisanimportantshortcoming,causingaseriouswasteofresources.Inthiscontext,theswitchingpowersupplycameintobeing.AnyelectronicdeviceneedsaDCpowersupplytosupplythecircuittowork.Especiallyelectronicproductspoweredbythepowergrid.Nowthattherearegridvoltagefluctuationsandchangesintheworkingstateofthecircuit,weneedtofindwaystoadapt.Intermsofpowersupply,itisnecessarytohaveaDCregulatedpowersupplythatadaptstothischange.Withthedevelopmentofelectronictechnology,peoplehaveenteredin-depthresearchonhowtoimprovethepowerconversionefficiency.Thusenhancingtheadaptabilitytothepowergrid,reducethevolume,andreducetheweight.Sotheswitchingpowersupplycameintobeing.3.2.2SwitchingRegulatedPowerSupplyAdvantage:Highexchangeefficiency.Theregulatortubeoftheswitchingregulatedpowersupplyworksintheswitchstate.Itsmainadvantageisthattheexchangeefficiencycanbeashighas70-95%.Lowpowerconsumptionandhighefficiency.Undertheexcitationoftheexcitationsignal,thetransistorsalternatelyworkintheon-offswitchingstate.Atthesametime,theswitchingspeedisveryfast,andthefrequencyisgenerallyabout50kHz.Thepowerconsumptionoftheswitchingtransistorisverysmall,andtheefficiencycanbeimprovedtoover80%.Smallsizeandlightweight.Nobulkypowerfrequencytransformerisusedintheswitchingpowersupply.Afterthepowerdissipationontheadjustmenttubeisgreatlyreduced,alargerheatsinkisomitted.Widevoltageregulationrange.Theoutputvoltageoftheswitchingpowersupplyisadjustedbythedutycycleoftheexcitationsignal.Thechangeoftheinputsignalvoltagecanbecontrolledbyfrequencymodulationorwidthmodulation.Whenthepowerfrequencygridvoltagechangesgreatly,itcanstillensureaneffectiveandstableoutputvoltage.Therearealsomanymethodsforswitchingregulatedpowersuppliestoachievevoltageregulation.Accordingtoactualapplicationrequirements,wecanchoosedifferenttypesofswitchingregulatedpowersupplies.Disadvantages:Thecircuitismorecomplicated.Theoutputripplevoltageishighandthetransientresponseispoor.Thereisalsomoreseriousswitchinginterference.Nowadays,difficultiesinfurtherpromotionandapplicationofswitchingregulatedpowersuppliesareasfollows:First,theproductiontechnologyisdifficult;Second,themaintenanceistroublesome;Last,thecostishigh.Highrequirementsforcircuitcomponents.Theefficiencyoftheswitchingpowersupplyisproportionaltotheswitchingspeedoftheswitchingtube.Aswitchingtransformerisusedintheswitchingpowersupply.Theswitchingtransformercanbeinputbyonegroup,andgetmultipleoutputswithdifferentpolarityandsize.Tofurtherimproveefficiency,theoperatingfrequencyofthepowersupplymustbeincreased.However,whenthefrequencyisincreased,therequirementswouldhavebeenfurtherimproved.Affectthenormaloperationofnearbyelectronicequipment.Thestabilizedpowersupplyhasthedualfunctionsofvoltagestabilizationandfiltering.Therefore,theserieslinearregulatedpowersupplydoesnotproduceswitchinginterference.Andtheripplevoltageoutputcanalsobesmall.However,whentheswitchtubeintheswitchingregulatedpowersupplyisintheon-offstate,thingshavechanged.Itsalternatingvoltageandoutputcurrentwillproducestrongspikeinterferenceandresonanceinterferencethroughthecomponents.Theseinterferenceswillenterthemainsgridandaffectthenormaloperationofnearbyelectronicdevices.3.3ThePowerSupplySelectionAccordingtothecomparison,wechoosealinearpowersupply.MostelectroniccircuitsrequireaDCpowersourcetowork.TheDCpowersupplyistheguaranteeoftheworkingstateofelectroniccircuitsandtheproviderofenergy.Butmostfixedpowersuppliesallowtheoutputvoltagetovarywithin10%,whichstillcannotmeettherequirementsofsomecircuits.Sowedesignedapowersupplywithadjustableoutputorallowingalargerrangeofvariation.Theperformanceofthispowersupply:Ontheonehand,itisdesignedandmadewithallintegratedcircuitsandhasthefunctionofautomaticshort-circuitandoverloadprotection.Ontheotherhand,ithashighaccuracy,stablecurrentperformance,andcontinuousadjustment.Besides,itcanbeusedformultipleexperimentalpower.IVPerformanceIndicators4.1WorkingModeTheoutputvoltagecanbeadjustedandchangedthroughoutthecurrentrange.ThispowersupplycanalsoworkinaDCsourcemodewithinacertainrange.Letsintroducetheworkproducedbyanetizen.First,the18VACoutputfromthetransformerisconvertedinto20VDCthrougharectifierfiltercircuit.Asshownbelow.Figure2.RectifierFilterCircuitAndthentheadjustablestep-downregulatorcircuitcomposedofLM2596-ADJoutputsavoltageof1.25to19V.Thecircuitisshowninthefigurebelow.AdjustingRW1canchangetheoutputvoltage,andincreasingtheinputvoltagecanincreasetheoutput.Themaximumsupplyvoltageis45V.Figure3.LM2596AdjustableStep-downRegulatorCircuitThenthroughthestep-upvoltageregulatorcircuitcomposedofLM2577,theoutputvoltageofLM2596isincreasedby1to11times.Thatistosay,ifRW1isadjustedtomakeLM2596output3V,RW2inLM2577isadjustedtooutputvoltageof3to33V.Thefigureofthecircuitisshownbelow.ChangingtheresistanceofRW2andtheinputvoltageofLM2577canoutputavoltageof3to100V.Figure4.LM1577Step-upVoltageRegulatorCircuitUndertheconditionoftheinputvoltageof220V,50HZandthevoltagerangeof+15%~-20%ofthemodifiedregulatedpowersupply:Theadjustablerangeofoutputvoltageis+1.25V~inputvoltage;Themaximumoutputcurrentis5A;Thevoltageadjustmentrateisnotmorethan0.5%;Theloadadjustmentrateisnotmorethan2%;Thehighestinputvoltageandoutputripplevoltageatfullloadarenotmorethan10mV.DC-DCconverter,undertheconditionofinputvoltage+2.6V~+18V:Theoutputvoltageisadjustablefrom+2.6Vto100V;Themaximumoutputcurrentis3A;Voltageregulationrateisnotmorethan1.5%,theloadregulationrateisnotmorethan3%;Thepowersupplyalsohasover-currentandshort-circuitprotectionfunctions.Aftereliminatingtheshort-circuitfault,itwillautomaticallyreturntothenormalstate.Anti-reverseconnection,diodesformavoltageindicator.4.2PCBandPrintedCircuitBoardThepicturesbelowarethePCBdrawnbyanetizenandtheprintedcircuitboard.Figure5.PCBandPrintedCircuitBoardFAQWhatislm2596?TheLM2596seriesofregulatorsaremonolithicintegratedcircuitsthatprovidealltheactivefunctionsforastep-down(buck)switchingregulator,capableofdrivinga3-Aloadwithexcellentlineandloadregulation.WhatisthedifferencebetweenLM2596andLM2595?LM2596:Thehighestoutputcurrentis3A,1PIN-VOUT,2PIN-VIN;LM2595:Thehighestoutputcurrentis1A,1PIN-VIN,2PIN-VOUT.WhatisthevoltageofeachpinofLM2596-12?Whatisthefunctionofeachpin?Pin1istheinputterminal,12V,thenormalworkingvoltagerangeshouldbe14V~37Vundertheoutputcondition;pin2istheoutputterminal,hereisthehigh-frequencyoscillationoutput,notDCvoltage,sothereisnodefinitevoltage;pin3isgrounded,0V;Pin5istheenablecontrolterminal,LM2596worksnormallywhenconnectedtoalowlevel,andnooutputisturnedoffwhenconnectedtoahighlevel,usuallydirectlygrounded;Pin4isthefeedbackcontrolsignalinputterminal,connectedtothemiddleconnectionpointoftheproportionalresistor,wherethevoltageItisproportionaltotheactualoutput.CanLM2596outputnegativevoltage?LM2596canoutputnegativevoltage.LM2596hasdifferentapplicationcircuits,whichcanoutputpositivevoltageornegativevoltage,butithasnoboostfunction,andtheabsolutevalueofitsoutputvoltagemustbelessthantheabsolutevalueoftheinputvoltage.Inthecircuitwithadjustableoutputvoltageoflm2596,cantheoutputvoltagebegreaterthantheinputvoltage?TheLM2596switchingvoltageregulatorisastep-downpowermanagementmonolithicintegratedcircuit,whichcanoutput3Adrivecurrentandhasgoodlinearityandloadregulationcharacteristics.Theoutputvoltagewillnotbegreaterthantheinputvoltage.Iftheoutputvoltageisgreaterthantheinputvoltage,itisbesttouseastep-uppowerchip.SuchasXL6009,VT1050.

Description74LS04containssixindependentgateseachofwhichperformsthelogicINVERTfunction.Theoutputsignalsofthesixinvertersareoppositetotheinputsignals.Theinvertercanreversethephaseoftheinputsignalby180degrees.Thiscircuitisusedinanalogcircuits,suchasaudioamplifier,clockoscillator,etc.Inverterisoftenusedinelectroniccircuitdesign.74LS04-HEXInverter-TruthTableExampleCatalogDescriptionCADModelsFeaturesApplicationPinoutCircuitDiagramPackageParametersElectricalCharacteristicsProductComplianceComponentDatasheetProductManufacturerFAQOrdering&QuantityCADModels74LS04FootprintFeaturesSupplyvoltagerange:+4.75Vto+5.25VMaximumsupplyvoltage:+7VMaximumcurrentallowedtodrawthrougheachgateoutput:8mATotallyleadfreeTTLoutputsMaximumRiseTime:15nsMaximumFallTime:15nsOperatingtemperature:0Cto70CApplication▪Indifferentlogiccircuit▪Indifferentservers▪Indifferentstoragemoduletostoredata▪Indifferentdigitalreluctancescircuitsandinstruments▪IndifferentnetworkingsystemsPinoutPinNumberDescriptionINPUTOFINVERTINGGATES11A-INPUTofGATE132A-INPUTofGATE253A-INPUTofGATE394A-INPUTofGATE4115A-INPUTofGATE5136A-INPUTofGATE6SHAREDTERMINALS7GND-Shouldbeconnectedtoground14VCC-ShouldbeconnectedtopositivevolatgeOUTPUTOFINVERTINGGATES21Y-OUTPUTofGATE142Y-OUTPUTofGATE263Y-OUTPUTofGATE384Y-OUTPUTofGATE4105Y-OUTPUTofGATE5126Y-OUTPUTofGATE6CircuitDiagramPackageParametersTechnologyFamilyLSVCC(Min)(V)4.75VCC(Max)(V)5.25Channels(#)6IOL(Max)(mA)8IOH(Max)(mA)-0.4ICC(Max)(uA)33InputtypeBipolarOutputtypePush-PullFeaturesHighspeed(tpd10-50ns),InputclampdiodeDatarate(Mbps)70ElectricalCharacteristicsProductComplianceECCNEAR99USHTS8542390001ComponentDatasheetDatasheet74LS04DatasheetProductManufacturerTexasInstrumentsInc.(TI)isanAmericantechnologycompanythatdesignsandmanufacturessemiconductorsandvariousintegratedcircuits,whichitsellstoelectronicsdesignersandmanufacturersglobally.ItsheadquartersareinDallas,Texas,UnitedStates.TIisoneofthetoptensemiconductorcompaniesworldwide,basedonsalesvolume.TexasInstrumentssfocusisondevelopinganalogchipsandembeddedprocessors,whichaccountsformorethan80%oftheirrevenue.TIalsoproducesTIdigitallightprocessing(DLP)technologyandeducationtechnologyproductsincludingcalculators,microcontrollersandmulti-coreprocessors.Todate,TIhasmorethan43,000patentsworldwide.FAQWhatis74LS04?74LS04isamemberof74XXYYICseries.The74-seriesaredigitallogicintegratedcircuits.74LS04IChassixNOTgates.TheseNOTgatesperformInvertingfunction.HencenameHEXINVERTINGGATES.Whatisthefunctionofic74ls04?74LS04HexNOTGateIC.74LS04isa2inputquadruple8-bitNOTgateIC.InverterinlogicconvertersisanelectronicsdevicewhosebasicfunctionsaretoinverttheincominglogicweatheritisHIGHorLOW.TheyarealsoknownasNOTgates.Whatisahexinverter?Ahexinverterisatypeofanintegratedcircuitthatcontainssixinverters.Manysophisticateddigitaldevicesuseinverters,includingmultiplexers,decoders,andstatemachines.Aninvertercircuitsmainfunctionistooutputthevoltagerepresentingtheoppositeleveltoitsinput.WhyisNOTgatecalledaninverter?ANOTgate,oftencalledaninverter,isanicedigitallogicgatetostartwithbecauseithasonlyasingleinputwithsimplebehavior.ANOTgateperformslogicalnegationonitsinput.Inotherwords,iftheinputistrue,thentheoutputwillbefalse.Whatarethe7basiclogicgates?Therearesevenbasiclogicgates:AND,OR,XOR,NOT,NAND,NOR,andXNOR.TheANDgateissonamedbecause,if0iscalledfalseand1iscalledtrue,thegateactsinthesamewayasthelogicalandoperator.ThefollowingillustrationandtableshowthecircuitsymbolandlogiccombinationsforanANDgate.IntroductionAcircuitordevicethatchangesthephaseofasignalby180,asrequiredforfeedingapush-pullamplifierstagewithoutusingacouplingtransformer,orforchangingthepolarityofapulse;atriodeiscommonlyusedasaphaseinverter.Alsoknownasinverter.Thefollowingisanintroductionto74LS04andothersimilarICchips.CatalogIntroductionI74LS04VS.74LS141.1BriefIntroduction1.2Differencebetween74LS04and74LS14II74LS04VS.74LS08III74LS04VS.74HC04IV74LS04VS.54LS04FAQOrdering&QuantityI74LS04VS.74LS141.1BriefIntroductionBoth74LS04and74LS14arenotgatesofthe74series.74LS04isaHexInverter.74LS14isaHexSchmidttrigger.The74LS04gatecircuithasathresholdvoltage.Whentheinputvoltagerisesfromthelowleveltothethresholdvoltage,ordecreasesfromthehighleveltothethresholdvoltage,theconditionofthecircuitwillchange.74LS14isaSchmidttrigger.Itisaspecialgatecircuit,whichisnotcompatiblewiththesimplegatecircuit.Schmidttriggerhastwothresholdvoltages(positivethresholdvoltageandnegativethresholdvoltage).1.2Differencebetween74LS04and74LS14◾Output:Theoutputof74LS04and74LS14arethesame.Ifthesamemanufacturer,theoutputparametersarethesame.◾Input:Thedifferencebetweenthetwoisthattheinputisnotthesame.74LS04inputisTTLlevel,while74LS14inputisSchmidtinput(withhysteresischaracteristics).Becausetheinputisdifferent,theapplicationofthetwochipsisalsodifferent.74LS04ismostlyusedfornoncontrolofgeneraldataontheboard,while74LS14isgenerallyusedforsignalshapingorsignalbufferingofcriticalsignals.Inmostcases,74LS14canreplace74LS04.II74LS04VS.74LS08The74LS08devicecontains4independent2-inputANDgates.Thelogicfunctionexpressionof74LS08is:Y=ABorY=/(A+B),positivelogic.74LS08iscommonlyusedindigitalcircuitsystems.74LS0474LS08VCC(Min)(V)4.754.75VCC(Max)(V)5.255.25LogiclevelTTLTTLPin/Package14PDIP,14SO,14SOIC,14SSOPPDIP14,SOIC14,SOP14,SSOP14III74LS04VS.74HC0474HC04isahexinverterofCMOScircuit,andtheworkingvoltageis2V-6V.Both74LS04and74HC04areinverters,butLSstandsforlow-powerSchottkyandHCishigh-speedCOMS.LSisslightlyfasterthanHC.LSadoptsTTLlevel.HCisCMOSlevel.74HC04iseasytounderstand.Inputlowlevel,outputhighlevel.Inputhighlevel,outputlowlevel.74LS04containssixindependentgateseachofwhichperformsthelogicINVERTfunction.Theoutputsignalsofthesixinvertersareoppositetotheinputsignals.Theinvertercanreversethephaseoftheinputsignalby180degrees.Thiscircuitisusedinanalogcircuits,suchasaudioamplifier,clockoscillator,etc.IV74LS04VS.54LS0454LS04containssixindependentinverters.Itischaracterizedforoperationoverthefullmilitarytemperaturerangeof-55℃to125℃.74LS0454LS04TechnologyFamilyLSLSVCC(Min)(V)4.754.5VCC(Max)(V)5.255.5Bits(#)66Voltage(Nom)(V)55F@NomVoltage(Max)(Mhz)3535ICC@NomVoltage(Max)(mA)0.0330.033tpd@NomVoltage(Max)(ns)2222IOL(Max)(mA)88IOH(Max)(mA)-0.4-0.4SchmittTriggerNoNoRatingCatalogMilitaryOperatingTemperatureRange(C)0to70-55to125Pin/Package14PDIP,14SO,14SOIC,14SSOP14CDIP,14CFP,20LCCCFAQWhatis74LS04?74LS04isamemberof74XXYYICseries.The74-seriesaredigitallogicintegratedcircuits.74LS04IChassixNOTgates.TheseNOTgatesperformInvertingfunction.HencenameHEXINVERTINGGATES.Whatisthefunctionofic74ls04?74LS04HexNOTGateIC.74LS04isa2inputquadruple8-bitNOTgateIC.InverterinlogicconvertersisanelectronicsdevicewhosebasicfunctionsaretoinverttheincominglogicweatheritisHIGHorLOW.TheyarealsoknownasNOTgates.Whatisahexinverter?Ahexinverterisatypeofanintegratedcircuitthatcontainssixinverters.Manysophisticateddigitaldevicesuseinverters,includingmultiplexers,decoders,andstatemachines.Aninvertercircuitsmainfunctionistooutputthevoltagerepresentingtheoppositeleveltoitsinput.WhyisNOTgatecalledaninverter?ANOTgate,oftencalledaninverter,isanicedigitallogicgatetostartwithbecauseithasonlyasingleinputwithsimplebehavior.ANOTgateperformslogicalnegationonitsinput.Inotherwords,iftheinputistrue,thentheoutputwillbefalse.

STPSC4H065D-ST

DescriptionTIP122isanNPNDarlingtontransistor.Darlingtontransistormeanstherearetwotransistorinonepackageconnectedtoincreasegainatoutput.TIP122transistorhasalotofgoodfeatureslike5Acollectorcurrent,maxemitter-basevoltageis5V,maxcollectordissipationis65watt,minimummaximumcurrentgainisequalto1000.Thistransistorisdesignedtouseasaswitchandforamplificationpurposes.CatalogDescriptionTIP122ComponentDatasheetTIP122PinoutTIP122FeaturesTIP122ApplicationsTIP122EnvironmentalandExportClassificationsTIP122ParametersWorkingofTIP122HowtoSafelyLongRuninaCircuitDarlingtonCircuitSchematicWheretouseTIP122HowtouseTIP122TIP122ReplacementandEquivalentComplementofTIP122TIP122AlternativeNPNTransistorsTIP122SameFamilyTransistorsAdditionalResourcesFAQOrdering&QuantityTIP122ComponentDatasheetResourceTypeLinkDatasheetsTIP120-22TIP120-22,TIP125-27TO220B03PkgDrawingPCNObsolescence/EOLMultipleDevices19/Jun/2009MultDeviceEOL19/May/2017PCNDesign/SpecificationHeatsinkDesingChanges24/Feb/2014Logo17/Aug/2017PCNPackagingTapeandBox/ReelBarcodeUpdate07/Aug/2014MultDevices24/Oct/2017HTMLDatasheetTO220B03PkgDrawingTIP122PinoutPinNumberPinNameDescription1BaseItgovernsthebiasingofthetransistorandworkstoturnONorOFFthetransistor.2CollectorCurrentflowsinthroughcollector,usuallyconnectedtoload3EmitterCurrentcomesoutbytheemitter,itisusuallylinkedtoground.TIP122FeaturesHighDCCurrentGainhFE=2500(Typ)@IC=4.0AdcCollectorEmitterSustainingVoltage@100mAdcVCEO(sus)=60Vdc(Min)TIP120,TIP125=80Vdc(Min)TIP121,TIP126=100Vdc(Min)TIP122,TIP127LowCollectorEmitterSaturationVoltageVCE(sat)=2.0Vdc(Max)@IC=3.0Adc=4.0Vdc(Max)@IC=5.0AdcMonolithicConstructionwithBuiltInBaseEmitterShuntResistorsPbFreePackagesareAvailable*TIP122ApplicationsAudioAmplifierAudioAmplifierStagesAudioPreamplifiersSwitchingLoadsUnder5ATIP122EnvironmentalandExportClassificationsAttributeDescriptionRoHSStatusRoHSnon-compliantMoistureSensitivityLevel(MSL)1(Unlimited)TIP122ParametersBaseProductNumberTIP122CategoryDiscreteSemiconductorProducts-Transistors-Bipolar(BJT)-SingleCollector-BaseVoltageVCBO100VConfigurationSingleCurrent-Collector(Ic)(Max)5ACurrent-CollectorCutoff(Max)500ADCCurrentGain(hFE)(Min)@Ic,Vce1000@3A,3VDescriptionTRANSNPNDARL100V5ATO220ABDetailedDescriptionBipolar(BJT)TransistorEmitter-BaseVoltageVEBO5VFactoryPackQuantity200Height9.4mmLength10.67mmManufacturerONSemiconductorManufacturerProductNumberTIP122MaximumCollectorCut-offCurrent200uAMaximumDCCollectorCurrent5AMaximumOperatingTemperature+150CMinimumOperatingTemperature-65CMountingStyleThroughHoleMountingTypeThroughHoleOperatingTemperature-65C~150C(TJ)PackagingBulkPartStatusObsoletePower-Max2WProductTypeDarlingtonTransistorsSeriesTIP122SubcategoryTransistorsTransistorTypeNPN-DarlingtonUnitWeight0.042329ozVceSaturation(Max)@Ib,Ic4V@20mA,5AVoltage-CollectorEmitterBreakdown(Max)100VWidth4.83mmWorkingofTIP122Thistransistorisrecognizedforitshighercurrentgainwhichis1000andhighercollectorcurrent5amperes,therefore,itisusuallyusedtoswitchThistransistorhaslessbaseandemitterVoltageofthemerely5VhenceforthcanbeeffortlesslyorganizedbyaLogicinstrumentsuchasamicrocontrollerThoughprecautionhastobeengagedtocheck,ifthelogicinstrumentscanfontupto120mA.ThoughTIP122hasextraordinarycurrentatcollectorandcurrentgain,itisimpartiallymodesttoswitchtheexpedientmeanwhileithasanEmitter-Basevoltage(VBE)oftheonly5VandIbofmerely120mA.HowtoSafelyLongRuninaCircuitTogetbetterperformancewiththisdarlingtiontransistorwesuggesttoalwaysstayingbelowitsmaximumratings.Donotoperateitincircuitsusingmorethan100V.Donotprovideloadmorethan5A.Alwaysuseasuitablebaseresistortoproviderequiredcurrentatitsbase.Useasuitableheatsinktosaveitfromoverheatinganddostoreoruseitintemperaturebelow-65centigradeandabove+150centigrade.DarlingtonCircuitSchematicWheretouseTIP122Thistransistorisknownforitshighcurrentgain(hfe=1000)andhighcollectorcurrent(IC=5A)henceitisnormallyusedtocontrolloadswithhighcurrentorinapplicationswherehighamplificationisrequired.ThistransistorhasalowBase-EmitterVoltageoftheonly5VhencecanbeeasilycontrolledbyaLogicdevicelikemicrocontrollers.Althoughcarehastobetakentocheckifthelogicdevicecansourceupto120mA.So,ifyoulookingforatransistorthatcouldbeeasilycontrolledbyaLogicdevicetoswitchhighpowerloadsortoamplifyhighcurrentthenthisTransistormightbeanidealchoiceforyourapplication.HowtouseTIP122AlthoughTIPhashighcollectorcurrentandcurrentgain,itisfairlysimpletocontrolthedevicesinceithasanEmitter-Basevoltage(VBE)ofonly5Vandbasecurrentofonly120mA.InthebelowcircuitIhaveusedtheTIP122tocontrola48Vmotorwhichhasacontinuouscurrentofabout3A.Thecontinuescollectorcurrentofthistransistoris5Aandourloadconsumesonly3Awhichisfine.Themaximumbasecurrentisabout120mA,butIhaveusedhighvalueof100ohmresistortolimititto42mA.Youcanuseevena1Kresistorifyourcollectorcurrentrequirementisless.Thepeak(pulse)currentofthistransistoris8Asomakesureyourmotordoesnotconsumemorethanthat.Thisisjustamodelcircuitdiagramthatshowstheworkingonthistransistoritcannotbeusedassuch.So,similarlyyoucancontrolyourloadinthesameway.TIP122ReplacementandEquivalentTIP132,TIP102,NTE261,NTE263,2N6045,2N6045G,2SD2495,BDT65B,2N6532,BDT63B,BDW43,TIP142T(PinconfigurationofsometransistorsmaydifferfromTIP122,checkpinconfigurationbeforereplacinginacircuit)TIP22isadarlingtionpairtransistormanufacturedinTO-220package,itsagoodtransistortouseasahighgainswitchoramplifier.ComplementofTIP122ThecomplementoftheTIP122transistorisTIP127.TIP122AlternativeNPNTransistorsBC547,BC548,BC549,BC636,BC639,2N2369,2N3055,2N3904,2N3906,2SC5200TIP122SameFamilyTransistorsNPNFamilytransistorsareTIP120,TIP121,TIP122,andPNPFamilyareTIP125,TIP126,TIP127(PNP)AdditionalResourcesAttributeDescriptionOtherNamesTIP122FSTIP122FS-NDTIP122FS-NDRTIP122OSFAQWhatisTIP122transistor?TIP122TransistorisanNPNDarlingtontransistor....TIP122Darlingtontransistorhasalotofgoodfeatures,like5Acollectorcurrent,maximumemitter-basevoltageis5V,maximumcollectordissipationis65watt,andsoon.Thistransistorismanufacturedtouseasaswitchandforamplificationpurposes.WhattypeofpackageisusedforTIP122transistor?TheTIP122isasiliconNPNDarlingtontransistorinaTO-220typepackagedesignedforgeneralpurposeamplifierandlow-speedswitchingapplications.HowdoyoutestatransistorTIP122?Harvino.Theproperwaytotestistosetyourdmmtodiodetest(usually2ksettingontheohmscale).Transistorshavethreelegs;anemitter,abase,andacollector.HowdoIknowifmytransistorisblown?Connectthebaseterminalofthetransistortotheterminalmarkedpositive(usuallycolouredred)onthemultimeter.Connecttheterminalmarkednegativeorcommon(usuallycolouredblack)tothecollectorandmeasuretheresistance.Itshouldreadopencircuit(thereshouldbeadeflectionforaPNPtransistor).Whatarethe3terminalsofatransistor?Abipolartransistorhasterminalslabeledbase,collector,andemitter.Asmallcurrentatthebaseterminal(thatis,flowingbetweenthebaseandtheemitter)cancontrolorswitchamuchlargercurrentbetweenthecollectorandemitterterminals.HowtomakeminiaudioamplifieruseTIP122/TIP127transistor?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.

STPSC4H065D-ST

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,CSETBSCLKDJNZR2,CLRBITRET②Display:CLRSLCKMOVR3,resettable thermal fuse#3MOVR0,#DISP3DISP1:MOVA,@R0MOVR2,how does a hall effect sensor work#8DISP2:CLRSCLKRLCAMOVSDA,CSETBSCLKDJNZR2 ,DISP2DECR0DJNZR3,smd resistor codingDISP1SETBSLCKRETIV.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.

STPSC4H065D-ST

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.

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.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.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,CSETBSCLKDJNZR2,electric fuseCLRBITRET②Display:CLRSLCKMOVR3 ,#3MOVR0,#DISP3DISP1:MOVA,variable resistor symbol@R0MOVR2,#8DISP2:CLRSCLKRLCAMOVSDA,CSETBSCLKDJNZR2,different types of capacitorsDISP2DECR0DJNZR3,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.

访客,请您发表评论:

Powered By Tkool Electronics

Copyright Your WebSite.sitemap