Tkool Electronics

I.DescriptionAutomaticgaintechnology(AGC)iswidelyusedinthefieldofindustrialautomationclosed-loopcontrol.Inindustrialcontrol,time-varyinggainamplifiersareoftenneededtomeetproductionneeds,ormadeithasacertainregularitytoensurethestabilityofthecontroloutputamplitude,therebyreducingtheinterferenceoftheinputinterferencenoisesignal.Forthesystemtoadjustquikly,thispaperdesignsanAGCcontrollerbasedonthecombinationofAGCchipAD603andswitchingpowersupplychipMC34063,cleverlyusingMC34063sstablereferencevoltageanddynamicvoltageadjustmentoutputtoaccessAD603gaincontrolterminaltocontroltheamplificationgain,thereforeachievethegoalofconstantsystemoutputamplitude.AD603CatalogI.DescriptionII.WorkingPrincipleoftheSystemIII.AD603IV.MC34063V.SystemHardwareCircuitDiagram5.1InputBufferAttenuationCircuit5.2AD603AutomaticGainAmplifier5.3OutputAmplitudeDetector5.4MC34063FeedbackCircuitVI.SystemOperationResultsVII.ConclusionFAQOrdering&QuantityII.WorkingPrincipleoftheSystemThesystemusesAD603asthecorecontroldevice,supplementedbytheswitchingpowersupplychipMC34063tocollecttheoutputofthecontroller,theoutputvoltageistransferredtothevoltagecontrolterminalofAD603throughMC34063tochangetheamplificationgain.ThesystemworkingprincipleblockdiagramisshownasinFig.1.Figure1SystemBlockdiagramInthisclosed-loopcontrolsystem,theMC34063circuitisusedasitsfeedbacklinktodynamicallycollecttheamplitudeoftheoutputsignalofthesystem,andcontroltheamplificationgainofAD603byadjustingthedutycycleoutputvoltageoftheinternalsignal.Thefeedbacklinkinthefigurecanbereplacedwithamicroprocessor.ThemicroprocessorcollectstheoutputvoltageamplitudethroughA/D,transfersittothemicroprocessorchipforsignalprocessing,andthenfeedsbacktotheinputoftheentiresystemthroughD/Aoutputcontrolvoltage.However,thismethodistoocomplicated,becausetheriseandfallofthedigitalchiptakealongtimetosetup,whichaffectstheresponsespeedoftheentiresystem,andrequiresrelativelyhighsignalprocessingalgorithms.Theswitchingpowersupplychipwidelyusedinpowersupplytechnologyisdynamicallyadjustedtoimproveitsoperatingspeed.Inaddition,itsdevelopmentcostislow,whichisconducivetothepromotionoftheindustrialcontrolfield.III.AD603AD603isachipwithprogrammablegain,lownoise,ithas3workingmodes,correspondingtodifferentgainranges.Inordertomakethecontrolmoreextensive,themaximumbandwidthmodeisselectedas90MHz.Thegainisexpressedindecibels,theamplificationgainiscontrolledbythecontrolvoltagetoalinearrelationshipof25mV/dB,andtheslewrateis275V/s.Thegaincontrolvoltageneedstobeinputduringnormaloperation.Thegainformulais:Intheformula:Gisthegain,dB;G0isthestartingpointofthegain,andthesizeofG0isdeterminedbythepinconnection.Thecircuitdesignedinthispapershort-circuitsVOUTandFDBK,G0=10dBisthewidebandmode(90MHzwideband),thegainrangeGofAD603is-11.09~+31.05dB,andVGisinthelinearrangewhentherangeis-500~500mV.ThegaincontrolvoltageVGiscontrolledbytheMC34063output.AD603inputsignalamplitudeUINP1.4V,theactualindustrialcontrolfieldofteninputplusinterferencesumisgreaterthan1.4V,ifthissignalisdirectlyaddedtothesystem,thedistortionislargeandlong-timeworkwilldamagetheAD603,soyoumustaddaninputbufferandattenuationcircuit.IV.MC34063MC34063isamonolithicbipolarintegratedcircuitusedinthefieldofDC-DCconvertercontrol.Itischeapandwidelyusedinthefieldofswitchingpowersupplies.Itcanuseaminimumofexternalcomponentstoachieveswitchingboostandbuck.Itsoperatingfrequencyis0.1-100kHz.ThetraditionalAGCcontrollerconstitutesaclosed-loopcontrolsystem,whichgenerallyneedstoperformA/Dsamplingontheoutputofthesystem,andthentransferthedatatothesingle-chiporcomputerforalgorithmdataprocessing,andjudgetheexecutionsignalD/Aoutputtomaketheactuatorexecute.Inthisfeedbackprocess,sampling,algorithmprocessingandexecutionobviouslyconsumetoomuchtime,andforsomecomplexcontrolsignals,algorithmdataprocessingrequirementsarehigh,andspecialDSPchipsarerequired,whichiscostly.Therefore,theuseofasingleanalogelectroniccircuittoachieveaclosed-loopcontrolsystemhashigherefficiencyandlowercost.InspiredbytheworkingmodeoftheMC34063step-downcircuit,itisanewdesignideatorealizethechangeoftheAD603gaincontrolvoltagebyusingthecharacteristicsoftheMC34063todynamicallyadjusttheoutputvoltage.Theexperimentalverificationisfeasibleanditissimplerandfasterthantheprogramcontrolmethod.Figure2showstheMC34063step-downcircuit.Figure2MC34063step-downcircuitAsshowninFigure2,theinputis+12V,theoutputis+5V,thereferencevoltageofpin5togroundis+1.25V,theresistanceofpin5togroundisR1=1.2k,andtheoutputandpin5areconnectedtoR2=3.6k,Accordingtotheresistancedividerratio,theoutputisclampedat+5V,thusachievingaregulatedoutput.AppliedinthefieldofAGCcontrol,youcanconnecttheoutputofMC34063tothecontrollergaincontrolterminal,andtheinputtotheoutputterminalofthecontroller.Accordingtoitsworkingprinciple,MC34063collectstheoutputoftheAGCcontrollerandtransmitsittopin5.ItsinternaldynamicallyadjuststhePWMdutycycle,dynamicallychangestheAD603gaincontrolvoltage,andcanavoidtheinterferenceofthesystem,andrealizethefunctionsimilartothePIDalgorithm.Itreplacesthealgorithmicdataprocessingmechanism,whichissimpleandeffective,andhascertainreferencesignificancetothefieldofindustrialautomationcontrol.V.SystemHardwareCircuitDiagramFigure3isthesystemhardwarecircuitdiagram.Thesystemismainlydividedintoinputbufferattenuationcircuit,AD603automaticgainamplifier,outputamplitudedetectorandMC34063feedbackcircuit.Figure3SystemHardwarecircuitdiagram5.1InputBufferAttenuationCircuitBecausetheAD603inputsignalamplitudeVINPislessthanorequalto1.4V,fourdiodeclampsareused.Accordingtotheunidirectionalconductivityofthediodeandtheforwardconductionvoltagedropofsilicon,theinputcharacteristicsarelimitedtomeettherequirementsofAD603.Theinputvoltagerequirements,thefollowerplaystheroleofisolatingthechip.AsshowninFigure3,part①.5.2AD603AutomaticGainAmplifierThe3pinofAD603isthesignalinputterminal,the2and4pinsareconnectedtothegroundwithR4=0,R5=0resistancetomakeitworkmorestable.The5and7pinsareconnectedtotheoutput,whichisthesystemoutputoftheAGCcontroller.Pin1isthegaincontrolvoltageVGterminal,thiscontrolvoltageisconnectedtotheoutputterminalofMC34063,MC34063generatesthecorrespondinggaincontrolvoltageVGaccordingtotheoutputofthesystem.5.3OutputAmplitudeDetectorInthefieldofindustrialcontrol,thesignalisonlyintheformofDC,andtheACsignalalsooccupiesacertainproportion.ForthecontroloftheDCsignal,thesystemoutputcanbedirectlytransmittedtotheMC34063forprocessing,buttheamplitudeoftheACsignalmustbedetected,sothedesignisshowninFigure3inpart③.Commonamplitudedetectors,suchasdioderectifierbridges,areonlysuitableforsituationswheretheinputvoltageisfargreaterthanthediodeconductionvoltagedrop.InAGCcontrol,thesignalinthesystemisoftenlowvoltage,soitcannotbeused,soitisverynecessarytodesignanamplitudedetectorthatcanavoiddiodeconductionvoltagedrop.AfterRCcharging,theDCvoltagevaluewithacertainrelationshipisobtained.InFigure3,thevoltageattheintermediatenodeofR13andR14isUf,andtheexpressionis:Intheformula,UINPistheinputamplitude,V.5.4MC34063FeedbackCircuitTheintermediatenodevoltageUfofR13andR14isproperlycalculatedbyasame-invertingamplifierandanadder,andthenconnectedtopin5ofMC34063.Atthistime,itisclampedat5V,andUf=1Vwhenreversed,thentheAGCcontrollersystemcanbedynamicallymaintainedstabilityofoutputvoltageamplitude.Whenthesysteminputisunstableorthereisnoiseinterference,MC34063dynamicallychangestheoutputvoltagevalueaccordingtotheamplitudedetectionresult,soastoachievethepurposeofchangingthegaincontrolvoltageVG.AsshowninthelowerpartofFigure3,theoutputvoltageofpin2ischargedanddischargedthroughswitchingandspecificSchottkydiodes,andtheattenuatedpartialvoltageistransmittedtopin1ofAD603,whichrealizestheautomaticadjustmentoftheamplificationgainandsuccessfullyrealizestheswitchingpowersupplytechnologyapplicationinthefieldofautomaticcontrolgain.VI.SystemOperationResultsTheexperimentalsettingisthatifthesysteminputsaDCsignal,theoutputwillbeaconstant+1VDC;ifanACsignalisinput,theoutputwillbeanACsignalwithaconstantamplitudeof+1V.Intheexperiment,twoinputmethodsweretestedandverified,andbothmetthedesignrequirements.Table1ispartoftheexperimentaldataoftheinputDCsignal.Intheexperiment,theinputoftheAGCcontrollerisconnectedtothevoltageregulatorsource,andtheinputvoltageiscontinuouslyadjusted.Table2ispartoftheexperimentaldataoftheinputACsignal.Intheexperiment,theAGCcontrollerinputisconnectedtotheUTG9002Csignalgenerator,theamplitudeoftheinputsinewaveiscontinuouslyadjusted,andtheoutputisconnectedtotheoscilloscopetoobservethewaveform.Observationfoundthatnomattertheinputamplitudebecomeslargerorsmaller,theoscilloscopewaveformisbasicallyunchanged.ReadtheoscilloscopewaveformamplitudeandfillinTable2.VII.ConclusionThisarticlesummarizesthedesignoftheAGCcontrollerbasedonAD603andMC34063.ExperimentshaveverifiedthattheAGCcontrolleriseffectiveandmeetsthedesignrequirements.Anewapplicationofswitchingpowersupplychipsinthecontrolfieldisproposed.BecausetheinternalPWMdutycycleisfaster,itcanreplacethetraditionalprogrammableAGCcontroller.Amongthem,MC34063canalsobereplacedbyotherswitchingpowersupplychips.Ithastheadvantagesofuniversalapplicability,simpledesign,lowcost,andithasimportantpracticalvalue.FAQWhatisAD603?AD603isalow-noise,voltage-controlledamplifierforradiofrequency(RF)andintermediatefrequency(IF)automaticgaincontrol(AGC)systems.Itprovidesprecisepin-selectablegain,withagainrangeof-11dBto+31dBat90MHzbandwidth,andagainrangeof+9dBto+51dBat9MHzbandwidth.Anyintermediategainrangecanbeobtainedwithanexternalresistor.Thenoisespectraldensityreferredtotheinputisonly1.3nV/Hz,andthepowerconsumptionis125mWwhenusingtherecommended5Vpowersupply.WhataretheproblemsthatneedtobepaidattentiontowhenusingAD603?Thevoltagecannotbetoohigh.Generally,thevoltageisplusorminus5V,andthemaximumvoltagecannotexceedplusorminus7.5V.Theoutputvoltagecannotexceed2V.Howtosolvetheself-oscillationproblemofAD603?Forhigh-frequencyoperationalamplifiers,thefollowingpointsarethebasicwaystosolveself-excitation.Thepowersupplyisstableandnoripple.Theelectricalconnectionwiresareasshortaspossible.Thead603circuitshouldbefarawayfromthepowercircuit,especiallyawayfromthetransformer.Thepowertransformerandthecircuitboardofad603shouldbeshieldedwithametalboxandgroundedifpossible.Onepointisveryimportant.Foropamps,toolargemagnificationcaneasilycauseself-excitation,soreducethemagnificationasmuchaspossibleandminimizethenumberofmagnificationlevels(generallynotgreaterthan4).Reverseamplificationcansuppressself-excitationinmulti-stageamplification.Ifyouwanttoconnecttothepoweramplifierandthenamplify,itisbesttousetwopowersupplies,andthecircuitshouldbeconnectedtothesameground.WhatisthedifferencebetweenAD603AQandAD603AR?Theirdifferencesareinmodel,Temperature,Package.AD603AQ-40Cto+85C8-LeadCERDIPAD603AR-40Cto+85C8-LeadSOIC_NAfterinputtinganACsignalandbeingamplifiedbyAD603,whydoestheoutputcontainaDCsignal?HowtoeliminatetheDCsignal?WhentheDCblockingcapacitorisnotused,thebiasvoltageoftheinputcircuitneedstobeadjustedforcompensation.IftheDCvoltageoftheACsignalisnotfixed,onlyaDCblockingcapacitorcanbeused,ortheaveragevaluecanbeusedtoeliminateitaftersamplingthenumber.

MBR2045CT-E3/45-VISHAY

I.DescriptionAutomaticgaintechnology(AGC)iswidelyusedinthefieldofindustrialautomationclosed-loopcontrol.Inindustrialcontrol,time-varyinggainamplifiersareoftenneededtomeetproductionneeds,ormadeithasacertainregularitytoensurethestabilityofthecontroloutputamplitude,therebyreducingtheinterferenceoftheinputinterferencenoisesignal.Forthesystemtoadjustquikly,thispaperdesignsanAGCcontrollerbasedonthecombinationofAGCchipAD603andswitchingpowersupplychipMC34063,cleverlyusingMC34063sstablereferencevoltageanddynamicvoltageadjustmentoutputtoaccessAD603gaincontrolterminaltocontroltheamplificationgain,thereforeachievethegoalofconstantsystemoutputamplitude.AD603CatalogI.DescriptionII.WorkingPrincipleoftheSystemIII.AD603IV.MC34063V.SystemHardwareCircuitDiagram5.1InputBufferAttenuationCircuit5.2AD603AutomaticGainAmplifier5.3OutputAmplitudeDetector5.4MC34063FeedbackCircuitVI.SystemOperationResultsVII.ConclusionFAQOrdering&QuantityII.WorkingPrincipleoftheSystemThesystemusesAD603asthecorecontroldevice,supplementedbytheswitchingpowersupplychipMC34063tocollecttheoutputofthecontroller,theoutputvoltageistransferredtothevoltagecontrolterminalofAD603throughMC34063tochangetheamplificationgain.ThesystemworkingprincipleblockdiagramisshownasinFig.1.Figure1SystemBlockdiagramInthisclosed-loopcontrolsystem,theMC34063circuitisusedasitsfeedbacklinktodynamicallycollecttheamplitudeoftheoutputsignalofthesystem,andcontroltheamplificationgainofAD603byadjustingthedutycycleoutputvoltageoftheinternalsignal.Thefeedbacklinkinthefigurecanbereplacedwithamicroprocessor.ThemicroprocessorcollectstheoutputvoltageamplitudethroughA/D,transfersittothemicroprocessorchipforsignalprocessing,andthenfeedsbacktotheinputoftheentiresystemthroughD/Aoutputcontrolvoltage.However,thismethodistoocomplicated,becausetheriseandfallofthedigitalchiptakealongtimetosetup,whichaffectstheresponsespeedoftheentiresystem,andrequiresrelativelyhighsignalprocessingalgorithms.Theswitchingpowersupplychipwidelyusedinpowersupplytechnologyisdynamicallyadjustedtoimproveitsoperatingspeed.Inaddition,itsdevelopmentcostislow,whichisconducivetothepromotionoftheindustrialcontrolfield.III.AD603AD603isachipwithprogrammablegain,lownoise,ithas3workingmodes,correspondingtodifferentgainranges.Inordertomakethecontrolmoreextensive,themaximumbandwidthmodeisselectedas90MHz.Thegainisexpressedindecibels,theamplificationgainiscontrolledbythecontrolvoltagetoalinearrelationshipof25mV/dB,andtheslewrateis275V/s.Thegaincontrolvoltageneedstobeinputduringnormaloperation.Thegainformulais:Intheformula:Gisthegain,dB;G0isthestartingpointofthegain,andthesizeofG0isdeterminedbythepinconnection.Thecircuitdesignedinthispapershort-circuitsVOUTandFDBK,G0=10dBisthewidebandmode(90MHzwideband),thegainrangeGofAD603is-11.09~+31.05dB,andVGisinthelinearrangewhentherangeis-500~500mV.ThegaincontrolvoltageVGiscontrolledbytheMC34063output.AD603inputsignalamplitudeUINP1.4V,theactualindustrialcontrolfieldofteninputplusinterferencesumisgreaterthan1.4V,ifthissignalisdirectlyaddedtothesystem,thedistortionislargeandlong-timeworkwilldamagetheAD603,soyoumustaddaninputbufferandattenuationcircuit.IV.MC34063MC34063isamonolithicbipolarintegratedcircuitusedinthefieldofDC-DCconvertercontrol.Itischeapandwidelyusedinthefieldofswitchingpowersupplies.Itcanuseaminimumofexternalcomponentstoachieveswitchingboostandbuck.Itsoperatingfrequencyis0.1-100kHz.ThetraditionalAGCcontrollerconstitutesaclosed-loopcontrolsystem,whichgenerallyneedstoperformA/Dsamplingontheoutputofthesystem,andthentransferthedatatothesingle-chiporcomputerforalgorithmdataprocessing,andjudgetheexecutionsignalD/Aoutputtomaketheactuatorexecute.Inthisfeedbackprocess,sampling,algorithmprocessingandexecutionobviouslyconsumetoomuchtime,andforsomecomplexcontrolsignals,algorithmdataprocessingrequirementsarehigh,andspecialDSPchipsarerequired,whichiscostly.Therefore,theuseofasingleanalogelectroniccircuittoachieveaclosed-loopcontrolsystemhashigherefficiencyandlowercost.InspiredbytheworkingmodeoftheMC34063step-downcircuit,itisanewdesignideatorealizethechangeoftheAD603gaincontrolvoltagebyusingthecharacteristicsoftheMC34063todynamicallyadjusttheoutputvoltage.Theexperimentalverificationisfeasibleanditissimplerandfasterthantheprogramcontrolmethod.Figure2showstheMC34063step-downcircuit.Figure2MC34063step-downcircuitAsshowninFigure2,theinputis+12V,theoutputis+5V,thereferencevoltageofpin5togroundis+1.25V,theresistanceofpin5togroundisR1=1.2k,andtheoutputandpin5areconnectedtoR2=3.6k,Accordingtotheresistancedividerratio,theoutputisclampedat+5V,thusachievingaregulatedoutput.AppliedinthefieldofAGCcontrol,youcanconnecttheoutputofMC34063tothecontrollergaincontrolterminal,andtheinputtotheoutputterminalofthecontroller.Accordingtoitsworkingprinciple,MC34063collectstheoutputoftheAGCcontrollerandtransmitsittopin5.ItsinternaldynamicallyadjuststhePWMdutycycle,dynamicallychangestheAD603gaincontrolvoltage,andcanavoidtheinterferenceofthesystem,andrealizethefunctionsimilartothePIDalgorithm.Itreplacesthealgorithmicdataprocessingmechanism,whichissimpleandeffective,andhascertainreferencesignificancetothefieldofindustrialautomationcontrol.V.SystemHardwareCircuitDiagramFigure3isthesystemhardwarecircuitdiagram.Thesystemismainlydividedintoinputbufferattenuationcircuit,AD603automaticgainamplifier,outputamplitudedetectorandMC34063feedbackcircuit.Figure3SystemHardwarecircuitdiagram5.1InputBufferAttenuationCircuitBecausetheAD603inputsignalamplitudeVINPislessthanorequalto1.4V,fourdiodeclampsareused.Accordingtotheunidirectionalconductivityofthediodeandtheforwardconductionvoltagedropofsilicon,theinputcharacteristicsarelimitedtomeettherequirementsofAD603.Theinputvoltagerequirements,thefollowerplaystheroleofisolatingthechip.AsshowninFigure3,part①.5.2AD603AutomaticGainAmplifierThe3pinofAD603isthesignalinputterminal,the2and4pinsareconnectedtothegroundwithR4=0,R5=0resistancetomakeitworkmorestable.The5and7pinsareconnectedtotheoutput,whichisthesystemoutputoftheAGCcontroller.Pin1isthegaincontrolvoltageVGterminal,thiscontrolvoltageisconnectedtotheoutputterminalofMC34063,MC34063generatesthecorrespondinggaincontrolvoltageVGaccordingtotheoutputofthesystem.5.3OutputAmplitudeDetectorInthefieldofindustrialcontrol,thesignalisonlyintheformofDC,andtheACsignalalsooccupiesacertainproportion.ForthecontroloftheDCsignal,thesystemoutputcanbedirectlytransmittedtotheMC34063forprocessing,buttheamplitudeoftheACsignalmustbedetected,sothedesignisshowninFigure3inpart③.Commonamplitudedetectors,suchasdioderectifierbridges,areonlysuitableforsituationswheretheinputvoltageisfargreaterthanthediodeconductionvoltagedrop.InAGCcontrol,thesignalinthesystemisoftenlowvoltage,soitcannotbeused,soitisverynecessarytodesignanamplitudedetectorthatcanavoiddiodeconductionvoltagedrop.AfterRCcharging,theDCvoltagevaluewithacertainrelationshipisobtained.InFigure3,thevoltageattheintermediatenodeofR13andR14isUf,andtheexpressionis:Intheformula,UINPistheinputamplitude,V.5.4MC34063FeedbackCircuitTheintermediatenodevoltageUfofR13andR14isproperlycalculatedbyasame-invertingamplifierandanadder,andthenconnectedtopin5ofMC34063.Atthistime,itisclampedat5V,andUf=1Vwhenreversed,thentheAGCcontrollersystemcanbedynamicallymaintainedstabilityofoutputvoltageamplitude.Whenthesysteminputisunstableorthereisnoiseinterference,MC34063dynamicallychangestheoutputvoltagevalueaccordingtotheamplitudedetectionresult,soastoachievethepurposeofchangingthegaincontrolvoltageVG.AsshowninthelowerpartofFigure3,theoutputvoltageofpin2ischargedanddischargedthroughswitchingandspecificSchottkydiodes,andtheattenuatedpartialvoltageistransmittedtopin1ofAD603,whichrealizestheautomaticadjustmentoftheamplificationgainandsuccessfullyrealizestheswitchingpowersupplytechnologyapplicationinthefieldofautomaticcontrolgain.VI.SystemOperationResultsTheexperimentalsettingisthatifthesysteminputsaDCsignal,theoutputwillbeaconstant+1VDC;ifanACsignalisinput,theoutputwillbeanACsignalwithaconstantamplitudeof+1V.Intheexperiment,twoinputmethodsweretestedandverified,andbothmetthedesignrequirements.Table1ispartoftheexperimentaldataoftheinputDCsignal.Intheexperiment,theinputoftheAGCcontrollerisconnectedtothevoltageregulatorsource,andtheinputvoltageiscontinuouslyadjusted.Table2ispartoftheexperimentaldataoftheinputACsignal.Intheexperiment,theAGCcontrollerinputisconnectedtotheUTG9002Csignalgenerator,theamplitudeoftheinputsinewaveiscontinuouslyadjusted,andtheoutputisconnectedtotheoscilloscopetoobservethewaveform.Observationfoundthatnomattertheinputamplitudebecomeslargerorsmaller,theoscilloscopewaveformisbasicallyunchanged.ReadtheoscilloscopewaveformamplitudeandfillinTable2.VII.ConclusionThisarticlesummarizesthedesignoftheAGCcontrollerbasedonAD603andMC34063.ExperimentshaveverifiedthattheAGCcontrolleriseffectiveandmeetsthedesignrequirements.Anewapplicationofswitchingpowersupplychipsinthecontrolfieldisproposed.BecausetheinternalPWMdutycycleisfaster,itcanreplacethetraditionalprogrammableAGCcontroller.Amongthem,MC34063canalsobereplacedbyotherswitchingpowersupplychips.Ithastheadvantagesofuniversalapplicability,simpledesign,lowcost,andithasimportantpracticalvalue.FAQWhatisAD603?AD603isalow-noise,voltage-controlledamplifierforradiofrequency(RF)andintermediatefrequency(IF)automaticgaincontrol(AGC)systems.Itprovidesprecisepin-selectablegain,withagainrangeof-11dBto+31dBat90MHzbandwidth,andagainrangeof+9dBto+51dBat9MHzbandwidth.Anyintermediategainrangecanbeobtainedwithanexternalresistor.Thenoisespectraldensityreferredtotheinputisonly1.3nV/Hz,andthepowerconsumptionis125mWwhenusingtherecommended5Vpowersupply.WhataretheproblemsthatneedtobepaidattentiontowhenusingAD603?Thevoltagecannotbetoohigh.Generally,thevoltageisplusorminus5V,andthemaximumvoltagecannotexceedplusorminus7.5V.Theoutputvoltagecannotexceed2V.Howtosolvetheself-oscillationproblemofAD603?Forhigh-frequencyoperationalamplifiers,thefollowingpointsarethebasicwaystosolveself-excitation.Thepowersupplyisstableandnoripple.Theelectricalconnectionwiresareasshortaspossible.Thead603circuitshouldbefarawayfromthepowercircuit,especiallyawayfromthetransformer.Thepowertransformerandthecircuitboardofad603shouldbeshieldedwithametalboxandgroundedifpossible.Onepointisveryimportant.Foropamps,toolargemagnificationcaneasilycauseself-excitation,soreducethemagnificationasmuchaspossibleandminimizethenumberofmagnificationlevels(generallynotgreaterthan4).Reverseamplificationcansuppressself-excitationinmulti-stageamplification.Ifyouwanttoconnecttothepoweramplifierandthenamplify,itisbesttousetwopowersupplies,andthecircuitshouldbeconnectedtothesameground.WhatisthedifferencebetweenAD603AQandAD603AR?Theirdifferencesareinmodel,Temperature,Package.AD603AQ-40Cto+85C8-LeadCERDIPAD603AR-40Cto+85C8-LeadSOIC_NAfterinputtinganACsignalandbeingamplifiedbyAD603,whydoestheoutputcontainaDCsignal?HowtoeliminatetheDCsignal?WhentheDCblockingcapacitorisnotused,thebiasvoltageoftheinputcircuitneedstobeadjustedforcompensation.IftheDCvoltageoftheACsignalisnotfixed,onlyaDCblockingcapacitorcanbeused,ortheaveragevaluecanbeusedtoeliminateitaftersamplingthenumber.

IntrodcutionTheCD4066isaquadbilateralswitchwhichcanbeappliedforswitchingofanalogsignalsanddigitalsignals.Itispin-for-pincompatiblewiththeCD4016Bdevice,butexhibitsamuchloweron-stateresistance.Inaddition,theon-stateresistanceisrelativelyconstantoverthefullsignal-inputrange.TheCD4066deviceconsistsoffourbilateralswitches,eachwithindependentcontrols.Theswitchescanbeswitchedoffindependentlyandcomplementeachother.Thisconfigurationeliminatesthevariationoftheswitch-transistorthresholdvoltagewithinputsignaland,thus,keepstheon-stateresistancelowoverthefulloperating-signalrange.Theadvantagesoversingle-channelswitchesincludepeakinput-signalvoltageswingsequaltothefullsupplyvoltageandmoreconstanton-stateimpedanceovertheinput-signalrange.CatalogIntrodcutionITestCircuitofCD4066IICordlessTelephoneIIISelf-lockingTouchSwitchCircuitIVElectronicSwitchCircuitFAQOrdering&QuantityITestCircuitofCD4066ThetestofCD4066quadbilateralswitchismainlytotestthecontrolfunctionandbilateralconductionfunctionofeachswitch.Figure1.TestCircuitofCD4066InFigure1,selectinghighorlowlevel,KIisaSPDTswitchatthecontrolterminal,whichisusedtochangetheonstateoftheanalogswitch.WhentheswitchisturnedtoHtoturnonthehighlevel,thecontrolterminalsofthefourswitchesareathighlevel,andeachswitchshouldbeturnedon.WhentheswitchisturnedtoLlowlevel,thefourswitchesshouldbeturnedoff.K2isadouble-poledouble-throwswitch.ToggletheswitchK2tocontrolthedirectionofthebilateralflowingswitchsignal.ItisindicatedbytwogroupsofredandgreenLED.WhentheswitchK2-1isturnedtoHhighlevel,K2-2isconnectedtoLlowlevel.WhenKIswitchisturnedtohighlevelstate,allswitchesareinforward(reverse)conductionstate.Sothepositivepoleofthepowersupplyisaddedtotheparallelconnectedlight-emittingdiodesLFD1,LED3,IED5,positivepoleofLED7andthestep-downresistorR.ThenthefourredLEDslightup.WhentheKlswitchisturnedtoLlowlevel,eachanalogswitchisinthecut-offstate.NomatterK2isswitchedtoHorLstate,thetwogroupsofredandgreenLEDwillnotlightup.IICordlessTelephoneCD4066isaquadbilateralswitch,whichiswidelyusedinTV,DVDplayer,telephone,variouselectronicinstrumentsandmeters.TheCD4066deviceconsistsoffourbilateralswitches,eachwithindependentcontrols.Theswitchescanbeswitchedoffindependentlyandcomplementeachother.ThetypicalapplicationcircuitofCD4066incordlesstelephoneisshowninthefigure.Figure2.CircuitofCordlessTelephoneIIISelf-lockingTouchSwitchCircuitIntheself-lockingtouchswitchcircuitcomposedofCD4066b,whenthetouchswitchS1isactivated,R4isdriventohighlevel,andthecontrolvoltagebecomeshigh,whichwilllatchtheswitch.WhenS2isactivated,R4becomeslowandthecontrolvoltagebecomeslow,whichwilldeactivatetheswitch.Figure3.Self-lockingTouchSwitchCircuitIVElectronicSwitchCircuitElectronicswitchcircuitcomposedofCD4017andCD4066isshownbelow.Figure4.ElectronicSwitchCircuitFAQWhatisCD4066?TheCD4066isaQuadBilateralSwitchIC,thatis,ithasfourswitcheswhichcanbecontrolledindividualusingacontrolpin.Theseswitchescanconductinboththedirectionsmakingitbilateral,itiscommonlyusedformultiplexinganalogordigitalsignals.HowtouseCD4066?TheCD4066ICconsistsoffourswitches.Itcanswitchanalogsignalsthroughdigitalcontrol.Ananalogsignalisappliedattheinputoftheswitch.IfaHIGHor1valueisfedintothecontrolinput,theanalogsignalwillbepassedfrominputtotheoutputofaswitch.HowCD4066work?The4066reallyfunctionsasananalogswitch.The4066isanICcomposedofswitcheswhicharedesignedtoswitchanalogsignalsviadigitalcontrol....The4066isaquadbilateralswitchcircuit,meaningthatiscomposedof4switches.Eachswitchhasasingleinputandasingleoutputterminal.WhataretheapplicationsofCD4066 ?TheCD4066isabi-directionalanalogswitchingICsimilartoCD4016,itiscommonlyusedinmultiplexingapplications;itcanalsobeusedtoisolatesignals.Theswitchisbilateralandhencecanbeusedforbothdigitalandanalogsignals.WhatsthedifferencebetweenCD4016andCD4066 ?ThemajordifferencebetweenbothisthatCD4066hasverylowinternalresistance,accordingtothedatasheetitcanonly5ofon-stateresistanceascomparedwith200ofCD4016IC.IntroductionTheCD4066isaquadbilateralswitchwhichcanbeappliedforswitchingofanalogsignalsanddigitalsignals.Itconsistsoffourindependentanalogswitches,eachwiththreeterminals:input,outputandcontrol.Whenthecontrolterminalisappliedwithhighpowerlevel,theswitchison.Whenthecontrolterminalisaddedwithlowpowerlevel,theswitchisclosed.Theinputterminalandoutputterminalcanbeusedinterchangeably.Thisconfigurationeliminatesthevariationoftheswitch-transistorthresholdvoltagewithinputsignaland,thus,keepstheon-stateresistancelowoverthefulloperating-signalrange.Theadvantagesoversingle-channelswitchesincludepeakinput-signalvoltageswingsequaltothefullsupplyvoltageandmoreconstanton-stateimpedanceovertheinput-signalrange.ThisarticleintroducestwoapplicationexamplesofCD4066analogswitch.CatalogIntroductionCatalogITrack-and-HoldCircuitofSignalIIInterchangingDisplayCircuitofFourWaysofElectronicSignalFAQOrdering&QuantityITrack-and-HoldCircuitofSignalFigure1.Track-and-HoldCircuitofSignalTheanalogsignalUiisfromthein-phaseinputoftheoperationalamplifier.Whenthecontrolterminaloftheanalogswitchisathighlevel,theanalogswitchison,andthecapacitorCischargedtoUi.Thisprocessiscalledthesamplingoftheinputsignal.Whenthesamplingisover,thecontrolterminaloftheanalogswitchislowlevelandtheanalogswitchisoff.Becausetheresistanceisashighas100Mwhentheanalogswitchisoff,andtheinputimpedanceofoperationalamplifierA2isalsoveryhigh,thesamplingsignalcanbemaintainedonthecapacitorC.IIInterchangingDisplayCircuitofFourWaysofElectronicSignalAgeneralsinglelineoscilloscopecanonlydisplayonecontinuoussignal.Butthisdevicecandisplayfourcontinuoussignalssimultaneouslyinasinglelineoscilloscope.Itisveryconvenienttocomparethetimerelationofdifferentsignals.Figure2.InterchangingDisplayCircuitofFourWaysofElectronicSignalFigure2isthecircuitdiagramofthedevice.ItusesaCD4017counterandoscillatortoformafour-beatcircuittocontrolthefouranalogswitchesintwoCD4066.AdjustableDClevelandoneinputsignalareaddedrespectivelyoneachpairofanalogswitches.Whenthecontrolendoftheanalogswitchishighlevel1,theanalogswitchison.TheDClevelandinputsignalaresenttothey-axisinputendoftheoscilloscope.BecausethefoursignalscorrespondtodifferentDClevels,thefoursignalsdisplayseparatelyontheoscilloscope.AlthoughthefourpairsofanalogswitchesarecontrolledbythecountersQ0,Q1,Q2,Q3outputterminal,theflickerofthewaveformissmallduetothehighoscillationfrequencyoftheoscillator.FAQWhatisCD4066?TheCD4066isaQuadBilateralSwitchIC,thatis,ithasfourswitcheswhichcanbecontrolledindividualusingacontrolpin.Theseswitchescanconductinboththedirectionsmakingitbilateral,itiscommonlyusedformultiplexinganalogordigitalsignals.HowtouseCD4066?TheCD4066ICconsistsoffourswitches.Itcanswitchanalogsignalsthroughdigitalcontrol.Ananalogsignalisappliedattheinputoftheswitch.IfaHIGHor1valueisfedintothecontrolinput,theanalogsignalwillbepassedfrominputtotheoutputofaswitch.HowCD4066work?The4066reallyfunctionsasananalogswitch.The4066isanICcomposedofswitcheswhicharedesignedtoswitchanalogsignalsviadigitalcontrol....The4066isaquadbilateralswitchcircuit,meaningthatiscomposedof4switches.Eachswitchhasasingleinputandasingleoutputterminal.WhataretheapplicationsofCD4066?TheCD4066isabi-directionalanalogswitchingICsimilartoCD4016,itiscommonlyusedinmultiplexingapplications;itcanalsobeusedtoisolatesignals.Theswitchisbilateralandhencecanbeusedforbothdigitalandanalogsignals.WhatsthedifferencebetweenCD4016andCD4066?ThemajordifferencebetweenbothisthatCD4066hasverylowinternalresistance,accordingtothedatasheetitcanonly5ofon-stateresistanceascomparedwith200ofCD4016IC.

MBR2045CT-E3/45-VISHAY

IDescriptionIndailylife,calendarclocksareusedinvariousplaces.Suchasshoppingmalls,supermarkets,offices,homes,schools,etc.Comparedwiththetraditionalmechanicalclock,thedigitalcalendarclockhasaseriesofadvantages.Suchashighprecision,intuitivedisplay,andlonglife.ThisblogintroducesacalendarclockdesignedwithaDS1302rtcchip.DS1302RTCwithArduinoTutorialCatalogIDescriptionIISystemHardwareDesign2.1OverallStructure2.2DS1302ClockModule2.3LCD1602LCDModuleIIISystemSoftwareDesign3.1DesignofDS1302ClockSubprogram3.2LCD1602LiquidCrystalDisplaySubprogramDesignIVConclusionFAQOrdering&QuantityIISystemHardwareDesign2.1OverallStructureTakeAT89C51single-chipmicrocomputerasthemaincontroller,anduseDS1302clockchiptodesigncalendarclock.ItsoverallstructureisshowninFigure1.Figure1.OverallStructureofSystemThedesignedcalendarclockmustnotonlydisplayhours,minutesandseconds,butalsodisplayyears,months,daysandweeks.ThecoreofthesystemistheAT89C51microcontroller.Throughthesingle-chipcomputercontrolDS1302displaycalendarandtime.AndtheoutputresultisdisplayedonLCD1602liquidcrystalscreen.2.2DS1302ClockModuleTheDS1302clockchiphasthecharacteristicsoflowpowerconsumptionandhighperformance.Itcancommunicatewiththemicrocontrollerthroughasimplesynchronousserialmode,andonlyrequiresthreeI/Olines.Namelyreset(RST),I/Odatalineandserialclock(SCLK)2.2.1DS1302PinsandStructureFigure2showstheexternalpinsandfunctionsofDS1302.Figure2.DS1302PinoutVCC2-mainpowersupplypin;X1,X2-32.768kHzcrystaloscillatorpin;GND-ground;VCC1-batterypin;SCLK-serialclock;I/O-datainput/output;RST-reset.TheinternalstructureofDS1302isshowninFigure3,whichismainlycomposedofthefollowingparts:real-timeclock,datamemoryRAM,oscillatorcircuitandfrequencydivider,inputshiftregister,commandandcontrollogicandsoon.2.2.2DS1302RegistersandcontrolcommandsTheDS1302clockchiphas7registersrelatedtothecalendarclock,asshowninTable1.ThecommunicationsignalbetweenDS1302andsingle-chipmicrocomputerisrealizedthroughsimplesynchronousserialcommunication.AccordingtotheworkingtimingrequirementsofDS1302,whetherthesingle-chipmicrocomputerperformsreadoperationcommunicationfromDS1302orthesingle-chipcomputerperformswriteoperationcommunicationtoDS1302,eachcommunicationisinitiatedbythesingle-chipcomputerfirst.Inotherwords,beforeexecutingthecorrespondingreadorwriteoperation,themicrocontrollermustwriteabyteofcommandwordtoDS1302.Theeight-bitdataofthebytecommandwordisshowninFigure4.Figure4.CommandwordstructureofDS13022.3LCD1602LCDModuleTheLCD1602screencandisplaytwolinesofcharacters,16charactersperline,foratotalof32characters.Thereisan80*8-bitdisplaydatamemoryDDRAMbufferinLCD1602.SeeTable2forthecorrespondencebetweencharacterdisplaybitsandDDRAMaddress.TheaddressonthefirstlineofDDRAMstartsat00Handendsat27H.Theaddressesonthesecondlinestartat40Handendat67H,with40addressesperline.AndLCD1602displays16charactersperline.Therefore,whenwritingaprogram,selectthefirst16addressesofDDRAM.Itisimportanttonotethatthesecondlineaddressstartsfrom40H.IfyouwanttodisplayacharacterinacertainrowandcertaincolumnoftheLCD1602screen,writetheASCIIcodecorrespondingtothischaracterintothecorrespondingDDRAMaddressofacertainrowandcertaincolumn.Atthistime,youwillfindthatthecharactercannotbedisplayednormallyontheLCDscreen.Thereasonisthat80Hmustbeaddedtotheaddress.Forexample,todisplaythesymbolVinthesecondrowandsecondcolumnofthevoltageunitvolts,firstadd80HtothecorrespondingDDRAMaddress41Hinthesecondrowandsecondcolumn,thatis,C1H.ThenwritetheASCIIcode0x56correspondingtotheVcharacterintheC1Haddress.Onlythencanitbedisplayednormally.Thedisplayofothercharacterscanbededucedbyanalogyandwillnotberepeatedhere.IIISystemSoftwareDesignThesoftwareprogrammainlycompletesthefunctionsofdatareading,conversionandliquidcrystaldisplayofthecalendarclock.3.1DesignofDS1302ClockSubprogramsbitRST=P1^0;//DS1302resetportisdefinedinP1.0pinsbitSCLK=P1^1;//TheDS1302clockoutputportisdefinedontheP1.1pinsbitDATA=P1^2;//TheDS1302dataoutputportisdefinedontheP1.2pin(1)Theprogramthatthesingle-chipmicrocomputerwritesabyteofdatatoDS1302voidwright1302(unsignedchardate){Unsigneedchari;SCLK=0;//BepreparedfortherisingedgetowritedataDelaynus(2);for(i=0;i8;i++)//Writeeight-bitdatacontinuously{DATA=date0x01;//Writethebit0dataofdateintoDS1302Delaynus(2);SCLK=1;//WritedataonrisingedgeDelaynus(2);SCLK=0;//date=1;//moveoneplacetotheright}}(2)Theprogramforthesingle-chipmicrocomputertoreadabyteofdatafromDS1302unsignedcharreadd1302(void){Unsignedchari,date;Delaynus(2);for(i=0;i8;i++)//Continuouslyreadeight-bitdata{Date=1;//shiftonebittotherightif(DATA==1)//Ifthedatareadoutis1date|=0x80;//Takeout1andwriteitinthehighestbitofdateSCLK=1;//SetSCLKtoahighlevel,readoutforthefallingedgeDelaynus(2);SCLK=0;//PulldownSCLKtoformthefallingedgeofthepulseDelaynus(2);}returndate;//Returnthereaddata}3.2LCD1602LiquidCrystalDisplaySubprogramDesignThedriverprogramofLCD1602LCDscreenisrelativelycomplicatedtocompile,sowemustfigureouttheusageandmeaningofeachoperationinstructionof1602.Mainlyincludethefollowing:DisplaymodesettingDisplayswitchcontrolInputmodecontrolReaddatafromDDRAMWritedatatoDDRAMClearscreen,cursorhomesettingDataaddresspointersettingLCDscurrentbusyworksign...Partofthecodedesignisasfollows:voidLcd_initial()//InitializeLCD{E=0;Lcd_writecmd(0x38);//16*2display,5*7dotmatrixMsdelay(1);Lcd_writecmd(0x08);//displayoffMsdelay(2);Lcd_writecmd(0x01);//displayclearscreenMsdelay(2);Lcd_writecmd(0x06);//Setthecursor,afterreadingandwritingacharacter,thecursorincreasesby1Msdelay(1);Lcd_writecmd(0x0c);//displayison,nocursorisdisplayedMsdelay(1);}Figure5.HardwarepowersupplydiagramofDS1302calendarclockIntheMedwinV3.0developmentenvironment,useC51languagetocompilethesystemprogram,compileanddebug.AndloadtheHEXhexadecimalfilegeneratedbycompilingintotheMCUchip.StartthesimulationandyoucanseethesimulationrunningeffectoftheDS1302calendarclockdesignsystembasedon1602LCDdisplay.Forexample,thecurrenttimeis11:42:25onMay28,2019,andthesimulationresultisshowninFigure6.Figure6.SimulationresultsofcalendarclockItcanbeseenfromFigure6thatthecurrentdateandtimecanbedisplayedontheLCDscreeninrealtimeandaccurately.IVConclusionCalendarclocksareeverywhereinourlives.ThistexttakesAT89C51single-chipmicrocomputerasthemaincontroller,andusesDS1302real-timeclockchiptodesignthecalendarclocksystem.Inaddition,thehardwarecircuitwasdesignedintheProteussimulationsoftware,andthecorrespondingC51programwaswrittenintheMedwinV3.0developmentenvironment.Thejointuseofthesetwosoftwares,ProteusandMedWinV3.0,greatlyimprovestheefficiencyofsingle-chipsystemdesign,reducescosts,andshortensthedevelopmentcycle.FAQWhatisDS1302?DS1302isatickle-chargetimekeepingchipwhichcontainsareal-timeclock/calendarand31bytesofstaticRAM.DS1302usesserialcommunicationtointeractwithmicrocontrollers.Also,itautomaticallyadjustthedateforthemonthwithfewerdays.WhatdoesanRTCdo?Areal-timeclock(RTC)isacomputerclock(mostoftenintheformofanintegratedcircuit)thatkeepstrackofthecurrenttime.Althoughthetermoftenreferstothedevicesinpersonalcomputers,serversandembeddedsystems,RTCsarepresentinalmostanyelectronicdevicewhichneedstokeepaccuratetime.HowdoyouuseRTC?WiringItUp.5VisusedtopowertotheRTCchipwhenyouwanttoqueryitforthetime.Ifthereisno5Vsignal,thechipgoestosleepusingthecoincellforbackup.ConnectGNDtocommonpower/dataground.ConnecttheSCLpintotheI2CclockSCLpinonyourArduino....ConnecttheSDApintotheI2CdataSDApinonyourArduino.DescriptionDS1302isalow-powerreal-timeclockchipwithtricklecurrentchargingcapability.Itcantimetheyear,month,day,week,hour,minute,andsecond.ThisVideoIntroducesDS1302ArduinoRealtimeClockCatalogDescriptionDS1302PinoutDS1302DocumentsandMediaDS1302CADModelsDS1302ParametersDS1302FeaturesDS1302AdvantageDS1302ApplicationsDS1302TypicalOperatingCircuitDS1302EnvironmentalandExportClassificationsDS1302BlockDiagramHowtoUseDS1302DS1302RTCModuleDS1302CommandByteFAQOrdering&QuantityDS1302PinoutThefigurebelowshowsthepinarrangementofDS1302.Amongthem,Vcc2isthemainpowersupply,andVCC1isthebackuppowersupply.Thecontinuousoperationoftheclockcanbemaintainedevenwhenthemainpowerisoff.DS1302ispoweredbythelargerofVcc1orVcc2.WhenVcc2isgreaterthanVcc1+0.2V,Vcc2suppliespowertoDS1302.WhenVcc2islessthanVcc1,DS1302ispoweredbyVcc1.X1andX2aretheoscillationsourcesandanexternal32.768kHzcrystaloscillator.RSTisthereset/chipselectline.AlldatatransfersarestartedbydrivingtheRSTinputtohigh.RSTinputhastwofunctions:First,RSTturnsonthecontrollogic,allowingtheaddress/commandsequencetobesenttotheshiftregister;second,RSTprovidesamethodtoterminatesingle-byteormulti-bytedatatransmission.WhenRSTishigh,alldatatransfersareinitialized,allowingoperationsonDS1302.IfRSTissettoalowlevelduringthetransfer,thedatatransferwillbeterminatedandtheI/Opinwillbecomehighimpedance.Duringpower-onoperation,RSTmustremainlowbeforeVcc2.0V.OnlywhenSCLKislow,canRSTbesethigh.I/Oisaserialdatainputandoutputterminal(two-way),whichwillbedescribedindetaillater.SCLKistheclockinputterminal.PinNumberPinNameDescription1VCC2PrimaryPower-SupplyPininDualSupplyConfiguration.VCC1isconnectedtoabackupsourcetomaintainthetimeanddateintheabsenceofprimarypower.TheDS1302operatesfromthelargerofVCC1orVCC2.WhenVCC2isgreaterthanVCC1+0.2V,VCC2powerstheDS1302.WhenVCC2islessthanVCC1,VCC1powerstheDS1302.2X1ConnectionsforStandard32.768kHzQuartzCrystal.Theinternaloscillatorisdesignedforoperationwithacrystalhavingaspecifiedloadcapacitanceof6pF.Formoreinformationoncrystalselectionandcrystallayoutconsiderations,refertoApplicationNote58:CrystalConsiderationsforDallasReal-TimeClocks.TheDS1302canalsobedrivenbyanexternal32.768kHzoscillator.Inthisconfiguration,theX1pinisconnectedtotheexternaloscillatorsignalandtheX2pinisfloated.3X24GNDGround5CEInput.CEsignalmustbeassertedhighduringareadorawrite.Thispinhasaninternal40kΩ(typ)pulldownresistortoground.Note:PreviousdatasheetrevisionsreferredtoCEasRST.Thefunctionalityofthepinhasnotchanged.6I/OInput/Push-PullOutput.TheI/Opinisthebidirectionaldatapinforthe3-wireinterface.Thispinhasaninternal40kΩ(typ)pulldownresistortoground.7SCLKInput.SCLKisusedtosynchronizedatamovementontheserialinterface.Thispinhasaninternal40kΩ(typ)pulldownresistortoground.8VCC1Low-PowerOperationinSingleSupplyandBattery-OperatedSystemsandLowPowerBatteryBackup.Insystemsusingthetricklecharger,therechargeableenergysourceisconnectedtothispin.ULrecognizedtoensureagainstreversechargingcurrentwhenusedwithalithiumbattery.DS1302DocumentsandMediaDatasheetsDS1302OtherRelatedDocumentsTipsforWritingBulletproofReal-TimeClockControlCodeMfgApplicationNotesEstimatingSuperCapacitorBackupTimeonTrickle-ChargerReal-TimeClocksSelectingaBackupSourceforReal-TimeClocksOscillatorDesignConsiderationsforLow-CurrentApplicationsStateMachineLogicinBinary-CodedDecimal(BCD)-FormattedReal-TimeClocksEnvironmentalInformationHalogenCertificateRedPhosphorousCertificateMaterialDeclarationDS1302PCNObsolescence/EOLMultDevOBS15/Jul/2015HTMLDatasheetDS1302EDA/CADModelsDS1302bySnapEDADS1302byUltraLibrarianDS1302CADModelsDS1302SymbolDS1302FootprintDS1302ParametersBaseProductNumberDS1302BatteryBackupSwitchingBackupSwitchingCategoryIntegratedCircuits(ICs)Clock/Timing-RealTimeClocksCurrent-Timekeeping(Max)0.3A~1A@2V~5VDateFormatYY-MM-DD-ddFeaturesLeapYear,NVSRAM,Trickle-ChargerFunctionCalendar,Clock,NVTimekeepingRAM,TrickleChargerInterface3-WireSerialManufacturerMaximIntegratedMaximumOperatingTemperature+70CMinimumOperatingTemperature0CMountingStyleThroughHoleOperatingTemperature0C~70CPackageTubePackage/Case8-DIP(0.300,7.62mm)PackagingTubePartStatusObsoleteProductCategoryRealTimeClockRoHSNRTCBusInterfaceSerialRTCMemorySize31BSubcategoryClockTimerICsSupplierDevicePackage8-PDIPSupplyVoltage-Max5.5VSupplyVoltage-Min2VTimeFormatHH:MM:SS(12/24hr)TypeClock/CalendarVoltage-Supply,Battery2V~5.5VDS1302FeaturesCompletelyManagesAllTimekeepingFunctionsoReal-TimeClockCountsSeconds,Minutes,Hours,DateoftheMonth,Month,DayoftheWeek,andYearwithLeap-YearCompensationValidUpto2100o31x8Battery-BackedGeneral-PurposeRAMSimpleSerialPortInterfacestoMostMicrocontrollersoSimple3-WireInterfaceoTTL-Compatible(VCC=5V)oSingle-ByteorMultiple-Byte(BurstMode)DataTransferforReadorWriteofClockorRAMDataLowPowerOperationExtendsBatteryBackupRunTimeo2.0Vto5.5VFullOperationoUsesLessThan300nAat2.0V8-PinDIPand8-PinSOMinimizesRequiredSpaceOptionalIndustrialTemperatureRange:-40Cto+85CSupportsOperationinaWideRangeofApplicationsUnderwritersLaboratories(UL)RecognizedDS1302AdvantageTheDS1302trickle-chargetimekeepingchipcontainsareal-timeclock/calendarand31bytesofstaticRAM.Itcommunicateswithamicroprocessorviaasimpleserialinterface.Thereal-timeclock/calendarprovidesseconds,minutes,hours,day,date,month,andyearinformation.Theendofthemonthdateisautomaticallyadjustedformonthswithfewerthan31days,includingcorrectionsforleapyear.Theclockoperatesineitherthe24-houror12-hourformatwithanAM/PMindicator.InterfacingtheDS1302withamicroprocessorissimplifiedbyusingsynchronousserialcommunication.Onlythreewiresarerequiredtocommunicatewiththeclock/RAM:CE,I/O(dataline),andSCLK(serialclock).Datacanbetransferredtoandfromtheclock/RAM1byteatatimeorinaburstofupto31bytes.TheDS1302isdesignedtooperateonverylowpowerandretaindataandclockinformationonlessthan1W.TheDS1302isthesuccessortotheDS1202.InadditiontothebasictimekeepingfunctionsoftheDS1202,theDS1302hastheadditionalfeaturesofdualpowerpinsforprimaryandbackuppowersupplies,programmabletricklechargerforVCC1,andsevenadditionalbytesofscratchpadmemory.DS1302ApplicationsTheapplicationsofDS1302includeincorporateddigitalclocks/timersofvariousmodulesinourreallives.OtherequivalentsICsofRTCare:DS1307,DS3231,DS3232DS1302TypicalOperatingCircuitDS1302EnvironmentalandExportClassificationsAttributeDescriptionRoHSStatusRoHSnon-compliantMoistureSensitivityLevel(MSL)1(Unlimited)HowtoUseDS1302AtypicaloperatingcircuitforDS1302isgivenbelow.DS1302havetwopowerinput,oneisfromcellandotherisfromcontroller.Acrystaloscillatorof32.768kHzisusedtogeneraterequiredfrequency.ForinterfacingDataline,ResetPinandSerial-clockpinsofDS1302areconnectedwiththemicro-controller.DS1302BlockDiagramDS1302RTCModuleDS1302isatickle-chargetimekeepingchipwhichcontainsareal-timeclock/calendarand31bytesofstaticRAM.DS1302usesserialcommunicationtointeractwithmicrocontrollers.Also,itautomaticallyadjustthedateforthemonthwithfewerdays.Clockoperatesin24hror12hrformatwithanAM/PMindicator.DS1302chipisalsocommonlyusedasDS1302RTCmodulewhichcomeswitha32kHzcrystalandon-boardbatterybackupallinasmallSIPmodulethatiscompatiblewithabreadboard.DS1302moduleareusedbymakerswithArduino,RaspberryPiandotherMicro-controllers.ADS1302RTCmodulepinoutisshowninbelowimage.DS1302CommandByteAcommandbyteinitiateseachdatatransfer.TheMSB(bit7)mustbealogic1.Ifitis0,writestotheDS1302willbedisabled.Bit6specifiesclock/calendardataiflogic0orRAMdataiflogic1.Bits1to5specifythedesignatedregisterstobeinputoroutput,andtheLSB(bit0)specifiesawriteoperation(input)iflogic0orreadoperation(output)iflogic1.ThecommandbyteisalwaysinputstartingwiththeLSB(bit0).DS1302RegisterDS1302has12registers,ofwhich7registersarerelatedtocalendarandclock.ThestoreddatabitsareintheformofBCDcodes.Thecalendar,timeregistersandtheircontrolwordsareshowninTable1.Inaddition,DS1302alsohasyearregister,controlregister,chargingregister,clockburstregister,andRAM-relatedregisters.Theclockburstregistercanreadandwritethecontentsofallregistersexceptthechargingregisterinsequenceatonetime.TheDS1302andRAM-relatedregistersaredividedintotwocategories:OneisasingleRAMunit,with31intotal.Eachunitisconfiguredasan8-bitbyte,anditscommandcontrolwordisC0H~FDH.Amongthem,oddnumbersarereadoperations,andevennumbersarewriteoperations;theothertypeisRAMregistersinburstmode.Inthismode,all31bytesofRAMcanbereadandwrittenatonce,andthecommandcontrolwordsareFEH(write)andFFH(read).FAQWhatisDS1302?DS1302isatickle-chargetimekeepingchipwhichcontainsareal-timeclock/calendarand31bytesofstaticRAM.DS1302usesserialcommunicationtointeractwithmicrocontrollers.Also,itautomaticallyadjustthedateforthemonthwithfewerdays.WhatdoesanRTCdo?Areal-timeclock(RTC)isacomputerclock(mostoftenintheformofanintegratedcircuit)thatkeepstrackofthecurrenttime.Althoughthetermoftenreferstothedevicesinpersonalcomputers,serversandembeddedsystems,RTCsarepresentinalmostanyelectronicdevicewhichneedstokeepaccuratetime.HowdoyouuseRTC?WiringItUp.5VisusedtopowertotheRTCchipwhenyouwanttoqueryitforthetime.Ifthereisno5Vsignal,thechipgoestosleepusingthecoincellforbackup.ConnectGNDtocommonpower/dataground.ConnecttheSCLpintotheI2CclockSCLpinonyourArduino....ConnecttheSDApintotheI2CdataSDApinonyourArduino.DescriptionTheTDA2822isadual-channel,single-chippoweramplifierintegratedcircuitdevelopedbyStMICROelectronics.Itiscommonlyusedasanaudioamplifierinportablecassetteplayers,cassetterecorders,andmultimediaactivespeakers.Ithasthecharacteristicsofsimplecircuit,goodsoundquality,widevoltagerangeandsoon.Itcanworkinthecircuitformofstereosoundandbridgeamplification(BTL).HowtoMakeaStereoAmplifierUsingICTDA2822?CatalogDescriptionTDA2822PinoutTDA2822CADModelTDA2822ParameterTDA2822ApplicationsTDA2822FeaturesTDA2822AdvantagesWheretouseTDA2822AmplifierICHowtouseTDA2822AmplifierTDA2822SchematicDiagramTDA2822DocumentsandMediaTDA2822EnvironmentalandExportClassificationsTDA2822CircuitOrdering&QuantityTDA2822PinoutPinNumberPinNameDescription1,3OutputProvidestheamplifiedAudiooutput5,8InvertingInput(IN-)TheInvertingPinofanamplifierisnormallygrounded6,7Non-InvertingInput(IN+)TheNon-Invertingpinisprovidedwiththeaudiosignal4Vcc-Connectedtothenegativesupplyrail2Vcc+ConnectedtoPositiveSupplyRailTDA2822CADModelTDA2822SymbolTDA2822FootprintTDA2822ParameterAudio-LoadImpedance8OhmsBaseProductNumberTDA2822BrandSTMicroelectronicsCategoryIntegratedCircuits(ICs)Linear-Amplifiers-AudioClassClass-ABDescription/FunctionHeadphone/SpeakerFactoryPackQuantity25Features-Gain39dBHeight4.59mmIb-InputBiasCurrent0.1uAInputTypeSingleLength20mmManufacturer:STMicroelectronicsMaxOutputPowerxChannels@Load3.2Wx1@8Ohm;1.7Wx2@4OhmMaximumOperatingTemperature:+150CMfrSTMicroelectronicsMinimumOperatingTemperature-40CMountingStyleThroughHoleNumberofChannels2ChannelOperatingSupplyCurrent12mAOperatingSupplyVoltage5V,9V,12VOperatingTemperature-40C~150C(TJ)OutputCurrent1500mAOutputPower3.2WOutputSignalTypeDifferential,SingleOutputType1-Channel(Mono)or2-Channel(Stereo)PackageTubePackage/Case16-DIP(0.300,7.62mm)Package/CasePDIP-16PackagingTubePartStatusObsoletePd-PowerDissipation4000mWProductAudioAmplifiersPSRR-PowerSupplyRejectionRatio40dBSeriesTDA2822SubcategoryAudioICsSupplierDevicePackage16-PowerDIPSupplyTypeSingleSupplyVoltageMax15VSupplyVoltageMin3VTHDplusNoise0.2%TypeClassABType1-ChannelMonoor2-ChannelStereoUnitWeight0.057419ozVoltageSupply3V~15VWidth7.1mmTDA2822ApplicationsAMandFMRadioamplifiersPortablemusicplayersLowPowerAudioamplifiersWienbridgeoscillatorPowerAmplifiersAudioboostersTDA2822FeaturesDualAmplifiersinoneDIP-8similarforLM368.Givepowerwattsat1W+1Wat4ohmsspeakers.Itisenough.WearehappyListeninginourcorner.Startvoltagesupplyof1.8Vto15V.Thewidealot.Saveenergywithonly6mA,Min.Thebandwidthexpansionratesat40dB120kHz.CheapandeasytouseTDA2822AdvantagesTDA2822isalowpowerstereoOpAmplifierusedinWalkmanplayersandHearingaids.Itcangive250mWoutput.TDA2822isanidealOpampforlowoutputapplications.Itisagoodchoiceasapreamplifierinstereohighpoweramplifiercircuits.Ithastwoinputsandtwooutputswhichcandeliver250milliwattsoutputpower.TheamplifiercircuitwithintheICiswellsetfornoisefreeoperation.Outputscanbedirectlycoupledtothespeakersthroughthedecouplingcapacitors.WheretouseTDA2822AmplifierICTheTDA2822isaDualAudioAmplifierIC,meaningithastwoOp-Ampsinsideitspackage,andtheyarecommonlyusedforaudioamplificationbecauseoftheirwidebandwidthgain.Thetwooutputscandeliver250milliwattsoutputpower.ThisICcanbeusedinportableaudiosystems,preamplifiers,hearingaidminiradio,headphoneamplifier,etc.SoifyouarelookingforadualpackageOperationalamplifierICwithhigh-gain,andwidebandwidthforaudioamplification,thenthisICmightbetherightchoiceforyou.HowtouseTDA2822AmplifierAnapplicationcircuitfromTDA2822datasheetisgivenbelowTheleftloadisconnectedtooutputpin1oftheICthroughelectrolyticcapacitorC4,andtherightloadisconnectedtooutputpin3throughelectrolyticcapacitorC5.TheInvertingInputPins(5and8)areconnectedtothegroundviaelectrolyticcapacitors.Non-InvertingInputPins(7and6)areconnectedtoinput1andinput2.Pin2isconnectedtoDCsupplyandpin4isconnectedtoground.ElectrolyticcapacitorC3connectedacrossVCCandground,workasafiltercapacitor.TDA2822SchematicDiagramTDA2822DocumentsandMediaDatasheetsTDA2822DesignResourcesDevelopmentToolSelectorHTMLDatasheetTDA2822TDA2822EnvironmentalandExportClassificationsAttributeDescriptionRoHSStatusROHS3CompliantMoistureSensitivityLevel(MSL)1(Unlimited)TDA2822CircuitTDA2822TestCircuit(Stereo)TDA2822TestCircuit(Bridge)TDA2822TypicalApplicationinPortablePlayersTDA2822LowCostApplicationinPortablePlayersTDA28223VStereoCassettePlayerwithMototSpeedControl

MBR2045CT-E3/45-VISHAY

I.Description74LS138isa3-lineto8-linedecoder/demultiplexer.Thechipisdesignedtobeusedinhigh-performancememory-decodingordata-routingapplications,requiringveryshortpropagationdelaytimes.Inhighperformancememorysystemsthesedecoderscanbeusedtominimizetheeffectsofsystemdecoding.Thethreeenablepinsofchip(inwhichTwoactive-lowandoneactive-high)reducetheneedforexternalgatesorinverterswhenexpanding.CatalogI.DescriptionII.DigitalVoltmeterCircuitFAQOrdering&QuantityII.DigitalVoltmeterCircuitWeuseAD574andAT89C2051toformahighprecisiondigitalvoltmeter.TheschematicdiagramisshowninFigure1.AD574isa12-bitsuccessivecomparisonA/Dconverterwith12datalinesintotal.P1ofAT89C2051isdirectlyconnectedtothehigh8-bitdatalineofAD574.Thelow4-bitdatalineofAD574isdirectlyconnectedwiththeupperhalf4-bitp1.4-p1.7ofsingle-chipmicrocomputer.Datareadingisbasedonthecontrollineofsinglechipmicrocomputer.P3.5isconnectedtoAD574byteshortperiodcontrolline(A0).P3.4isconnectedtoreadconversiondatacontrolpin.AndP3.7isdirectlyconnectedwiththeterminalofindicatingworkingstatus(STS).Suchstructuredeterminesthatitcanonlybe8-bitoutput,sothedatamodeselectionendcanbedirectlygrounded.AT89C2051hasonly15I/Oportwires,11ofwhichareusedabove,andonly4ofthemareleft.Theoutputdataisoutputthroughtheserialportofthesingle-chipmicrocomputer,andanexternal74LS164(serialinandparallelout)decoderisconnectedforexpansion.Atthesametime,thedatadisplayedis4bits,andtheremaining2portlinesstillcannotmeettherequirements.A74LS138decoderisneededtogatetheaddressofthedisplayLED.Hereweusetheinputmodeof10Vrange.Pin13ofAD574istheinputterminalofthemeasuredvoltage.BecauseonlyoneAD574conversionchipisused,theCSterminalcanbedirectlygrounded.Theconverteruses12Vpowersupplyvoltageandtheworkingvoltageis+5V.74LS164isaserialinputandparalleloutputdecoder.TheBCDserialcodeoutputbyAT89C2051throughtheserialportisdecodedby74LS164andoutputasaseven-segmentBCDcode,whichisdirectlyconnectedtoa-goftheLED,andthedatalinesofthefourLEDsareconnectedonebyone.LEDdigitaltubeusescommonanodetype.Theaddresscodeoutputby74LS138isconnectedtothecommonterminalofLEDviaatransistor2SA1015(PNP).Thedisplayofthefour-digitLEDistime-sharingstrobethroughtheaddressline,whichisourcommonlyuseddynamicscanningdisplaymethod.Itisworthmentioningthatinthedynamicscanningdisplaymode,thefrequencyofdynamicscanninghascertainrequirements.Ifthefrequencyistoolow,theLEDwillflicker.Ifthefrequencyistoohigh,thelightingtimeofeachLEDistooshort,andthebrightnessoftheLEDistoolow.Itcantbeseenclearlywithnakedeye.Soitisgenerallyappropriatetotakeabout10ms.Thisrequiresthatwhenwritingaprogram,acertainLEDshouldbeonandkeptforacertainperiodoftime.Theprogramoftenusesthecalldelaysubroutine.FAQWhatisthedifferencebetween74hc138and74LS138?Bothhavethesamefunction.74HC138ismadeofhigh-speedCMOSprocess,withlowpowerconsumption,highoutput,lowlevelandwiderange.74LS138adoptstheearlybipolarprocess,anditsdrivingcapabilityisrelativelylarger.Whatisthefunctionaldifferencebetween74ls138decoderand74ls148?74ls138isa3-8wiredecoder/multiplexer,74ls148isan8-3wireoctalpriorityencoder.Oneisdecodingandtheotherisencoding.OppositeeffectWhatsthedifferencebetween74LS138Dand74LS138N?Thosetwoarethesamechip,DisSOPpackage,NisDIPpackage.Whataretheoutputcharacteristicsof74LS138decoder?UnderthepremisethattheenableterminalsS1(activehigh),S2(activelow),andS3(activelow)arevalidatthesametime,onlyoneoutputterminalislowatatime(therestarehigh);Iftheenableterminalisinvalid,theoutputisallhighlevel.Whatdothelettersandnumbersin74ls138standfor?74ls138isa3-8-linedecoder.Thenumber74representsthe74seriesofthe54/74series,andthe74serieshasanoperatingtemperatureof0degreesto70degrees.LSisaseries,representingthelow-powerSchottkyseries.138isthevarietycode.Whatstheworkingprincipleof74ls138?74LS138workingprinciple①Whenonestrobeterminal(E1)ishighlevel,andtheothertwostrobeterminals(E2)and(E3)arelowlevel,attheoutputterminalscorrespondingtoY0toY7,thebinarycodeofaddressterminals(A0,A1,A2)canbedecodedatlowlevel.Forexample:whenA2A1A0=110,theY6outputterminaloutputsalow-levelsignal.②UsingE1,E2andE3,itcanbecascadedtoexpandintoa24-linedecoder;ifanexternalinverterisconnected,itcanalsobecascadedtoexpandintoa32-linedecoder.③Ifoneofthestrobeterminalsisusedasadatainputterminal,74LS138canalsobeusedasadatadistributor.④Itcanbeusedin8086decodingcircuittoexpandmemory.Introduction74LS138isa3-lineto8-linedecoder/demultiplexer.Thechipisdesignedtobeusedinhigh-performancememory-decodingordata-routingapplications,requiringveryshortpropagationdelaytimes.Inhighperformancememorysystemsthesedecoderscanbeusedtominimizetheeffectsofsystemdecoding.Thethreeenablepinsofchip(inwhichTwoactive-lowandoneactive-high)reducetheneedforexternalgatesorinverterswhenexpanding.CatalogIntroductionIFullAdderCircuitIIResponderCircuitIIILogicFunctionIVFullSubtractorCircuitVThree-inputMajorityVotingFAQOrdering&QuantityIFullAdderCircuitThefulladderhas3inputterminals:An,Bn,Cn-1;2outputterminals:Sn,Cn.The74LS1383-lineto8-linedecoderhas3datainputterminals:A,B,C;3enableterminalsand8outputterminals.Here,the3datainputterminalsofthe3-lineto8-linedecodercanberegardedasthe3inputterminalsofthefulladder.Thatis,theinputsA,B,andCofthe3-lineto8-linedecodercorrespondtotheinputsAn,Bn,andCn-1ofthefulladderrespectively.Setthe3enableterminalsofthe3-lineto8-linedecodertotheeffectiveleveltomaintainnormaloperation.Thekeypointhereistodealwiththerelationshipbetweenthe8outputterminalsofthe3-lineto8-linedecoderandthe2outputsofthefulladder.UsetheoutputOUT(1,2,4,7)ofthe3-lineto8-linedecoderasa4-inputorgateinput,andthegateoutputasthesumoftheadder.UsetheoutputOUT(3,5,6,7)ofthe3-lineto8-linedecoderasa4-inputorgateinput,thegateoutputisusedasthecarryoutputoftheadder.Whentheinputoftheadderis:a=1,b=0,ci=1,theinputofthecorresponding3-lineto8-linedecoderisA=1,B=0,C=1.Theoutputofthedecoderisout(5)=1andtherestis0.Accordingtotheconnectionrelationshipdesignedabove,S=0,CO=1,whichsatisfiesthefunctionoffulladder.Figure1.FullAdderCircuitIIResponderCircuitFigure2.ResponderCircuitIIILogicFunctionF=ABC+ABC+ABC=111+110+101=Y7+Y6+Y5Accordingtotheruleof74LS138,Aisthelowbit(LSB)andDisthehighbit(MSB).The74LS138decodingoutputislowleveleffective.With74LS10NANDgate,theactuallogicisinputlowleveleffectiveorgate.Figure3.CircuitofLogicFunctionIVFullSubtractorCircuitFigure4.FullSubtractorCircuitVThree-inputMajorityVotingThedeviceconsistsofa3-lineto8-linedecoder(74LS138)andtwo4-inputNANDgates(74LS20).Therearethreebuttonsforuser.Pressthebuttontoagree,nottopressmeanstoreject.Whennoonepressesthebutton,orwhenonlyonepersonpressesthebutton,forexample,S1ispressed,butS2andS0arenotpressed.Theredlightison,thegreenlightisoff,andthebuzzerissilent,indicatingveto.Whentwoormorepeoplepressthebutton,forexample,ifS1andS2arepressed,theredlightwillbeoff,thegreenlightwillbeon,andthebuzzerwillsoundtoindicateapass.Use74LS138decoderandfour-inputNANDgate74LS20torealizethislogicfunction.Figure5.CircuitofThree-inputMajorityVotingFAQWhatisthedifferencebetween74hc138and74LS138?Bothhavethesamefunction.74HC138ismadeofhigh-speedCMOSprocess,withlowpowerconsumption,highoutput,lowlevelandwiderange.74LS138adoptstheearlybipolarprocess,anditsdrivingcapabilityisrelativelylarger.Whatisthefunctionaldifferencebetween74ls138decoderand74ls148?74ls138isa3-8wiredecoder/multiplexer,74ls148isan8-3wireoctalpriorityencoder.Oneisdecodingandtheotherisencoding.OppositeeffectWhatsthedifferencebetween74LS138Dand74LS138N?Thosetwoarethesamechip,DisSOPpackage,NisDIPpackage.Whataretheoutputcharacteristicsof74LS138decoder?UnderthepremisethattheenableterminalsS1(activehigh),S2(activelow),andS3(activelow)arevalidatthesametime,onlyoneoutputterminalislowatatime(therestarehigh);Iftheenableterminalisinvalid,theoutputisallhighlevel.Whatdothelettersandnumbersin74ls138standfor?74ls138isa3-8-linedecoder.Thenumber74representsthe74seriesofthe54/74series,andthe74serieshasanoperatingtemperatureof0degreesto70degrees.LSisaseries,representingthelow-powerSchottkyseries.138isthevarietycode.Whatstheworkingprincipleof74ls138?74LS138workingprinciple①Whenonestrobeterminal(E1)ishighlevel,andtheothertwostrobeterminals(E2)and(E3)arelowlevel,attheoutputterminalscorrespondingtoY0toY7,thebinarycodeofaddressterminals(A0,A1,A2)canbedecodedatlowlevel.Forexample:whenA2A1A0=110,theY6outputterminaloutputsalow-levelsignal.②UsingE1,E2andE3,itcanbecascadedtoexpandintoa24-linedecoder;ifanexternalinverterisconnected,itcanalsobecascadedtoexpandintoa32-linedecoder.③Ifoneofthestrobeterminalsisusedasadatainputterminal,74LS138canalsobeusedasadatadistributor.④Itcanbeusedin8086decodingcircuittoexpandmemory.

MBR2045CT-E3/45-VISHAY

Description74LS138isa3-lineto8-linedecoder/demultiplexer.Thechipisdesignedtobeusedinhigh-performancememory-decodingordata-routingapplications,requiringveryshortpropagationdelaytimes.Inhighperformancememorysystemsthesedecoderscanbeusedtominimizetheeffectsofsystemdecoding.Thethreeenablepinsofchip(inwhichTwoactive-lowandoneactive-high)reducetheneedforexternalgatesorinverterswhenexpanding.A24-linedecodercanbeimplementedwithnoexternalinverters,anda32-linedecoderrequiresonlyoneinverter.74LS138isusedinde-multiplexingapplicationsbyusingenablepinasdatainputpin.Alsothechipinputsareclampedwithhigh-performanceSchottkydiodestosuppressline-ringingandsimplifysystemdesign.CatalogDescriptionCatalogCADModelsFeaturesApplicationPinoutLogicDiagramPackageParametersProductComplianceComponentDatasheetProductManufacturerFAQOrdering&QuantityCADModels74LS138Symbol74LS138FootprintFeaturesDesignedSpecificallyforHigh-Speed:MemoryDecodersDataTransmissionSystems3EnableInputstoSimplifyCascadingand/orDataReceptionSchottky-ClampedforHighPerformanceApplicationLinedecodersServersDigitalsystemsLineDe-multiplexingTelecomcircuitsMemorycircuitsPinoutPinFunctionPinNameDescription1A0Addressinputpin2A1Addressinputpin3A2Addressinputpin4E1Enableinput(activeLOW)5E2Enableinput(activeLOW)6E3Enableinput(activeHIGH)7O7Outputpin78GNDGround9O6Outputpin610O5Outputpin511O4Outputpin412O3Outputpin313O2Outputpin214O1Outputpin115O0Outputpin016VCCPowersupplypinLogicDiagramPackageParametersFunctionDecoder,DemultiplexerTechnologyFamilyLSVCC(Min)(V)4.75VCC(Max)(V)5.25Channels(#)1Voltage(Nom)(V)5F@nomvoltage(Max)(MHz)35ICC@nomvoltage(Max)(mA)10tpd@nomVoltage(Max)(ns)41Configuration3:8ProducttypeStandardIOL(Max)(mA)8IOH(Max)(mA)-0.4RatingCatalogOperatingtemperaturerange(C)0to70Bits(#)8Digitalinputleakage(Max)(uA)5ESDCDM(kV)0.75ESDHBM(kV)2ProductComplianceECCNEAR99USHTS8542390001ComponentDatasheetDatasheet74LS138DatasheetProductManufacturerTexasInstrumentsInc.(TI)isanAmericantechnologycompanythatdesignsandmanufacturessemiconductorsandvariousintegratedcircuits,whichitsellstoelectronicsdesignersandmanufacturersglobally.ItsheadquartersareinDallas,Texas,UnitedStates.TIisoneofthetoptensemiconductorcompaniesworldwide,basedonsalesvolume.TexasInstrumentssfocusisondevelopinganalogchipsandembeddedprocessors,whichaccountsformorethan80%oftheirrevenue.TIalsoproducesTIdigitallightprocessing(DLP)technologyandeducationtechnologyproductsincludingcalculators,microcontrollersandmulti-coreprocessors.Todate,TIhasmorethan43,000patentsworldwide.FAQWhatisthedifferencebetween74hc138and74LS138?Bothhavethesamefunction.74HC138ismadeofhigh-speedCMOSprocess,withlowpowerconsumption,highoutput,lowlevelandwiderange.74LS138adoptstheearlybipolarprocess,anditsdrivingcapabilityisrelativelylarger.Whatisthefunctionaldifferencebetween74ls138decoderand74ls148?74ls138isa3-8wiredecoder/multiplexer,74ls148isan8-3wireoctalpriorityencoder.Oneisdecodingandtheotherisencoding.OppositeeffectWhatsthedifferencebetween74LS138Dand74LS138N?Thosetwoarethesamechip,DisSOPpackage,NisDIPpackage.Whataretheoutputcharacteristicsof74LS138decoder?UnderthepremisethattheenableterminalsS1(activehigh),S2(activelow),andS3(activelow)arevalidatthesametime,onlyoneoutputterminalislowatatime(therestarehigh);Iftheenableterminalisinvalid,theoutputisallhighlevel.Whatdothelettersandnumbersin74ls138standfor?74ls138isa3-8-linedecoder.Thenumber74representsthe74seriesofthe54/74series,andthe74serieshasanoperatingtemperatureof0degreesto70degrees.LSisaseries,representingthelow-powerSchottkyseries.138isthevarietycode.Whatstheworkingprincipleof74ls138?74LS138workingprinciple①Whenonestrobeterminal(E1)ishighlevel,andtheothertwostrobeterminals(E2)and(E3)arelowlevel,attheoutputterminalscorrespondingtoY0toY7,thebinarycodeofaddressterminals(A0,A1,A2)canbedecodedatlowlevel.Forexample:whenA2A1A0=110,theY6outputterminaloutputsalow-levelsignal.②UsingE1,E2andE3,itcanbecascadedtoexpandintoa24-linedecoder;ifanexternalinverterisconnected,itcanalsobecascadedtoexpandintoa32-linedecoder.③Ifoneofthestrobeterminalsisusedasadatainputterminal,74LS138canalsobeusedasadatadistributor.④Itcanbeusedin8086decodingcircuittoexpandmemory.

I.IntroductionTheheartrateisakeyindicatorvaluereflectingthehealthofthebody.Simplyput,theheartratereferstothefrequencyofcardiovascularbeatswithin1minute.Thetestofheartratecanshowscientificevidenceinworksuchasdiseasediagnosis,patientcare,andathletetraining.Inrecentyears,manymedicalequipmentandfitnessequipmentdevelopedandmanufacturedbycountriesaroundtheworldhaveadoptedheartratetestpowercircuits.Thelowcostofproductdevelopmentandhighperformanceheartratetestpowercircuitshaveimportantapplicationvalues.ThearticleintroducesthiskindofheartbeatratedetectionsystembasedonAD620integratedICindetail.Usingtheexcellentlow-noisecharacteristicsofAD620integratedIC,pluseffectivefilteringandamplifyingcircuits,combinedwithmicroprocessorsolutions,ahigh-precisionheartratemonitoringsystemisobtained.Figure1AD620CatalogI.IntroductionII.AD620ChipIII.CircuitDesign3.1BlockDiagram3.2SignalExtractionCircuitBasedonAD6203.3FilterAmplifierCircuit3.4MicroprocessorCircuit3.5ExperimentalResultsandDiscussionIV.ConclusionFAQOrdering&QuantityII.AD620chipAD620isalow-cost,high-precisioninstrumentationamplifier.Itonlyneedsanexternalresistortosetthegain,andthegainrangeis1to10000.Inaddition,AD620adopts8-pinSOICandDIPpackage,thesizeissmallerthanthediscretecircuitdesign,andthepowerconsumptionislower,soitisverysuitableforbattery-poweredandportableapplications.Itscharacteristicsareasfollows:EASYTOUSEGainSetwithOneExternalResistor(GainRange1to10,000)WidePowerSupplyRange(2.3Vto18V)HigherPerformancethanThreeOpAmpIADesignsAvailablein8-LeadDIPandSOICPackagingLowPower,1.3mAmaxSupplyLOWNOISE9nV/Hz,@1kHz,InputVoltageNoise0.28Vp-pNoise(0.1Hzto10Hz)EXCELLENTDCPERFORMANCE(BGRADE)50Vmax,InputOffsetVoltage0.6V/Cmax,InputOffsetDrift1.0nAmax,InputBiasCurrent100dBminCommon-ModeRejectionRatio(G=10)EXCELLENTACSPECIFICATIONS120kHzBandwidth(G=100)15sSettlingTimeto0.01%III.CircuitDesign3.1BlockDiagramThesurfaceofthehumanskincontainshumanECG,EMG,andpowerfrequencysignals.Generally,thenoiseoftheECGsignalcontainingheartrateinformationismuchsmallerthanthatofthepowerfrequencysignal.InordertoextracttheweakECGsignal,alow-noiseoperationalamplifiermustbeusedandareasonablefilteramplifiercircuitmustbedesigned.Figure2isablockdiagramoftheheartratedetectionsystem.Thewholeheartratedetectionsystemconsistsoffourparts:thesensorheadincontactwiththehumanskinsurface,thesignalextractioncircuit,thefilteramplifiercircuitandthemicroprocessorcircuit.Thesensorheadisgenerallyametalthatiseasytoconductelectricity.Aftercontactingthesurfaceofthehumanskin,ithascomplexelectricalsignalssuchashumanECGsignals,electromyographicsignals,andpowerfrequencysignals.Weusethelow-noiseAD620operationalamplifierasthecorechipoftheheartbeatrateextractioncircuit.Inthefilteringandamplifyingcircuitpart,asimplelow-passfilteringcircuitisused.Theexperimentalresultsshowthatthisfilteringcircuitissufficienttoextracttheheartratesignal.Afterfilteringtheamplifiedsignal,anadjustablecomparatorcombinedwithatransistorcircuitisusedtoforma5voltTTLlevelsignal,andfinallyconnectedtothemicroprocessor,theheartbeatsignalisprocessedbythemicrocomputer,andtheheartbeatrateiscalculatedanddisplayed.Figure2Blockdiagramofheartratedetectionprinciple3.2SignalExtractionCircuitBasedonAD620AD620operationalamplifier,usuallyusedinhigh-precisiontestinstruments,themaximumnonlinearerrorof40ppm,themaximumvoltageoffsetof50uV,themaximumtemperaturedriftof0.6uV/℃,becauseofitslownoise,lowbiascurrent,lowpowerconsumptioncharacteristics,itItiswidelyusedinmedicalfieldssuchaselectrocardiogram(ECG)andbloodpressuremonitoring.Figure3isasignalextractioncircuitbasedonAD620,inwhichtheLEFT_ARM,RIGHT_ARM,LEGthreeleadsareconnectedtothealuminumsheet(iethesensorhead),whicharerespectivelyconnectedtotheleftandrighthandsandrightfeetofthehumanbody.OurexperimentalresearchresultsshowthattheR4gainofLEFT_ARMis1K,thecorrespondingAD620operationalamplifiergainis50.Toomuchgainwillweakenthefinalsignal-to-noiseratio,sotheR4resistancevalueshouldbesetreasonablyintheexperiment.The0.1uFcapacitancebetweentheLEFT_ARMandRIGHT_ARMleadsistoeffectivelyweakenthepowerfrequencynoise.TheLEGleadisconnectedtoAD620throughTL082A,whichprovidesthereferencepotentialofthehumanbodyforthedifferentialsignalofLEFT_ARMandRIGHT_ARM.Figure3SignalextractioncircuitbasedonAD6203.3FilterAmplifierCircuitFigure4isafilteramplifiercircuit.Threeoperationalamplifiersconstituteathree-stageamplification,eachamplifying100times.Duetocircuitloss,especiallythelossoftheisolationcapacitor,theactualsignalamplificationislessthan1milliontimes.TheratiooftheresistancevaluesofR6andR5,R9andR8,R11andR10inthecircuitdeterminesthemagnificationfactor,andtheseresistancevaluesshouldbeadjustedreasonablyinpracticalapplications.Alow-passfiltercircuitshouldbeusedwhileamplifyingthesignaltoachievetheeffectoffilteringpowerfrequencynoise.Sincethefrequencyofthepowerfrequencynoiseis50Hz,thedesignedfiltercircuithasapassbandbandwidthoflessthan50Hz,thatis,theRCtimeconstantofthecapacitorresistormustbeofthesameorderofmagnitudeasthepowerfrequencysignalperiod.R7andC10inthecircuitformalow-passfilter.Weuse1uFcapacitorisolationbetweenlevelsofamplification.Thesecapacitorswillattenuatethesignalatthesametime,andthethreeoperationalamplifiersareselectedforsignalamplification,sothesignal-to-noiseratioisimproved.Itshouldbepointedoutthatiftheisolationcapacitoristoolarge,itiseasytocausetheoutputelectricalsignaltodrift.Figure4FilteramplifiercircuitFigure5istheshapingcircuit.Theheartbeatratesignalandsignal-to-noiseratioofthe2ND_OUTleadarelargeenough(thepulserateoftheheartbeatrateis1~5V),afterthehalf-waveshapingofD1,thentheadjustablecomparator,andfinallythetransistorQ1isconvertedtothemicrocontrollerlevel.Figure5Shapingcircuit3.4MicroprocessorCircuitThefinalsignalisprocessedbyAT89C51,andtheheartrateisdisplayedbyLEDdigitaltube.ThemicroprocessorcircuitwithAT89C51asthecoreisverymature,soitsnoneedtorepeathere.3.5ExperimentalResultsandDiscussionFigure6showstheactualmeasurementresultsofthehumanheartrateusingtheabovesystem.Figure6(a)isthevoltagesignalafterthesignal2ND_OUTisshapedbyD1.ItcanbeseenfromthefigurethatthisisactuallyacompleteECGsignal.Inacycleofsignals,therearetwomoreobviouspulsesignals.Thispulsecharacteristicvariesfrompersontoperson.ItisfoundthatthereisatleastonepulsesignalthroughactualmeasurementoftheECGsignalsofdifferentpeople.Figure6(b)showstheelectricalsignalofHEART_PULSE,whichisobtainedafterthesignalofFigure6(a)passesthroughthecomparatorandthetransistorswitch.Thesignalcanbedirectlyinputtotheportofthemicroprocessor,andthemicroprocessorcalculatesandoutputstheheartrate.Figure6HeartratesignaldiagramWhendevelopingtheabove-mentionedheartratedetectionsystem,thereareseveralkeypointstopayspecialattentionto:(1)ConnectingcapacitorstoLEFT_ARMandRIGHT_ARMcangreatlyimprovethesignal-to-noiseratio;themainenergyoftheheartratesignalonLEFT_ARMandRIGHT_ARMisatafrequencyofabout1Hz,andthecapacitorisalow-passfilterthatcanfilterandsuppressnoise;Choosealargecapacitortoeliminatehigh-frequencynoise.Intheexperiment,a10uFnon-polarcapacitorisused,andtheeffectisverygood;(2)Thelow-passfiltercircuiteffectivelyweakensthepowerfrequencysignalandimprovesthesignal-to-noiseratio;itadoptsacombinationofactivefilteringandpassivefilteringtofilterwhileamplifying,whichhasabettereffectthanfilteringafteramplification;(3)Capacitorisolationattenuationandmulti-stageamplificationarebeneficialtoimprovethesignal-to-noiseratio;themainnoiseis50Hzpowerfrequencysignals.Althoughthemulti-stageamplificationandfilteringincreasethermalnoise,ithasgreatsuppressionofpowerfrequencynoise.Ofcourse,thenumberofamplificationstagescannotbeinfinite,andthebestnumberofstagesistheminimumsumofpowerfrequencynoiseandthermalnoise;(4)SmallcapacitorisolationshouldbeusedtosuppressDCsignaldrift.Thisisshownbytheexperimentalresults,andthereasonneedstobefurtherstudied.IV.ConclusionThisarticlediscussesaschemebasedonAD620chipheartratedetection,andintroducesthecircuitdesignofthesensorhead,signalextraction,filteramplificationandmicroprocessorthatmakeupthesystem.Givesthemethodtoimprovethesystemperformance.ExperimentsshowthatthesystemcanobtainbetterECGsignalsandaccurateheartrate.Theheartbeatratedetectionsysteminthisarticlehasstronganti-interferenceability,simplestructureandlowcost.FAQWhatisAD620?AD620isalow-cost,high-precisioninstrumentationamplifier.Itonlyrequiresanexternalresistortosetthegain.Thegainrangeis1to10,000.CanIchangeAD620toAD623whenmakingMCUproducts?BothAD620andAD623aresingleinstrumentationamplifiers,andthepinarrangementisexactlythesame.Themaindifferenceis:AD620mustusepositiveandnegativepowersupplies,AD623canbeapositiveandnegativepowersupplyorasinglepowersupply.IftheoriginalboardisAD620,youcanreplaceitwith623;iftheoriginalboardisAD623,youmaynotbeabletoreplaceitwith620(itdependsonwhetherthepowersupplyoftheoriginalboardcircuitisdualpowersupplyorsinglepowersupply).AfterreplacingAD620andAD623insingle-chipproducts,theprogramcanworknormallywithoutmodification.WhatisthedifferencebetweenAD620BRandAD620AN?Theirpackagesaredifferent.WhatistheoutputresistanceofAD620?Howtoadjustit?AD620isakindoflowpowerconsumptioninstrumentamplifier,itsoutputresistanceisabout10K,thisistheinherentcharacteristicofthischip,generallyitisdifficulttoadjust.Ifyouhaverequirementsforoutputresistance,youcangenerallyuseanexternalcircuittosolveit.IsAD620apositivephaseamplificationorareversephaseamplification?AD620isaninstrumentamplifier,theoutputvoltageis[(Vin+)-(Vin-)]*gain.Ifthedesiredsignalis(Vin+)-(Vin-),thegainispositive,whichisequivalenttopositiveamplification.Conversely,ifthedesiredsignalis(Vin-)-(Vin+),thegainisequivalenttonegative,whichisequivalenttoreverseamplification.Whatisaninstrumentationamplifier?Instrumentationamplifier,animprovementofthedifferentialamplifier,hasaninputbuffer,doesnotrequireinputimpedancematching,sothattheamplifierissuitableformeasurementandelectronicinstrumentsI.DesriptionInthefieldofmeasurementandcontrol,itisoftenencounteredthattheoutputsignalofthemonitoredobjectissmall,anditisdifficulttodirectlycollectit.Generally,itneedstobeamplifiedbeforeprocessing.Thisarticleintroducesamethodofimplementingasmallsignalacquisitionsystem.Thesmallestsystemisrealizedbyusingthesingle-chipSTC25A60S2withA/Dconversionfunctionandtheeasy-to-useamplifierAD620withpreciseamplificationfunction.Thesystemdesignandimplementationarediscussedandtheacquisitionisintroducedindetail.Theprocessofsmallsignal,andgivespracticalapplicationexamples,aswellastheapplicationofsmallsignalacquisitioninrelatedfields.AD620CatalogI.DesriptionII.AD620IntroductionIII.IntroductiontoSTC12C5A60S2IV.SystemHardwareDesign4.1SystemPrincipleBlockDiagram4.2PowerSupplyCircuitDesign4.3SignalConditioningCircuit4.4SystemDecouplingCircuit4.5RealizationofA/DConversion4.6Follow-upWorkV.PracticalApplicationVI.ConclusionFAQOrdering&QuantityII.AD620IntroductionAsamonolithicinstrumentamplifier,AD620haslowpowerconsumption,achipwithhighgainthroughexternalresistors,andfeatureslowinputdriftandtemperaturedrift.AD620isdevelopedfromthetraditionalthreeoperationalamplifiers,butsomeofthemainperformanceisbetterthanthedesignoftheinstrumentamplifiercomposedofthreeoperationalamplifiers,suchaswidepowersupplyrange(2.3~18V),smalldesignvolume,andverypowerconsumptionLow(themaximumpowersupplycurrentisonly1.3mA),soitissuitableforlow-voltage,low-powerapplications.Figure1SchematicdiagramofAD620principleThemonolithicstructureandlasercrystaladjustmentofAD620allowcircuitcomponentstobecloselymatchedandtracked,therebyensuringtheinherenthighperformanceofthecircuit.AD620isathree-op-ampintegratedinstrumentationamplifierstructure.Inordertoprotectthehighprecisionofgaincontrol,theinputtransistorprovidesasimpledifferentialbipolarinput,andusestheprocesstoobtainalowerinputbiascurrent.Throughtheinputstageinternalop-ampThefeedbacktokeepthecollectorcurrentoftheinputtransistorconstant,andtheinputvoltageisaddedtotheexternalgaincontrolresistorRG.ThetwointernalgainresistorsofAD620are24.7k8,sothegainequationis:G=49.4k/RG+1(1)Fortherequiredgain,theexternalcontrolresistancevalueis:RG=49.4/(G-1)k(2)III.IntroductiontoSTC12C5A60S2STC12C5A60S2isanewgeneration8051single-chipmicrocomputerwithA/Dconversionfunction.Theinstructioncodeisfullycompatiblewiththetraditional8051,butthespeedis8-12timesfaster.With8channelsofhigh-speed10-bitinputA/Dconversion(250k/s),itcanbeusedfortemperaturedetection,batteryvoltagedetection,keyscanning,spectrumdetection,etc.TheusercansetanychannelasA/Dconversion,andtheportsthatdonotneedtobeusedasA/DcancontinuetobeusedasI/Oports.Itscharacteristicsareasfollows:Figure2STC12C5A60S2(1)On-chipintegrated1280bytesRAM;(2)WithEEPROMfunction(STC12C5A62S2/AD/PWMwithoutinternalEEPROM);(3)Enhanced8051CPU,1T,singleclock/machinecycle,instructioncodeisfullycompatiblewithtraditional8051;(4)InternalintegratedMAX810dedicatedresetcircuit(whentheexternalcrystalisbelow12M,theresetpincanbedirectlyconnectedtothegroundwith1Kresistance);(5)Userapplicationspace8K/16K/20K/32K/40K/48K/52K/60K/62Kbytes;(6)ISP(In-SystemProgrammable)/IAP(In-ApplicationProgrammable),noneedforadedicatedprogrammer,noneedforadedicatedemulator,youcandownloadtheuserprogramdirectlythroughtheserialport(P3.0/P3.1),andonepiececanbecompletedinafewseconds;(7)STC12C5A60S2serieshavedualserialports,onlythosewiththeS2logosuffixhavedualserialports,RxD2/P1.2(canbesettoP4.2byregister),TxD2/P1.3(canbesettoP4.3byregister);(8)GeneralI/Oports(36/40/44),afterreset,theyare:quasi-bidirectionalport/weakpull-up(normal8051traditionalI/Oport),whichcanbesettofourmodes:quasi-bidirectionalport/weakPull-up,push-pull/strongpull-up,onlyinput/highimpedance,open-drain,eachI/Oportdrivecapacitycanreach20mA,butthewholechipshouldnotexceed120mA;(9)A/Dconversion,10-bitprecisionADC,8channelsintotal,conversionspeedupto250K/S(250,000timespersecond),universalfull-duplexasynchronousserialport(UART),becausetheSTC12seriesishigh-speed8051,canreusetimerorPCAsoftwaretorealizemultipleserialports.IV.SystemHardwareDesign4.1SystemPrincipleBlockDiagramGenerallyspeaking,beforethesignalisused,itneedstobefilteredandthenamplified,oramplifiedandthenfiltered,andthenobtained/perceivedbymeanssuchasA/D.Forsmallsignals,thesignalamplitudeisonlyafewmillivoltsorevensmaller.Iffilteredfirst,usefulsignalsmaybefilteredout.Therefore,inthiscase,youneedtoamplifyfirst,thenfilter,andthenperformA/Dconversionorotherprocessing.Accordingtothecharacteristicsofthissystem,theinterferenceinthesystemcanbeignored,sothesignalfilteringlinkisnotconsidered.Therefore,thesystemismainlyrealizedthroughthreeimportantlinks:signalextraction,signalamplification,andA/Dacquisition.Thedatageneratedinthethirdlinkcanguidepeoplesworkordisplayrelevantinformation.TheblockdiagramoftheentiresystemisshowninFigure3.Figure3Systemblockdiagram4.2PowerSupplyCircuitDesignAD620amplifiercanusesinglepowersupplyordualpowersupply,butwhenusingdualpowersupply,itsperformanceisbetterthansinglepowersupply.Inintegratedcircuitdesign,singlepowersupplyiseasytoimplement,butconsideringtheworkingperformanceofthechip,dualpowersupplyisusedinthissystem.UsetheICL7660Schiptoconvertanexternalsinglepowersupplyintoadualpowersupply.ICL7660Sisavoltageconversionchipthatcanrealizethefunctionofconvertingapositivevoltagetoanegativevoltage,anditsperipheralcircuitisrelativelysimple.ThespecificcircuitisshowninFigure4.Figure4PowersupplyimplementationschematicdiagramTheotherchipsinthesystemarepoweredbyasingle5Vpowersupply,andtheconnected5Vpowersupplycanbeusedwithoutanyprocessing,whichisnotdescribedhere.4.3SignalConditioningCircuitTheactualweaksignalisgenerallymVlevelorevensmaller.Beforeprocessing,itneedstobeamplifiedandthenA/Dcollected.AccordingtotheA/DfunctionofSTC12C5A60S2,itisnecessarytoaccuratelyamplifythesignaltoreachtheVlevel,sotheAD620amplifierisused.AD620hasagoodamplificationeffecton2inputdifferentialsignals.Inpracticalapplications,thesignalsaregenerallygeneratedbyelectricbridges.Inordertorealizesignalamplification,AD620needsanexternalresistor,whichdeterminestheamplificationfactortogetherwiththeinternalresistor.SupposethemagnificationisG,thenthereisthefollowingformula.G=(RG/R1)+1(1)canalsobewrittenasthefollowingformula:G=49.4k/RG+1(2)1)Intheformula,RGistheinternalresistanceofAD620,andR1istheexternalresistance.Itcanbeseenfromtheformulas(1)and(2)thatthesizeofRGintheformula(1)is49.4k.Theconditionedsignalisoutputthroughthe6-pinofAD620.Atthistime,itcanbedirectlyconnectedtotheA/Dconversionchiptorealizedatacollection.Itcanbereducedbythecorrespondingmultiplewhenusingit.TheprincipleofsignalconditioningisshowninFigure5.Figure5Signalconditioningcircuit4.4SystemDecouplingCircuitSincethesystemmainlyrealizessmallsignalamplificationandA/Dconversionafteramplification,thechipthatcompletestheA/Dfunctionofthissystem,namelySTC12C5A60S2,usesitsownworkingpowersupplyasthereferencevoltage.Inordertoensuretheconsistencyoftheconversionresults,itisnecessarytoensurethepowersupplyvoltagestability.Tofilterouttheinterferenceinthepowersupply,itcanbefilteredbymultiplecapacitorsinparallel.Afterthecapacitorsareconnectedinparallel,thecapacitancevalueincreases,buttheequivalentresistanceinsidethecapacitorisreducedduetotheparallelconnection,whichisbeneficialtoreducetheloss.Therefore,manycapacitorsareusedinparallel,andtherealizationprincipleisshowninFigure6.Figure6Powerdecouplingcircuit4.5RealizationofA/DConversionAsmentionedearlier,STC12C5A60S2isasingle-chipmicrocomputerwithA/Dconversionfunction,whichisconvenient,simple,andmulti-functional.ItsA/Dconversiononlyrequires90clockcycles(relatedtoitsoperatingfrequency)atthefastest.ThissystemUseittoachieveA/Dconversion.STC12C5A60S2usesportP1asan8-channelA/Dconversioninputinterface.Whenusingit,youonlyneedtosetitasananaloginterface.Bysettingthecorrespondingregister,theA/Dconversioncanbecompleted.Theunusedpinscanstillbeusedasordinarytubes.ThissystemrealizestheA/Dconversionofoneinputsignal,soitonlyneedstosetone.Inthissystem,P1.0portisusedasthesignalinputport.ThissystemrealizestheprincipleofA/DconversionasshowninFigure7.Figure7A/Dacquisitioncircuit4.6Follow-upWorkAftertheA/Dconversioniscompleted,dataanalysisisrequired.Generally,itcanbesenttotheuppercomputerthroughthecommunicationport(usuallyserialport),andthedataisprocessedbytheuppercomputer.Accordingtothedifferentcharacteristicsofthespecificsystem,thedataprocessingmethodsarealsodifferent,soitsnoneedtodiscussthemindetailhere.Table1ADconversiondataandactualdataAfterthesystemperformsA/Dconversiononsignalsofdifferentsizes,aseriesofactualdataandtheoreticaldataareobtained,asshowninTable1.DrawthecurveofA/DdatathroughExcel,andfoundthatthesystemA/Dconverterhasgoodlinearity.AsshowninFigure8.Figure8LinearityofA/DconverterV.PracticalApplicationThesmallsignalconditioning,A/Dconversion,andprocessingmethodsarediscussedinmoredetailabove.Thespecificapplicationisintroducedbelowthroughexamples.Asakindofsensingelement,resistancestraingaugeiscommonlyusedtomonitorthedeformationoftheobject.Generally,thestraingaugeisattachedtothesidepointofthecomponent.Afterthecomponentisstressed,duetothestrainofthemeasuringpoint,theresistancechanges,resultinginaweakvoltagechange.Thevoltagechangecanbecalculatedtoobtainthedeformationdegreeofthecomponent,soastoachievethepurposeofmonitoringtheconditionofthecomponentandguidetherelevantengineeringpersonneltodealwithit.Thissystemcanbeappliedtothevoltagegeneratedbytheelectricbridge.AschematicdiagramoftheelectricbridgeisshowninFigure9.Inthefigure,R4,R3,R1,andR2arethefourarmsofthebridge,R4andR3arefixedresistancesofimpedance,andR1andR2areinOneisaresistorwhoseresistancevaluechangesafterbeingstressed.R4andR3havethesameresistancevalue,andR1andR2havethesameresistancevaluewhentheyarenotstressed.Inthecaseofnoforce,thetwopointsofthebridge3and4areequipotential,thatis,thepotentialdifferenceis0.IfitisinputasAD620,theinputsignalisconsideredtobe0,andthebridgeissaidtobebalancedatthistime.WhentheforceofR1orR2changes,theresultofthechangeisreflectedinitsresistancevalue,whichcanbeobtainedbyOhmslaw.Thepotentialatpoints3and4isdifferent,thatis,thereisapotentialdifference.Atthistime,thebridgeisoutofbalance,butatthistimeThesignalisveryweakandcannotbecollecteddirectly.Therefore,thesignalisamplifiedthroughthesignalconditioningcircuitmentionedinthearticle,thatis,points3and4inthebridgeareconnectedtopins2and3ofAD620,afteramplification,thenA/Dacquisitionisperformed.Figure9SchematicdiagramofelectricbridgeThissystemusesasimpleelectricbridgebuiltbyitselfduringsimulation,asshowninFigure10.Figure10SimpleelectricbridgeByadjustingR2inthefigure,differentweaksignalsaregenerated,andthesimplebridge1and2areconnectedtothesignalconditioningcircuit,andthenafterA/Dconversion,weaksignalacquisitioncanberealized.The1,2endsofthesimpleelectricbridgecorrespondtothe3and4endsinthefigure.Inthissimulation,adjustR2togenerateabout5.35mVatbothendsof1,2andadjusttheexternalresistanceinthesignalconditioningcircuitto160.7.Thecalculatedmagnificationisabout308.4times,andtheA/Dreferencevoltageis4.256VBymeasuringtheoutputofAD620,itcanbeobtainedthatthevoltageis1.645V,andthemagnificationfactorG=1.647V/5.35mV308canbecalculated.Itcanbeseenthatthemagnificationeffectisgood(afterremovingthemagnificationeffect,theerrorisonlynVlevel).ThroughmultipleA/Dconversions,thereturnedresultsareallaround0x018B,whichprovesthatthesystemhashighcredibility(ithasbeenusedinactualsystems).VI.ConclusionThisarticledescribesindetailthedesignandimplementationofsmallsignalacquisitionsystemsfromchipselection,circuitdesign,etc.,suchas8-bitsingle-chipSTC12C5A60S2asthecontrollerandA/Dconverter;AD620asthemainchipofthesignalconditioningcircuit;electricbridgeprincipleetc.Throughthetest,thecircuithasrealizeditsfunctionwell,andithasaccomplishedtheexpectedgoalexcellentlyintheactualsystem,whichhascertainpracticalvalue.FAQWhatisAD620?AD620isalow-cost,high-precisioninstrumentationamplifier.Itonlyrequiresanexternalresistortosetthegain.Thegainrangeis1to10,000.CanIchangeAD620toAD623whenmakingMCUproducts?BothAD620andAD623aresingleinstrumentationamplifiers,andthepinarrangementisexactlythesame.Themaindifferenceis:AD620mustusepositiveandnegativepowersupplies,AD623canbeapositiveandnegativepowersupplyorasinglepowersupply.IftheoriginalboardisAD620,youcanreplaceitwith623;iftheoriginalboardisAD623,youmaynotbeabletoreplaceitwith620(itdependsonwhetherthepowersupplyoftheoriginalboardcircuitisdualpowersupplyorsinglepowersupply).AfterreplacingAD620andAD623insingle-chipproducts,theprogramcanworknormallywithoutmodification.WhatisthedifferencebetweenAD620BRandAD620AN?Theirpackagesaredifferent.WhatistheoutputresistanceofAD620?Howtoadjustit?AD620isakindoflowpowerconsumptioninstrumentamplifier,itsoutputresistanceisabout10K,thisistheinherentcharacteristicofthischip,generallyitisdifficulttoadjust.Ifyouhaverequirementsforoutputresistance,youcangenerallyuseanexternalcircuittosolveit.IsAD620apositivephaseamplificationorareversephaseamplification?AD620isaninstrumentamplifier,theoutputvoltageis[(Vin+)-(Vin-)]*gain.Ifthedesiredsignalis(Vin+)-(Vin-),thegainispositive,whichisequivalenttopositiveamplification.Conversely,ifthedesiredsignalis(Vin-)-(Vin+),thegainisequivalenttonegative,whichisequivalenttoreverseamplification.Whatisaninstrumentationamplifier?Instrumentationamplifier,animprovementofthedifferentialamplifier,hasaninputbuffer,doesnotrequireinputimpedancematching,sothattheamplifierissuitableformeasurementandelectronicinstruments

DescriptionThe2N7000isaN-ChannelEnhancementModeFieldEffectTransistor,a.k.a.MOSFETforvoltagecontrolledsmallsignalswitching.2N7000NChannelEnhancementModeMOSFETSwitchCircuitBasicsCatalogDescription2N7000Pinout2N7000Parameters2N7000Features2N7000Applications2N7000Advantage2N7000SwitchingWaveformsandTestCircuit2N7000PackageInformation2N7000PopularitybyRegion2N7000AlternativesHowtouse2N7000Wheretouse2N7000ProductManufacturerFAQOrdering&Quantity2N7000PinoutPinNumberPinNameDescription1SourceCurrentflowsoutthroughSource2GateControlsthebiasingoftheMOSFET3DrainCurrentflowsinthroughDrain2N7000ParametersConfigurationSINGLEWITHBUILT-INDIODEContinuousDrainCurrent(ID)200mADrainCurrent-Max(ID)0.2ADraintoSourceResistance5RDraintoSourceVoltage(Vdss)60VDrain-sourceOnResistance-Max5DSBreakdownVoltage-Min60VElementConfigurationSingleFeedbackCap-Max(Crss)5pFFETTechnologyMETAL-OXIDESEMICONDUCTORGatetoSourceVoltage(Vgs)30VHeight5.33mmJEDEC-95CodeTO-92JESD-30CodeO-PBCY-T3LeadFreeLeadFreeLength5.21mmManufacturerMicrochipTechnologyIncManufacturerPartNumber2N7000-GP003MaxPowerDissipation1WNumberofChannels1NumberofElements1NumberofTerminals3OperatingModeENHANCEMENTMODEOperatingTemperature-Max150COperatingTemperature-Min-55CPackageTO-92-3PartLifeCycleCodeActivePolarity/ChannelTypeN-CHANNELReachComplianceCodeCompliantREACHSVHCNoSVHCRiskRank5.56SurfaceMountNOTerminalFormTHROUGH-HOLETerminalPositionBOTTOMTransistorApplicationSWITCHINGTransistorElementMaterialSILICONVoltageRating(DC)60VWeight0.00776ozWidth4.19mm2N7000FeaturesFreefromsecondarybreakdownLowpowerdriverequirementEaseofparallelingLowCISSandfastswitchingspeedsExcellentthermalstabilityIntegralsource-draindiodeHighinputimpedanceandhighgain2N7000ApplicationsMotorcontrolsConvertersAmplifiersSwitchesPowersupplycircuitsDrivers(relays,hammers,solenoids,lamps,memories,displays,bipolartransistors,etc.)The2N7000hasbeenreferredtoasaFETlingtonandasanabsolutelyidealhackerpart.ThewordFETlingtonisareferencetotheDarlington-transistor-likesaturationcharacteristic.Atypicaluseofthesetransistorsisasaswitchformoderatevoltagesandcurrents,includingasdriversforsmalllamps,motors,andrelays.Inswitchingcircuits,theseFETscanbeusedmuchlikebipolarjunctiontransistors,buthavesomeadvantages:highinputimpedanceoftheinsulatedgatemeansalmostnogatecurrentisrequiredconsequentlynocurrent-limitingresistorisrequiredinthegateinputMOSFETs,unlikePNjunctiondevices(suchasLEDs)canbeparalleledbecauseresistanceincreaseswithtemperature,althoughthequalityofthisloadbalanceislargelydependentontheinternalchemistryofeachindividualMOSFETinthecircuitThemaindisadvantagesoftheseFETsoverbipolartransistorsinswitchingarethefollowing:susceptibilitytocumulativedamagefromstaticdischargepriortoinstallationcircuitswithexternalgateexposurerequireaprotectiongateresistororotherstaticdischargeprotectionNon-zeroohmicresponsewhendriventosaturation,ascomparedtoaconstantjunctionvoltagedropinabipolarjunctiontransistor2N7000AdvantageTheSupertex2N7000isanenhancement-mode(normallyoff)transistorthatutilizesaverticalDMOSstructureandSupertexswell-provensilicon-gatemanufacturingprocess.Thiscombinationproducesadevicewiththepowerhandlingcapabilitiesofbipolartransistors,andthehighinputimpedanceandpositivetemperaturecoefficientinherentinMOSdevices.CharacteristicofallMOSstructures,thisdeviceisfreefromthermalrunawayandthermally-inducedsecondarybreakdown.SupertexsverticalDMOSFETsareideallysuitedtoawiderangeofswitchingandamplifyingapplicationswhereverylowthresholdvoltage,highbreakdownvoltage,highinputimpedance,lowinputcapacitance,andfastswitchingspeedsaredesired.2N7000SwitchingWaveformsandTestCircuit2N7000PackageInformation3-LeadTO-92PackageOutline(N3)FrontView3-LeadTO-92PackageOutline(N3)SideView3-LeadTO-92PackageOutline(N3)BottomView2N7000PopularitybyRegion2N7000AlternativesManufacturerManufacturerPartNo.LifecycleStatusIndicatorMicrochipSupertex2N7000-GVolumeProductionHowtouse2N7000AMosfethasthreeterminals:Drain,SourceandGate.ThecurrentalwaysentersthroughtheDrainandleavesthroughtheSource.TheGatepinactsasaswitchtoturntheMosfetonoroff.IftheGateisconnectedtoground,theMosfetisswitchedoff,i.e.thereisnoconnectionbetweentheDrainandtheSource(open).IftheGateissuppliedwithitssourcevoltage(VGS)thentheMOSFETwillbeON,i.e.theDrainandSourcepinswillbeconnectedtogether(Closed).Thus,bycontrollingthevoltage(VGS),wecanswitchtheMOSFET,makingtheMOSFETavoltage-controlleddevice.Thegate-sourcevoltage(VGS)isacriticalparameterwhenusingthetransistor.Forthistransistor,theVGSis20V,sowhenwesupplythisvoltage,theMOSFETwillbecompletelyclosed.Anyvaluebetween20VcausestheMOSFETtopartiallyclose,creatingapartialconnection.TheloadswitchedbytheMOSFETcanreach60V(VDS)andcanconsumeupto200mA(ID).GivenbellowisaverysimplecircuitunderneaththatusesthisMOSFETtocontrola24V2Aloadmotor.Thecurrentandvoltagevaluescanalsobeobservedwhentheswitchisclosedandopen.AsweknowthatthevoltageofthegridsourceofthisMosfetis20V,weused20VtoturnontheMOSFET.Whenthegateswitchisopen,theMosfetsgatepinmustbeconnectedtogroundtocuttheload,soweuseda10KresistortoturnofftheMOSFETafterturningiton.TheRGresistorisacurrentlimitingresistorthatlimitstherequiredgridcurrent.IftheloadcontrolledbytheMOSFETisaninductiveloadlikethemotorwehaveusedhere,thenitismandatorytouseaflywheeldiodetosafelydischargetheloadaccumulatedbytheinductivecoil.Wheretouse2N70002N7000isasmallN-channelMOSFET.MOSFETsareelectronicpowerswitches,justliketransistors,butwithahighercurrentandvoltagerating.The2N7000MOSFETcanbeusedtoswitchloadsthatoperateonlessthan60V(VDS)and200mA(ID).ThismosfetcomesinacompactTO-92packageandhasathresholdvoltageof3V,soifyouarelookingforasmallmosfettoswitchaload,thisICmightberightforyou.ProductManufacturerMicrochipTechnologyInc.isaleadingproviderofmicrocontrollerandanalogsemiconductors,providinglow-riskproductdevelopment,lowertotalsystemcostandfastertimetomarketforthousandsofdiversecustomerapplicationsworldwide.HeadquarteredinChandler,Arizona,Microchipoffersoutstandingtechnicalsupportalongwithdependabledeliveryandquality.FAQWhatisa2n7000Mosfet?2N7000isasmallsignalN-channelMOSFET.MOSFETsarepowerelectronicswitchesjustliketransistors,butwithahighercurrentandvoltagerating.The2N7000MOSFETcanbeusedtoswitchloadswhichoperatesonlessthan60V(VDS)and200mA(ID).Whatisamaximumoperatingvoltageforthe2n7002transistor?The2N7002isalogiclevelMOSFETwithalowon-stateresistance.Themosfethasalowgatetosourcethresholdvoltageof2.1Vtypicallythismakesthemosfetsuitableevenfor3.3Vapplicationcircuits.WhatisMosfetgatethresholdvoltage?ThethresholdvoltagerepresentsthevoltageatwhichtheMOSFETstartstoturnon,whilstthemaximumgate-sourcevoltageisthemaximumgate-sourcevoltagethattheMOSFETcanwithstandsafely.WhatisanchannelMosfet?TheN-ChannelMOSFEThasanN-channelregionlocatedinbetweenthesourceanddrainterminals.Itisafour-terminaldevicehavingtheterminalsasgate,drain,source,body.InthistypeofFieldEffectTransistor,thedrainandsourceareheavilydopedn+regionandthesubstrateorbodyareofP-type.DescriptionThe2N7002isalogiclevelMOSFETwithalowon-stateresistance.Themosfethasalowgatetosourcethresholdvoltageof2.1Vtypicallythismakesthemosfetsuitableevenfor3.3Vapplicationcircuits.Sincethemosfethaslowonstateresistanceithashighefficiencyduringwhenthemosfetinon.Duetothispropertyitcanmaintainhighswitchingperformanceandhenceusedwidelyinpowermanagementapplications.ThemosfetalsocomesinaSMDpackagehencecanbeusedforcompactapplications.Oneconsiderabledisadvantageofthemosfetisitslowdraincurrent;itcanprovideacontinuouscurrentof200mAandpeakscurrentsupto1Aatmaximumthresholdvoltage.Anythingmorethanthatwilldamagethemosfet.CatalogDescriptionPinConfigurationFeaturesDucumentsandMediaPackageOutlineApplicationsAlternativesProductManufacturerOrdering&QuantityPinConfigurationPinNo.PinNameDescription1GateControlsthebiasingoftheMOSFET2SourceCurrentflowsoutthroughSource3DrainCurrentflowsinthroughDrainFeaturesSuitableforlogiclevelgatedrivesourcesSurface-mountedpackageVeryfastswitchingTrenchMOSFETtechnologyDocumentsandMediaDatasheet2N7002N-ChannellogiclevelMOSFETDatasheetPackageOutlineApplicationsLowcurrentandLowVoltageswitchingapplicationsDC-DCconverterseMobilityapplicationsApplicationwherelowon-stateresistanceisrequired.PowermanagementapplicationsAlternativesNTR4003,FDC666,FDC5582N7002EquivalentP-Channel:BSS84,FDN358POtherN-ChannelMOSFETs:BS170N,IRF3205,2N7000,IRF1010E,IRF540NProductManufacturerNXPSemiconductorsN.V.(NXP)isaholdingcompany.TheCompanyoperatesasasemiconductorcompany.TheCompanyprovideshighperformancemixedsignalandstandardproductsolutions.TheCompanyssegmentsareHighPerformanceMixedSignal(HPMS),StandardProducts(SP),andCorporateandOther.Itsproductsolutionsareusedinarangeofend-marketapplications,includingautomotive,personalsecurityandidentification,wirelessandwirelineinfrastructure,mobilecommunications,multi-marketindustrial,consumerandcomputing.Itengageswithglobaloriginalequipmentmanufacturers(OEMs)andsellsproductsinallgeographicregions.NXPsHPMSsegmentincludesbusinesslines,suchasAutomotive,SecureIdentificationSolutions(SIS),SecureConnectedDevices(SCD),andSecureInterfacesandInfrastructure(SII).TheCompanysSPsegmentsuppliesarangeofstandardsemiconductorcomponents,suchassmallsignaldiscretesandpowerdiscretes.

DescriptionTheweatherinthepasttwodayshassuddenlycooleddown,andIforgottoinstallaswitchonthebedside,andIdontwanttogetoutofbedtoturnoffthelightbecauseofthecold.Atthistime,itwouldbenicetohaveanintelligentcontrolswitch.ThisblogintroducesasmartswitchcontrollerbasedonATMEGA328P-PU.Thecontroller,withoutchangingtheexistingswitchesandcircuits,canautomaticallyturnoffthelightsafterapowerfailure.Atthesametime,thewirelesscontrollightswitchfunctioncanalsoberealizedthroughtheBluetoothmodule,andthelightcanbeturnedonandoffwhilelyingdown,andthereisnoneedtogetoutofbed.ATMEGA328P-PUCatalogDescriptionIIntroductionIIATmega328P-PUBasedSystemPricipleIIIATmega328P-PUBasedSystemHardwareDesign3.1Centralcontrolmodule3.2Lightdetectioncircuit3.3BluetoothmoduleIVATmega328P-PUBasedStructureDesignVATmega328P-PUBasedSystemSoftwareDesignVIConclusionComponentDatasheetFAQOrdering&QuantityIIntroductionThesmartswitchlightcontrollerbasedonATmega328P-PUintroducedinthisblogconsistsofthefollowingmodules:LightDetectionModule:Perceivethechangeofindoorlightintensity;BluetoothModule:controlandrealizeautomaticlightswitch;SteeringGearandMechanicalLinkageMechanism:Itcanalsoautomaticallyturnoffthelights.Thecontrollerusestheorganiccombinationofmechatronics,whichisreliableandeasytocontrol.IIATmega328P-PUBasedSystemPricipleTheintelligentswitchlightcontrollersystemismainlycomposedoflightdetectionmodule,Bluetoothmodule,steeringgearandArduinocontrolsystem.Thesystemcontrolprocessisasfollows:Thelightdetectionmoduleperceivestheenvironmentfrombrighttodark;ThelightdetectionmodulesendsthesensedinformationtotheArduino;Arduinoturnsoffthelightingequipmentbycontrollingthesteeringgearaccordingtothisinformation;Or,tocompletetheoperationofturningoffthelights,youcanalsodirectlycontrolitthroughthemobilephoneAPPBluetooth.ThesystemprinciplediagramoftheintelligentswitchlightcontrollerisshowninFigure1.Figure1.SystemschematicdiagramIIIATmega328P-PUBasedSystemHardwareDesign3.1CentralcontrolmoduleThemostwidelyusedmicrocontrollersforthecentralcontrolmoduleareAVRand51microcontrollers.Fromtheperspectiveoffunctionandupgradepotential,theAVR8-bitmicrocontrollerATMEGA328P-PUwasselectedasthecentralcontrolmodule.So,whataretheadvantagesofATMEGA328P-PUcontrolmodule?Whychooseit?ATMEGA328P-PU,asacentralcontrolmodule,hasflexibleI/Oportresourcesandpowerfulfunctions.Itnotonlyhaslowpowerconsumptionbutisreliable,andcanmeettheneedsofsubsequentequipmentupdates.Figure2showstheminimumsystemdiagramofATMEGA328P.Figure2.ATMEGA328Pminimumsystem3.2LightdetectioncircuitHere,thelightdetectioncircuitisafour-wiresystem.TheAOportisananalogsignaloutputport,whichconvertstheexternallightintensityintoacontinuousoutputvoltagevalue.Whenthebrightnessofthelightchanges,howdoestheDOportactasadigitalsignaloutputport?Whentheambientlightbrightnessdoesnotreachthesetthreshold,theDOterminaloutputsahighlevel;Whenthebrightnessoftheambientlightexceedsthesetthreshold,theDOterminaloutputsalowlevel.Becausethesignaloutputbythecircuitisstableandreliable,thecontrollerselectsthedigitalsignaloutputbytheDOportastheinputsignalofthecontrolmodule.Inthisway,thesensitivityandreliabilityofthesystemcanbeimproved.IlluminationdetectioncircuitdiagramshowninFigure3.Figure3.Illuminationdetectioncircuitdiagram3.3BluetoothmoduleThisblogusestheHC-05master-slaveintegratedBluetoothmodule.ItscircuitdiagramisshownasinFig.4.Figure4.BluetoothdetectioncircuitThemoduleadoptsCSRmainstreamBluetoothchip,BluetoothV2.0protocolstandard,andcanworkwith3.3Vlowvoltage.Itischeap,smallinsize,stableinsignal,lowinpower,andcanbeusedinconjunctionwithmobileAPPtorealizewirelesscontrolofthesystem.Inthisdesign,Bluetoothonlyactsasaslave,receivinginstructionsfromthemobilephone.IVATmega328P-PUBasedStructureDesignTakethedormitoryasanexampletodesignthecontrollerfortheswitch(asshowninFigure5).Figure5.PowerswitchAftermeasurement,whentheswitchisintheequilibriumposition,thatis,betweentheclosedandopenpositions,ifthelight-offpositionispressedmorethan2mm,thebuttonwillturnoffthepower.Whenthelight-onpositionispresseddownmorethan2mm,thebuttonwillturnonthepower.Wecandesignalinkmechanismconnectedwiththesteeringgeartomake:Whenthesteeringgearrotatesto180,theconnectingrodpositionisthehighest;Whenthesteeringgearrotatesto0,theconnectingrodpositionislowest.Then,settheinitialpositionofthesteeringgearto90,sothatthebuttonisatthevalueofthebalanceposition.Atthistime,coincidethemiddlepositionoftheT-shapedfixingbracketwiththemiddlepositionofthebutton.Inaddition,inordertofacilitatetherealizationoffunctions,thecentralpositioncanbesetasachute.Figure6showsthedesignandinstallation.Figure7showsthatthecontrollerisdesignedasarectangularbox.Figure8showsthelayoutofeachmodule.Figure9showsthephysicalobjectandinstallationdiagramofthesmartswitchcontroller.Figure6.DesignandinstallationdrawingofconnectingrodpartFigure7.OverallviewofthecontrollerFigure8.SchematicdiagramofeachmoduleinstallationFigure9.PhysicalimageofsmartswitchcontrollerVATmega328P-PUBasedSystemSoftwareDesignThesoftwarepartcompletestheprocessingofthesignalsreceivedbythelightdetectionmoduleandtheBluetoothmodule,andthencontrolsthemechanicalstructuretoswitchthelights.Figure10showsthesystemsoftwareflowchart.Thelightdetectionmodule(theschematicdiagramofthelightdetectionmoduleisshowninFigure11)isusedtodetectchangesinbrightnessanddarknessofthesurroundingenvironment.Whenthesurroundingenvironmentisalwaysinalightstate,thelightdetectioncircuitwillcontinuouslysendalow-levelsignal0tothecentralcontrolmodule;Whenthesurroundingenvironmenthasbeeninadarkstate,thelightdetectioncircuitwillcontinuouslysendahighlevelsignal1tothecentralcontrolmodule.Whenthesurroundingenvironmentchangesfromnolighttolight(judgingthedaybreak),inthiscase,thesystemdoesnotact.Whenthesurroundingenvironmentchangesfromlighttonolight(judgedasamomentofpowerfailure),thelightdetectioncircuitwillstarttosendahighlevelsignal1tothecentralcontrolmodule.Atthemomentoftransition,thecentralcontrolmodulewillcontrolthesystemtoexecuteaworkcycle.Afterturningoffthelight,thesystemwillautomaticallyresetandwaitforthenextchangefromlighttonolight.Becausetheportmemoryofthecentralcontrolmoduleislimited,andthelightdetectioncircuitcontinuouslytransmitsdatatotheport.Thiswillcausethecentralcontrolmoduletorestartinashorttimeduetoexhaustionofmemory,makingthesystemunstableandunreliable.Therefore,aportclearingfunctionisspeciallywrittenwhencompilingthesystemtoensurethattheexpireddatasentbythelightdetectioncircuitisclearedintime.Therebyimprovingthestabilityandreliabilityofthesystem.Figure10.SystemsoftwareflowchartAftertalkingaboutthelightdetectionmodule,howdoestheBluetoothmoduleprocessthereceivedsignaltocontroltheswitch?WecanusemobilephoneAPPandBluetoothmoduletocontrolthesystemtoturnonandoffthelightsthroughwirelesstransmission.WhenthemobilephonesendsthecommandcharacterAtothecentralcontrolmodulethroughtheBluetoothmodule,thesystemwillexecuteacycleofturningoffthelights,andthenautomaticallyreset;Inthesameway,whenthemobilephonesendsthecommandcharacterBtothecentralcontrolmodulethroughtheBluetoothmodule,thesystemexecutesalight-oncommandforaworkingcycle,andthenautomaticallyresets.Figure11.SchematicdiagramofthelightmoduleVIConclusionThesmartswitchlightcontrollerdiscussedinthisbloghassignificantadvantages:*Donotchangethecircuitoftheoriginalpush-typepowerswitch.Therefore,itisnotonlysafe,butalsoeasytodisassembleandassemble;*TurnonandoffthelightsviaBluetoothwirelesscontrol.Therefore,ithasstrongoperability;*Aftercompletingtheswitchlampworkcycle,realizeautomaticreset.Inaddition,whilerealizingautomation,wecanalsomoveourfingerstoeasilyswitchlightsonthebed;*ATmega328P-PUhasgreatdevelopmentpotential.Thereasonforusingitistomeettheneedsofexpandingfunctionsinthefuture.suchas:CooperatewithWIFImodule:canrealizeultra-remotecontrol;Cooperatewithtimer:itcanrealizethefunctionofturningonthelightsatatime.Insummary,theintelligentswitchlightcontrollerbasedonATmega328P-PUweintroducedissimpleandreasonableinstructure,easytoinstall,safe,convenientandefficienttooperate.WiththesmartswitchlightcontrollerofATmega328P-PU,whenwelazilylieonthebedandplaywiththemobilephone,weusethemobilephonetocontrolthelightswitch.Atnight,weareafraidthatweforgettoturnoffthelightswhenwefallasleep,andwedontneedtogetoutofbed.Itcanalsoautomaticallyturnoffthelightswhenitgetsdark.ComponentDatasheetATMEGA328PDatasheetFAQWhatismeantbyATMEGA328P?ATMEGA328Pishighperformance,lowpowercontrollerfromMicrochip.ATMEGA328Pisan8-bitmicrocontrollerbasedonAVRRISCarchitecture.ItisthemostpopularofallAVRcontrollersasitisusedinARDUINOboards.WhatisthedifferencebetweenATMEGA328andATMEGA328P?ATMEGA328PandATMEGA328arethesameeverysensearchitecturally.ATMEGA328PjustconsumeslowerpowerthanATMEGA328,whichmeansthatthe328Pismanufacturedinafinerprocessthanthe328.WhyATMEGA328isusedinArduino?TheATMEGA328/Pisalow-powerCMOS8-bitmicrocontrollerbasedontheAVRenhancedRISC(reducedinstructionsetcomputer)architecture.InOrdertomaximizeperformanceandparallelism,theAVRusesHarvardarchitecturewithseparatememoriesandbusesforprogramanddata.HowdoyoucodeATMEGA328P?IsATMEGA328Pamicrocontroller?TheATMEGA328isasingle-chipmicrocontrollercreatedbyAtmelinthemegaAVRfamily(laterMicrochipTechnologyacquiredAtmelin2016).IthasamodifiedHarvardarchitecture8-bitRISCprocessorcore.CantheATMEGA328PmicrocontrollerbeusedwithouttheArduinoboard?Yes.YoucanuseATMega328Pwithoutarduinoboard....YoucanusearduinoboardwiththeIC.ProgramtheICandthentakeitoutanduseitinyourcircuit.Youwillhavetouse16MHZOscillatorwithcapacitors.HowdoIprogramAtmega328Pwithoutbootloader?ProgrammingAVRWithArduinoAsISPWithoutBootloaderandExternalCrystalStep1:ThingsYouNeed....Step2:UploadArduinoISPCodeonArduinoBoard....Step3:OpenCommandPrompt(inWindowsOS)...Step4:RequiredDownloads.....Step5:InstallationofWinAVR(onlyHelpforWindowsOSIsCoveredforNow)DescriptionTheCD405xBanalogmultiplexersanddemultiplexersaredigitally-controlledanalogswitcheshavinglowONimpedanceandverylowOFFleakagecurrent.ThesemultiplexercircuitsdissipateextremelylowquiescentpoweroverthefullVDDVSSandVDDVEEsupplyvoltageranges,independentofthelogicstateofthecontrolsignals.TheCD4051Bisasingle8-Channelmultiplexerhavingthreebinarycontrolinputs,A,B,andC,andaninhibitinput.Thethreebinarysignalsselect1of8channelstobeturnedon,andconnectoneofthe8inputstotheoutput.CatalogDescriptionPinoutConfigurationandFunctionCD4051BlockDiagramDocumentsandMediaFeaturesApplicationCD4051TypicalApplicationCircuitsOrdering&QuantityPinoutConfigurationandFunctionCD4051BlockDiagramThelogicdiagramofCD4051iscomposedofthreeparts:logiclevelconversioncircuit,8select1decodingcircuitand8CMOSswitchunits.A,BandCare3-bitbinaryaddressinputterminals,and8combinationsof3-bitbinarycanbeusedforselection8channels;INHistheaddressinputprohibitionterminal,whenitishigh,theaddressinputterminalisinvalid,thatis,nochannelisstrobed.TheinputlevelsofA,B,CandINHarecompatiblewithTTL.CD4051has8input\outputterminals,1output/inputterminal,digitalcircuitpowersupply+Eand-E1,analogcircuitpowersupply+Eand-E2.ThemainfunctionofthelogiclevelconversioncircuitistoinputtheaddressA,B,CandaddressinputinhibitterminalINHinputTTLlogiclevelisconvertedintoCMOSlevel,sothattheswitchunitcanbecontrolledbyTTLlevel.Themainfunctionofthe8-to-1addressdecodingcircuitistoconverttheaddressinputsignalfromthelogiclevelconversioncircuitintothecorrespondingswitchunitstrobesignalandturnonthecorrespondingswitchunit.DocumentsandMediaDatasheetCD405xBCMOSSingle8-ChannelAnalogMultiplexer/DemultiplexerwithLogic-LevelConversiondatasheet(Rev.I)FeaturesWideRangeofDigitalandAnalogSignalLevelsDigital:3Vto20VAnalog:20VP-PLowONResistance,125Ω(Typical)Over15VP-PSignalInputRangeforVDDVEE=18VHighOFFResistance,ChannelLeakageof100pA(Typical)atVDDVEE=18VLogic-LevelConversionforDigitalAddressingSignalsof3Vto20V(VDDVSS=3Vto20V)toSwitchAnalogSignalsto20VP-P(VDDVEE=20V)MatchedSwitchCharacteristics,rON=5Ω(Typical)forVDDVEE=15VVeryLowQuiescentPowerDissipationUnderAllDigital-ControlInputandSupplyConditions,0.2W(Typical)atVDDVSS=VDDVEE=10VBinaryAddressDecodingonChip5V,10V,and15VParametricRatings100%TestedforQuiescentCurrentat20VMaximumInputCurrentof1Aat18VOverFullPackageTemperatureRange,100nAat18Vand25CBreak-Before-MakeSwitchingEliminatesChannelOverlapApplicationAnalogandDigitalMultiplexingandDemultiplexingA/DandD/AConversionSignalGatingFactoryAutomationTelevisionsAppliancesConsumerAudioProgrammableLogicCircuitsSensorsCD4051TypicalApplicationCircuits1.CD4051,CH3130multi-channeldemodulatorcircuitdiagramThiscircuitismainlycomposedof8-channelanalogswitchCD4051andvoltagefollowerCH3130,etc.TheinputsignaloftheprohibitionterminalINHofanalogswitchCD4051isusedtocontrolthegatingofvoltagefollowerCH3130,therebyperformdemodulationtomultipleanalogsignals.2.CD4051constructs32-channelcircuitBecausetheCD4051hasonlyeightinputports,fourCD4051sareneededtobuilda32-waymultiplexer,labeledINH1,INH2,INH3,andINH4.The32-waymultiplexershouldhave5controlports,ofwhichthefirstthreearetheinputportsofCD4051andthelasttwoarecontrolports.(BecauseCD4051hasthreeinputports),labelthemasD1,D2,D3,D4,D5(0000011111,00000channel0,11111channel31).Thebasicideaistorealizethechoiceof32channelports(0-7,8-15,16-23,24-31)byselecting4CD4051s.IfyouchoosethethirdCD4051,youcanchoose16-23(10000-10111)channelport.However,theselectionofCD4051isachievedbycontrollingtheINHlevelofeachCD4051.Forexample,ifyouwanttoturnonthethirdCD4051,makeitsINHhigh(atthistimeD5=1,D4=0,thenINH3=D5!D4).Therefore,thechoiceofINHisachievedbycontrollingthelogicalrelationshipbetweenD5andD4.WhereINH1=!D5!D4;INH2=!D5D4;INH3=D5!D4;INH4=D5D4.

访客,请您发表评论:

Powered By Tkool Electronics

Copyright Your WebSite.sitemap