You are on page 1of 14

KnowledgeforTechnology

20DEC2013Leaveacomment
bySMNawaz inCircuitDesign Tags:12VDCmotor,bangladesh,Electronics,motor,speed
Thiscircuitisdesignedforindicatingoverspeedanddirectionofrotationofthemotorusedinminihand
tools,waterpumpmotors,toysandotherappliances.A12VDCmotor(M1)iscoupledtotherotating
partoftheappliancewithasuitablexingarrangement.Whenthemotorrotates,itdevelopsavoltage.
ThisoverspeedindicatorisbuiltaroundoperationalamplierCA3140(IC1).Setthereferencevoltage
(dependingonthedesiredspeed)byadjustingpresetVR1atpin2ofIC1.Whenthevoltagedevelopedat
pin3ofIC1ishigherthanthereferencevoltageatpin2,outputpin6ofcomparatorIC1goeshigh
tosoundpiezobuzzerPZ1andlightupLED3.TherotationindicatorcircuitisbuiltaroundANDgate
74LS08(IC2).Pin2ofgateN1goeshighwhenthemotorrotatesinforwarddirection,whilepin1of
gateN1ispulledhighviaresistorR2.Whenbothpins1and2arehigh,outputpin3ofgateN1
goeshightolightupLED1.Similarly,pin5ofgateN2goeshighwhenthemotorrotatesinreverse
direction.Whenbothpins4and5arehigh,outputpin6ofgateN2goeshightolightupLED2.
Reference
ElectronicsForYou.
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
1 of 14 9/3/2014 9:40 PM
20MAR2013Leaveacomment
bySMNawaz inCircuitDesign Tags:bangladesh,BuckConverter,Electronics,LED,LEDDriver,
Power,PWM
PoormansBuckisasimple,constantcurrenthighpowerLEDdrivercapableofdriving350mAto1Aof
outputcurrent.Itiscompact(footprintis1x1.5inches)andeasytobuild,yetveryversatile.
Inputpowersupplyvoltagecanbeanywherebetween5to20V(mustbehigherthantheconnected
LEDsforwardvoltagedrop).Upto5LEDscanbeconnectedinseries,andbyparallelconnectingthe
seriesconnectedLEDs,upto18WtotalofLEDscanbedriven(with20Vpowersupply).
Outputcurrentiscongurable;350mA,700mA,or1Ausingincludedparts.Inboardpotentiometercan
lowertheoutputcurrentdowntoabout9%levelwhichcanbeusedasadimmer.Fulldimmingcontrol
canalsobedoneviathePWMinput,makingPoormansBuckaperfectbuildingblockforArduinoor
othermicrocontrollerprojects.
Reerence:htp://www.instructables.com/id/PoormansBuck/
Buckledcircuit
Inductorswitchmode(buck)converterforhighenergyeciency.
Widesupplyvoltagerangeof5to20V.GreatwithbateriesaswellasACadaptors.
Cyclebycycle,trueconstantcurrentcircuit
Congurableoutputcurrentupto1A
Upto15Wmaximumoutputpower.(atsupplyvoltage20Vwithve3WLEDsconnected)
Currentcontrolpotentiometer(trimstheoutputcurrentdowntoabout9%)
Currentcontrolcanbeusedasabuiltindimmer
Outputshortcircuitprotection
PWMcontrolinputcontrollableviaexternalmicrocontrollerincludingArduino.
Compactdesignonly1x1.5x0.5inches(excludingthepotshaft)
BuckLEDDriverComponent
CircuitDesign
ThecircuitisbuiltaroundaverycommondualcomparatorIC:LM393usingbuckconvertertopology.
TheoutputLEDcurrentowsthroughR10andR11(currentsensingresistors).Theresultingvoltageis
proportionaltothecurrentaccordingtotheOhmsLaw.Thisvoltageiscomparedtothereference
voltagebyacomparator.AstheQ3turnson,currentowsthroughL1,LEDs,andthecurrentsensing
resistors.Inductordoesnotallowcurrenttoshootupimmediately,sothecurrentincreasesgradually.As
thecurrentgetshigher,thevoltageatthecomparatorsnegativeinputpinincreasesaswell.Whenitgets
higherthanthereferencevoltage,thecomparatortrips,whichturnsoQ3,whichturnsocurrent
owingintotheinductor.
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
2 of 14 9/3/2014 9:40 PM
Nowbecauseinductorischarged,currentdoesntstopowingimmediately.Currentthenows
throughtheSchotkydiodeD3topowertheLEDs.Thiscurrentgraduallydecays,andasthecurrent
decayssodoesthevoltageacrossthecurrentsenseresistors.Eventuallythecomparatoripsbackagain,
andthecyclestartsover.Thismethodofcontrollingcurrentisoftencalledcyclebycyclecurrent
limiting.(Thistruecurrentlimitingalsoworksasabuitinshortcircuitprotection.Shortingtheoutput
doesntharmthecircuit.)
Thiswholecycleabovehappensveryquicklyasfastas500,000timesasecond.(Thisfrequencychanges
dependingonthesupplyvoltageandLEDsforwarddropvoltageandcurrent.Anywherebetween100k
500kHz.)
Thereferencevoltageisgeneratedbyanordinarydiode.Forwardvoltagedropofadiodeisabout0.7V
andstaysrelativelyconstant.ThenpotentiometerVR1trimsthevoltagebecausetheoutputcurrentis
comparedagainstthisvoltage,thisinturncontrolstheoutputcurrent.Therangeofthechangeisabout
11:1or100%9%.Thisispretynarrowcomparedtoarealdimmer,howeveritisquitehandy.
SometimesafterinstallingthelightyourealizethatLEDsaremuchbrighterthanexpected.Thenyoucan
simplytrimthecurrentdownuntilthebrightnessisjustright.
Youcanomitthepotentiometerandreplacewithresistorsifyourprojectdoesntcallforit.
Thebeautyofaswitchmodecontrolleristhatitcontrolstheoutputcurrentwithoutburningthe
excessenergy.Energyfromthepowersupplyisusedonlyasmuchasneededtogettherequiredoutput
current.Someenergyislostinthecircuitduetotheresistanceandotherfactors,butnotthatmuch.A
typicalbuckconverterhaseciencyof90%orhigher.
ThePoormansBuckdoesntgetveryhotwhenoperatingonlygetwarm.Unlikelinearregulators,no
heatsinkingneeded.
References
BuckConverter:htp://en.wikipedia.org/wiki/Buck_converter(htp://en.wikipedia.org
/wiki/Buck_converter)
Comparator:htp://en.wikipedia.org/wiki/Comparator(htp://en.wikipedia.org/wiki/Comparator)
ConguringOutputCurrent
ThePoormansBuckcanbeconguredtodeliveranywherebetween350mAto1Aofoutputcurrent.
CombinationofR2svalueandwetheryouconnectR11,youcanchangetheoutputcurrent.
Herearesamplesofafewcongurations:
OutputCurrent R2Value UseR11?
350mA(1WLED) 10k No
700mA(3WLED) 10k Yes
1A(5WLED) 2.7k Yes
ThecurrentcontrolpotVR1controlstheoutputcurrentfromabout9100%ofthesetcurrent.Soifyou
conguretheunittodeliver1A,youcantrimitdowntoabout90mAjustbyturningthepot.Thiscanbe
usedasadimmer(althoughthedimmingrangeissomewhatlimited).
PWMInput
Thebasicoperationofthiscircuitcanbedonewithjustonecomparator.Howeverthemostpopular
comparatorIC(LM393)hastwocomparatorsinit.Soratherthanletingoneofthecomparatorssiting
doingnothing,IaddedafewextrapartstomakeitPWMcontrollable.thesecondcomparatorinthe
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
3 of 14 9/3/2014 9:40 PM
circuitworksasanANDgatesothatthePWMinputhastobeopen(orlogichigh)fortheoutputLEDs
toturnon.Usuallythispincanbeleftopen(noconnection)andthePoormansBuckwilloperate
withoutPWM.Butwhenyouneedthatextracontrol,youcanconnectArduinoorothermicrocontroller
andcontrolthehighpowerLEDsconnectedtoPoormansBuck.WithArduino,controlisjustaseasyas
usingAnalogWrite()command.Upto6PoormansBuckcanbecontrolledbyoneArduino.
ThisPWMcontrolworkswithinthecurrentlevelsetbythecurrentcontrolpot.Soifyoulowerthe
current,thesame10%PWMlevelcanbedarker,forexample.
ThesourceofthePWMcontrolisnotlimitedtomicrocontrollers.Anythingthatproducevoltage
between0around5Vcanbeusedtoturntheoutputonando.Becreativeusephotoresistors,
timers,logicICsTheupperlimitofPWMfrequencyisabout2kHz,butIthink1kHzwouldbethe
optimum.
ThisPWMinputcanalsobeusedsimplyasaremoteon/oswitch.HowevertheLEDswillbeonwhen
theswitchisopen,andowhenclosedoppositeofusualpowerswitch.
Assemblyisverystraightforward.Allpartsarestandard,otheshelftype.
PartsList
1or2x1ohm1WR10,R11(useonlyonetoget350mA,or500mA(withR2=2.7k)outputcurrent)
1x10ohmR8
2x1kohmR3,R9
3x4.7kohmR1,R4,R7
3x10kohmR2,R5,R6(changeR2to2.7kohmtoget1Aoutputcurrent)
1x10kohmpotentiometerVR1
1x22pF/35VceramiccapacitorC5(optional)
2x0.1uF/35VceramiccapacitorC2,C3(optional)
1x2.2uF/10VelectrolyticcapacitorC1
1x100uF/35VelectrolyticcapacitorC4
1x47100uH/1.2AL1
1xGPN(5551,2222,3904,etc.)Q1
1xGPP(5401,2907,3906,etc.)Q2
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
4 of 14 9/3/2014 9:40 PM
1xPchMOSFET(NTD2955orIRFU9024)Q3
2x1N4148diodeD1,D2
1xSB140or1N5819SchotkydiodeD3
1xLM393dualcomparatorIC1
*Allresistorsare1/8Wor1/4Wcarbonlmunlessotherwisenoted.
Substitutions
InductorL1canbeanywherebetween47to100uH,ratedatleastat1.2A.C1canalsobeanywherefrom
1to10uF.C4canbeassmallas22uF,makingsurethatitsratedatleastat35VDC.
Similarly,Q1andQ2canbealmostanygeneralpurposetypetransistors.Q3canbesubstitutedbyother
PchMOSFETscapableofminimum2Aofdraincurrent,drainsourcevoltageatleast30V,and
gatethresholdlowerthan4V(logicgate).
Assembly
Solderthepartsstartingwiththelowestproleones,inthiscase,IC1.Allresistorsanddiodesare
installedvertically.Becarefulwiththeorientationofpolarizedparts,suchasdiodes,transistors,and
MOSFET.
12JUN2011Leaveacomment
bySMNawaz inCircuitDesign Tags:bangladesh,circuit,infraredsensor,Microcontroller,speed
measurementsystem,speedometer
ADIYGatsometerwithinfraredlightbarriers
Thelightbarriersystemdescribedinthisarticleallowsaccuratemeasurementoftheabsolutespeedof
modelcars,planesandothermovingobjects.Ineducationandtrainingprograms,thesystemformsa
perfectcontactlessspeedometer.Overtoyoutofootballandgolffanstoseewhohasthemeanestball
kickorclubswing.
Features
Speedmeasurementwithinrangeof0.01to999km/h
Speedreadoutinm/sorkm/hon116characterdotmatrixdisplay
Elapsedtimereadout(max.16.777215seconds)
Resolution1s
Lightbarrierdistanceadjustablebetween1and255cm
Opticalalignmentaid
Singleorcontinuousmeasurements
Poweredby9Vbatery
Currentconsumptionapprox.45mA.
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
5 of 14 9/3/2014 9:40 PM
(htp://postimage.org/image/1rllai5no/)
Lightbarrierssystemsarearoundusinmoresituationsthanyouwouldexpect.Unnoticed,theydotheir
jobscanningitemsatthesupermarketcheckout,detectingvehiclesinparkinglots,videotapesinVCRs
orpersonsenteringorleavingbuildings.Usually,infraredlightisemployedbecauseitisinvisibletothe
humaneyeandensuresahighdegreeofimmunityagainstinterferinglightsources.
Whereassimplelightbarriersoperatingwithoutmodulation,liketheslotedlightbarriersthatcheckifa
CDordiskisinsertedinthePC,haverelativelysimplefunctions,theabovementioned
applicationsinparkinglots,garagesandsecuritysystemshavefarmorechallengingrequirementsin
respectofnoiseimmunity.Thesolution,innearlyallcases,istoemploya36kHzcarrier.Thereceivers
arethendesignedtorespondonlytochangesinthefrequency.Amicrocontrollersystemisthenthrown
intoanalysethereceiveroutputsignalandevaluatethelengthofanyinterruption.Thisisdoneto
preventerroneoustriggeringofanalarminthecaseof,say,aninsectyingorcrawlingthroughthe
barrier.
AsillustratedinFigure1,speedmeasurementusingalightbarriermaybeachievedwithjustonesender
andonereceiver.Adisadvantageofthissystemistheriskofinconsistentmeasurementresultsifthe
movingobjecthasanirregularshapecausingmultiple
SeveralinfrareddetectorICshavebeenusedinmanyprojectspublishedinthismagazineoverthepast
fewyears.Oneofthese,theSFH505fromSiemens,hasbecomeakindofstandardcomponentforthis
function.TheSFH505andaotherfunctionallycompatibledevices(includingIS1UdetectorsfromSharp)
arefoundinlotsofequipmentoftheconsumerelectronicsvariety.Althoughthesecomponentsare
versatileandcosteective,theyarelesssuitablefortheprojectwehaveinmind,mainlybecauseofthe
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
6 of 14 9/3/2014 9:40 PM
followingaspects.
Theoutputresponsetimetobeaminterruptionissubjecttotoomanytimetolerancefactors;
Foranacceptablerange,theinfraredlightmaynotbemodulatedallthetime.Pulsesneedtobe
insertedtopreventthecontrolelectronicsfromconsiderablyreducingthereceiversensitivity.
Becauseoftherequiredpauseswithinthemodulatedsignal,reproduciblespeedmeasurementisnot
feasiblemainlybecausebeaminterruption(bytheobject)cannotbedistinguishedfromapause
(insertedbythesystem).
Despitetheextrahardware,thesystemproposedinFigure2isthebeteralternative,ifonlyforitsmuch
higheraccuracyandmorereliablemeasurementresultswhenusedtomeasurethespeedofobjects
passingthroughthebarrier.
Tomakereallifeapplicationoftheabovesystemasexibleaspossible,thedesignallowstheusertoset
upthelengthofthepaththeobjecthastotravelalonginordertointerruptthetwolightbeams.In
practice,thisisdonebyplacingtherstandsecondbarrieratasuitabledistancefromeachother,and
informingthesystemabouttheexactdistancebeforethemeasurementcommences.
Senderandreceiver
TheKodenshiCompanyfromKoreahavedevelopedtwomodules(EmiterPIE310andDetector
PID310)forlightbarrierapplications.Thankstotheirhighdegreeofintegration,thesemodulescontain
allcomponentsnecessaryforalongrangeyetnoiseimmunelightbarriersystem.Fromthedatasheets
(inKorean)wewereabletodistilthefollowingimportantcharacteristics:
IRLEDwithinternalmodulationandassociatedphotodetectorinaseparate,compactcasewithalens
system.
Sizeapprox.1787mm
Range1to8.5m(3to25ft.)
Activelowopencollectoroutput
Controlinputonsender
Highlytolerantofambientlightthankstoopticalltersandinternalmodulation.
Lowcostsensorapplicationsatlargedistances
SuitableforuseinReectionmode
3pinwireconnection
Supplyrequirements5V/5mA(receiver)and5V/15mA(transmiter)
Switchingspeed0.5ms
Halfsensitivityangle+/5degrees
operatingtemperature10to+60C
Themodules,whosepinoutsaregiveninFigure3,areintendedforuseinpapersensors,distance
sensorsinreectionmode,counterandregistrationsystemsorproximitydetectors.
Thesimplicity,relativelylowcostandreliabilityofthecircuittobediscussedismainlyduetothese
readymademodulesfromKodenshi.Themoduleconnectioncablesareavailableasaccessories.They
areessential,however,becauseitisverydiculttosolderwirestothedevicepins.
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
7 of 14 9/3/2014 9:40 PM
Themicrocontroller
Byvirtueofaprogrammedmicrocontroller,thecircuitisrelativelyunclutered.Thecircuitshownin
Figures3and4consistsoftwolightbarriers,adisplayforthespeedreadoutandsystemsetings,four
pushbutonsand,ofcourse,thecentralmicrocontroller.
Alowpower,lowprice,lowpincountmicrocontroller(tousethewordsofPhilips)type87LPC762is
employedhere.Thisdeviceisbasedonthewellestablished8051architecture.Here,itisclockedat6
MHz(1uscycletime),inviewofthecalculationloadandthehightimeresolutionrequiredbythe
system.
Themainfeaturesofthe87LPC762maybefoundinthedatasheet:
2KBytesROM
128BytesRAM
32BytesuserprogrammableEEPROM
2.7to6Vsupplyvoltage
Two16BitTimer/Counter
IntegratedReset
InternalRCoscillatorforoptionaluse
20mAdrivecapacityatallportpins
upto18I/Opins
2analoguecomparators
I2Cinterface
FullduplexUART
Serialincircuitprogrammable
BecausetherearenotenoughI/OpinsavailablefordirectconnectionofthepushbutonsandtheLCDin
8bitmode,somepinshavebeengivenadoublefunctionbycleverprogramming.Pushbuton
connections+andshareaportpinlinewiththedisplaycontrollines.Forthedisplaycontrolthese
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
8 of 14 9/3/2014 9:40 PM
pinsareprogrammedaspushpullstages,whileinputonlymodeisbrieyselectedwhenpollingthe
pushbutonsforactivity.ResistorsR1andR2limittheshortcircuitcurrentwhenapushbutonispressed
atthesametimethedisplayisbeingcontrolled.
Thelightbarrierreceiveroutputsaredirectlyconnectedtothemicrocontrollerinputs.Theinternal
pullupresistorsareusedbecausethelightbarrierhasanopencollectoroutput.
Circuitandconstruction
Thedisplayisanalphanumericdotmatrixtypewithonelineof16characters.Thisversionshouldbe
widelyavailablebecauseitrepresentsakindofindustrystandard,includingtheuseoftheHitachi
HD44780LCDcontrolleranditscommandset.Thedisplayrequiresasinglesupplyvoltageof+5V(no
additional5V!).Importantthingstowatchoutforarethepinoutandwithittheorderofthe
connections(upperleftcorner),aswellastheinternalRAMaddressallocation.OnlyLCDmoduleswith
amultiplexrateof1/16havetherightaddressorder00,01,02,03,04,05,06,07,40,41to47.Although
moreinformationhastobedisplayedthancanbetedonasingleline,a1linedisplayisusedinstead
ofa4linetypebecausetheuserispromptedtopressabutontoviewtheinformation.Thedisplay
contrastisadjustedbypresetP1.TurnP1acrossitsfulltravelifnocharactersaredisplayedwhenthe
circuitisrststartedandyouaresurethatnoconstructionerrorshavebeenmade.
Asusualthecircuitispoweredviaa7805xedvoltageregulator.
Withsimplicityandcostinmind,thesenderandreceiverareconnectedtotheprocessingelectronicsvia
asingle9waysubDconnector.ThelightbarrierwireshavetobeconnectedinaccordancewithFigure3.
Inthisapplication,thesendercontrolinputsarenotusedtheyareeithernotconnectedorhardwired
toground.
Practicaluse
Toenablethecontrollertorespondinstantlytochangesatthelightbarrieroutputs,themeasurement
routineisinterruptdriven.Asaconsequence,portpinsP1.3andP1.4arenotconstantlypolledbythe
software.Instead,apieceoflogicinsidethemicrocontrollerissetuptocontrolthetimemeasurement.
Theadvantageofthisarrangementisthatinadditiontoinstantreactiontoevents,thesoftwarehas
sucientsparetimeforotherchoreslikedrivingthedisplayandscanningthepushbutonsforactivity.
ThisisnotpossiblejustlikethatandusinganyinputpinP1.3andP1.4arespeciallypreparedto
handlesuchexactingjobs.
Atafallingpulseedge,theinternalprogramhaltsinstantlyandjumpstoaspecialroutinewritento
handlethetaskonhand.
Anyspeedmeasurementstartswhentherstlightbeamisinterrupted.Instantly,the16bitcounter
insidethemicrocontrollerisstartedatacountrateof1us.Overowsthatoccurareaddedinan8bit
register,allowingamaximumperiodof16.777215secondstobemeasured.Theobjectvelocity,v,isthen
computedbythemicrocontrollerusingthesimpleequationv=d/tusingthedistance,d,betweenthe
barriersandthetimerstate,t.
Usingthedefaultsetings,thesoftwareassumesabarrierdistanceof0.1m,areadoutinm/sand
continuousasthemeasurementmode.
Tosimplifythecalculations,theresolutionislimitedtotwodecimals,whichshouldbesucientinmost
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
9 of 14 9/3/2014 9:40 PM
ifnotallcases.Ifyourequirebeteraccuracy,getoutyourpocketcalculatorandusetheindicated
countervalueandthelightbarrierdistance.Youshould,however,alwaystakethe0.5msdelayofthe
lightbarriersintoaccount.Note,however,thatthisdelayisaboutequalonbothreceiverssothatshould
notbeaproblem.
Moreimportantthantweakingthenumbersbehindthedecimalpoint(orcomma,inthiscase)istomake
surethatthesendersandreceiversarecorrectlyalignedandproperlysecured,whiletheirdistance
remainseasilyadjustableforthespeedmeasurementyouwanttoperform.
Withthebarriersinstalled,connectedupandthesoftwareswitchedon,thesoftwaretakesover,guiding
youthroughamenuinwhichvariousoptionsmaybeselected.
MODEkey
Pressthiskeytostepthroughthefourmenuitems,asfollows
TESTDISTANCEMODE
SPEEDTEST
TESTcausesthestateofthelightbarrierreceiverstobedisplayed.ThemessageOKmeanshighlevel
measuredandindicatesthatthelightbeamfromthesenderisbeingpickedup.ALowindicatesthatthe
beamiseitherinterruptedornotproperlyaimedatthereceiver.Beforeanymeasurementisstarted,both
outputsshouldagOK.Afteraresetorafterthecircuitisswitchedon,thismenualwaysappearsrst.
ItshouldbenotedthataunconnectedlightbarrierreceiverwillalsocauseOKtobedisplayed,simply
becauseoftheinternalpullupresistorsatthecontrollerinputs.Therefore,asasecuritycheck,makea
habitofinterruptingthelightbeammanuallywhilewatchingthedisplayindication.
Anothersourceoferrorsisthelobeshapeofthelightbeam,whichmayreachtheotherreceiverwhen
thebarriersareplacedatarelativelysmalldistance.
WhenDISTANCEisdisplayed,thevaluetobeprocessedbythemicrocontrollerisenteredin
centimetres.Thedefaultvalueis10cm.Asamaterofcourse,youhavetomakesurethatthedisplayed
valueistherealdistancebetweenthelightbarriers.
MODEallowsyoutoselectthemeasurementmode:SINGLEperformsjustonemeasurement.Whenthe
barriersaretriggeredagain,nonewmeasurementisperformed.
CONTINUOUSenablesresultstoberefreshedbyanynewmeasurement.Thecurrentmeasuredvalueis
alwaysoverwriten.
SPEEDindicatesthemeasuredvelocityoftheobject.Threeunitsareavailabletochoosefrom:m/s,km/h
andseconds.Themaximumtimeis16.777215seconds.ExceedingthisvaluecausesERRORtobe
displayed.
STARTkey
ThispushbutonisonlyreadinSINGLEmode.Itlaunchesameasurementwhenneitherofthelight
barriersisinterrupted.ThedisplaythenindicatesREADY.Ifabarriersfailstodetectasignal,the
softwarejumpstoTEST,wheretheusercansee
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
10 of 14 9/3/2014 9:40 PM
whatswrong.Oncetheproblemissolved,anotherpressoftheSTARTkeycausestheSPEEDor
DISTANCEmenutoappear.
+andkeys
Intraditionalfashionthesetwokeysareusedtoselectdierentparametersintheindividualmenus.In
theDISTANCEmenu,forexample,thekeysallowvaluesbetween1cmand255cmtobesetup.
IntheMODEmenu,bothkeyshavethesamefunction,changingbetweenSINGLEandCONTINUOUS.
IntheSPEEDmenu,nally,the+andkeysallowyoutochoosebetweenareadoutinm/s,km/hor
seconds(thelaterfortheconvenienceofpocketcalculatorusers).
Components
Resistors:
R1,R2=4kOhm7
R3=10kOhm
R4,R5=100kOhm
P1=10kOhmpreset
Capacitors:
C1=10F16V
C2C5=100nF
C6,C7=15pF
Semiconductors:
IC2=7805
IC3=87LPC762,programmed,downloadfromRapidsharepassword01020641
Speed_Measurement_System_Hex_File(htps://rapidshare.com/les/3021917140
/Speed_Measurement_System.rar)
Miscellaneous:
K1=9waysubDsocket(female),angledpins,PCBmount
K2=14waySILpinheader
S1S4=pushbuton
S5=on/oswitch
X1=6MHzquartcrystal
LCDdotmatrixdisplay,116characters,44780compatible
2combinationsofIRSenderPIE310andIRreceiverPID310
4moduleconnectingcables
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
11 of 14 9/3/2014 9:40 PM
Reference
Dotmatrixdisplay:
htp://www.datamodul.de/displaytechnik/lcdalpha/bt_11608.htm(htp://www.datamodul.de
/displaytechnik/lcdalpha/bt_11608.htm)
htp://electronicassembly.de/(htp://electronicassembly.de/)
htp://www.schukat.com(htp://www.schukat.com)(DisplayFa.Sharp)
Microcontroller:
wwwus.semiconductors.philips.com/mcu/
Lightbarrierdatasheets:
htp://www.kodenshi.com/pdfs/g1.pdf(htp://www.kodenshi.com/pdfs/g1.pdf)
Electro032002
10JUN2011Leaveacomment
bySMNawaz inCircuitDesign Tags:bangladesh,circuit,Microcontroller,Waterlevelcircuit,water
levelindicator
MostwaterlevelindicatorsforwatertanksarebaseduponthenumberofLEDsthatglowtoindicatethe
correspondinglevelofwaterinthecontainer.Hereitispresentasadigitalversionofthewaterlevel
indicator.
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
12 of 14 9/3/2014 9:40 PM
Itusesa7segmentdisplaytoshowthewaterlevelinnumericformfrom0to9.Thecircuitworkso
5Vregulatedpowersupply.ItisbuiltaroundpriorityencoderIC74HC147(IC1),BCDto7segment
decoderICCD4511(IC2),7segmentdisplayLTS543(DIS1)andafewdiscretecomponents.Duetohigh
inputimpedance,IC1senseswaterinthecontainerfromitsnineinputterminals.Theinputsare
connectedto+5Vvia560kiloohmresistors.Thegroundterminalofthesensormustbekeptatthe
botomofthecontainer(tank).IC74HC147hasnineactivelowinputsandconvertstheactiveinputinto
activelowBCDoutput.TheinputL9hasthehighestpriority.TheoutputsofIC1(A,B,CandD)are
fedtoIC2viatransistorsT1throughT4.Thislogicinverterisusedtoconverttheactivelowoutputof
IC1intoactivehighforIC2.TheBCDcodereceivedbyIC2isshownon7segmentdisplayLTS543.
ResistorsR18throughR24limitthecurrentthroughthedisplay.Whenthetankisempty,alltheinputs
ofIC1remainhigh.Asaresult,itsoutputalsoremainshigh,makingalltheinputsofIC2low.Display
LTS543atthisstageshows0,whichmeansthetankisempty.Similarly,whenthewaterlevelreaches
L1position,thedisplayshows1,andwhenthewaterlevelreachesL8position,thedisplayshows8.
Finally,whenthetankisfull,alltheinputsofIC1becomelowanditsoutputgoeslowtomakeallthe
inputsofIC2high.DisplayLTS543nowshows9,whichmeansthetankisfull.Assemblethecircuiton
ageneralpurposePCBandencloseinabox.Mount7segmentLTS543onthefrontpanelofthebox.For
sensorsL1thoughL9andground,usecorrosionfreeconductivemetal(stainlesssteel)strips.
Reference
htp://www.electronicsforu.com(htp://www.electronicsforu.com)
BlogatWordPress.com. TheKoiTheme.
Follow
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
13 of 14 9/3/2014 9:40 PM
PoweredbyWordPress.com
Circuit Design | SMN Technology http://smnawaztech.wordpress.com/category/circuit-design/
14 of 14 9/3/2014 9:40 PM

You might also like