SparshGauba
April14,2015
BikesLendingProject
Introduction
Withonly500students,myschoolisverysmall.However,sincealmostallofthe
studentscometoschoolinacar,thereisalwaysaparkingandtrafficprobleminthemornings
andafternoons.Inmyenvironmentalscienceclass,thistranslatedtounnecessaryuseofgasand
pollutionoftheenvironment.Afterfurthercollectingdatafromallofthestudents,myclass
foundoutthatmorethan50studentslivewithina5mileradius,makingitpossibleforthemto
cometoschoolwithouttheneedofcars.Asanenvironmentalscienceclass,wedecidedtostarta
projecttoencouragestudentstobiketoschoolbycreatingabikelendingsystem,throughwhich
studentscanrentbikesprovidedbytheschool.
GatheringBikesForTheProject
Tostartthisprojectwenotonlyneededseveralbikes,butalsotheinfrastructure,suchas
bikeracks,locks,andaconvenientprocessofrentingabikethatdidnotinvolveconstanthuman
presence.Thelackofbikeswasovercomebybringinginseveralbrokenanddonatedbikesfrom
thesurroundingneighborhoodandstudentsintheclass.Currently,weareintheprocessoffixing
thesebikesbyreplacingthechains,tiresetc.Wearealsopaintingtheminourschoolscolorsto
givethemauniformlook.Tomakethemmoresuitableforstudents,wearealsomodifying
severalbikestohaveasidecarorothertypesofconvenientstorageinwhichtheycanputheavy
orlargeprojectsthatotherwisewouldneedacarinordertobetransported.
BikeRacks
CurrentBikeRacks
Withenoughbikesforthebikelendingsystem,therealsoneedtobeenoughbikeracks
andgoodsecuritymeasuresinordertosafelystorethebikes,somethingwhichIamcurrentlyin
chargeof.Thiswasinitiallyachallengesincemyschoolhasveryfewbikeracks,mostofwhich
areusedregularlybypeoplewhousetheirpersonalbikestocometoschool.Usingthesebike
racksfortheschoolbikeswouldnotleaveanyspaceforstudentsownbikes.Atthesametime,
makingnewbikerackswouldrequiremetalpipingandtoolsthatdonotfitintothisprojects
budget.
Figure1GraphicalRepresentationofBikeRacks
Tosolvethisproblem,Idevisedaplantoincreasethenumberofbikesthatcanfitinthe
existingbikeracksbyaddingmoredividersandmetalbarstowhichbikelockscanbeattached.
Sincethepreexistingbikerackswerefairlyspreadapart,thiswasagoodwaytomaximize
spaceaswellasreducetheworkneededtocreatemorebikeracks.AsFigure1shows,thegray
portionsofthebikeracksalreadyexist,andareusedbystudentstolocktheirpersonalbikes.The
greenpartsofthebikerackarebeingbuiltbymyteammatesandIbyweldingscrapmetalpipes
togetherandattachingthemtothecurrentbikeracks.Theschoolcurrentlyhasthreegroupsof5
Ushapedbikeracksaroundthecampus,somodifyingallofthebikerackswillresultinenough
spacefor24bikes,10ofwhichwillbeusedbytheschooltostorebikesforthebikelending
program.
ElectronicSecuritySystem
Whilethebikeracksallowforeasystorageofbikes,therestillisaneedforasecurity
systemforbikesthatwillbeaccessibletoallthestudentswithoutthedangerofthebikesbeing
stolen.Usingcombinationbikelockswouldonlyprovidesafetyforaverylittletimesincetheir
combinationwillinevitablybecomecommonknowledgeandresultinthebikesbecoming
extremelyvulnerable.Furthermore,lockswithphysicalkeyswouldrequireconstantorganization
ofkeysfromaperson,whichissomethingIamtryingtoavoid.
Figure2SecuritySystemBlockDiagram
Inordertoovercomethechallengeofkeepingallthebikessafeandeasilyaccessibleby
userswithouttheneedofanotherperson,Iplantocreateanelectronicsecuritysystemthat
wouldautomatetheprocessofunlockingandlockingthebikes.Thealarmsystemconsistsof
RaspberryPi,apalmsizedcomputer,alongwithanelectricaltripwiregoingthroughtheframe
ofeachbike,asshowninFigure2,tocreateanalarmsystem.Undernormalcondition,the
GPIOINwillbegroundedandhaveaVoltageof0relativetoVCC.Ifthethetripwireis
disconnectedanywherewithoutauthorization,theGPIOINwillreceivetheVCCvoltageas
HIGHsignalandtheRaspberryPiwillsendasignaltosoundthealarmandstartrecordinga
footageofthebikesthroughtheGPIOOUTports.
Todeactivatethetripwireandthealarm,therewillbeanumpadattachedtothe
RaspberryPitoenterapassword,uniquetoeachuser.Thepasswordforeachstudentwillbehis
orherStudentIDnumber,whichisa4digitcodethatallstudentsaregivenbytheschooltobuy
schoollunch.Thisisconvenientforstudentssincetheywillnotneedtorememberanew
password,andalsomakesiteasyfortheschooltoseewhoischeckingoutbikes.
Figure3SecuritySystemStateMachineDiagram
Eachtimeapasswordisentered,thePiwillrecordthetimeofpasswordentryandturnon
thecameraforsecurity,asdetailedinFigure3.Afterthepasswordisentered,thetripwirewill
bedeactivatebythePi,whichwillallowtheusertounlockandcheckoutthebike.Toreturnthe
bike,eachuserhastoenterhisorherpasswordagain,whichwillcompletethetransaction.The
programontheRaspberryPiwillmanagealogfileofthetimeofallbikecheckoutandreturns,
aswellasnameofthestudentlinkedtothetransaction.
Ifthecircuitisbroken,thePiwillsoundanalarmandturnonthecameratorecorda
videooftheincident.Thealarmwillbedisabledafterenteringthemasterpassword,givenonly
totheschool,andconnectingthetripwire.Tosavedataandmakeiteasytolookupfootage
fromaparticulartime,thecamerawillbeenabledonlyduringemergencyandstudentactivity.
FuturePlans
Althoughthedesignoftheautomatedsecuritysystemprovidesampleamountofsecurity
withitspasswordentrysystem,tripwirealarmandacamera,therearestillsomeminoraspects
oftheRaspberryPislogicandthetripwiredesignthatcanbeimproved.Forexample,whilethe
passwordsystemallowsforstudentstobeidentifiedbytheirpasswords,thereisnowaytotrack
whichbikethestudenthastaken.Whenastudentunlocksthesecuritysystem,heorshecantake
anyoftheavailablebikes,andpossiblyevenmultiplebikes.Theonlyworkaroundforthis
probleminvolvesapersonlookingthroughthefootagedailytomakesurethatallthebikesare
accountedfor.Anothersolutioncouldbethatthesecuritysystemtakesasnapshotofthebike
racksdailyatagiventime,whichcouldbeeasilycheckedbyapersontocountthebikes.Also,
sincethisprojectisstillaworkinprogress,andwillstarttotakeshapeoverthenextfewweeks,
theseproblemswillbeaddressedbythetimethesecuritysystemisbeingimplemented.Thecode
fortheRaspberryPiwillbeimplementedinCtomakeitpossibleforitsGPIOtocontrolthe
camera,tripwire,andalarmspeaker.
Thecurrentnumberofbikes,whichisten,isagoodstartfortheproject,butnotenough
toeffectivelyimprovetheschoolstrafficproblem.Inthefuture,thisprojectissettoexpand
withadditionalbikesandbikeracks.Inordertosupportthisexpansion,moresecuritymeasures
willalsobemadetoprotectandmanagethebikes.