Professional Documents
Culture Documents
Light,unlikesound,isanelectromagneticwavethatrequirenomediumto
propagate. However, depending on its frequency, it can be reflected off certain
objects.Infraredraysareoffthevisiblelight;however,itcanbeusedtotransfer
heatorinformationinmanyapplications.
MicrocontrollingUnits
Microcontrollersarethebrainsofoperation.Theywerebuilttoanalyzeinput
data to come up with a response faster and more accurate than that of human
operator.Wehavesofarsketcheddraftsforamechanicalsystemactuatedbyan
electricalsystemcontrolledbyacontrolnetworkofsensingandactuatingsystem
andthisallisconnectedtoacentralbrainthatkeepsthinggoingbasedonastored
logicstructure.Inchapter2,theconceptofmicrocontrollerwasintroducedandthe
mechanism with which it processes data. Here, a common microcontrolling
technologywillbepresentedwithdetailsalongwiththeprocessofutilizationof
suchtechnologyinmodernindustry.
ATmega25607 MCUscanbesaidtobeoneofAtmelsmasterpiecesusedfor
mostautomationapplications.Thismicrochipisverywidelyusedthatitwaschosen
astheprimaryMCUforthepowerfulArduino 8board;theArduinoMega9.ThisIC
isan8bitMCUthatcomeswithintegratedelementsofanactualcomputerfrom
microprocessor to memory, the technical specs of which are in the datasheet. It
comeswith100pins70ofwhicharegeneralpurposeinput/outputlines,therestare
forpower,programming,serialcommunicationandclocks.(Figure69).TheMCUis
suppliedat1.8to5.5V,typicallylogical5Vpowersupplyischosen.Input/output
pins are divided, by functionality, into two groups; analog and digital. With 16
analogpinsthatcanreadandwriteanalogvoltagerangingfrom0tomaximum
supplyvoltagemappedona0to1024scale.
Digitalpinsontheotherhand,theremaining54canalsobesubdividedinto
PWM10andnonPWMgroupsof15and39pins,respectively.PWMpinsofferduty
cyclevaluesfrom0%to100%mappedona0to255scale.Unlikeanalog,digital
pinsneedtobeassignedamodebeforehandbythedesigner.Powerconsumptionof
this MCU is speed dependent, providing that speed is dependent on the pulse
generator chosen by the circuit designer. However, most, including the Arduino
Megaboard,choose16MHzforatypicalcrystal.
AnMCUcanbeprogrammedviaamediumplatformcalledaprogrammer.Inorder
touploadaprogramintothechipmemory,thereisamediumfirmwarepreinstalledinthe
MCU called bootloader. Bootloader uploading requires special equipment and circuitry
usuallyprovidedbythemanufacturerforextraexpenses;however,ATmega2560beingthe
MCUusedfortheArduinoMega,thelatterprovidesabuiltinprogrammerwithapreburnt
bootloader.EachmicrocontrollingunitcomeswithtwoserialcommunicationpinsTXand
RXforserialtransmissionandserialreceiving,respectively.Thisserialportcanbeusedto
communicateamongfellowMCUunitsandwithcomputersviacomputerUSBport.
MCUPlanning
In this subsection, we will walk through the MCU planning for the
automated line chosen for this prototype. from the few sections above, this
production line contains three main processes; dissolving, mixing and
filling. In the few paragraphs to come, we decide the MCU system used to
guaranteeoptimumoperationoftheproductionmachine.
Automatedroofraindetector
Actuators:1DCmotors.
Sensors:1Rainsensor,2IRproximitysensor.
ItisseenfromTable3thattheprocessesofAutomatedroofraindetectorrequire
atleast4digitalpinsandoneanalogpin.Severalotherpinswillbeused
forindicatorsandsecuritychecks
Illumination
Actuators:Lamps.
Sensors:1LDRsensor.
ItisseenfromTable2thatIlluminationprocess,althoughveryvitalprocess,it
requiresaminornumberofIOpins.
Monitoring
LCDdisplay.
Led.
SinceATmega2560isthechiefprocessor,itcaneasilyhandleroofcoveringand
illuminationprocesseswithmultiplefreepinsforfunctionalitiesseenatthetime.Thus,a
singleATmega2560MCUcanbeusedtoautomatethisentireproject.
Programming
Processorsunderstandonlythebinarylanguageoftheirancestors,thusthe
translationfromhumanlogicintoabinarycoderequiresfromthehuman
sidewhatisknownashighlevelprogramminglanguagesinwhichthelogic
iswritteninhumanlanguage.Thiscodeisthenusuallycompiledviaa
computersoftwarereferredtoasIDE11toensurethelegitimacyofthe
writtencode.ThiscodeisthentransformedintoabinarycodetheMCUcan
understandandexecute.
TheselectedMCUarebuiltininArduinoboards.Thus,itisconvenientthat
weuseArduinoIDEforwritinganduploadingthecodetotheadjusted
MCUs.TheopensourceArduinoIDEisCbasedandoffersalmostallthe
builtinfunctionsofClanguage.
5Algorithmdesign
Sofatinthisreport,wehavebuiltanentirephysicalsystemthatcan
operateunaidedwithlittleifnotabsenthumansupervision.Thissmart
systemwasanalogizedtoaphysicaloperatingsystem;thatishuman
beings.Although,we,humans,havetakenlongstepsinproducinganentity
thatfullysimulatesthehumanbody,westill,tothedaythisreportwas
11IDEorIntegratedDevelopmentEnvironmentisasoftwareapplicationthatprovides
comprehensivefacilitiestocomputerprogrammersforprogramming.
written,areveryfarfromproducingthehumanmindyet,artificial
intelligencedevelopsbythedayforthatpurpose.
Therefore,sofarwestillneedtoformourownlogicinseriesofcommands
andstorethatlogicinsidethecomputingunitsothatitrunsforaslongas
itisupexecutingthoseexactcommandstimeaftertimeaftertime.
Thedesigneroftheautomatedsystemshouldtakeeverybitofphysical
systemdesigninconsiderationwhenplanningthelogicdesignofthe
machine;for,themachinedoesnotunderstandcommonsenseandwillonly
computetheinputstoformanoutputpredictedbythealgorithmdesigner
beforehand.
Anerrorinlogicplanningforthemachineisthatasinglemistakeinthe
codebywhichthemachinerunscanleadtocatastrophicresults.Inthis
sectionweshallprovidethealgorithmsplannedfortheAutomatedSyrup
ProductionMachineprocesses;oneatatime.Withextensivedetailofevery
potentialscenariothroughoutoperation.
ElectricalConstruction
Fortheelectricalsystemistheheartofthisproject,inthissectionweshall
discussthecircuitsusedtodrivethismachineandelectronicpartsusedand
thejustificationfortheselectionofthoseparts.Thisdiscussionwillbe
sequencedinaccordancetotherouteofpowerfromsupplyallthewayto
powerdissipationcenters.
Powerisdeliveredin12Vpotentialtotwoexternalterminalsonthecontrol
panelonacablecapableofdeliveringmaximumcurrentof20amps.The
terminalsareconnectedtoaprotectivetwopoleDCMCB12withratingof
25AloadcurrentratingfromC&S.
TheDCbusbarsuppliestheMCUwhichinturncontrolspowerflow
throughoutthesystemviapowerelectroniccircuits;tobediscussedbelow.
TheMCUonlyexecutestheprogramaslongaspowerispresentinthe
busbar,evenwhentheMCUissuppliedfromothersources.Thisis
especiallyimportantbecauseitguaranteesthatMCUcontrollingpulses
actuallycontrolexistingpowerflow.
DCMachinery
SelectionofDCmachinesfortheprojectdependedontwomajorfactors,
availability;for,custommachinesareimpossibletogethandson.The
secondfactorissuitability.Machinesareselectedaccordingtothebase
speedandtorqueandtheircontrollabilitybyelectricdrivestosupply
maximumefficiency.
Machinesusedinthisprojectareforindexingtable,pumps,blenders,filling
headandfans.Eachwillbediscussedindividuallybelow:
3.1.1Covermotors
Thismachineisrequiredtosupplyhightorqueatverylowspeeds,sothat
itdrivesthemechanismrotating2bottlesatonce,oneofwhichisfilledat
20cmdistancefromthecenteroftorque.DCmotorsofverylowspeedsby
constructionarenotavailableandreducingspeedtoverylowvaluesby
meansofelectricdriveswillsignificantlyreduceitsefficiencyandmaynot
deliverenoughtorque.Thus,thechosenDCmotorhasabuiltingearbox
forspeedtorquetransformation.
REPM361101Figure79isthemotorusedforthewiperofthefront
MercedesBenzwindshield,iteasilysupplies5N.mofworkingtorqueand
26N.mofbrakingtorqueatspeednotover20rpmwhichcanbefurther
controlledusingelectricdrives.
Thismotorisselectedfortheindexingtablemechanismmotion.Itdraws
roughly50Wofpowerat5N.mtorque,thusisbyfartheheaviestelectric
loadofthisproject
ControlConstruction
Controlnetworkforthisproductionmachineincludednumerous
components,buttheyallfallintobothcategories;sensorsandactuators.
Theactuatorsinthiscasearetheinterfacingcircuitswhichwerealready
discussedinChapterFour3.2.3,whilesensorsvaryfromactualsensing
devicestobuttonsandvoltageregulators.
4.1PWMMachineControl
DCmachinesthatrequirespeedcontrolarethoseforbottletransferand
solutionblending.Usingmachinedatasheetandtherelationswehave
derivedearlierinchapter3,thespeedcanbefoundasafunctionofduty
cycle.Hence,thedesiredspeedcaneasilybeachieved.
Assuminglinearspeedvoltagerelationshipatconstanttorque,the
parametersofthemachineareallreducedintooneconstantequalingthe
ratioofbasespeedtoratedvoltage.
Indexingtablemachine
Fromearlier,at12Vthebasespeedofthismachineis20rpm.Dutycycle
usedtoachievethespeedof10rpmisthenK=0.5atmotoring.
ForfastbreakingthedutycycleusedforpluggingisK=0.78
Blendingmachines
Fromearlier,at12Vandconstantloadtorquethebasespeedofthis
machineis38rpm.Dutycycleusedtoachievethespeedof30rpmisthen
K=0.8
Othermachinelikepumpsareoperatedattheirbasespeedandarenot
PWMcontrolled,ratherareonlyON/OFFcontrolledbytheswitching
circuit.
AutomatedSyrupProductionMachine|Model
106|Page
4.2Sensors
Sensors,beingtheeyesofthecontrollingsystem,aredistributedina
mannerthatgivesfeedbackofthesystemstatusatalltimes.Thetypesof
sensorsandtheirpositionsareofgreatsignificantfordecisionmakingby
theMCU.Itisveryimportantthatsensorsperformasingletaskonlyand
givesdataofasinglephysicalvariable.Inthissubsectionwewillexplain
thepositionsandjobofeachofthesensorsusedinthisproject.
4.2.1Ultrasonicsensors
Ultrasonic,readingthelongitudinaldistancefromthesensortotheclosest
object,isaveryexcellenttooltoreadingthetanklevelofeachofthethree
tanks.Thesensorismountedtotheceilingofeachtankandisfaced
downward.Thesensorreadsthedistancefromthetopofthetanktothe
fluidtop.Thisway,thedifferencebetweenthetankfullheightandthe
valuereadbythesensoristheeffectivetanklevel.
4.2.2Infraredsensors
Indexingtableisneededtostopexactlyeverythirdcycle.Theinfraredgives
adigitalsignalwheneveranobjectiscloseenoughtoitshead.Toobtain
suchanaccurateresponse,theinfraredsensorisexpectedtopickupa
signalevery120degreessothattheindexingtablebrakesexactlyatthe
fillingstation.
AMercedesBenzlogohasthreearmswith120degreeangular
displacementbetweeneach.Thesymbolismountedonthesameaxisthat
rotatestheindexingthetableandthesensorisfixedbelowthesymbol
(Figure84)toreadtheexistenceofthearmsduringrotationtoissuea
brakingcommand.
Fillingstationonlyissuefillingcommandifandonlyifthereisatleast
200mlleftinthesyruptankandabottleispresentbelowthefillinghead.
Aninfraredisinstalledtocheckwhetherornotabottleexistsbelowthe
fillinghead(Figure85).Thissensordoesnotinterferewithsteppingsensor;
forsteppingprocessesshouldoccuraccuratelyregardlessoftheexistenceof
thebottleintheline.
Figure85(Fillinginfrared)
4.2.3Leakagesensor
Ifanerroroccurredduringfilling,eitherflowsensorfailure,fillinghead
positionerrororafalsedetectionofabottle.Thesyrupwillleakoutofits
decidedcourseandontothefloorbelowthefillingstation.Aleakagesensor,
thus,isplacedinsidethefloorofthefillingstation(Figure86).
Figure86(Leakagesensor)
AutomatedSyrupProductionMachine|Model
108|Page
Thesensorsendsadigitaloutputifpredefinedquantityofliquidwas
detectedonitssurface.WhentheMCUreceivesthisdigitalsignal,itshuts
downproductionandsendsanalarmtotheoperator.
ControlPanel
Althoughthesystemisfullyautomated,itdoesnoteliminatetheneedfor
humaninteractionwiththemachine.Therefore,acontrolpanelisessential
forprovidinganinterfacebetweentheMCUandtheuser.Thecontrolpanel
ofthisproject(Figure87)containseachoftheprotectivecircuitbreakers
andON/OFFbuttonasexplainedinElectricalConstructiontotheright,
twoLEDindicatorsareplacedabovethemainbuttonshowingthestatueof
theproject;greenforONandredforOFF.Anindicatorscreeninthemiddle
givingvisualrepresentationofprocessesandalarmsthroughoutoperation.
Totheleftarethreecontrolpushbuttons;for1DMtankblending
authorization,2sugartankblendingauthorizationand3resetofthe
countdownoftheindexingmotion,thebuttonsareshowninFigure87
respectivelyfromlefttoright.
Figure87(Controlpanel)
AbovecontrolbuttonsmountedanLCDdisplayforoperatorsupervision.It
displaystheprocesstakingplaceatthetimeaswellastanklevelsformore
monitoringoftheproductionprocess.
4.4MicroprocessingUnit
AstheselectedMCUforautomatingthisproductionmachineisAtmels
ATmega2560,itwasconvenienttoemploytheArduinoMega2560board
poweredbythismicrocontrollerforsimplerprogrammingandconnectionof
controlnetworktotheMCU.
AutomatedSyrupProductionMachine|Model
109|Pag