GENERAL .................................................................................................................................................................. 3 THE ERA OF HOME AUTOMATION ............................................................................................................................... 3 THE AUTOMATIC DUSTBIN ......................................................................................................................................... 4 POB'S DUSTBIN .......................................................................................................................................................... 5 MECHANICS ............................................................................................................................................................. 6 PROGRAM WITH RISBEE .................................................................................................................................. 11 EXPECTED BEHAVIOUR ............................................................................................................................................ 11 RISBEE PROGRAM .................................................................................................................................................. 12 Robot's instructions .......................................................................................................................................... 13 Complete program ............................................................................................................................................ 13
1he xxLh cenLury has been a very producLlve perlod for Lhe lnvenLlons almed Lo lmprove people's way of llfe. We can enumeraLe washlng machlnes and dlshwashers, quallLy lrons, vacuum cleaners . 1hls ground has been wldely cleared, and Lhe Llme spenL for housework has subsLanLlally decreased ln Lhe vasL ma[orlLy of homes. AL Lhe dawn of Lhe 3 rd mlllennlum, Lhe sLruggle for comforL ls noL over yeL. lf Lhe bulk of Lhe work has already been achleved, we are now Lrylng Lo auLomaLe as many Lasks as posslble, expecLlng our house Lo be able Lo malnLaln lLself wlLhouL anyone asklng. lL's Lhls approach LhaL had glven blrLh Lo home automat|on, ln full expanslon Loday and cerLalnly for many years. We can easlly lmaglne Lhe house of Lomorrow cleanlng lLself from floor Lo celllng, servlng you your meal and chaslng lnLruders. Cn Lhe program: radlaLors adapLlng Lo Lhe exLernal LemperaLure, roller bllnds closlng auLomaLlcally when Lhe nlghL comes, alarms LhaL can be acLlvaLed afar . 1o Lall Lhe consLanLly growlng markeL, deslgners redouble efforLs Lo flnd ouL 1PL good ldea LhaL wlll sLand up among Lhe oLhers. Companles ln Lhls domaln are mulLlplylng Lo follow Lhe demand, even Lhe schools and Lralnlng cenLres have Laken precedence Lo ensure Lhe compeLlLlveness of Lomorrow's englneers. lL's ln Lhls economlcal conLexL LhaL all Lhe school currlculums have been adapLed, rlghL from hlgh school ln Lechnologlcal classes. 1haL's why we are proposlng here a LuLorlal based on one of Lhe key elemenL of Loday's home auLomaLlon: Lhe auLomaLlc dusLbln.
1he funcLlonlng of an auLomaLlc dusLbln ls slmple: lL auLomaLlcally opens when someone approaches a hand Lo Lhrow a wasLe, and closes afLer a few seconds. 1he lnLeresL ls flrsL a maLLer of hyglene, because lL permlLs noL Lo have any physlcal conLacL wlLh Lhe dusLbln, and evenLually avold bacLerla Lransfers. lL also offers some klnd of comforL, besldes Lhe gadgeL aspecL whlch ls ofLen very appreclaLed for Lhls klnd of producLs.
1he funcLlonlng of Lhls dusLbln ls very slmple. We can noLlce ln fronL a dlsLance sensor LhaL deLecLs Lhe presence of a hand. When lL happens, Lhe servomoLor roLaLes and ralses Lhe cover. 1he cover sLays open a few seconds Lo allow Lhe wasLe Lo be Lhrown, Lhen lL closes.
ConnecLors are aL Lhe backslde of Lhe roboL. We recommend uslng boLh porLs 1, because LhaL's how Lhey have Lo be connecLed ln Lhe exerclse of Lhe nexL chapLer. POB's dustbin 1 2 3 4 S 6 7
8efore concelvlng your 8lS8LL program, lL's lmporLanL Lo deflne all Lhe sLeps composlng lL and how Lhey are relaLed.
Pere's Lhe behavlour we are expecLlng from Lhe roboL: - 1he cover ls closed - 1he dlsLance sensor scans Lhe zone ln fronL of Lhe dusLbln - When a hand shows up (wlLhln a deflned dlsLance), Lhe cover opens - AfLer 3 seconds, Lhe cover closes - 1he sensor walLs for anoLher movemenL
We Lhus need Lhe program Lo lndeflnlLely loop whlle walLlng movemenLs. 1he loop only sLops when we swlLch off Lhe roboL, l.e. when Lhe program ls sLopped. 1he dlsLance sensor's value has Lo be plcked up aL regular lnLervals. We analyze Lhls dlsLance, and lf lL ls blgger Lhan a deflned Lhreshold, we conslder LhaL Lhe user has poslLloned hls hand ln fronL of Lhe dusLbln, expecLlng lL Lo open. Cnce Lhe movemenL ls deLecLed, we open Lhe cover, and leL lL open for a few seconds, enough Lo puL Lhe wasLe ln Lhe dusLbln. 1hen we close Lhe cover.
Pere's Lhe general sLrucLure of Lhe algorlLhm, uslng 8lS8LL elemenLs Lo handle condlLlonal [umps. 1he lnsLrucLlons glven Lo Lhe roboL wlll be deLalled furLher.
1he compleLe openlng of Lhe cover makes an angle of 90 wlLh Lhe compleLe closure. 8uL because of servomoLor's sense of roLaLlon, lL's Lhe open poslLlon LhaL ls consldered as Lhe sLarLlng polnL of roLaLlon (90). So Lhe angle 180 corresponds Lo Lhe closure.
?ou also have Lo deflne Lhe dlsLance from whlch we conslder LhaL we do have someLhlng passlng ln fronL of Lhe dlsLance sensor. We are uslng here 100 mm, l.e. 10 cm. ?ou can however, lf you wlsh, seL 130 mm lnsLead: Lhen your dusLbln wlll be more reacLlve Lo Lhe moves. Cn Lhe oLher hand, Lhe cover may open Loo ofLen because of a paraslLlc movemenL, wheLher lL should noL. We can noLlce LhaL boLh Lhe loops are uslng Lhe same flag. We could have use Lwo flags slde by slde for each loop, for reasons of clarlLy: buL lL ls wlser Lo use [usL one Lo opLlmlze Lhe funcLlonlng. RISBEE program