您的当前位置:首页 >74LS03 >IRFP440PBF-VISHAY 正文

IRFP440PBF-VISHAY

时间:2021-04-23 00:24:49 来源:网络整理编辑:74LS03

核心提示

IDescriptionFirst,thisblogwillintroducethe1wiredigitaltemperaturesensorDS18B20.Wemainlyintroduceitsstructure,characteristicsandworkingprinciplehere.Second,wewillintroduceatemperaturemeasurementsystembasedonDS18B20andAT89S52microcontroller.Herewemainlyintroduceitshardwarestructureandassembler.Third,therewillbepartofthesourceprogramthatisdetailedanalyed.Finally,theblogalsoexplainshowitperformstemperaturemeasurementintheagriculturalfield.Thetemperaturemeasuringdevicehasaseriesofadvantages.Suchas:highdisplayaccuracy,lowprice,simplestructure,convenientexpansionandwideapplication.DS18B20TemperatureSensorTutorialCatalogIDescriptionIIIntroductionIIIDS18B20Overview3.1DS18B20Advantages3.2DS18B20Features3.3DS18B20InternalStructureIVDS18B20MCUTemperatureMeasurementDevice4.1CompositionofSystemHardware4.2DesignofInterfaceVSoftwareDesignVIApplicationinAgriculturalProduction6.1TemperatureofMildew6.2TemperatureofAgriculturalProducts6.3TemperatureDetectioninGreenhouses6.4TemperatureofSoilVIIConclusionFAQOrdering&QuantityIIIntroductionWhatistemperature?Whataretherolesoftemperature?Temperatureisaphysicalquantitythatcharacterizesthedegreeofcoolingofanobject,anditisalsoabasicenvironmentalparameter.Inagro-industrialproductionanddailylife,themeasurementandcontroloftemperaturealwaysoccupyanextremelyimportantposition.Atpresent,atypicaltemperaturemeasurementandcontrolsystemconsistsofthefollowingparts:Analogtemperaturesensor;A/Dconversioncircuit;MCU.However,theanalogsignaloutputbytheanalogtemperaturesensorhastobeconverted.Itcaninterfacewithmicroprocessorssuchassingle-chipmicrocomputersonlyafterobtainingdigitalsignalsthroughtheA/Dconversionlink.Therefore,thehardwarecircuitstructureiscomplicatedandthecostishigh.ButDS18B20canhelpsolvethisproblem.Thenew1wiredigitaltemperaturesensorrepresentedbyDS18B20integratestemperaturemeasurementandA/Dconversion,anddirectlyoutputsdigitalquantities.Thestructureoftheinterfacecircuitwiththesingle-chipmicrocomputerissimple,anditiswidelyusedintheoccasionswithlongdistanceandmanynodes.Therefore,DS18B20hasstrongpromotionandapplicationvalue.IIIDS18B20Overview3.1DS18B20AdvantagesDS18B20type1wireintelligenttemperaturesensorproducedbyDALLASSemiconductorCompany.Itbelongstoanewgenerationofintelligenttemperaturesensorsadaptedtomicroprocessors.Comparedwiththetraditionalthermistor,ithasthefollowingadvantages:Itcandirectlyreadthemeasuredtemperature;Thereadingmodeof9-12digitscanberealizedthroughsimpleprogrammingaccordingtoactualrequirements;Itcanalsocomplete9-bitand12-bitdigitalquantitieswithin93.75msand750ms,respectively,withamaximumresolutionof0.0625C;ToreadorwritetheinformationofDS18B20,onlyoneportline(1wireinterface)isrequiredtoreadandwrite.3.2DS18B20FeaturesUnique1-WireInterfaceRequiresOnlyOnePortPinforCommunicationReduceComponentCountwithIntegratedTemperatureSensorandEEPROMMeasuresTemperaturesfrom-55Cto+125C(-67Fto+257F)0.5CAccuracyfrom-10Cto+85CProgrammableResolutionfrom9Bitsto12BitsNoExternalComponentsRequiredParasiticPowerModeRequiresOnly2PinsforOperation(DQandGND)SimplifiesDistributedTemperature-SensingApplicationswithMultidropCapabilityEachDeviceHasaUnique64-BitSerialCodeStoredinOn-BoardROMFlexibleUser-DefinableNonvolatile(NV)AlarmSettingswithAlarmSearchCommandIdentifiesDeviceswithTemperaturesOutsideProgrammedLimitsAvailablein8-PinSO(150mils),8-PinSOP,and3-PinTO-92Packages3.3DS18B20InternalStructureDS18B20adopts3-pinPR-35packageor8-pinSOICpackage.ItsDS18B20externalshapeandpindiagramareshowninFigure1.TheDS18B20internalstructureblockdiagramisshownasinFigure2.Thestructureof64-bitflashROMisshowninFigure3.Figure1.DS18B20PinoutFigure2.DS18B20InternalStructureFigure3.64bFlashROMStructureIVDS18B20MCUTemperatureMeasurementDevice4.1CompositionofSystemHardwareTheDS18B20single-chipmicrocomputerintelligenttemperaturemeasurementdeviceismainlycomposedofDS18B20temperaturesensor,AT89S52,displaymoduleandpowermodule,asshowninFigure4.Themaintechnicalindicatorsoftheproductare:MeasuringRange(℃):-55.0~+125.0MeasurementAccuracy(℃):0.1ResponseTime(s):1.5Figure4.SystemStructureDiagramThesystemusesDS18B20asatemperaturesensor.Theone-chipcomputerAT89S52ofATMELCompanyservesastheprocessor.Temperaturedisplayandlight-emittingdiodeastemperaturecontroloutputunit.Thewholesystemstrivestohaveasimplestructureandperfectfunctions.Theworkingprincipleofthesystemisasfollows:AfterDS18B20carriesonthefieldtemperaturemeasurement,themeasureddataissenttotheP3.5portofAT89S52.Thetemperaturevalueisdisplayedafterbeingprocessedbythemicrocontroller.Then,thistemperaturevalueiscomparedwiththeupperlimitofthesetalarmtemperature.Ifitishigherthanthesetupperlimit,theyellowLEDlightsup.ThemaincircuitdiagramofthesystemisshownasinFig.5.Figure5.DS18B20TemperatuerMeasurementDevice4.2DesignofInterfaceThereare2waystoconnectDS18B20tothehardwareofthemicrocontroller:Vccisconnectedtoexternalpowersupply,GNDisgrounded,andI/OisconnectedtotheI/Olineofthemicrocontroller;Useparasiticpowersupply,UDDandGNDaregroundedatthistime,andI/OisconnectedtoMCUI/O.Regardlessofthe1stor2ndpowersupplymode,theI/Olinemustbeconnectedtoapull-upresistorofabout4.7k.Figure6showsatypicalconnectionbetweenDS18B20andamicroprocessor.InFigure6(a),DS18B20adoptsparasiticpowersupply,anditsVDDandGNGterminalsarebothgrounded;InFigure6(b),theDS18B20usesanexternalpowersupply,anditsVDDterminalusesa3~5.5Vpowersupply.ThissystemadoptsthewiringmodeshowninFigure6(b),thatis,theworkingmodeofexternalpowersupply.TheactualconnectionpictureofthesystemisshowninFigure6.Figure6.PhysicalDiagramofSystemConnectionVSoftwareDesignItisworthnotingthatDS18B20hasveryhighrequirementsontwoaspects:timingandelectricalparameters.Therefore,theworkflowofthemainCPUaccessingtheDS18B20throughthesingle-businterfacemustfollowastrictoperatingsequence:first,initializetheDS18B20;second,sendROMcommands;andthen,sendfunctioncommands.Wecantakealookatthefollowingpartofthesourceprogramisasfollows:ORG0000HAJMPMAIN;StatementofMCUmemoryallocation!TEMPER_LEQU29H;usedtosavethelower8bitsofthereadtemperatureTEMPER_HEQU28H;usedtosavetheupper8bitsofthereadtemperatureFLAG1EQU38H;WhethertheDS18B20flagisdetectedPNFLAGEQU68H;DatapositiveandnegativeflagA_BITEQU20H;thesingledigitofthedigitaltubestoresthememorylocationB_BITEQU21H;ThetendigitsofthedigitaltubestorethememorylocationC_BITEQU22H;ThedecimalplacesofthedigitaltubestorethememorylocationT_INTEGEREQU26H;TheintegerpartafterFORMAT,whichintegratestwobytesoftemperatureintoonebyteT_DFEQU27H;ThedecimalfractionafterFORMAT,thedecimalfractionofnibbletemperature(therearelowfourdigits)MAIN:LCALLGET_TEMPER;CallthetemperaturereadingsubroutineLCALLT_FORMAT;Formattheread2bytetemperatureLCALLALARM;callthealarmsubroutineLCALLDISPLAY;callthedigitaltubedisplaysubroutineLCALLD1S;testafteradelayof0.5secondsAJMPMAIN;thisistheDS18B20resetinitializationsubroutineINIT_1820:SETBP3.5NOPCLRP3.5;thehostsendsoutaresetlowpulsewithadelayof537microsecondsMOVR1,#2TSR1:MOVR0,#250DJNZR0,$DJNZR1,TSR1SETBP3.5;thenpullupthedatalineNOPNOPNOPMOVR0,#25HTSR2:JNBP3.5,TSR3;waitingforDS18B20responseDJNZR0,TSR2;delayLJMPTSR4TSR3:SETBFLAG1;SettheflagbittoindicatethatDS1820existsLJMPTSR5TSR4:CLRFLAG1;cleartheflagbit,indicatingthatDS1820doesnotexistLJMPTSR7TSR5:MOVR0,#120TSR6:DJNZR0,TSR6;timingrequiresaperiodofdelayTSR7:SETBP3.5RET;readthetemperaturevalueafterconversionGET_TEMPER:;SETBP3.5LCALLINIT_1820;firstresetDS18B20JBFLAG1,TSS2RET;DeterminewhetherDS1820exists?IfDS18B20doesnotexistThenreturnTSS2:MOVA,#0CCH;skipROMmatchingLCALLWRITE_1820MOVA,#44H;IssuetemperatureconversioncommandLCALLWRITE_1820LCALLDISPLAYLCALLINIT_1820;resetbeforereadingtemperatureMOVA,#0CCH;SkipROMmatchingLCALLWRITE_1820MOVA,#0BEH;IssuereadtemperaturecommandLCALLWRITE_1820LCALLREAD_18200;savethereadtemperaturedatato28H/29HRET;WriteDS18B20subroutine(withspecifictimingrequirements)WRITE_1820:MOVR2,#8;atotalof8bitsofdata;CLRCWR1:CLRP3.5MOVR3,#6DJNZR3,$RRCAMOVP3.5,CMOVR3,#23DJNZR3,$SETBP3.5NOPDJNZR2,WR1SETBP3.5RET;readtheprogramofDS18B20,readtwobytesoftemperaturedatafromDS18B20READ_18200:MOV36H,#2;SetthehighandlowtemperatureReadfromDS18B20MOVR1,#29H;thelowbitisstoredin29H(TEMPER_L),thehighbitDeposit28H(TEMPER_H)RE00:MOVR2,#8;Thereare8bitsofdataRE01:;CLRCSETBP3.5NOPNOPCLRP3.5NOPNOPNOPSETBP3.5MOVR3,#9RE10:DJNZR3,RE10MOVC,P3.5MOVR3,#23RE20:DJNZR3,RE20RRCADJNZR2,RE01MOV@R1,ADECR1DJNZ36H,RE00RET;-----Integratethetwo-bytetemperaturereadout(pleaserefertotheinformationaboutthe2-bytetemperatureformatreadoutbyDS18B20)----------T_FORMAT:;AlarmsubroutineALARM:;DisplaysubroutineDISPLAY:;1MSdelay(calculatedby12MHZ)D1MS:MOVR7,#250llmm:nopnopDJNZR7,llmmRET;1MSdelay(calculatedby12MHZ)D1S:MovR6,#4LOOP2:movR5,#125;------------250LOOP1:LCALLD1mSDJNZR5,LOOP1DJNZR6,LOOP2RET;7-segmentdigitaltube0-9digitcommonanodedisplaycodeNUMTAB:DB0C0H,0f9H,0a4H,0b0H,99H,92H,82H,0f8H,80H,90H,0ffHXIAOSHU:DB00H,01H,01H,02H,03H,03H,04H,04H,05H,06H,06H,07H,08H,08H,09H,09HENDVIApplicationinAgriculturalProductionThistemperaturemeasurementsystemcandirectlyoutputdigitalquantities.Inaddition,ithasthecharacteristicsofsimplestructure,convenientuseandlowprice.Therefore,itcanbewidelyusedinagriculturalproduction.6.1TemperatureofMildewModerngrainwarehousescanusethissystemtomonitorthetemperatureofhundredsofpoints.Inthisway,youcaneasilygraspthetemperaturechangesatvariouspointsatdifferenttimes,increasestoragecapacity,andeffectivelyreducetheoccurrenceofmildew.6.2TemperatureofAgriculturalProductsAtpresent,low-temperaturerefrigerationmeasuresarewidelyadoptedforthepreservationoffruitsandvegetables.Thesystemcanbeinstalledinthetemperaturemeasurementpositionoftherefrigeratorcompartment.Inthisway,thetemperaturevaluecanbeconvenientlyobservedatanytimetocheckwhethertheoptimalpreservationtemperatureisreached.6.3TemperatureDetectioninGreenhousesThesystemisusedinplasticgreenhousesforgreenhousevegetablecultivationandflowerproduction.Inthisway,automatictemperaturedisplaycanberealized,andlaborandtimefortemperaturemeasurementcanbesaved.6.4TemperatureofSoilIntheprocessofplantingcropswithstrictrequirementsonsoiltemperature,thesystemcantestthechangesinsoiltemperatureasneededtofacilitatethegraspofaccuratetemperaturevalues.VIIConclusionThesingle-chiptemperaturemeasurementsystemtakesfulladvantageofthesimplicityofthehardwarestructureofDS18B20andAT89S52,using8-segmentdigitaltubedisplay,lowpriceandwideapplication.Accordingtoactualneeds,wecanalsouseLCDasadisplaydeviceorformadistributedtemperaturemeasurementandcontrolsystem.Althoughthedesigniseasytoexpand,italsohasitsshortcomings.Thesimplicityofthehardwarestructurecomesattheexpenseofsoftware.Therefore,specialattentionshouldbepaidtotheworkingsequencerequirementsofDS18B20duringprogramming.Inshort,thesystemcanbewidelyusedintemperaturemeasurementinagriculturalproduction.FAQWhatisDS18B20temperaturesensor?TheDS18B20isa1-wireprogrammabletemperaturesensorfrommaximintegrated.Itiswidelyusedtomeasuretemperatureinhardenvironmentslikeinchemicalsolutions,minesorsoiletc.Theconstrictionofthesensorisruggedandalsocanbepurchasedwithawaterproofoptionmakingthemountingprocesseasy.HowdoestheDS18B20work?Itworksontheprincipleofdirectconversionoftemperatureintoadigitalvalue.IsDS18B20athermistor?Athermistorisathermalresistor-aresistorthatchangesitsresistancewithtemperature....Thermistorshavesomebenefitsoverotherkindsoftemperaturesensorssuchasanalogoutputchips(LM35/TMP36)ordigitaltemperaturesensorchips(DS18B20)orthermocouples.HowaccurateisDS18B20?TheDS18B20readswithanaccuracyof0.5Cfrom-10Cto+85Cand2Caccuracyfrom-55Cto+125C.Whatisds1820?TheDS18B20isonetypeoftemperaturesensoranditsupplies9-bitto12-bitreadingsoftemperature....Thecommunicationofthissensorcanbedonethroughaone-wirebusprotocolwhichusesonedatalinetocommunicatewithaninnermicroprocessor.HowdoIconnectmyDS18B20tomyRaspberryPi?OnceyouveconnectedtheDS18B20,powerupyourPiandlogin,thenfollowthesestepstoenabletheOne-Wireinterface:1.Atthecommandprompt,entersudonano/boot/config.txt,thenaddthistothebottomofthefile:2.dtoverlay=w1-gpio.3.ExitNano,andrebootthePiwithsudoreboot.WhatistheworkingprincipleofDS18B20?TheDS18B20DigitalThermometerprovides9to12-bit(configurable)temperaturereadingswhichindicatethetemperatureofthedevice.Itcommunicatesovera1-Wirebusthatbydefinitionrequiresonlyonedataline(andground)forcommunicationwithacentralmicroprocessor.Inadditionitcanderivepowerdirectlyfromthedataline(parasitepower),eliminatingtheneedforanexternalpowersupply.ThecorefunctionalityoftheDS18B20isitsdirect-to-digitaltemperaturesensor.Theresolutionofthetemperaturesensorisuser-configurableto9,10,11,or12bits,correspondingtoincrementsof0.5C,0.25C,0.125C,and0.0625C,respectively.Thedefaultresolutionatpower-upis12-bit.WheretouseDS18B20Sensor?TheDS18B20isa1-wireprogrammableTemperaturesensorfrommaximintegrated.Itiswidelyusedtomeasuretemperatureinhardenvironmentslikeinchemicalsolutions,minesorsoiletc.Theconstrictionofthesensorisruggedandalsocanbepurchasedwithawaterproofoptionmakingthemountingprocesseasy.Itcanmeasureawiderangeoftemperaturefrom-55Cto+125withadecentaccuracyof5C.EachsensorhasauniqueaddressandrequiresonlyonepinoftheMCUtotransferdatasoitaverygoodchoiceformeasuringtemperatureatmultiplepointswithoutcompromisingmuchofyourdigitalpinsonthemicrocontroller.HowconnectDS18B20toArduino?FirstplugthesensoronthebreadboardtheconnectitspinstotheArduinousingthejumpersinthefollowingorder:pin1toGND;pin2toanydigitalpin(pin2inourcase);pin3to+5Vor+3.3V,attheendputthepull-upresistor.OnanATMega328P,whyisaDS18B20temperaturesensorreturningincorrecttemperaturevalues?Severalpossibilities:1.Ifitisjustreadingalittlehigh,itmightbecausedbyselfheating.Addaheatsinkand/ormakemeasurementslessfrequently.2.Especiallyifthevaluesarereallywhacky,itmightbecodewitherrorsormis-wiring.Useapublishedsketchtocheckoperation.3.TheDS18B20mightbedefective.Tryanother.4.Itsaccurateto0.5C.Areyouexpectingittobemoreaccurate(likedowntotheLSBofthereadvalue)?

IDescriptionFirst,thisblogwillintroducethe1wiredigitaltemperaturesensorDS18B20.Wemainlyintroduceitsstructure,characteristicsandworkingprinciplehere.Second,wewillintroduceatemperaturemeasurementsystembasedonDS18B20andAT89S52microcontroller.Herewemainlyintroduceitshardwarestructureandassembler.Third,therewillbepartofthesourceprogramthatisdetailedanalyed.Finally,theblogalsoexplainshowitperformstemperaturemeasurementintheagriculturalfield.Thetemperaturemeasuringdevicehasaseriesofadvantages.Suchas:highdisplayaccuracy,lowprice,simplestructure,convenientexpansionandwideapplication.DS18B20TemperatureSensorTutorialCatalogIDescriptionIIIntroductionIIIDS18B20Overview3.1DS18B20Advantages3.2DS18B20Features3.3DS18B20InternalStructureIVDS18B20MCUTemperatureMeasurementDevice4.1CompositionofSystemHardware4.2DesignofInterfaceVSoftwareDesignVIApplicationinAgriculturalProduction6.1TemperatureofMildew6.2TemperatureofAgriculturalProducts6.3TemperatureDetectioninGreenhouses6.4TemperatureofSoilVIIConclusionFAQOrdering&QuantityIIIntroductionWhatistemperature?Whataretherolesoftemperature?Temperatureisaphysicalquantitythatcharacterizesthedegreeofcoolingofanobject,anditisalsoabasicenvironmentalparameter.Inagro-industrialproductionanddailylife,themeasurementandcontroloftemperaturealwaysoccupyanextremelyimportantposition.Atpresent,atypicaltemperaturemeasurementandcontrolsystemconsistsofthefollowingparts:Analogtemperaturesensor;A/Dconversioncircuit;MCU.However,theanalogsignaloutputbytheanalogtemperaturesensorhastobeconverted.Itcaninterfacewithmicroprocessorssuchassingle-chipmicrocomputersonlyafterobtainingdigitalsignalsthroughtheA/Dconversionlink.Therefore,thehardwarecircuitstructureiscomplicatedandthecostishigh.ButDS18B20canhelpsolvethisproblem.Thenew1wiredigitaltemperaturesensorrepresentedbyDS18B20integratestemperaturemeasurementandA/Dconversion,anddirectlyoutputsdigitalquantities.Thestructureoftheinterfacecircuitwiththesingle-chipmicrocomputerissimple,anditiswidelyusedintheoccasionswithlongdistanceandmanynodes.Therefore,DS18B20hasstrongpromotionandapplicationvalue.IIIDS18B20Overview3.1DS18B20AdvantagesDS18B20type1wireintelligenttemperaturesensorproducedbyDALLASSemiconductorCompany.Itbelongstoanewgenerationofintelligenttemperaturesensorsadaptedtomicroprocessors.Comparedwiththetraditionalthermistor,ithasthefollowingadvantages:Itcandirectlyreadthemeasuredtemperature;Thereadingmodeof9-12digitscanberealizedthroughsimpleprogrammingaccordingtoactualrequirements;Itcanalsocomplete9-bitand12-bitdigitalquantitieswithin93.75msand750ms,respectively,withamaximumresolutionof0.0625C;ToreadorwritetheinformationofDS18B20,onlyoneportline(1wireinterface)isrequiredtoreadandwrite.3.2DS18B20FeaturesUnique1-WireInterfaceRequiresOnlyOnePortPinforCommunicationReduceComponentCountwithIntegratedTemperatureSensorandEEPROMMeasuresTemperaturesfrom-55Cto+125C(-67Fto+257F)0.5CAccuracyfrom-10Cto+85CProgrammableResolutionfrom9Bitsto12BitsNoExternalComponentsRequiredParasiticPowerModeRequiresOnly2PinsforOperation(DQandGND)SimplifiesDistributedTemperature-SensingApplicationswithMultidropCapabilityEachDeviceHasaUnique64-BitSerialCodeStoredinOn-BoardROMFlexibleUser-DefinableNonvolatile(NV)AlarmSettingswithAlarmSearchCommandIdentifiesDeviceswithTemperaturesOutsideProgrammedLimitsAvailablein8-PinSO(150mils),8-PinSOP,and3-PinTO-92Packages3.3DS18B20InternalStructureDS18B20adopts3-pinPR-35packageor8-pinSOICpackage.ItsDS18B20externalshapeandpindiagramareshowninFigure1.TheDS18B20internalstructureblockdiagramisshownasinFigure2.Thestructureof64-bitflashROMisshowninFigure3.Figure1.DS18B20PinoutFigure2.DS18B20InternalStructureFigure3.64bFlashROMStructureIVDS18B20MCUTemperatureMeasurementDevice4.1CompositionofSystemHardwareTheDS18B20single-chipmicrocomputerintelligenttemperaturemeasurementdeviceismainlycomposedofDS18B20temperaturesensor,AT89S52,displaymoduleandpowermodule,asshowninFigure4.Themaintechnicalindicatorsoftheproductare:MeasuringRange(℃):-55.0~+125.0MeasurementAccuracy(℃):0.1ResponseTime(s):1.5Figure4.SystemStructureDiagramThesystemusesDS18B20asatemperaturesensor.Theone-chipcomputerAT89S52ofATMELCompanyservesastheprocessor.Temperaturedisplayandlight-emittingdiodeastemperaturecontroloutputunit.Thewholesystemstrivestohaveasimplestructureandperfectfunctions.Theworkingprincipleofthesystemisasfollows:AfterDS18B20carriesonthefieldtemperaturemeasurement,themeasureddataissenttotheP3.5portofAT89S52.Thetemperaturevalueisdisplayedafterbeingprocessedbythemicrocontroller.Then,thistemperaturevalueiscomparedwiththeupperlimitofthesetalarmtemperature.Ifitishigherthanthesetupperlimit,theyellowLEDlightsup.ThemaincircuitdiagramofthesystemisshownasinFig.5.Figure5.DS18B20TemperatuerMeasurementDevice4.2DesignofInterfaceThereare2waystoconnectDS18B20tothehardwareofthemicrocontroller:Vccisconnectedtoexternalpowersupply,GNDisgrounded,andI/OisconnectedtotheI/Olineofthemicrocontroller;Useparasiticpowersupply,UDDandGNDaregroundedatthistime,andI/OisconnectedtoMCUI/O.Regardlessofthe1stor2ndpowersupplymode,theI/Olinemustbeconnectedtoapull-upresistorofabout4.7k.Figure6showsatypicalconnectionbetweenDS18B20andamicroprocessor.InFigure6(a),DS18B20adoptsparasiticpowersupply,anditsVDDandGNGterminalsarebothgrounded;InFigure6(b),theDS18B20usesanexternalpowersupply,anditsVDDterminalusesa3~5.5Vpowersupply.ThissystemadoptsthewiringmodeshowninFigure6(b),thatis,theworkingmodeofexternalpowersupply.TheactualconnectionpictureofthesystemisshowninFigure6.Figure6.PhysicalDiagramofSystemConnectionVSoftwareDesignItisworthnotingthatDS18B20hasveryhighrequirementsontwoaspects:timingandelectricalparameters.Therefore,theworkflowofthemainCPUaccessingtheDS18B20throughthesingle-businterfacemustfollowastrictoperatingsequence:first,initializetheDS18B20;second,sendROMcommands;andthen,sendfunctioncommands.Wecantakealookatthefollowingpartofthesourceprogramisasfollows:ORG0000HAJMPMAIN;StatementofMCUmemoryallocation!TEMPER_LEQU29H;usedtosavethelower8bitsofthereadtemperatureTEMPER_HEQU28H;usedtosavetheupper8bitsofthereadtemperatureFLAG1EQU38H;WhethertheDS18B20flagisdetectedPNFLAGEQU68H;DatapositiveandnegativeflagA_BITEQU20H;thesingledigitofthedigitaltubestoresthememorylocationB_BITEQU21H;ThetendigitsofthedigitaltubestorethememorylocationC_BITEQU22H;ThedecimalplacesofthedigitaltubestorethememorylocationT_INTEGEREQU26H;TheintegerpartafterFORMAT,whichintegratestwobytesoftemperatureintoonebyteT_DFEQU27H;ThedecimalfractionafterFORMAT,thedecimalfractionofnibbletemperature(therearelowfourdigits)MAIN:LCALLGET_TEMPER;CallthetemperaturereadingsubroutineLCALLT_FORMAT;Formattheread2bytetemperatureLCALLALARM;callthealarmsubroutineLCALLDISPLAY;callthedigitaltubedisplaysubroutineLCALLD1S;testafteradelayof0.5secondsAJMPMAIN;thisistheDS18B20resetinitializationsubroutineINIT_1820:SETBP3.5NOPCLRP3.5;thehostsendsoutaresetlowpulsewithadelayof537microsecondsMOVR1,#2TSR1:MOVR0,#250DJNZR0,$DJNZR1,TSR1SETBP3.5;thenpullupthedatalineNOPNOPNOPMOVR0,#25HTSR2:JNBP3.5,TSR3;waitingforDS18B20responseDJNZR0,TSR2;delayLJMPTSR4TSR3:SETBFLAG1;SettheflagbittoindicatethatDS1820existsLJMPTSR5TSR4:CLRFLAG1;cleartheflagbit,indicatingthatDS1820doesnotexistLJMPTSR7TSR5:MOVR0,#120TSR6:DJNZR0,TSR6;timingrequiresaperiodofdelayTSR7:SETBP3.5RET;readthetemperaturevalueafterconversionGET_TEMPER:;SETBP3.5LCALLINIT_1820;firstresetDS18B20JBFLAG1,TSS2RET;DeterminewhetherDS1820exists?IfDS18B20doesnotexistThenreturnTSS2:MOVA,#0CCH;skipROMmatchingLCALLWRITE_1820MOVA,#44H;IssuetemperatureconversioncommandLCALLWRITE_1820LCALLDISPLAYLCALLINIT_1820;resetbeforereadingtemperatureMOVA,#0CCH;SkipROMmatchingLCALLWRITE_1820MOVA,#0BEH;IssuereadtemperaturecommandLCALLWRITE_1820LCALLREAD_18200;savethereadtemperaturedatato28H/29HRET;WriteDS18B20subroutine(withspecifictimingrequirements)WRITE_1820:MOVR2,#8;atotalof8bitsofdata;CLRCWR1:CLRP3.5MOVR3,#6DJNZR3,$RRCAMOVP3.5,CMOVR3,#23DJNZR3,$SETBP3.5NOPDJNZR2,WR1SETBP3.5RET;readtheprogramofDS18B20,readtwobytesoftemperaturedatafromDS18B20READ_18200:MOV36H,#2;SetthehighandlowtemperatureReadfromDS18B20MOVR1,#29H;thelowbitisstoredin29H(TEMPER_L),thehighbitDeposit28H(TEMPER_H)RE00:MOVR2,#8;Thereare8bitsofdataRE01:;CLRCSETBP3.5NOPNOPCLRP3.5NOPNOPNOPSETBP3.5MOVR3,#9RE10:DJNZR3,RE10MOVC,P3.5MOVR3,#23RE20:DJNZR3,RE20RRCADJNZR2,RE01MOV@R1,ADECR1DJNZ36H,RE00RET;-----Integratethetwo-bytetemperaturereadout(pleaserefertotheinformationaboutthe2-bytetemperatureformatreadoutbyDS18B20)----------T_FORMAT:;AlarmsubroutineALARM:;DisplaysubroutineDISPLAY:;1MSdelay(calculatedby12MHZ)D1MS:MOVR7,#250llmm:nopnopDJNZR7,llmmRET;1MSdelay(calculatedby12MHZ)D1S:MovR6,#4LOOP2:movR5,#125;------------250LOOP1:LCALLD1mSDJNZR5,LOOP1DJNZR6,LOOP2RET;7-segmentdigitaltube0-9digitcommonanodedisplaycodeNUMTAB:DB0C0H,0f9H,0a4H,0b0H,99H,92H,82H,0f8H,80H,90H,0ffHXIAOSHU:DB00H,01H,01H,02H,03H,03H,04H,04H,05H,06H,06H,07H,08H,08H,09H,09HENDVIApplicationinAgriculturalProductionThistemperaturemeasurementsystemcandirectlyoutputdigitalquantities.Inaddition,ithasthecharacteristicsofsimplestructure,convenientuseandlowprice.Therefore,itcanbewidelyusedinagriculturalproduction.6.1TemperatureofMildewModerngrainwarehousescanusethissystemtomonitorthetemperatureofhundredsofpoints.Inthisway,youcaneasilygraspthetemperaturechangesatvariouspointsatdifferenttimes,increasestoragecapacity,andeffectivelyreducetheoccurrenceofmildew.6.2TemperatureofAgriculturalProductsAtpresent,low-temperaturerefrigerationmeasuresarewidelyadoptedforthepreservationoffruitsandvegetables.Thesystemcanbeinstalledinthetemperaturemeasurementpositionoftherefrigeratorcompartment.Inthisway,thetemperaturevaluecanbeconvenientlyobservedatanytimetocheckwhethertheoptimalpreservationtemperatureisreached.6.3TemperatureDetectioninGreenhousesThesystemisusedinplasticgreenhousesforgreenhousevegetablecultivationandflowerproduction.Inthisway,automatictemperaturedisplaycanberealized,andlaborandtimefortemperaturemeasurementcanbesaved.6.4TemperatureofSoilIntheprocessofplantingcropswithstrictrequirementsonsoiltemperature,thesystemcantestthechangesinsoiltemperatureasneededtofacilitatethegraspofaccuratetemperaturevalues.VIIConclusionThesingle-chiptemperaturemeasurementsystemtakesfulladvantageofthesimplicityofthehardwarestructureofDS18B20andAT89S52,using8-segmentdigitaltubedisplay,lowpriceandwideapplication.Accordingtoactualneeds,wecanalsouseLCDasadisplaydeviceorformadistributedtemperaturemeasurementandcontrolsystem.Althoughthedesigniseasytoexpand,italsohasitsshortcomings.Thesimplicityofthehardwarestructurecomesattheexpenseofsoftware.Therefore,specialattentionshouldbepaidtotheworkingsequencerequirementsofDS18B20duringprogramming.Inshort,thesystemcanbewidelyusedintemperaturemeasurementinagriculturalproduction.FAQWhatisDS18B20temperaturesensor?TheDS18B20isa1-wireprogrammabletemperaturesensorfrommaximintegrated.Itiswidelyusedtomeasuretemperatureinhardenvironmentslikeinchemicalsolutions,minesorsoiletc.Theconstrictionofthesensorisruggedandalsocanbepurchasedwithawaterproofoptionmakingthemountingprocesseasy.HowdoestheDS18B20work?Itworksontheprincipleofdirectconversionoftemperatureintoadigitalvalue.IsDS18B20athermistor?Athermistorisathermalresistor-aresistorthatchangesitsresistancewithtemperature....Thermistorshavesomebenefitsoverotherkindsoftemperaturesensorssuchasanalogoutputchips(LM35/TMP36)ordigitaltemperaturesensorchips(DS18B20)orthermocouples.HowaccurateisDS18B20?TheDS18B20readswithanaccuracyof0.5Cfrom-10Cto+85Cand2Caccuracyfrom-55Cto+125C.Whatisds1820?TheDS18B20isonetypeoftemperaturesensoranditsupplies9-bitto12-bitreadingsoftemperature....Thecommunicationofthissensorcanbedonethroughaone-wirebusprotocolwhichusesonedatalinetocommunicatewithaninnermicroprocessor.HowdoIconnectmyDS18B20tomyRaspberryPi?OnceyouveconnectedtheDS18B20,powerupyourPiandlogin,thenfollowthesestepstoenabletheOne-Wireinterface:1.Atthecommandprompt,entersudonano/boot/config.txt,thenaddthistothebottomofthefile:2.dtoverlay=w1-gpio.3.ExitNano,andrebootthePiwithsudoreboot.WhatistheworkingprincipleofDS18B20?TheDS18B20DigitalThermometerprovides9to12-bit(configurable)temperaturereadingswhichindicatethetemperatureofthedevice.Itcommunicatesovera1-Wirebusthatbydefinitionrequiresonlyonedataline(andground)forcommunicationwithacentralmicroprocessor.Inadditionitcanderivepowerdirectlyfromthedataline(parasitepower),eliminatingtheneedforanexternalpowersupply.ThecorefunctionalityoftheDS18B20isitsdirect-to-digitaltemperaturesensor.Theresolutionofthetemperaturesensorisuser-configurableto9,10,11,or12bits,correspondingtoincrementsof0.5C,0.25C,0.125C,and0.0625C,respectively.Thedefaultresolutionatpower-upis12-bit.WheretouseDS18B20Sensor?TheDS18B20isa1-wireprogrammableTemperaturesensorfrommaximintegrated.Itiswidelyusedtomeasuretemperatureinhardenvironmentslikeinchemicalsolutions,minesorsoiletc.Theconstrictionofthesensorisruggedandalsocanbepurchasedwithawaterproofoptionmakingthemountingprocesseasy.Itcanmeasureawiderangeoftemperaturefrom-55Cto+125withadecentaccuracyof5C.EachsensorhasauniqueaddressandrequiresonlyonepinoftheMCUtotransferdatasoitaverygoodchoiceformeasuringtemperatureatmultiplepointswithoutcompromisingmuchofyourdigitalpinsonthemicrocontroller.HowconnectDS18B20toArduino?FirstplugthesensoronthebreadboardtheconnectitspinstotheArduinousingthejumpersinthefollowingorder:pin1toGND;pin2toanydigitalpin(pin2inourcase);pin3to+5Vor+3.3V,attheendputthepull-upresistor.OnanATMega328P,whyisaDS18B20temperaturesensorreturningincorrecttemperaturevalues?Severalpossibilities:1.Ifitisjustreadingalittlehigh,itmightbecausedbyselfheating.Addaheatsinkand/ormakemeasurementslessfrequently.2.Especiallyifthevaluesarereallywhacky,itmightbecodewitherrorsormis-wiring.Useapublishedsketchtocheckoperation.3.TheDS18B20mightbedefective.Tryanother.4.Itsaccurateto0.5C.Areyouexpectingittobemoreaccurate(likedowntotheLSBofthereadvalue)?

AD603IntroductionTheAD603isalownoise,voltage-controlledamplifierforuseinRFandIFAGCsystems.Itprovidesaccurate,pin-selectablegainsof11dBto+31dBwithabandwidthof90MHzor+9dBto51+dBwithabandwidthof9MHz.Anyintermediategainrangemaybearrangedusingoneexternalresistor.Theinputreferrednoisespectraldensityisonly1.3nV/Hz,andpowerconsumptionis125mWattherecommended5Vsupplies.CatalogAD603IntroductionAD603FeaturesAD603PinConfigurationandFunctionsAD603FunctionalBlockDiagramAD603WorkingModesAD603FunctionalEquivalentsAD603PackageOutlineAD603TypicalApplicationAD603ApplicationsAD603ApplicationNoteComponentDatasheetFAQOrdering&QuantityAD603FeaturesLinear-in-dBgaincontrolPin-programmablegainranges:11dBto+31dBwith90MHzbandwidth9dBto51dBwith9MHzbandwidthAnyintermediaterange,forexample,1dBto+41dBwith30MHzbandwidthBandwidthindependentofthevariablegain1.3nV/Hzinputnoisespectraldensity60.5dBtypicalgainaccuracyAD603PinConfigurationandFunctionsAD603FunctionalBlockDiagramFigure1AD603functionalblockdiagramItisnotdifficulttofindthatitisdifferentfromAD600inthat:thefixedgainamplifieritusescanchangethegainvalue.ThegainGFisdeterminedbytheconnectionformofVOUTandFDBK.WhenVOUTandFDBKareshort-circuited,GF=31.07dB;whenitisopen,GF=51.07dB;connectresistorREXTbetweenVOUTandFDBKtosetGFAnyvaluebetween31.07dB~51.07dB.However,thegainaccuracyinthismodeisreduced.Whentheexternalresistanceisabout2K,theerroristhelargest.IfanappropriateresistorisconnectedbetweenVOUTandCOMM,thegaincanbeincreased,upto60dB.AD603WorkingModesAD603hasthreeworkingmodes:Mode1:Short-circuitVOUTandFDBK,thisconnectioncanobtainthemaximumbandwidth-90MHz,andthegainrangeis-11.07dB~+31.07dB.AsshowninFigure2.Figure2ShortconnectionbetweenVOUTandFDBKMode2:ConnectaresistorREXTbetweenVOUTandFDBK,anda5.6pFcapacitorbetweenFDBKandCOMMasfrequencycompensation.Accordingtotherelationalexpressionoftheamplifier,selectingtheappropriateREXTvaluecanobtaindifferentgainrangevalues.WhenREXT=2.15Kohms,thegainrangeis:-1dB~+41dB.AsshowninFigure3.Figure3VOUTandFDBKaccessresistanceREXTMode3:OpenacircuitbetweenVOUTandFDBK,andconnectan18pFcapacitorbetweenVOUTandCOMMtoextendthefrequencyresponserange.Thismodeisahighgainmodewithagainrangeof8.93dB~51.07dBandabandwidthof9MHz.AsshowninFigure4.Figure4HighgainmodeIntheabovethreemodes,therelationshipbetweengainGFandcontrolvoltageVGisshowninFigure5.Figure5TherelationshipbetweengainGFandcontrolvoltageVGWhenVGisintherangeof-500mV~+500mVat40dB/V(thatis25mV/dB,whichisdifferentfromAD600s32mV/dB)forlineargaincontrol,therelationshipbetweengainG(dB)andVG(V)is:G=40VG+Goi(I=1,2,3),whereVG=VPOS-VNEG.G0iisthedifferentgainconstantsinthreemodes.Mode1:GOi=10dB;Mode2:GOi=10dB~30dB(determinedbytheexternalresistorREXT);Mode3:GOi=30dB.WhenthecontrolvoltageVGisoutside-500mV~+500mV,thegainGandVGnolongersatisfythelinearrelationship.WhenVG=-526mV,thegainisG=GF-42.14,whenVG=+526,thegainisG=GF.AD603TypicalApplicationFigure6AD603typicalapplicationcircuitFigure6isatwo-stageAD603amplifiercircuitwithautomaticgaincontrol.Inthefigure,Q1andR8formadetectortodetectchangesintheamplitudeoftheoutputsignal.TheautomaticgaincontrolvoltageVAGCisformedbyCAV,thedifferencebetweenthecurrentQ2andthecollectorcurrentofQ1flowingintothecapacitorCAV,anditsmagnitudechangeswiththeamplitudeoftheoutputsignalofA2,whichmakesitaddedtoA1andA2amplifier1.TheautomaticgaincontrolvoltageVAGCofthepinchangeswiththeoutputsignalamplitudechange,soastoachievethepurposeofautomaticallyadjustingtheamplifiergain.AD603FunctionalEquivalentsAD603PackageOutlineAD603ApplicationsRF/IFAGCamplifiersVideogaincontrolsA/DrangeextensionsSignalmeasurementsAD603ApplicationNote(1)Thepowersupplyvoltageshouldgenerallybeselectedas5V,andthemaximumshouldnotexceed7.5V.(2)Inthecaseof5Vpowersupply,theeffectivevalueoftheratedvoltageappliedtotheinputterminalVINPshouldbe1V,thepeakvalueis1.4V,andthemaximumshouldnotexceed2V.Ifyouwanttoexpandthemeasurementrange,youshouldaddalevelofattenuationinfrontofAD603.Inthisway,thetypicalvalueofthepeakoutputvoltagecanreach3.0V.Therefore,itisusuallynecessarytoaddafirstlevelofamplificationafterAD603toconnecttotheA/Dconverter.(3)Thevoltageappliedtothevoltagecontrolterminalmustbeverystable,otherwisethegainwillbeunstable,whichwillincreasethenoiseoftheamplifiedsignal.(4)Thesignalmustbedirectlyconnectedtopin4oftheamplifier,otherwisetheaccuracyoftheamplifierwillbereducedduetothelargeimpedance.ComponentDatasheetAD603DatasheetFAQWhatisAD603?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.ADC0804DescriptionTherearemultiplekindsofAnalogtoDigitalConverters(ADC)whichareusedtoconvertthesignalformicroprocessorsorcontrollers.EveryADChasitsownspecificationandadvantagesonthebaseoftherequirement.HerewearegoingtodiscussADC0804ICwhichisknownasthelowvoltage8-bitAnalogtoDigitalConverter.ADC0804isalowvoltageICusetoconvertthelowvoltageanalogsignaltoan8-bitdigitalsignal.Itworkswith0-5Volts,has1Analoginputand8outputpins.ADC0804comeswithaninternalclockbuttoincreaseorchangetheclockthecyclewecouldusetheexternalclock.Alwayskeepinmindthatconversionspeedcannotbefasterthan110useitherweareusinganinternalclockorexternalclock.CatalogADC0804DescriptionADC0804PinConfigurationandFunctionsADC0804FunctionalBlockDiagramADC0804FeaturesWheretoUseADC0804HowtoUseADC0804ADC0804TypicalApplicationADC0804ApplicationsADC0804PhysicalDimensionsComponentDatasheetFAQOrdering&QuantityADC0804PinConfigurationandFunctionsADC0804FunctionalBlockDiagramADC0804FeaturesEasytointerfacewithallMicroprocessorsorworksStand-alone.Single-channel8-bitADCmoduleOn-chipClockavailable,noneedforexternalOscillator(Clock)Digitaloutputvariousfrom0to255WhenVref=5V,forevery19.53mVofanalogvaluetherewillbetheriseofonebitonthedigitalside(Stepsize)Availablein20-pinPDIP,SOICpackagesWheretoUseADC0804TheADC0804isacommonlyusedADCmodule,forprojectswereanexternalADCisrequired.Itisa20-pinSinglechannel8-bitADCmodule.MeaningitcanmeasureoneADCvaluefrom0Vto5Vandtheprecisionwhenvoltagereference(Vrefpin9)is+5Vis19.53mV(Stepsize).Thatisforeveryincreaseof19.53mVoninputsidetherewillbeanincreaseof1bitattheoutputside.ThisICisveryIdealtousewithMicroprocessorslikeRaspberryPi,Beagleboneetc.OreventouseasastandaloneADCmodule.EveryADCmodulerequiresaclocktofunction;thisICcomeswithitsowninternalclocksoyoudonthavetoworryaboutit.Hence,ifyouarelookingforacompactADCmodulewithadecentresolutionof8-bitthenthisICisforyou.HowtoUseADC0804SincetheICcomeswithaninternalclockwedonotneedmanycomponentstomakeitwork.HowevertomaketheinternalclocktoworkwehavetouseanRCcircuit.TheICshouldbepoweredby+5Vandbothgroundpinsshouldbetiedtocircuitground.TodesigntheRCcircuitsimplyusearesistorofvalue10kandcapacitorof100pf(approx)andconnectthemtoCLKRandCLKINpinsasshowninthecircuitbelow.Thechipselect(CS)andRead(R)pinshouldalsobegrounded.TheVrefpinisleftfreebecausebydefaultwithoutanyconnectionitwillbeconnectedto+5V.ThedigitaloutputwillbeobtainedfromthepinsDB0toDB7andtheanalogvoltageshouldbeconnectedtoVin(+)pinasshowninthecircuit.Alsonotethatanotherendofthevoltagesource(sensor/module)shouldalsobegroundedtothecircuitfortheADCconversiontowork.Now,fortheADCConversiontostartwehaveomaketheWrite(WR)pintogohighmomentarythiscanbedoneconnectingthepintoI/OofMPUandtogglingithighbeforeeveryADCread.OnlyifthisisdonetheADCvalueontheoutputsidewillbeupdated.Intheabovecircuit,Ihaveusedapotentiometertofeedinavariablevoltageof0Vto5VtotheVinpinandthepresentVoltageisreadusingavoltmeter.Asyoucanseeintheimagethevoltagevalueis1.55Vandtheresultingbinaryvalueis01001111.LetusseehowthisbinaryvaluecanbeconvertedtoAnalogvalue,sincewewillneeditwhileprogramming/designing.BinaryValue=01001111ConvertingtoDecimal=(0*128)+(1*64)+(0*32)+(0*16)+(1*8)+(1*4)+(1*2)+(1*1)=79AnalogVoltage=DecimalValue*Stepsize=79*19.53mV=1.54VTheobtainedvalueis1.54Vandthemeasuredvoltageis1.55Vwhichareverymuchclose.SothisishowyouuseanADC0804IC.ADC0804TypicalApplicationADC0804ApplicationsTransducer-to-microprocessorinterfaceDigitalthermometerDigitally-controlledthermostatMicroprocessor-basedmonitoringandcontrolsystemsADC0804PhysicalDimensionsDual-In-LinePackage(J)OrderNumberADC0801LJ,ADC0802LJ,ADC0801LCJ,ADC0802LCJ,ADC0803LCJorADC0804LCJADC0802LJ/883or5962-9096601MRANSPackageNumberJ20ASOPackage(M)OrderNumberADC0802LCWM,ADC0803LCWMorADC0804LCWMNSPackageNumberM20BMoldedDual-In-LinePackage(N)OrderNumberADC0801LCN,ADC0802LCN,ADC0803LCN,ADC0804LCNorADC0805LCNNSPackageNumberN20AMoldedChipCarrierPackage(V)OrderNumberADC0802LCV,ADC0803LCVorADC0804LCVNSPackageNumberV20AComponentDatasheetADC0804DatasheetFAQWhatisadc0804?TheADC0804isacommonlyusedADCmodule,forprojectswereanexternalADCisrequired.Itisa20-pinSinglechannel8-bitADCmodule.MeaningitcanmeasureoneADCvaluefrom0Vto5Vandtheprecisionwhenvoltagereference(Vrefpin9)is+5Vis19.53mV(Stepsize).Whatisthedifferencebetweenadc0804andmax1112?ADC0804isusedforparallelADCandMAX1112isusedforserialADC.Whichpinoftheadc0804indicatestheendofconversion?PIN-5Interrupt(INTR)ThispinautomaticallygoeslowwhentheconversionisdonebyADC0804orwhenthedigitalequivalentofanaloginputisready.PIN-6Vin(+)connectinputanalogsensorpin/inputvoltagetothispin.WhatareADCandDAC?ADCstandsforAnalogtoDigitalConverter,whichconvertstheanalogsignalintothedigitalsignal.DACstandsforDigitaltoAnalogConverteranditconvertstheDigitalsignalintoananalogsignal.Whatistheresolutionof8bitADC?Forexample,anADCwitharesolutionof8bitscanencodeananaloginputtoonein256differentlevels(28=256).Thevaluescanrepresenttherangesfrom0to255(i.e.asunsignedintegers)orfrom128to127(i.e.assignedinteger),dependingontheapplication.

IRFP440PBF-VISHAY

L298DescriptionTheL298isanintegratedmonolithiccircuitina15-leadMultiwattandPowerSO20packages.Itisahighvoltage,ahighcurrentdualfull-bridgedriverdesignedtoacceptstandardTTLlogiclevelsanddriveinductiveloadssuchasrelays,solenoids,DCandsteppingmotors.Twoenableinputsareprovidedtoenableordisablethedeviceindependentlyoftheinputsignals.Theyaremostlyused:whenitisneededtooperatedifferentloadslikemotorsandsolenoidetcwhereanH-BridgeisrequiredwhenhighpowermotordriverisrequiredwhenthecontrolunitcanonlyprovideTTLoutputswhencurrentcontrolandPWMoperablesingle-chipdeviceisneededCatalogL298DescriptionL298CircuitDiagramL298FeaturesandSpecificationsL298PinConfigurationsandFunctionsL298PackageOutlineandMechanicalDataWheretouseL298ICHowtouseL298ICL298ApplicationsL298ComparewithOtherMotorsProductManufacturerComponentDatasheetFAQOrdering&QuantityL298CircuitDiagramL298FeaturesandSpecificationsOperatingsupplyvoltageupto46vTotalDCcurrentupto4A25wratedpower2enablecontrolterminalstoenableordevicewithoutinputtingsignals.Abletodriveatwo-phasesteppermotor,four-phasesteppermotorortwoDCmotorsLowsaturationvoltageOvertemperatureprotectionLogical0inputvoltageupto1.5V(highnoiseimmunity)Operatingtemperature:-23Cto130CStorageTemperature:-40Cto150CL298PinConfigurationsandFunctionsPinoutFunctions:L298PackageOutlineandMechanicalDataL298(Multiwatt15V)L298(Multiwatt15H)L298(PowerSO20)WheretouseL298ICHereareafewareaswhereL298ispreferred:L298isbasicallyusedwhereH-BRIDGEisrequired.Whereahighpowermotordriverisrequired.Inthemarked,thereareH-bridgeslikeL293whichareusedforthelowpoweredapplicationwhileL298isspeciallydesignedforthehighpowerapplications.WherecurrentcontrolandPWMoperablesingle-chipdeviceisneeded.ThechipispreferredwhencontrolunitcanonlyprovideTTLoutputAlso,thechipdoesnotneedanyadditionalcomponentstobeinstalledforoperating.HowtouseL298ICForunderstandingtheworkingofL298IC,considerthesimplecircuitconfigurationshownbelow.HereweareusingoneofH-BRIDGESofl298IC.AsshowninthecircuitwehavetwopushbuttonsQ1andQ2whichactascontrolsinputsforbridge-A.TheselogicinputsareprovidedbyMicrocontrollerorMicroprocessorinapplicationcircuits.ThefourdiodesareFLYBACKdiodesusedforprotectingtheICforminductivevoltagespikes.Theenablepinispulledhighthrougharesistorsobridge-Awillbefunctioningallthetime.Ifitspulledtogroundthebridge-Awillbedisablednomattertheinputcontrollogic.AfterallthecircuitaresetupweneedtopressthebuttonsQ1andQ2tochangetheflowofcurrentbetweenpinsOUT1andOUT2.Thelogiccontroltableisgivenbelow.INPUTSFUNCTIONQ1=HIGH,Q2=LOWForwardcurrentQ1=LOW,Q2=HIGHReversecurrentQ1=Q2FastMOTORstopSoifonlyQ1ispressed,thecurrentflowsfromOUT1toOUT2.WiththatMOTORrotatesclockwisedirection.IfonlyQ2ispressed,thecurrentflowsfromOUT2toOUT1.WiththatMOTORrotatesanti-clockwisedirection.IfbothbuttonsarepressedorreleasedsimultaneouslytheMOTORcomestostopimmediately.Inthisway,wecancontrolthemotorrotationusingtheL298chip.L298ApplicationsRoboticarmsRobotsRelaydriversVendingmachinesIndustrialmachinesEngineeringsystemsMeasuringinstrumentsHobbyprojectsL298ComparewithOtherMotorsWithsomanymotordriverscurrentlysuchasServoMotorsandsteppermotors,whatreallyarethedifferencesbetweenthemotordriversandwhichonetochoose?Noworries,aswehavecraftedatablejustforyoutocomparethevariousmotordriverssoyouknowwhichmotordriverfitsthebestforyourproject.TypeMotorDriversChipActuatorWorkingVoltageWorkingCurrentGroveGroveI2CMotorDriverL298N2DCmotoror1Stepper6v-15v2.0Aeach(Max)GroveI2CMotorDriver(TB6612FNG)TB6612FNG2DCmotoror1Stepper2.5v-13.5v(5Avg,15vMax)1.2A(Avg)to3.2A(Max)GroveI2CMiniMotorDriverDRV88302DCMotor2.75v-6.8v0.2Ato1AeachShieldMotorShieldV2.0L298N2DCmotoror1Stepper6v-15v2.0Aeach(Max)4AMotorShieldMC339322DCMotor6v-28v5.0Aeach(Max)BrushlessMotorShield(TB6605FTG)TB6605FTG1DCBrushlessMotor9v-24v-ProductManufacturerSTmicroelectronics(ST)groupwasestablishedinJune1988asaresultofthemergerofSGSMicroelectronicsofItalyandThomsonOfFrance.InMay1998SGS-ThomsonMicroelectronicschangeditsnametoSTmicroelectronicsLimited.Itistheworldslargestmanufacturerofdedicatedanalogchipsandpowerconversionchips,theworldslargestsupplierofindustrialsemiconductorsandset-topboxchips,andaworldleaderindiscretecomponents,mobilephonecameramodules,andautomotiveintegratedcircuits.ComponentDatasheetL298DatasheetFAQWhatisl298n?ThisL298NMotorDriverModuleisahighpowermotordrivermodulefordrivingDCandStepperMotors.ThismoduleconsistsofanL298motordriverICanda78M055Vregulator.L298NModulecancontrolupto4DCmotors,or2DCmotorswithdirectionalandspeedcontrol.Whatistheuseofl298n?TheL298NisadualH-BridgemotordriverwhichallowsspeedanddirectioncontroloftwoDCmotorsatthesametime.ThemodulecandriveDCmotorsthathavevoltagesbetween5and35V,withapeakcurrentupto2A.Howdoesl298ncontrolDCmotorspeed?1.IfyousendaHIGHsignaltotheenable1pin,motorAisreadytobecontrolledandatthemaximumspeed;2.IfyousendaLOWsignaltotheenable1pin,motorAturnsoff;3.IfyousendaPWMsignal,youcancontrolthespeedofthemotor.Themotorspeedisproportionaltothedutycycle.Whatisl298nmotordrivermodule?ThisL298NMotorDriverModuleisahighpowermotordrivermodulefordrivingDCandStepperMotors.ThismoduleconsistsofanL298motordriverICanda78M055Vregulator.L298NModulecancontrolupto4DCmotors,or2DCmotorswithdirectionalandspeedcontrol.Howdoesl298nmotordriverwork?TheL298NisadualH-BridgemotordriverwhichallowsspeedanddirectioncontroloftwoDCmotorsatthesametime.ThemodulecandriveDCmotorsthathavevoltagesbetween5and35V,withapeakcurrentupto2A.HowdoIuseanl298motordriverwithArduino?Startbyconnectingpowersupplytothemotors.Inourexperiment,weareusingDCGearboxMotors(alsoknownasTTmotors)thatareusuallyfoundintwo-wheel-driverobots.Theyareratedfor3to12V.So,wewillconnecttheexternal12VpowersupplytotheVCCterminal.WhatisthefunctionoftheHbridge?AnH-bridgeisanelectroniccircuitthatswitchesthepolarityofavoltageappliedtoaload.ThesecircuitsareoftenusedinroboticsandotherapplicationstoallowDCmotorstorunforwardsorbackwards.Whatisthedifferencebetweenl293dandl298n?L293isaquadruplehalf-HdriverwhileL298isdualfull-Hdriver,i.e,inL293allfourinput-outputlinesareindependentwhileinL298,ahalfHdrivercannotbeusedindependently,onlyfullHdriverhastobeused....Hence,heatsinkisprovidedinL298.TDA7294IntroductionTheTDA7294isamonolithicintegratedcircuitinMultiwatt15package,intendedforuseasaudioclassABamplifierinHi-Fifieldapplications(HomeStereo,self-poweredloudspeakers,TopclassTV).Thankstothewidevoltagerangeandtothehighoutcurrentcapabilityitisabletosupplythehighestpowerintoboth4Ωand8Ωloadseveninpresenceofpoorsupplyregulation,withhighSupplyVoltageRejection.Thebuilt-inmutingfunctionwithturn-ondelaysimplifiestheremoteoperationavoidingswitchingon-offnoises.ThisisabuildandevaluationoftheTDA7294100wattaudioamplifierI.C.CatalogTDA7294IntroductionTDA7294FeaturesTDA7294PinConfigurationandFunctionsTDA7294BlockDiagramTDA7294PackageOutlineTDA7294AlternativesWhereandHowtouseTDA7294TDA7294ElectricalSpecificationsTDA7294ApplicationsDifferenceBetweenTDA7294andTDA7293ProductManufacturerComponentDatasheetOrdering&QuantityTDA7294FeaturesVeryhighoperatingvoltagerange(40V)DMOSpowerstageHighoutputpower(upto100wmusicpower)Muting/stand-byfunctionsNoswitchon/offnoiseNoBoucheroncellsVerylowdistortionVerylownoiseShortcircuitprotectionThermalshutdownTDA7294PinConfigurationandFunctionsPinfunctions:PinNo.PinNamePinDescription1Stand-ByGNDStand-ByGND,outputgetsconnectedtoground2InvertinginputTheInvertinginput3Non-InvertinginputTheNon-Invertinginput4SVRSupplyVoltageRejectionusedforpowersupplyrippleornoiserejection5N.C.Notconnected6BootstrapUsedtostep-upcharge7+VsSupplyPositivesupply8-VsSupplyNegativesupply9Stand-byStandbycontrolpinusedforlowpowermode,outputrunsinlowcurrentmode10MuteAudioisdisabledoftheoutput11N.C.Notconnected12N.C.Notconnected13+VsPowerPositivepowersupply14OutOutputpin15-VsPowerNegativepowersupplyTDA7294BlockDiagramTDA7294PackageOutlineMultiwatt15VpackageinformationMechanicalData:Multiwatt15HpackageinformationMechanicalData:TDA7294AlternativesTDA7293,TDA7295,LM3886WhereandHowtoUseTDA7294TDA7294canbeusedincircuitsrequiringhighpowerandhigh-efficiencyamplificationapplications.R1istheinputresistanceanditsrecommendedvalueis22kΩ.R2=680ΩandR3=22kΩdecidestheloopgainoftheamplifier.TheR4=22kΩandC4=10FdeterminethestandbyON/OFFtimeduration.TheR5=10kΩandC3=10Fareusedfordecidingthemutetimeconstant.DecouplingusedisC1=0.47F.C2=22mFisthefeedbackDC.C5=22mFBootstrapping.C6,C8=1000mFandC7,C90.1mFareusedforsupplyvoltagebypass.TDA7294ElectricalSpecificationsMaximumVSSupplyVoltage(NoSignal)50VMaximumIOOutputPeakCurrent10AMaximumTopOperatingAmbientTemperatureRange0to70CMaximumTstg,TjStorageandJunctionTemperature150CVSSupplyRangeisminimum10Vandmaximumvalue40VOpen-LoopVoltageGain80dBClosed-LoopVoltageGainminimum24dB,typically30dBandmaximum40dBIbInputBiasCurrent500nATDA7294ApplicationsHI-FICAR-RADIOBridgeApplicationCircuitAnaudioclassABamplifierStereossystemSubwooferDifferencesBetweenTDA7294andTDA7293FeaturesofTDA7293MultipowerBCDtechnologyVeryhighoperatingvoltagerange(50V)DMOSpowerstageHighoutputpower(100Winto8Ω@THD=10%,withVS=40V)Mutingandstand-byfunctionsNoswitchon/offnoiseVerylowdistortionVerylownoiseShort-circuitprotected(withnoinputsignalapplied)ThermalshutdownClipdetectorModularity(severaldevicescaneasilybeconnectedinparalleltodriveverylowimpedances)BoththeseaudiochipsuseDMOSordouble-diffusedmetaloxidesemiconductoroutputstages.Supplyrailsare+/-60VDCmaxfortheTDA7293and+/-50VDCfortheTDA7294,transformersupplyrailsAC32V-0-32Vto35V-0-35V,recommendationis32V-0-32Vfor8ohmoperation.TheconversionratevalueofTDA7293isalso10V/us,butithasawidervoltagesupplyrange,andthehighestavailabledual50VDCpowersupply,whichmeansthatithasalargerdynamicrangeandhigheroutputpowerthanTDA7294.Indual40VDCpowersupply,anaverageoutputpowerof100Wcanbeachievedat8ohmload.Ofcourse,ifthevoltageisincreasedtodouble50V,orasmallerloadsuchas4ohm,therewillbegreateroutputpower,accordingtothecharacteristicsofTDA7293,whenselectingatransformer,dual28VACvoltagecanbeselected,sothevoltageafterrectificationandfilteringisabout40V,ofcourse,thevoltagecanalsobeincreased.Consideringthatthereisafluctuationinthegridvoltage,itisbesttobelessthanthemaximumvoltageof50V,sothatthecircuitcanworkinamorestablecondition.ProductManufacturerSTMicroelectronics(ST)groupwasestablishedinJune1988asaresultofthemergerofSGSMicroelectronicsofItalyandThomsonOfFrance.InMay1998SGS-ThomsonMicroelectronicschangeditsnametoSTMicroelectronicsLimited.Itistheworldslargestmanufacturerofdedicatedanalogchipsandpowerconversionchips,theworldslargestsupplierofindustrialsemiconductorsandset-topboxchips,andaworldleaderindiscretecomponents,mobilephonecameramodules,andautomotiveintegratedcircuits.ComponentDatasheetTDA7294DatasheetTDA2030DescriptionTheTDA2030isamonolithicintegratedcircuitinPentawattpackage,intendedforuseasalow-frequencyclassABamplifier.Typicallyitprovides14Woutputpower(d=0.5%)at14V/4Ω;at14Vor28V,theguaranteedoutputpoweris12Wona4Ωloadand8Wonan8Ω(DIN45500).TheTDA2030provideshighoutputcurrentandhasverylowharmonicandcross-overdistortion.Further,thedeviceincorporatesanoriginal(andpatented)shortcircuitprotectionsystemcomprisinganarrangementforautomaticallylimitingthedissipatedpowersoastokeeptheworkingpointoftheoutputtransistorswithintheirsafeoperatingarea.Aconventionalthermalshut-downsystemisalsoincluded.HowToMakeHighPowerAmplifierUsingTDA2030/DC12v(EnglishSubtitle)CatalogTDA2030DescriptionTDA2030PinConfigurationsTDA2030FunctionalBlockDiagramTDA2030PackageOutlineTDA2030FeaturesTDA2030FunctionalEquivalentsTDA2030PopularitybyRegionTDA2030ApplicationsWheretoUseTDA2030?HowtoUseTDA2030?ProductManufacturerComponentDatasheetOrdering&QuantityTDA2030PinConfigurationsPinNumberPinNameDescription1NonInvertingInputNon-invertingend(+)ofAmplifier2InvertingInputInvertingend(-)ofAmplifier3Vs(Ground)Connecttothegroundofthecircuit4OutputThispinoutputstheamplifiedsignal5Vs(Power)Supplyvoltage,Minimum6VandMaximum36VTDA2030FunctionalBlockDiagramTDA2030PackageOutlineMechanicalData:TDA2030FeaturesFewexternalcomponentsMinimalbootimpactLow-frequencyclassABamplifier,mostsuitableforaudioamplificationCanprovideupto20wattsofoutputpowerWiderangepowersupplyfrom6Vto36VCanprovideshortcircuitandthermalprotectionBreadboardfriendlyAvailablein5-pinTO220packageTDA2030FunctionalEquivalentsTDA2030PopularitybyRegionTDA2030ApplicationsForaudiosignalamplificationSuitableforhighpoweramplificationAbletorunondual/splitpowersuppliesCanbeusedtocascadeaudiospeakersWheretouseTDA2030?TheTDA2030isapowerfulaudioamplifierIC.Anaudioamplifierisnothingbutonethathasthecapabilitytoamplifytheaudiosignalsfromanyaudiosourcesuchasmobilephonejackormicrophonesothatvolumeisincreasedwhentheaudioisplayedinaspeaker.Audioamplifiercircuitscanalsobemadeusingsimpleop-amps,butifyouneedthehighervolumethatisloudenoughforaroomthenthispoweraudioamplifieriswillbethebestchoice.ThisICcandeliverupto20Wofoutputpower,soyoucanruna4Ωspeakerat12Woran8Ωspeakerat8W.HowtouseTDA2030?TheTDA2030isbreadboardfriendlyandhencecanbeeasilytestedusingabreadboard.TheTDA2030AdatasheetgiveninthepaperconsistsofsomebasiccircuitswhichcanbeusedtomakethisICwork.Ihavealsogivenaverybasiccircuitbelow.TheICcanwitherworkondualpowersupplyorsinglemodepowersupply,tokeepthissimpleIhavepreferredsingle-modesupplybyusinga9Vbattery.The5thpin(Vs)isconnectedtothepositiveterminalofthebatteryandthe3rdpin(Ground)isconnectedtothenegativeterminalofthebattery.ThisICisapoweramplifierICandhencerequiresadecentamountofcurrenttooperate,hencemakesureyourbatterycansourceenoughcurrent.TheresistorR1andR2formapotentialdivideracrossthepins4and2.ThetwodiodesD1andD2areusedtoprotecttheICfromreversecurrents.ThespeakerLS1canbeanyordinaryspeakerofvalue4Ω,6Ωor8Ω.TheaudiosourceC2(1)canbeanyaudiosourcefromamobilejackorevenamicrophone.JustconnectthepositivepointtoC2(1)andgroundtheotherpoint.Also,notethatthisamplifiercanamplifyonlymonochannelsoundsignals.Soifyouhavetwoaudiowiresforleftandrightchannelcombinethembothtomakeitasasinglechannel.ProductManufacturerTheSTMicroelectronics(SGS-THOMSON,ST)groupwasestablishedin1987bythemergerofSGSMicroelectronicsinItalyandThomsonSemiconductorinFrance.InMay1998,SGS-THOMSONMicroelectronicschangeditscompanynametoSTMicroelectronicsCo.,Ltd.STMicroelectronicsisoneoftheworldslargestsemiconductorcompanies.Itaimstobethemarketleaderinmultimediaapplicationintegrationandpowersolutions.STMicroelectronicshastheworldsmostpowerfulproductlineup,includingdedicatedproductswithhighintellectualpropertyrights.Products,therearealsoinnovativeproductsinmanyfields,suchasdiscretedevices,high-performancemicrocontrollers,securitysmartcardchips,andmicro-electromechanicalsystems(MEMS)devices.Indemandingapplicationssuchasmobilemultimedia,set-topboxesandcomputerperipherals,STMicroelectronicsisapioneerinthedevelopmentofcomplexICsusingplatform-baseddesignmethods,andcontinuestoimprovethisdesignmethod.STMicroelectronicshasawell-balancedproductportfoliothatcanmeettheneedsofallmicroelectronicsusers.Globalstrategiccustomerssystem-on-chip(SoC)projectsalldesignateSTMicroelectronicsasthepreferredpartner.Atthesametime,thecompanyalsoprovidesfullsupportforlocalcompaniestomeetlocalcustomersneedsforgeneral-purposedevicesandsolutions.ComponentDatasheetTDA2030Datasheet

IRFP440PBF-VISHAY

DescriptionULN2003AisaDarlingtontransistorarraywithhighvoltageandhighcurrent.ItconsistsofsevenNPNDarlingtonpairswithahighvoltageoutputandacommoncathodeclampdiodeforswitchinginductiveloads.CatalogDescriptionULN2003APinoutULN2003ADocumentsandMediaULN2003AECADModelULN2003AFeaturesULN2003AAdvantagesWheretouseULN2003HowtouseULN2003ULN2003AApplicationULN2003APackageInformationULN2003ARepresentativeSchematicDiagramProductManufacturerFAQOrdering&QuantityULN2003APinoutULN2003ADocumentsandMediaResourceTypeLinkDatasheetsULN2003A,ULQ2003AHTMLDatasheetULN2003A,ULQ2003AULN2003AECADModelULN2003ADR2GSymbolsULN2003ADR2GFootprintsULN2003AFeaturesTheULN2003isknownforitshigh-current,high-voltagecapacity.Thedriverscanbeparalleledforevenhighercurrentoutput.Evenfurther,stackingonechipontopofanother,bothelectricallyandphysically,hasbeendone.Generallyitcanalsobeusedforinterfacingwithasteppermotor,wherethemotorrequireshighratingswhichcannotbeprovidedbyotherinterfacingdevices.ULN2003Mainspecifications:500mAratedcollectorcurrent(singleoutput)50Voutput(thereisaversionthatsupports100Voutput)IncludesoutputflybackdiodesInputscompatiblewithTTLand5-VCMOSlogicULN2003AAdvantagesTheULN2003AisanarrayofsevenNPNDarlingtontransistorscapableof500mA,50Voutput.Itfeaturescommon-cathodeflybackdiodesforswitchinginductiveloads.ItcancomeinPDIP,SOIC,SOPorTSSOPpackaging.InthesamefamilyareULN2002A,ULN2004A,aswellasULQ2003AandULQ2004A,designedfordifferentlogicinputlevels.TheULN2003AisalsosimilartotheULN2001A(4inputs)andtheULN2801A,ULN2802A,ULN2803A,ULN2804AandULN2805A,onlydifferinginlogicinputlevels(TTL,CMOS,PMOS)andnumberofin/outputs(4/7/8).WheretouseULN2003ULN2003ICisoneofthemostcommonlyusedMotordriverIC.ThisICcomesinhandywhenweneedtodrivehighcurrentloadsusingdigitallogiccircuitslikeOp-maps,Timers,Gates,Arduino,PIC,ARMetc.Forexampleamotorthatrequires9Vand300mAtoruncannotbepoweredbyanArduinoI/OhenceweusethisICtosourceenoughcurrentandvoltagefortheload.ThisICiscommonlyusedtodriveRelaymodules,Motors,highcurrentLEDsandevenStepperMotors.Soifyouhaveanythingthatanythingmorethan5V80mAtowork,thenthisICwouldbetherightchoiceforyou.HowtouseULN2003TheULN2003isa16-pinIC.IthassevenDarlingtonPairsinside,whereeachcandriveloadsupto50Vand500mA.ForthesesevenDarlingtonPairswehavesevenInputandOutputPins.AddingtothatwecanagroundandCommonpin.Thegroundpin,asusualisgroundedandtheusageofCommonpinisoptional.ItmightbesurprisingtonotethatthisICdoesnothaveanyVcc(power)pin;thisisbecausethepowerrequiredforthetransistorstoworkwillbedrawnfromtheinputpinitself.ThebelowcircuitisasimplecircuitthatcanbeusedtotesttheworkingofULN2003IC.InthecircuitconsidertheLEDtobetheloadsandthelogicpins(bluecolor)asthepinsconnectedtotheDigitalcircuitorMicrocontrollerlikeArduino.NoticethatthePositivepinoftheLEDisconnectedtothepositiveloadvoltageandthenegativepinisconnectedtotheoutputpinoftheIC.ThisisbecausewhentheinputpinoftheICgetshightherespectiveoutputpinwillgetconnectedtoground.SowhenthenegativeterminaloftheLEDisgroundeditcompletesthecircuitandthusglows.Theloadsconnectedtotheoutputpincanbemaximumof50Cand500mAeach.Howeveryoucanrunhighercurrentloadsbuycombiningtwoormoreoutputpinstogather.Forexampleifyoucombinethreepinsyoucandriveupto(3*500mA)~1.5A.TheCOMpinisconnectedtogroundthroughaswitch,thisconnectionisoptional.Itcanbeusedatestswitch,meaningwhenthispinisgroundedalltheoutputpinswillbegrounded.ULN2003AApplicationTypicalusageoftheULN2003Aisindrivercircuitsforrelays,lampandLEDdisplays,steppermotors,logicbuffersandlinedrivers.AULN2003installedinabreakoutboardtobeusedasaunipolarsteppermotordriverwitha28BYJsteppermotorontheleft.ULN2003APackageInformationULN2003ARepresentativeSchematicDiagramProductManufacturerONSemiconductor(Nasdaq:ON)isdrivingenergyefficientinnovations,empoweringcustomerstoreduceglobalenergyuse.Thecompanyoffersacomprehensiveportfolioofenergyefficientpowerandsignalmanagement,logic,discreteandcustomsolutionstohelpdesignengineerssolvetheiruniquedesignchallengesinautomotive,communications,computing,consumer,industrial,LEDlighting,medical,military/aerospaceandpowersupplyapplications.ONSemiconductoroperatesaresponsive,reliable,world-classsupplychainandqualityprogram,andanetworkofmanufacturingfacilities,salesofficesanddesigncentersinkeymarketsthroughoutNorthAmerica,Europe,andtheAsiaPacificregions.FAQWhatistheuseofuln2003a?TypicalusageoftheULN2003Aisindrivercircuitsforrelays,lampandLEDdisplays,steppermotors,logicbuffersandlinedrivers.Whatisthefunctionofuln2003driverininterfacingofsteppermotor?Knownforitshighcurrentandhighvoltagecapacity,theULN2003givesahighercurrentgainthanasingletransistorandenablesthelowvoltageandlowcurrentoutputofamicrocontrollertodriveahighercurrentsteppermotor.WhatisaDarlingtonarray?Darlingtondevicesarehigh-voltage,high-currentswitcharrayscontainingmultipleopen-collectorDarlingtonpairsormultipleDarlingtontransistorswithcommonemitters,andintegralsuppressiondiodesforinductiveloads.HowtousetheULN2003ATransistorArraywithArduino?I.DescriptionTheroleofanalog-to-digitalconversion(AD)istoconvertcontinuousanalogquantitiesintodiscretedigitalquantitiesthroughsampling.Itiswidelyusedincircuitdesign,suchasthedigitizationofanalogquantitiessuchasimage,voltage,andcurrent.ThefunctionoftheADchipistocompletetheanalog-to-digitalconversionfunction.TherearemanykindsofADchips.ThisarticletakesADC0804asanexampletoelaborateonthesoftwareandhardwaredesignmethodsoftheADconversioncircuit.CatalogI.DescriptionII.ADC0804IntroductionIII.CircuitConnectionDiagramIV.ADC08904TimingAnalysis4.1ADC08904StartConversionTimingAnalysis4.2ADC0804ReadDataTimingAnalysisV.ADC0804Analog-to-digitalConversionTestProgramVI.ConclusionFAQOrdering&QuantityII.ADC0804IntroductionADC0804isastep-by-stepcomparisonADconverter,usingCMOSmanufacturingprocess,20pins,8-bitresolution,theinputanalogvoltagerangeis0-5V,andthetypicalconversiontimeis100us.Thechipcontainsathree-statedataoutputlatch,whichcanbedirectlyhungonthedatabusofthemicrocontroller.III.CircuitConnectionDiagramFigure1CircuitconnectiondiagramThecircuitconnectiondiagramisshowninFigure1above,whichmainlyincludesAT89S52single-chipmicrocomputer,ADC0804and8light-emittingdiodes.The31-pinoftheone-chipcomputerisconnectedtohighlevel,thepurposeistomaketheone-chipcomputerstarttoexecutetheprogramfromtheinternalROMafterpower-on.ThefollowingfocusesontheperipheralcircuitdesignoftheADC0804chipandtheconnectionbetweenthecorrespondingpinsandthemicrocontroller.The20thpinofADC0804isconnectedto5Vforpoweringitself,andpin0isthepowerground.Pins11-18aretheconverteddigitalsignaloutputterminals,whicharerespectivelyconnectedtoP1.7-P1.0ofthesingle-chipmicrocomputerandconnectedtotheanodesof8light-emittingdiodes(LED1-LED8).Thefunctionofconnectingthelight-emittingdiodeistointuitivelytestthecorrectnessofthecircuitdesignandprogrammingbyobservingthechangeofitson-offstate.Thedetailswillbegivenlater.Pin1CSisthechipselectionterminal,connectedtopinP3.5ofthemicrocontroller,andthelowlevelisactive.OnceCSisactive,ADC0804isreadytostartworkingimmediately.Pin2RDisthereadsignalinputterminal,connectedtopinP3.7ofthesingle-chipmicrocomputer,lowleveliseffective.3pinWRisthewritesignalinputterminal,connectedtothesingle-chipP3.6pin,thelowlevelisvalid,andtheWRisvalid,theADconversionisstartedimmediately.The19-pinCLKRistheexternalresistanceendoftheinternalclockgenerator.TheRCoscillatorcircuitisformedbya10Kresistoranda150pfcapacitor.Theoscillationsignaloutputbytheoscillatorcircuitisconnectedtothe4-pinCLKINastheclockpulseofADC0804.Thepulsefrequencyis1/(1.1R*C),ifthecapacitorisselectedtoomuch,theconversionratewillbeaffected.Pin5INTRistheinterruptsignaloutputterminal.Whenitoutputsalowlevel,itindicatestheendofanADconversionandpromptsthecontrollertodothecorrespondingprocessing.Thisarticledoesnotusetheinterruptmode,sothepinisleftfloating.6-pinVIN+and7-pinVIN-formapairofanalogdifferentialsignalinputterminals.Amongthem,pin6VIN+isconnectedtoanadjustableresistorthrougha10Kcurrentlimitingresistor.Byadjustingthesizeoftheadjustableresistor,avoltagebetween0-5Vcanbeobtained.Sincepin7VIN-isgrounded,thevoltageisItistheanaloginputvoltageofADC0804.ThetaskofADC0804istoconverttheanalogvoltageintoan8-bitdigitalquantity,therangeis0x00-0xFF.Pin9VREF/2isthereferencevoltageinputterminal.Thereferencevoltageis2.5V,whichisobtainedbydividingthe5Vvoltagethroughtwo1Kresistors.IV.ADC08904TimingAnalysis4.1ADC08904StartConversionTimingAnalysisFigure2ADC08904startconversiontimingdiagramAccordingtotheADC0804startconversiontimingdiagram(Figure2),itcanbeseenthattheADC0804startstheconversionthroughthefollowingseriesofprocesses:first,clearCS,thatis,changeCStolowlevel,afteraslightdelay,changeWRfromhighleveltolowlevel,andthenchangeWRtohighlevelafteraslightdelay,andtheADconversionisofficiallystarted.After1-8ADconversiontimeperiods,theanalog-to-digitalconversioniscompleted,andtheconversionresultisautomaticallystoredintheinternallatch.Atthesametime,theINTRinterruptoutputterminalbecomeslowleveltoinformtheMCUofthisADconversionjunction,andtheMCUthentakesoutthedatabyreadingforsubsequentprocessing.4.2ADC0804ReadDataTimingAnalysisFigure3ADC0804readdatatimingdiagramAccordingtotheADC0804readdatatimingdiagram(Figure3),itcanbeseenthattheADC0804readdataoperationneedstogothroughthefollowingseriesofprocesses:firstclearCS,thatis,CSbecomeslow,andafteraslightdelay,RDchangesfromhightohighLowlevel,afterTacctime,thedataonthedigitalsignaloutputterminal(digitalsignalafterA/Dconversion)canbestabilized.Atthistime,themicrocontrollercanreadthedataonthedigitalsignaloutputterminal,andthenpullRDtoahighlevel.V.ADC0804Analog-to-digitalConversionTestProgramThisarticlewritesacompleteADC0804analog-to-digitalconversiontestprogram,asshownbelow,andgivestheprogramfunctioncommentslinebyline.TheprogramiswrittenstrictlyinaccordancewiththeADC0804start-upconversiontimingandreaddatatiming.ItsfunctionistoobtaindifferentvoltagesbyadjustingtheadjustableresistorR2inFigure1.ThisvoltageisusedastheanaloginputofADC0804,whichisconvertedto8-bitdigitalquantitybyADC0804,anddrives8-bitlight-emittingdiodesrespectively.Differentvoltagesareconvertedintodifferentdigitalquantities,sothatthebrightnessofthe8-bitLEDisdifferent.Observingthisphenomenonindicatesthatthedesignoftheanalog-to-digitalconversioncircuitinthisarticleiscorrect.VI.ConclusionInthispaper,8051single-chipmicrocomputerisusedasthecontroller,theADC0804-basedanalog-to-digitalconversioncircuitisdesigned,theworkingprincipleofADC0804isdiscussed,andacompletetestprogramisgivenandannotated.Throughtesting,thecircuitcanworknormally,layingagoodfoundationforfurtherresearchinthefieldofcircuitdesigninthefuture.FAQWhatisadc0804?TheADC0804isacommonlyusedADCmodule,forprojectswereanexternalADCisrequired.Itisa20-pinSinglechannel8-bitADCmodule.MeaningitcanmeasureoneADCvaluefrom0Vto5Vandtheprecisionwhenvoltagereference(Vrefpin9)is+5Vis19.53mV(Stepsize).Whatisthedifferencebetweenadc0804andmax1112?ADC0804isusedforparallelADCandMAX1112isusedforserialADC.Whichpinoftheadc0804indicatesendofconversion?PIN-5Interrupt(INTR)ThispinautomaticallygoeslowwhenconversionisdonebyADC0804orwhendigitalequivalentofanaloginputisready.PIN-6Vin(+)connectinputanalogsensorpin/inputvoltagetothispin.WhatisADCandDAC?ADCstandsforAnalogtoDigitalConverter,whichconvertstheanalogsignalintothedigitalsignal.DACstandsforDigitaltoAnalogConverteranditconvertstheDigitalsignalintoananalogsignal.Whatistheresolutionof8bitADC?Forexample,anADCwitharesolutionof8bitscanencodeananaloginputtoonein256differentlevels(28=256).Thevaluescanrepresenttherangesfrom0to255(i.e.asunsignedintegers)orfrom128to127(i.e.assignedinteger),dependingontheapplication.

IRFP440PBF-VISHAY

IDescriptionThisblogintroducesatemperatureacquisitionandalarmsystembasedonAT89S52microcontrollerandDS18B20temperaturesensor.Here,wehavedescribedthefollowingindetail:schemedesign,componentselection,hardwarestructureandsoftwaredesign,etc.CatalogIDescriptionIIIntroduction2.1Introductiontotemperaturemeasurementsystem2.2IntroductiontoDS18B202.3DS18B20TemperaturemeasurementsystemIIISystemschemestructuredesignIVSelectionofmaincomponents4.1Processor4.2DigitaltemperaturesensorDS18B20VSystemhardwaredesign5.1Powermodule5.2Temperatureacquisitionmodule5.3Displaymodule5.4Alarmmodule5.5ButtonmoduleVISystemsoftwaredesign6.1Instructions6.2Initializationsequence6.3Buswritetiming6.4Busreadtiming6.5TemperatureacquisitionprogramVIIExperimentaltestVIIIConclusionFAQOrdering&QuantityIIIntroduction2.1IntroductiontotemperaturemeasurementsystemTemperaturemeasurementsystemsarewidelyusedinthefollowingfields:grainstorage;medicalcare;transportation;smarthomesandgreenhouses;powertelecommunicationsystems;Moreover,thesystemwithanalarmfunctioncanalsoreducetheriskoftemperatureaccidents.Atpresent,thetemperaturevaluescollectedbythetemperaturemeasuringdevicearestillmainlyanalogsignals.However,themicroprocessorcanonlyprocessdigitalsignals,andA/Dconversionisrequiredfirst.Thismakesthedevicestructurecomplexandlowprecision.However,theemergenceofdigitaltemperaturesensorscansolvethisproblem.2.2IntroductiontoDS18B20ThenewdigitaltemperaturesensorrepresentedbyDS18B20integratestemperatureacquisitionandA/Dconversiondirectlyoutputsdigitalsignalsandhasasimpleinterfacecircuitwiththesingle-chipmicrocomputer.DS18B20hasthefeaturesofasinglebus,smallsize,highresolution,stronganti-interference,etc.Ithasapplicationsinthemeasurementofhighwaysubgradetemperaturefieldandbearingtemperaturedetectioninfrozensoilareas.Moreover,thesensorhasaunique64-bitserialnumber,andmultipledevicescanbeconnectedtoasinglesignallinetoachievelong-distance,multi-pointdistributedtemperaturemeasurement.2.3DS18B20TemperaturemeasurementsystemThisbloguses51single-chipmicrocomputersastheprocessingcore,usesDS18B20toformatemperaturemeasurementmodule,plusabuttonmodule,adisplaymodule,andanalarmmodule,etc.,todesignadigitaltemperaturecollectionalarmsystemsuitableformultipleoccasions.Itisdesignedtorealizemultiplefunctionsofsynchronouscollection,display,alarm,andcontrolofspecifiedtemperature.ThetemperaturemeasurementalarmsystemhaspassedthesimulationtestofthePROTUSsimulationplatformandsuccessfullyverifieditsfunctionwiththecircuitboard.Thedevicerunsstably,withagoodtemperaturemeasurementeffectandsmallerror.IIISystemschemestructuredesignThesystemincludesthefollowingparts:ThecoreAT89S52microcontrolleranditsperipheralcircuits;Temperaturemeasurementmodule(DS18B20digitaltemperaturesensor);Powermodule;Displaymodule(drivecircuit,multi-digitLEDdigitaltube);Buttonmodule;Alarmmodule(buzzer;LEDlight-emittingdiode).WecantakealookatdetailsshowninFigure1.Figure1.BlockDiagramoftemperaturemeasurementsystemWhenweusetheDS18B20intelligenttemperaturesensor,itoutputsdigitalsignalswithoutprocessingandconversion.AslongasthereadandwriteasequenceofDS18B20isstrictlyfollowed,thereal-timetemperaturecanbeaccuratelyread.Eventhoughthesystemhashighprecisionandrelativelycomplicatedprocedures,thecircuitissimpleandsmall,whichisconducivetotheintelligentizationandlightweightofthesystem.WithmultipleDS18B20sconnectedtoasinglebus,themicrocomputercancommunicatewithmultipleDS18B20swithonlyonedataline.Inthisway,itcanalsomeettherequirementsofmulti-pointtemperaturemeasurement.IVSelectionofmaincomponents4.1ProcessorThesystemprocessorusesanAT89S52single-chipmicrocomputer.AT89S52isahigh-performance,low-power8-bitCMOSmicroprocessorfromAt-mel.Its8KsystemprogrammableFLASHmemorymakesitsdownloadcircuitsimpleandcanrealizeonlineprogramminginserialandparallelmode.Thereare316-bittimer/countersinsidetheAT89S52chip,1full-duplexserialport,4I/Oports,and256bytesRAM,whichisconvenientforprogramdebugging.4.2DigitaltemperaturesensorDS18B20TheDS18B20temperaturesensorisaone-linesmartdigitaltemperaturesensorproducedbyDALLASSemiconductor.Inaddition,DS18B20isalsotheworldsfirsttemperaturesensorsupportingasingle-wirebusinterface.Ithasthecharacteristicsoflongtransmissiondistance,smallsize,andsimpleinterface.TheDS18B20ismainlycomposedofthefollowingcomponents:Temperaturesensor,configurationregister;64-bitROM;HighandlowalarmtriggersTHandTL.Amongthem,lithographyROMisthekeytorealizingmulti-pointtemperaturemeasurement.Afterthetemperaturemeasurementisconverted,itisoutputintheformof16-bitsign-extendedtwoscomplementandstoredintheDS18B2028-bitRAMs.VSystemhardwaredesignThehardwarecircuitofthesystemismainlycomposedofthefollowing5modules:Temperaturemeasurementmodule,powersupplymodule,displaymodule,alarmmoduleandbuttonmodule.TheoverallcircuitschematicdiagramisshownasinFig.2.AT89S52single-chipmicrocomputerisconnectedtoa11.0592MHzcrystaloscillatorcircuittoprovideanexternalclock,andtheresetterminalRESETisconnectedtothewatchdogcircuittoformaminimalsingle-chipsystem.Thesystemcanachievethefollowingfunctions:DS18B20collectstemperature,andthemicrocontrollerisresponsibleforthecommunicationandcontrolofthesensor;Thedisplaymoduledisplaystheprocessedtemperaturevalueinrealtime;Thealarmmodulemonitorsthetemperaturerange.Whenthetemperatureexceedstheupperandlowerlimits,LEDdiodesandbuzzersareusedtogeneratealarmsignalstoreminduserstotakemeasures;Thebuttonmodulesetsthealarmvalueasrequiredtoimprovethepracticality.5.1PowermoduleThecircuituses+5Vworkingvoltagetosupplypowerforthesingle-chip,acquisition,andalarmcircuits.Inaddition,anindependentpowermoduleneedstobeaddedduringhardwareproduction.5.2TemperatureacquisitionmoduleDS18B20utilizesthecharacteristicofasinglebusline,connectsthetemperatureoutputendDQandP0.3mouththrougha4.7kpull-upresistor.Thesingle-chipmicrocomputerinitializesthesensorandcompletesthetemperaturecollectionthroughthewire.TheGNDofthesensorisgrounded,andVDDcanbepoweredbyadatalineoranexternalpowersupply.Inordertoimprovetheanti-interferenceability,thisdesignusesanexternalpowersupplymode.Figure2.Hardwarecircuitstructure5.3DisplaymoduleInordertosavethehardwareinterface,adynamicscanningdisplayschemeisadopted.Dynamicscanningisacyclicshiftmethodthatusesthepersistenceofthehumaneyetoachievetheeffectofcontinuousdisplay.Thisdesignusesa6-digit8-segmentcommoncathodedigitaltubewithadecimalpointtodisplaythetemperaturevalue.Amongthem,thefirstdigitisthepositiveandnegativesigndigit,thesecond,third,fourth,andfifthdigitsrespectivelydisplaythehundreds,tens,onesanddecimalplacesofthetemperature,andthelastdigitdisplaysthetemperatureunit℃.TheP2portofthesingle-chipmicrocomputer(P2.0~P2.7total8bitscorrespondingto8fields)isconnectedwiththesegmentselectioncommonsignallineofthenixietubethroughthedriverchip74LS245.P3.0~P3.5ofP3portareconnectedwiththebitselectionsignallineofthedigitaltubetorealizebitselectioncontrol.5.4AlarmmoduleInordertoincreasethesafetyfactor,thealarmcircuitadoptsanalarmmethodwithsoundandlightdoubleguarantee.Thisincludesabuzzerand2LEDsofdifferentcolors.Thecollectedtemperatureisconstantlycomparedwiththesettemperaturethreshold:Whenthetemperatureishigherthantheupperlimitthreshold,thebuzzerofportP3.7sendsoutahigh-frequencyalarmsignal,andtheredLEDlightofportP0.6islitatthesametimetogivehightemperaturealarm.Whenthetemperatureislowerthanthelowerlimitthreshold,thebuzzersendsoutalow-frequencyalarmsignal,andatthesametimelightsuptheblueLEDlightofportP0.7togivealow-temperaturealarm.5.5ButtonmoduleWecanrealizehuman-computerinteractionthroughbuttons,adjustthetemperaturethreshold,andmakethesystemsuitableformoreoccasions.Thismoduleiscomposedoftwoparts,onepartisthecontrolbutton(K1~K4),theotherpartistheindicatorlight,whichoccupiestheportP1.0~P1.5ofthesingle-chipmicrocomputer.Fordetails,wecanseeFigure3below.WhenK1ispressed,theredlightison,indicatingthattheupperlimitsettingstateisentered,andthetemperatureisadjustedthroughthebuttonsK2(+)andK3(-).Atthesametime,thedisplaymoduledisplaysthetemperaturevaluesettingsynchronously.Aftertheadjustmentiscompleted,pressK1againtoexit.Thelowerlimittemperaturevalueadjustment(K4)processisconsistentwiththeupperlimit.VISystemsoftwaredesignTheDS18B20hardwarecircuitissimple,andrelativelycomplicatedsoftwaredesignmustbeusedtoprovidereasonablelogictimingtoensurereliableandaccuratework.DS18B20mainlyincludes3kindsofoperations:initialization,busread,andbuswrite.Thesethreeoperationsmuststrictlyfollowthetimingrequirements.Inthefollowing,wewillconductanin-depthanalysisofthesethreeaspects.6.1InstructionsAccordingtothecommunicationprotocolofDS18B20,thesensormustusetheROMinstructionandmemoryRAMinstructionprovidedbyittooperate.Andthesetwokindsofinstructionsappearintheprograminthehexadecimalformof8bitwordlength.CommonlyusedcodesandspecificmeaningsareshowninTable1andTable2.Eachtemperatureconversiongenerallygoesthroughthreesteps:resetoperation,sendROMcommand,sendRAMcommand,andthenreadthetemperature.6.2InitializationsequenceInitializationisoneofthebasicoperationsatthebottomoftheDS18B20,whichisequivalenttoestablishingacommunicationbridgebetweenthemicrocontrollerandthesensortoprepareforthesubsequentoperations.TheinitializationpulseincludestheresetpulsesentbytheCPUandtheresponsepulsesentbythesensor.TheinitializationpulsesequenceisshowninFigure3.Figure3.DS18B20initializationsequenceThehostfirstsendsoutaresetpulse(low-levelsignal)of480-960sandthenreleasesthebustoenterthereceivingmode(RX).WhenDS18B20detectstherisingedgewhenthebusisreleased,itwaitsfor15-60s,andthensendsoutalow-levelresponsepulsewithadelayof60-240s.Atthistime,theDQofthesensorissetto1,andthehostisalsosetto1,andtheinitializationprocessiscompleted.Atthistime,thesensorisinastatewhereitcanbereadandwritten6.3BuswritetimingWritingdatatoDS18B20isthebasicoperationofsendinginstructionsanddata.Therightshiftoperationisusedtorealizebit-by-bitwritingwithlowbitinfrontandhighbitinback.Itmainlyincludestwotimings:writing0andwriting1.Thewritesequencestartswhenthehostpullsdownthebusformorethan1s,andsendsthesignaltobesenttotheDQwithin15s,waitingforthesensortosampleit,andthesensorcompletesthedatacollectionwithin45s.Duringdatacollection,ifthebusishigh,writelogic1;otherwise,writelogic0.ItcanbeseenfromthewritesequenceinFigure4thatonewritecyclerequiresatleast60s,andtheremustbeanintervalgreaterthan1sbetweentwowritecycles.Figure4.WritetimesequenceofDS18B206.4BuswritetimingWritingdatatoDS18B20isthebasicoperationofsendinginstructionsanddata.Therightshiftoperationisusedtorealizebit-by-bitwritingwithlowbitinfrontandhighbitinback.Itmainlyincludestwotimings:writing0andwriting1.Thewritesequencestartswhenthehostpullsdownthebusformorethan1s,andsendsthesignaltobesenttotheDQwithin15s,waitingforthesensortosampleit,andthesensorcompletesthedatacollectionwithin45s.Duringdatacollection,ifthebusishigh,writelogic1;otherwise,writelogic0.ItcanbeseenfromthewritesequenceinFigure4thatonewritecyclerequiresatleast60s,andtheremustbeanintervalgreaterthan1sbetweentwowritecycles.Figure5.ReadtimesequenceofDS18B206.5TemperatureacquisitionprogramTakethetemperatureacquisitionprogramasanexampletobrieflyexplainthesourcecode:VoidConvert_18B20(Void){RST_18B20();WR_18B20(0xcc);WR_18B20(0x44);}IntRead_18B20(Void){RST_18B20();WR_18B20(0xcc);WR_18B20(0xbe);Temp_8[0]=RD_18B20;Temp_8[1]=RD_18B20;return(Temp_8);}VIIExperimentaltestThetesttemperaturevalueisshowninTable3.Thesystemerrorislessthan0.5,andthetestresultsshowthatthesystemhashighaccuracyandstrongpracticability.VIIIConclusionThisarticledesignsatemperatureacquisitionalarmsystembasedonAT89S52single-chipmicrocomputerandDS18B20digitaltemperaturesensor,anddetailsthesoftwareandhardwaredesign.Thedesignhastheadvantagesofsimplestructure,highprecisionandgoodstability,andissuitableforthefollowingfields:granary,electricmachineroom,bearing,airconditioner,refrigerator,industryandagriculture,etc.TheDS18B20singlebusandmulti-pointtemperaturemeasurementfeaturestrengthensitsscalabilityandhasabroadmarketprospect.FAQWhatisDS18B20temperaturesensor?TheDS18B20isa1-wireprogrammabletemperaturesensorfrommaximintegrated.Itiswidelyusedtomeasuretemperatureinhardenvironmentslikeinchemicalsolutions,minesorsoiletc.Theconstrictionofthesensorisruggedandalsocanbepurchasedwithawaterproofoptionmakingthemountingprocesseasy.HowdoestheDS18B20work?Itworksontheprincipleofdirectconversionoftemperatureintoadigitalvalue.IsDS18B20athermistor?Athermistorisathermalresistor-aresistorthatchangesitsresistancewithtemperature....Thermistorshavesomebenefitsoverotherkindsoftemperaturesensorssuchasanalogoutputchips(LM35/TMP36)ordigitaltemperaturesensorchips(DS18B20)orthermocouples.HowaccurateisDS18B20?TheDS18B20readswithanaccuracyof0.5Cfrom-10Cto+85Cand2Caccuracyfrom-55Cto+125C.Whatisds1820?TheDS18B20isonetypeoftemperaturesensoranditsupplies9-bitto12-bitreadingsoftemperature....Thecommunicationofthissensorcanbedonethroughaone-wirebusprotocolwhichusesonedatalinetocommunicatewithaninnermicroprocessor.HowdoIconnectmyDS18B20tomyRaspberryPi?OnceyouveconnectedtheDS18B20,powerupyourPiandlogin,thenfollowthesestepstoenabletheOne-Wireinterface:1.Atthecommandprompt,entersudonano/boot/config.txt,thenaddthistothebottomofthefile:2.dtoverlay=w1-gpio.3.ExitNano,andrebootthePiwithsudoreboot.WhatistheworkingprincipleofDS18B20?TheDS18B20DigitalThermometerprovides9to12-bit(configurable)temperaturereadingswhichindicatethetemperatureofthedevice.Itcommunicatesovera1-Wirebusthatbydefinitionrequiresonlyonedataline(andground)forcommunicationwithacentralmicroprocessor.Inadditionitcanderivepowerdirectlyfromthedataline(parasitepower),eliminatingtheneedforanexternalpowersupply.ThecorefunctionalityoftheDS18B20isitsdirect-to-digitaltemperaturesensor.Theresolutionofthetemperaturesensorisuser-configurableto9,10,11,or12bits,correspondingtoincrementsof0.5C,0.25C,0.125C,and0.0625C,respectively.Thedefaultresolutionatpower-upis12-bit.WheretouseDS18B20Sensor?TheDS18B20isa1-wireprogrammableTemperaturesensorfrommaximintegrated.Itiswidelyusedtomeasuretemperatureinhardenvironmentslikeinchemicalsolutions,minesorsoiletc.Theconstrictionofthesensorisruggedandalsocanbepurchasedwithawaterproofoptionmakingthemountingprocesseasy.Itcanmeasureawiderangeoftemperaturefrom-55Cto+125withadecentaccuracyof5C.EachsensorhasauniqueaddressandrequiresonlyonepinoftheMCUtotransferdatasoitaverygoodchoiceformeasuringtemperatureatmultiplepointswithoutcompromisingmuchofyourdigitalpinsonthemicrocontroller.HowconnectDS18B20toArduino?FirstplugthesensoronthebreadboardtheconnectitspinstotheArduinousingthejumpersinthefollowingorder:pin1toGND;pin2toanydigitalpin(pin2inourcase);pin3to+5Vor+3.3V,attheendputthepull-upresistor.OnanATMega328P,whyisaDS18B20temperaturesensorreturningincorrecttemperaturevalues?Severalpossibilities:1.Ifitisjustreadingalittlehigh,itmightbecausedbyselfheating.Addaheatsinkand/ormakemeasurementslessfrequently.2.Especiallyifthevaluesarereallywhacky,itmightbecodewitherrorsormis-wiring.Useapublishedsketchtocheckoperation.3.TheDS18B20mightbedefective.Tryanother.4.Itsaccurateto0.5C.Areyouexpectingittobemoreaccurate(likedowntotheLSBofthereadvalue)?

IDescriptionSometimes,ifyoucanusetheinexpensiveLM386anduseittomakeastereopoweramplifier,theeffectshouldbeconsideredideal.Here,thisblogwillintroducethemethodsandexperienceofusingLM386tomakeamicrocomputerstereopoweramplifier.CatalogIDescriptionIIIntroduction2.1LM386schematic2.2HowtouseLM386IIIInstallationandcommissioningOrdering&QuantityIIIntroduction2.1LM386schematicLM386isalow-powerhigh-gainpoweramplifiercircuit.ItsencapsulationformisshownasinFig.1.Figure1.LM386PinoutBecausetheaudiosignalamplitudeofthelineoutputofthesoundcardislarge,itcandrivetheLM386andthenthespeaker.AndbecauseitwillbeinterferedbythevideosignalwhenplayingVCD,itisnotgoodtofollowthetypicalcircuitconnection.Atthistime,weneedtoaddsomecomponentsanddebugcomponentvalues.TheschematicdiagramofLM386isshownasinFig.2.Figure2.LM386SchematicLM386pinfunctionsareasfollows:LM386hastwoinputterminals:non-invertinginputterminal3thpinandinvertinginputterminal2thpin.Theinputsignalcanbeinputfromanyend,theotherinputendisgrounded,theinputendisconnectedinparallelwiththecapacitorC4,thepurposeistofilteroutthevideointerferencewhenplayingVCD.Thevaluecanbeincreasedappropriately,butitcanbewithorwithoutC4whenplayingCD.Pins1and8arethegaincontrolterminals,andthegaincontrolnetworkiscomposedofC2andW2.Thesmallertheresistance,thehigherthegain.Figure2SchematicdiagramW2ismoreappropriatetoadjustthegaintoabout150,andthegainistoohightocauseself-excitation;Connecta10capacitortopin7toavoidself-excitationwhenthegainistoohigh;R2andC6formahigh-frequencycomponentattenuationcircuittoeliminatethecracksoundfromthespeaker.Amongthem,thesizeoftheC6capacityisadjustedaccordingtotheactualeffect;A0.1capacitorisconnectedtothe6thpintogroundtofilterandeliminatethestatichumoftheamplifier;The5thpinisconnectedtothecouplingcapacitorC3.Ifonlyoneconespeakerisconnectedtoonechannel(theauthorusesaconespeakerwithadiameterof120mm,impedance8ohms,andoutputpowerof1W),theC3capacitycannotexceed470.Otherwise,thespeakerwillbeblockedwhenplayinglowmusic.Ifthehighandlowfrequencycrossovertechnologyisadopted,theC3capacitycanbeincreasedtofullyreflectthebass.W1isusedtoadjusttheoutputvolume,whichisespeciallyconvenientwhenplayinggamesorlisteningtoCDs;theworkingvoltageis10volts,andabridgerectifierfiltercircuitcanbemadebyyourself.2.2HowtouseLM386LM386isanaudiopoweramplifierICwidelyusedinelectronicproductsandhomeamateurproduction.ItstypicalapplicationcircuitisshownasinFig.3.Figure3.LM386CircuitSo,howshouldweuseLM386correctly?1.Self-excitedhowlingcausedbyexcessiveinputsignal.Forthehowlingcausedbytheexcessiveinputsignal,aresistance-capacitancenetworkcanbeaddedbetweenthe1and8pinsofLM386.Inbatchapplication,theresistanceofRcanbedeterminedbyexperiments,orRcanbereplacedbyatrimmingpotentiometerW.Ifthesignalisstilltoostrong,LM386pins1and8canbesuspended.2.Highfrequencyself-excitation.Theprincipleofanti-highfrequencyself-excitationcircuitisshowninFigure4.Forhowlingcausedbyhigh-frequencyself-excitation,a4700pF~0.22Fceramiccapacitorcanbeconnectedbetweenthesignalinputterminalandtheground,anda1000~4700pFcapacitorcanbeconnectedbetweenthe8thpinandtheground.Whenmakingsingle-endedinput,theidleinputterminalshouldnotbegrounded.Figure4.LM386Circuit3.Lowfrequencyself-excitation.Forhowlingcausedbylow-frequencyself-excitation,youcantrytoconnecta68~22kresistorbetweentheinputterminalandtheground,increasethefiltercapacitorofpin8to1000F,andmaketheLM386ascloseaspossibletotheoutputterminalofthepowersupplywhenmakingtheprintedboard..4.Whenusingotherbrandproducts(suchasGL386,KA386,etc.),someICswillaffectthesensitivityofhigh-frequencyaudio.A0.1Fceramiccapacitorcanbeconnectedbetweenits7thpinandground,anda0.1Fceramiccapacitorcanbeconnectedbetweenthe4thand6thpins(note:differentfromthe8thpintoground).IIIInstallationandcommissioningAccordingtotheschematicdiagramshowninFigure2,wecanmaketwoidenticalpoweramplifiercircuits,whicharecombinedtoformastereopoweramplifier.Becausetherearefewcomponents,itisbettertousedouble-coreshieldedwireswithoutmakingprintedcircuitboards.Then,connectthestereoplugtothetwoamplifiers,andusetheshieldwireasthegroundwire.Donotconnecttheamplifiertothesoundcardaftersoldering.Atthistime,weshouldfirstcheckthattheweldingiscorrectandthenturnonthepower,andthentapthetwoinputendsofthestereoplugwithmetaltweezers.Ifthetwospeakerscanknockoutnormally,itindicatesthattheamplifierisworkingproperly.Atthistime,afterturningoffthepoweroftheamplifierandthemicrocomputer,wecanconnectittothesoundcard.Theconnectionmethodistoinsertthestereoplugintothelineoutputjack(LineOut)ofthesoundcard.Finally,itisemphasizedthatyoushouldavoidunpluggingandpluggingthestereoplugwhenthepowerison(microcomputeroramplifier),orweldingthecircuitwhentheamplifierisconnectedtothesoundcard,soasnottodamagethecomputer.FAQHowdoesanLM386work?TheLm386integratedchipisalowpoweraudiofrequencyamplifier,whichuseslowlevelpowersupplylikebatteriesinelectroniccircuits.Itisdesignedas8pinminiDIPpackage.Thisprovidesvoltageamplificationof20.Byusingexternalpartsvoltagegaincanberaisedupto200.Islm386anopamp?TheLM386isatypeofoperationalamplifier(Op-Amp)....Inanamplifiercircuit,theLM386takesanaudioinputsignalandincreasesitspotentialanywherefrom20to200times.Thatamplificationiswhatsknownasthevoltagegain.Whatislm386IC?TheLM386isanintegratedcircuitcontainingalowvoltageaudiopoweramplifier.Itissuitableforbattery-powereddevicessuchasradios,guitaramplifiers,andhobbyelectronicsprojects.Howdoyoucalculatelm386gain?VoltageGainAnalysis:Withoutanyexternalcomponents,ithasagainofGv=2x15K/(150+1350)=20(26dB).Withacapacitor(orshortcutting)betweenpins1and8,ithasagainofGv=2x15K/150=200(46dB).WhichICisusedinaudioamplifier?TheICLM386isalow-poweraudioamplifier,anditutilizeslowpowersupplylikebatteriesinelectricalandelectroniccircuits.ThisICisavailableinthepackageofmini8-pinDIP.WhataresomeprojectsthatusetheLM386audioamplifiercircuit?LM386isanintegratedclassABampandisgoodforbeginnerssmallaudioamplifierapplicationsforexampleinaRFreceiver,smallStereosystem,cheaplowvoltageamplifieretcdrawbacksisthatitcannothandlemuchpowerandhencecreatesdistortionwhenyoucrankupthevolumetoomuch..SootherICsareusedinpractical.HowtomakeanLM386audioamplifiercircuit?IDescriptionThisblogusesLM386integratedblockasthecoredevicetomakeasimplesoundamplifier.Itsproductioncostisrelativelylow.Thisblogissuitableforbeginnerstolearnaboutpowertubes,integratedoperationalamplifiers,speakers,languagechipsandothercomponents.Sowecanmastertheprinciples,characteristicsandusageofthebasicamplifiercircuitandpoweramplifiercircuit.Figure1.LM386CatalogIDescriptionIIIntroductiontoLM3862.1Features2.2InternalStructureIIIWorkingPrincipleofLM386SoundAmplifierIVLM386SoundAmplifierDebuggingVConclusionFAQOrdering&QuantityIIIntroductiontoLM3862.1FeaturesLM386isakindofaudiointegratedamplifier.Ithastheadvantagesoflowpowerconsumption,adjustableinternalchaingainadjustment,largepowersupplyvoltagerange,fewexternalcomponentsandlowtotalharmonicdistortion.Therefore,LM386iswidelyusedinrecordersandradios,mainlyinlow-voltageconsumerproducts.LM386featuresare:BatteryOperationMinimumExternalPartsWideSupplyVoltageRange:4V12Vor5V18VLowQuiescentCurrentDrain:4mAVoltageGainsfrom20to200Ground-ReferencedInputSelf-CenteringOutputQuiescentVoltageLowDistortion:0.2%(AV=20,VS=6V,RL=8,PO=125mW,f=1kHz)Availablein8-PinMSOPPackageBasedonthecharacteristicsshownabove,lm386componentsarewidelyusedincommunicationequipment,smallradios,andwalkie-talkiecircuits.Itisalsocalleduniversalpoweramplifiercircuitbythemajorityofelectronicenthusiasts.2.2InternalStructureLM386adopts8-pindualin-linepackage.SeeFigure2forthepinarrangementdiagram.Figure2.LM386PinArrangementPin6isconnectedtothepositivepoleofthepowersupply;Pin4aregrounded;Pin2invertinginputterminal;Pin3non-invertinginputterminal;Pin5istheoutputterminal;Pins1,7,and8areusedtoimprovetheperformanceofthecircuit.Theexternalcomponentends,andtheinternalcircuitisathree-stageamplifiercircuit:The1ststageconsistsofVT1~VT6toformadifferentialamplifiercircuit,The2ndstageiscomposedofVT7voltageamplifiercircuit,The3rdstageiscomposedofVT8~VT10toformacomplementarysymmetricalOTLoutputcircuitthatcaneliminatecrossoverdistortion.R5,R6,andR7formanegativefeedbacknetwork.IIIWorkingPrincipleofLM386SoundAmplifierThecoreoftheLM386soundamplifieristheLM386poweramplifierintegratedcircuit.AsshowninFigure3.TheelectretmicrophoneB1convertssoundsignalsintoelectricalsignals.Thissignalisveryweak,howtoamplifyit?WecanaddthecouplingcapacitorC1tothebaseofVT1,andVT1formsacommonemitteramplifiercircuittoamplifythesignal.Also,thesignalisoutputfromthecollectorofVT1,andaddedtotheinvertinginputterminalofLM386viacouplingcapacitorC2topin2andpin3isgrounded.AfterthesignalisamplifiedbytheinternalthreestagesofLM386,thesignalisoutputfrompin5,andthenpassesthroughthecouplingcapacitor.C3issenttothespeakers.Aftergoingthroughtheseprocesses,itcanmakeasound.Figure3.LM386SoundAmplifierFigure4.LM386AudioAmplifierCircuitThenhowtoadjustthesignalmagnificationofLM386?Here,wecanconnectanadjustableresistorR5andcapacitorC6topin1andpin8toformaseriesRCnetwork.WhenR5=0,thevoltagemagnificationis200.Pin7isconnectedtocapacitorC5topreventLM386fromgeneratingself-excitation.Inaddition,pin5isgroundedthroughR4andC4tomakethespeakersoundsofter.IVLM386SoundAmplifierDebuggingAfterthecircuitisassembled,weshouldcarefullycheckforerrorsorfalsesoldering.Ifthereisnoabnormalityaftertheinspection,turnonthe6Vpowersupplyfordebugging:Step1:Dontpickupthemicrophonefirst.Whenthereisnoinputsignal,testthequiescentcurrentofthewholemachine,whichisabout7mA.Step2:TestthestaticvoltagevalueofeachpinofLM386,asshowninFigure2.Step3:Afterthevoltageandcurrentarenormal,placetheRPvolumeregulatorinthemiddleandtouchthebaseofVT1withascrewdriver.Thespeakerwillemitaclickclicksound,indicatingthatthecircuitisnormal.Step4:ConnectthemicrophoneB1,andthenfine-tunetheRP.Ifnothinggoeswrong,speakintothemicrophone,thespeakershouldhaveamplifiedsound.Ifthereisnosound,checkwhetherthemicrophonecableisconnectedincorrectlyorthequalityofthemicrophoneisdefective.Step5:Whenusingasoundamplifier,donotplacethemicrophoneandspeakertooclosetogether.Iftheyareunfortunatelytooclose,thespeakerswillmakeaharshsound.Therefore,itisbesttouseshieldedwireforthemicrophonelead-out.Figure5.LM386VConclusionThroughthedesignofthisblog,wehaveanessentialunderstandingoftheworkingprincipleofLM386.Wehavemasteredthepinfunction,internalstructurecircuitandworkingprincipleofLM386.Inaddition,thesoundamplifiermadebyLM386hasthecharacteristicsofsimplecircuit,convenientdebugging,andcompletefunctions.Afterreadingthisblog,haveyoubetterunderstandLM386?FAQHowdoesanLM386work?TheLm386integratedchipisalowpoweraudiofrequencyamplifier,whichuseslowlevelpowersupplylikebatteriesinelectroniccircuits.Itisdesignedas8pinminiDIPpackage.Thisprovidesvoltageamplificationof20.Byusingexternalpartsvoltagegaincanberaisedupto200.Islm386anopamp?TheLM386isatypeofoperationalamplifier(Op-Amp)....Inanamplifiercircuit,theLM386takesanaudioinputsignalandincreasesitspotentialanywherefrom20to200times.Thatamplificationiswhatsknownasthevoltagegain.Whatislm386IC?TheLM386isanintegratedcircuitcontainingalowvoltageaudiopoweramplifier.Itissuitableforbattery-powereddevicessuchasradios,guitaramplifiers,andhobbyelectronicsprojects.Howdoyoucalculatelm386gain?VoltageGainAnalysis:Withoutanyexternalcomponents,ithasagainofGv=2x15K/(150+1350)=20(26dB).Withacapacitor(orshortcutting)betweenpins1and8,ithasagainofGv=2x15K/150=200(46dB).WhichICisusedinaudioamplifier?TheICLM386isalow-poweraudioamplifier,anditutilizeslowpowersupplylikebatteriesinelectricalandelectroniccircuits.ThisICisavailableinthepackageofmini8-pinDIP.WhataresomeprojectsthatusetheLM386audioamplifiercircuit?LM386isanintegratedclassABampandisgoodforbeginnerssmallaudioamplifierapplicationsforexampleinaRFreceiver,smallStereosystem,cheaplowvoltageamplifieretcdrawbacksisthatitcannothandlemuchpowerandhencecreatesdistortionwhenyoucrankupthevolumetoomuch..SootherICsareusedinpractical.HowtomakeanLM386audioamplifiercircuit?

Introduction74LS04containssixindependentgateseachofwhichperformsthelogicINVERTfunction.Theoutputsignalsofthesixinvertersareoppositetotheinputsignals.CatalogIntroductionICircuitofRingOscillatorIISymmetricalSquare-waveOscillatorIIISimpleself-excitedMultivibratorIVCircuitofCrystalOscillatorandFrequencyDividerVFMWirelessMicrophoneFAQOrdering&QuantityICircuitofRingOscillatorFigure1.RingoscillatorTheexperimentalcircuitofanongateringself-excitedmultivibratorwithRCdelaycircuitisshowninthefigure.TheoscillationcircuitiscomposedofnongateIC1,IC2,IC3andtimingcircuitelementsRPandC.TherectangularwavesignalisoutputbyIC3.R1isaprotectiveresistortoavoiddamagetoIC3gatecircuitwhentimingcapacitorCisreversedischarged.NotgateIC4makestheoscillatoroutputrectangularwavewithbetterwaveform.Oscillationfrequencyestimationf1/2.3RCT2.3RCTheresistancevalueoftimingresistorisselectedintherangeof100-10002.ThetimingcapacitorChasalargevaluerange,fromseveralhundredpicofarads(pF)toseveralhundredmicrofarads,whichcanmaketheoscillationfrequencyrangefromseveralmegahertztoseveralhertz.Replacethetimingresistorwithapotentiometer(1.5k92),whichcancontinuouslyadjusttheoscillationfrequencyandhasalargercoverage.Thechipusedis74LS04.IISymmetricalSquare-waveOscillatorThefigureshowstheexperimentalcircuitofnon-gatesymmetricalsquare-waveself-excitedmultivibrator.Becausethecircuitissymmetrical,thedutycycleofoutputoscillationwaveformis1:1,whichissquarewave,soitiscalledsymmetricalsquarewaveoscillator.Intheoscillationcircuit,theoutputofnongateIC1iscoupledtotheinputofnongateIC2viaatimingcapacitorC2.Also,theIC2outputiscoupledtotheIC1inputviaC1.Twonongatesarecoupledwitheachotherthroughcapacitorstoformapositivefeedbackclosed-loopcircuit,whichcanproducesquare-waveoscillation.WhenR1=R4=R,C1=C2=C,theestimationformulaofoscillationfrequencyisasfollows:f1/RC.TheoscillationperiodTRC.Figure2.SymmetricalSquare-waveOscillatorIIISimpleself-excitedMultivibratorThefigureshowsasimplenongateself-excitedmultivibratorexperimentalcircuit.Itiscomposedofnon-gateoscillatorIC1,IC2,inverterIC3,redandgreenlight-emittingdiodesandpowersupplysystemGB.IC1andIC2aretheswitchinglinksoftheoscillator.R1andCtimingcircuitsproducedelaypositivefeedbacksignalstocontroltheswitchtoturnonandoffperiodically,sothatIC2outputsrectangularwave.TheinverterIC3makestheredandgreenLEDsandtheoscillatorflashalternately.Figure3.Simpleself-excitedmultivibratorIVCircuitofCrystalOscillatorandFrequencyDividerFigure4.CircuitofCrystaloscillatorandfrequencydividerVFMWirelessMicrophoneWirelessmicrophonesareavailableeverywhereonthemarket,buttheircircuitsareallmadeupofLCoscillatorsorquartzcrystaloscillatorcircuits.Asweallknow,theNANDgatehasthefunctionofmagnificationandphaseinversion.Therefore,aslongasthreeNANDgatesareconnected,aringoscillatorisformed.CoupledwiththeFMcircuit,itcanalsobemadeintoawirelessmicrophone.Figure5.FMwirelessmicrophone74LS04isaTTLintegratedcircuitwithsixsingle-inputNANDgates.Theauthorusesthreeofthemtomakeanoscillator.Whenthesupplyvoltageis5V,theoscillationfrequencyisabout90mhz.Whenthepowersupplyvoltagedecreases,thefrequencydecreases;whenthesupplyvoltageincreases,thefrequencyalsoincreases.Ofcourse,itsoscillationamplitudewillalsochange,buttheeffectisnotsignificant.Inthisway,theauthorusesthemethodofchangingthepowersupplyvoltagetochangethefrequency(thatis,toachievefrequencymodulation).ThespecificmethodistousetheoutputofBA328,anaudioamplifierintegratedcircuit,asitspowersupply.BA328isanamplifyingcircuitofrecordinghead.Whenitisusedfortapesignalcompensationandequalization,anRCseriesparallelnetworkshouldbeconnectedbetweenthefirstandthesecondpins,butitisusedforlinearamplification,soonlya100kw-130kwresistorisneeded.Thevoltageoftheoutputterminal(pin)ofBA328shouldbeequaltoone-halfofthevoltageofthepin(powersupply).Ifthepowersupplyvoltageis12V,thereshouldbea6Voutput.Ifitisnotcorrect,theresistanceshouldbeadjusted.Inaddition,the1kWresistorinthefigureisusedtoadjustthemagnification.Ifitisreduced,thegainwillbeincreased.Whenspeakingtoanelectretmicrophone,thevoltageattheoutput(PIN)canchangerapidlyfrom5.8vto6.2V.Thisvoltageissenttothefootof74LS04tomakeitgenerateFMsignal,whichisamplifiedandisolatedbythefourthNANDgateandsenttotheantenna.FAQWhatis74LS04?74LS04isamemberof74XXYYICseries.The74-seriesaredigitallogicintegratedcircuits.74LS04IChassixNOTgates.TheseNOTgatesperformInvertingfunction.HencenameHEXINVERTINGGATES.Whatisthefunctionofic74ls04?74LS04HexNOTGateIC.74LS04isa2inputquadruple8-bitNOTgateIC.InverterinlogicconvertersisanelectronicsdevicewhosebasicfunctionsaretoinverttheincominglogicweatheritisHIGHorLOW.TheyarealsoknownasNOTgates.Whatisahexinverter?Ahexinverterisatypeofanintegratedcircuitthatcontainssixinverters.Manysophisticateddigitaldevicesuseinverters,includingmultiplexers,decoders,andstatemachines.Aninvertercircuitsmainfunctionistooutputthevoltagerepresentingtheoppositeleveltoitsinput.WhyisNOTgatecalledaninverter?ANOTgate,oftencalledaninverter,isanicedigitallogicgatetostartwithbecauseithasonlyasingleinputwithsimplebehavior.ANOTgateperformslogicalnegationonitsinput.Inotherwords,iftheinputistrue,thentheoutputwillbefalse.Description74LS04containssixindependentgateseachofwhichperformsthelogicINVERTfunction.Theoutputsignalsofthesixinvertersareoppositetotheinputsignals.Theinvertercanreversethephaseoftheinputsignalby180degrees.Thiscircuitisusedinanalogcircuits,suchasaudioamplifier,clockoscillator,etc.Inverterisoftenusedinelectroniccircuitdesign.74LS04-HEXInverter-TruthTableExampleCatalogDescriptionCADModelsFeaturesApplicationPinoutCircuitDiagramPackageParametersElectricalCharacteristicsProductComplianceComponentDatasheetProductManufacturerFAQOrdering&QuantityCADModels74LS04FootprintFeaturesSupplyvoltagerange:+4.75Vto+5.25VMaximumsupplyvoltage:+7VMaximumcurrentallowedtodrawthrougheachgateoutput:8mATotallyleadfreeTTLoutputsMaximumRiseTime:15nsMaximumFallTime:15nsOperatingtemperature:0Cto70CApplication▪Indifferentlogiccircuit▪Indifferentservers▪Indifferentstoragemoduletostoredata▪Indifferentdigitalreluctancescircuitsandinstruments▪IndifferentnetworkingsystemsPinoutPinNumberDescriptionINPUTOFINVERTINGGATES11A-INPUTofGATE132A-INPUTofGATE253A-INPUTofGATE394A-INPUTofGATE4115A-INPUTofGATE5136A-INPUTofGATE6SHAREDTERMINALS7GND-Shouldbeconnectedtoground14VCC-ShouldbeconnectedtopositivevolatgeOUTPUTOFINVERTINGGATES21Y-OUTPUTofGATE142Y-OUTPUTofGATE263Y-OUTPUTofGATE384Y-OUTPUTofGATE4105Y-OUTPUTofGATE5126Y-OUTPUTofGATE6CircuitDiagramPackageParametersTechnologyFamilyLSVCC(Min)(V)4.75VCC(Max)(V)5.25Channels(#)6IOL(Max)(mA)8IOH(Max)(mA)-0.4ICC(Max)(uA)33InputtypeBipolarOutputtypePush-PullFeaturesHighspeed(tpd10-50ns),InputclampdiodeDatarate(Mbps)70ElectricalCharacteristicsProductComplianceECCNEAR99USHTS8542390001ComponentDatasheetDatasheet74LS04DatasheetProductManufacturerTexasInstrumentsInc.(TI)isanAmericantechnologycompanythatdesignsandmanufacturessemiconductorsandvariousintegratedcircuits,whichitsellstoelectronicsdesignersandmanufacturersglobally.ItsheadquartersareinDallas,Texas,UnitedStates.TIisoneofthetoptensemiconductorcompaniesworldwide,basedonsalesvolume.TexasInstrumentssfocusisondevelopinganalogchipsandembeddedprocessors,whichaccountsformorethan80%oftheirrevenue.TIalsoproducesTIdigitallightprocessing(DLP)technologyandeducationtechnologyproductsincludingcalculators,microcontrollersandmulti-coreprocessors.Todate,TIhasmorethan43,000patentsworldwide.FAQWhatis74LS04?74LS04isamemberof74XXYYICseries.The74-seriesaredigitallogicintegratedcircuits.74LS04IChassixNOTgates.TheseNOTgatesperformInvertingfunction.HencenameHEXINVERTINGGATES.Whatisthefunctionofic74ls04?74LS04HexNOTGateIC.74LS04isa2inputquadruple8-bitNOTgateIC.InverterinlogicconvertersisanelectronicsdevicewhosebasicfunctionsaretoinverttheincominglogicweatheritisHIGHorLOW.TheyarealsoknownasNOTgates.Whatisahexinverter?Ahexinverterisatypeofanintegratedcircuitthatcontainssixinverters.Manysophisticateddigitaldevicesuseinverters,includingmultiplexers,decoders,andstatemachines.Aninvertercircuitsmainfunctionistooutputthevoltagerepresentingtheoppositeleveltoitsinput.WhyisNOTgatecalledaninverter?ANOTgate,oftencalledaninverter,isanicedigitallogicgatetostartwithbecauseithasonlyasingleinputwithsimplebehavior.ANOTgateperformslogicalnegationonitsinput.Inotherwords,iftheinputistrue,thentheoutputwillbefalse.Whatarethe7basiclogicgates?Therearesevenbasiclogicgates:AND,OR,XOR,NOT,NAND,NOR,andXNOR.TheANDgateissonamedbecause,if0iscalledfalseand1iscalledtrue,thegateactsinthesamewayasthelogicalandoperator.ThefollowingillustrationandtableshowthecircuitsymbolandlogiccombinationsforanANDgate.

IntroductionAcircuitordevicethatchangesthephaseofasignalby180,asrequiredforfeedingapush-pullamplifierstagewithoutusingacouplingtransformer,orforchangingthepolarityofapulse;atriodeiscommonlyusedasaphaseinverter.Alsoknownasinverter.Thefollowingisanintroductionto74LS04andothersimilarICchips.CatalogIntroductionI74LS04VS.74LS141.1BriefIntroduction1.2Differencebetween74LS04and74LS14II74LS04VS.74LS08III74LS04VS.74HC04IV74LS04VS.54LS04FAQOrdering&QuantityI74LS04VS.74LS141.1BriefIntroductionBoth74LS04and74LS14arenotgatesofthe74series.74LS04isaHexInverter.74LS14isaHexSchmidttrigger.The74LS04gatecircuithasathresholdvoltage.Whentheinputvoltagerisesfromthelowleveltothethresholdvoltage,ordecreasesfromthehighleveltothethresholdvoltage,theconditionofthecircuitwillchange.74LS14isaSchmidttrigger.Itisaspecialgatecircuit,whichisnotcompatiblewiththesimplegatecircuit.Schmidttriggerhastwothresholdvoltages(positivethresholdvoltageandnegativethresholdvoltage).1.2Differencebetween74LS04and74LS14◾Output:Theoutputof74LS04and74LS14arethesame.Ifthesamemanufacturer,theoutputparametersarethesame.◾Input:Thedifferencebetweenthetwoisthattheinputisnotthesame.74LS04inputisTTLlevel,while74LS14inputisSchmidtinput(withhysteresischaracteristics).Becausetheinputisdifferent,theapplicationofthetwochipsisalsodifferent.74LS04ismostlyusedfornoncontrolofgeneraldataontheboard,while74LS14isgenerallyusedforsignalshapingorsignalbufferingofcriticalsignals.Inmostcases,74LS14canreplace74LS04.II74LS04VS.74LS08The74LS08devicecontains4independent2-inputANDgates.Thelogicfunctionexpressionof74LS08is:Y=ABorY=/(A+B),positivelogic.74LS08iscommonlyusedindigitalcircuitsystems.74LS0474LS08VCC(Min)(V)4.754.75VCC(Max)(V)5.255.25LogiclevelTTLTTLPin/Package14PDIP,14SO,14SOIC,14SSOPPDIP14,SOIC14,SOP14,SSOP14III74LS04VS.74HC0474HC04isahexinverterofCMOScircuit,andtheworkingvoltageis2V-6V.Both74LS04and74HC04areinverters,butLSstandsforlow-powerSchottkyandHCishigh-speedCOMS.LSisslightlyfasterthanHC.LSadoptsTTLlevel.HCisCMOSlevel.74HC04iseasytounderstand.Inputlowlevel,outputhighlevel.Inputhighlevel,outputlowlevel.74LS04containssixindependentgateseachofwhichperformsthelogicINVERTfunction.Theoutputsignalsofthesixinvertersareoppositetotheinputsignals.Theinvertercanreversethephaseoftheinputsignalby180degrees.Thiscircuitisusedinanalogcircuits,suchasaudioamplifier,clockoscillator,etc.IV74LS04VS.54LS0454LS04containssixindependentinverters.Itischaracterizedforoperationoverthefullmilitarytemperaturerangeof-55℃to125℃.74LS0454LS04TechnologyFamilyLSLSVCC(Min)(V)4.754.5VCC(Max)(V)5.255.5Bits(#)66Voltage(Nom)(V)55F@NomVoltage(Max)(Mhz)3535ICC@NomVoltage(Max)(mA)0.0330.033tpd@NomVoltage(Max)(ns)2222IOL(Max)(mA)88IOH(Max)(mA)-0.4-0.4SchmittTriggerNoNoRatingCatalogMilitaryOperatingTemperatureRange(C)0to70-55to125Pin/Package14PDIP,14SO,14SOIC,14SSOP14CDIP,14CFP,20LCCCFAQWhatis74LS04?74LS04isamemberof74XXYYICseries.The74-seriesaredigitallogicintegratedcircuits.74LS04IChassixNOTgates.TheseNOTgatesperformInvertingfunction.HencenameHEXINVERTINGGATES.Whatisthefunctionofic74ls04?74LS04HexNOTGateIC.74LS04isa2inputquadruple8-bitNOTgateIC.InverterinlogicconvertersisanelectronicsdevicewhosebasicfunctionsaretoinverttheincominglogicweatheritisHIGHorLOW.TheyarealsoknownasNOTgates.Whatisahexinverter?Ahexinverterisatypeofanintegratedcircuitthatcontainssixinverters.Manysophisticateddigitaldevicesuseinverters,includingmultiplexers,decoders,andstatemachines.Aninvertercircuitsmainfunctionistooutputthevoltagerepresentingtheoppositeleveltoitsinput.WhyisNOTgatecalledaninverter?ANOTgate,oftencalledaninverter,isanicedigitallogicgatetostartwithbecauseithasonlyasingleinputwithsimplebehavior.ANOTgateperformslogicalnegationonitsinput.Inotherwords,iftheinputistrue,thentheoutputwillbefalse.DescriptionTIP122isanNPNDarlingtontransistor.Darlingtontransistormeanstherearetwotransistorinonepackageconnectedtoincreasegainatoutput.TIP122transistorhasalotofgoodfeatureslike5Acollectorcurrent,maxemitter-basevoltageis5V,maxcollectordissipationis65watt,minimummaximumcurrentgainisequalto1000.Thistransistorisdesignedtouseasaswitchandforamplificationpurposes.CatalogDescriptionTIP122ComponentDatasheetTIP122PinoutTIP122FeaturesTIP122ApplicationsTIP122EnvironmentalandExportClassificationsTIP122ParametersWorkingofTIP122HowtoSafelyLongRuninaCircuitDarlingtonCircuitSchematicWheretouseTIP122HowtouseTIP122TIP122ReplacementandEquivalentComplementofTIP122TIP122AlternativeNPNTransistorsTIP122SameFamilyTransistorsAdditionalResourcesFAQOrdering&QuantityTIP122ComponentDatasheetResourceTypeLinkDatasheetsTIP120-22TIP120-22,TIP125-27TO220B03PkgDrawingPCNObsolescence/EOLMultipleDevices19/Jun/2009MultDeviceEOL19/May/2017PCNDesign/SpecificationHeatsinkDesingChanges24/Feb/2014Logo17/Aug/2017PCNPackagingTapeandBox/ReelBarcodeUpdate07/Aug/2014MultDevices24/Oct/2017HTMLDatasheetTO220B03PkgDrawingTIP122PinoutPinNumberPinNameDescription1BaseItgovernsthebiasingofthetransistorandworkstoturnONorOFFthetransistor.2CollectorCurrentflowsinthroughcollector,usuallyconnectedtoload3EmitterCurrentcomesoutbytheemitter,itisusuallylinkedtoground.TIP122FeaturesHighDCCurrentGainhFE=2500(Typ)@IC=4.0AdcCollectorEmitterSustainingVoltage@100mAdcVCEO(sus)=60Vdc(Min)TIP120,TIP125=80Vdc(Min)TIP121,TIP126=100Vdc(Min)TIP122,TIP127LowCollectorEmitterSaturationVoltageVCE(sat)=2.0Vdc(Max)@IC=3.0Adc=4.0Vdc(Max)@IC=5.0AdcMonolithicConstructionwithBuiltInBaseEmitterShuntResistorsPbFreePackagesareAvailable*TIP122ApplicationsAudioAmplifierAudioAmplifierStagesAudioPreamplifiersSwitchingLoadsUnder5ATIP122EnvironmentalandExportClassificationsAttributeDescriptionRoHSStatusRoHSnon-compliantMoistureSensitivityLevel(MSL)1(Unlimited)TIP122ParametersBaseProductNumberTIP122CategoryDiscreteSemiconductorProducts-Transistors-Bipolar(BJT)-SingleCollector-BaseVoltageVCBO100VConfigurationSingleCurrent-Collector(Ic)(Max)5ACurrent-CollectorCutoff(Max)500ADCCurrentGain(hFE)(Min)@Ic,Vce1000@3A,3VDescriptionTRANSNPNDARL100V5ATO220ABDetailedDescriptionBipolar(BJT)TransistorEmitter-BaseVoltageVEBO5VFactoryPackQuantity200Height9.4mmLength10.67mmManufacturerONSemiconductorManufacturerProductNumberTIP122MaximumCollectorCut-offCurrent200uAMaximumDCCollectorCurrent5AMaximumOperatingTemperature+150CMinimumOperatingTemperature-65CMountingStyleThroughHoleMountingTypeThroughHoleOperatingTemperature-65C~150C(TJ)PackagingBulkPartStatusObsoletePower-Max2WProductTypeDarlingtonTransistorsSeriesTIP122SubcategoryTransistorsTransistorTypeNPN-DarlingtonUnitWeight0.042329ozVceSaturation(Max)@Ib,Ic4V@20mA,5AVoltage-CollectorEmitterBreakdown(Max)100VWidth4.83mmWorkingofTIP122Thistransistorisrecognizedforitshighercurrentgainwhichis1000andhighercollectorcurrent5amperes,therefore,itisusuallyusedtoswitchThistransistorhaslessbaseandemitterVoltageofthemerely5VhenceforthcanbeeffortlesslyorganizedbyaLogicinstrumentsuchasamicrocontrollerThoughprecautionhastobeengagedtocheck,ifthelogicinstrumentscanfontupto120mA.ThoughTIP122hasextraordinarycurrentatcollectorandcurrentgain,itisimpartiallymodesttoswitchtheexpedientmeanwhileithasanEmitter-Basevoltage(VBE)oftheonly5VandIbofmerely120mA.HowtoSafelyLongRuninaCircuitTogetbetterperformancewiththisdarlingtiontransistorwesuggesttoalwaysstayingbelowitsmaximumratings.Donotoperateitincircuitsusingmorethan100V.Donotprovideloadmorethan5A.Alwaysuseasuitablebaseresistortoproviderequiredcurrentatitsbase.Useasuitableheatsinktosaveitfromoverheatinganddostoreoruseitintemperaturebelow-65centigradeandabove+150centigrade.DarlingtonCircuitSchematicWheretouseTIP122Thistransistorisknownforitshighcurrentgain(hfe=1000)andhighcollectorcurrent(IC=5A)henceitisnormallyusedtocontrolloadswithhighcurrentorinapplicationswherehighamplificationisrequired.ThistransistorhasalowBase-EmitterVoltageoftheonly5VhencecanbeeasilycontrolledbyaLogicdevicelikemicrocontrollers.Althoughcarehastobetakentocheckifthelogicdevicecansourceupto120mA.So,ifyoulookingforatransistorthatcouldbeeasilycontrolledbyaLogicdevicetoswitchhighpowerloadsortoamplifyhighcurrentthenthisTransistormightbeanidealchoiceforyourapplication.HowtouseTIP122AlthoughTIPhashighcollectorcurrentandcurrentgain,itisfairlysimpletocontrolthedevicesinceithasanEmitter-Basevoltage(VBE)ofonly5Vandbasecurrentofonly120mA.InthebelowcircuitIhaveusedtheTIP122tocontrola48Vmotorwhichhasacontinuouscurrentofabout3A.Thecontinuescollectorcurrentofthistransistoris5Aandourloadconsumesonly3Awhichisfine.Themaximumbasecurrentisabout120mA,butIhaveusedhighvalueof100ohmresistortolimititto42mA.Youcanuseevena1Kresistorifyourcollectorcurrentrequirementisless.Thepeak(pulse)currentofthistransistoris8Asomakesureyourmotordoesnotconsumemorethanthat.Thisisjustamodelcircuitdiagramthatshowstheworkingonthistransistoritcannotbeusedassuch.So,similarlyyoucancontrolyourloadinthesameway.TIP122ReplacementandEquivalentTIP132,TIP102,NTE261,NTE263,2N6045,2N6045G,2SD2495,BDT65B,2N6532,BDT63B,BDW43,TIP142T(PinconfigurationofsometransistorsmaydifferfromTIP122,checkpinconfigurationbeforereplacinginacircuit)TIP22isadarlingtionpairtransistormanufacturedinTO-220package,itsagoodtransistortouseasahighgainswitchoramplifier.ComplementofTIP122ThecomplementoftheTIP122transistorisTIP127.TIP122AlternativeNPNTransistorsBC547,BC548,BC549,BC636,BC639,2N2369,2N3055,2N3904,2N3906,2SC5200TIP122SameFamilyTransistorsNPNFamilytransistorsareTIP120,TIP121,TIP122,andPNPFamilyareTIP125,TIP126,TIP127(PNP)AdditionalResourcesAttributeDescriptionOtherNamesTIP122FSTIP122FS-NDTIP122FS-NDRTIP122OSFAQWhatisTIP122transistor?TIP122TransistorisanNPNDarlingtontransistor....TIP122Darlingtontransistorhasalotofgoodfeatures,like5Acollectorcurrent,maximumemitter-basevoltageis5V,maximumcollectordissipationis65watt,andsoon.Thistransistorismanufacturedtouseasaswitchandforamplificationpurposes.WhattypeofpackageisusedforTIP122transistor?TheTIP122isasiliconNPNDarlingtontransistorinaTO-220typepackagedesignedforgeneralpurposeamplifierandlow-speedswitchingapplications.HowdoyoutestatransistorTIP122?Harvino.Theproperwaytotestistosetyourdmmtodiodetest(usually2ksettingontheohmscale).Transistorshavethreelegs;anemitter,abase,andacollector.HowdoIknowifmytransistorisblown?Connectthebaseterminalofthetransistortotheterminalmarkedpositive(usuallycolouredred)onthemultimeter.Connecttheterminalmarkednegativeorcommon(usuallycolouredblack)tothecollectorandmeasuretheresistance.Itshouldreadopencircuit(thereshouldbeadeflectionforaPNPtransistor).Whatarethe3terminalsofatransistor?Abipolartransistorhasterminalslabeledbase,collector,andemitter.Asmallcurrentatthebaseterminal(thatis,flowingbetweenthebaseandtheemitter)cancontrolorswitchamuchlargercurrentbetweenthecollectorandemitterterminals.HowtomakeminiaudioamplifieruseTIP122/TIP127transistor?