Invisible Canvas Digital Pen - University Of Illinois ?· Invisible Canvas Digital Pen ECE 445 Fall…

Download Invisible Canvas Digital Pen - University Of Illinois ?· Invisible Canvas Digital Pen ECE 445 Fall…

Post on 16-Jun-2018

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • InvisibleCanvasDigitalPenECE445Fall2015DesignReview

    PichamonMeteveravongPerutBoribalburephan

    TA:CaraYang

    September29,2015

    -4 Need more details on R/V table, see comments there

    Otherwise, excellent job!56/60

  • TableofContents1Introduction....................................................................................31.1StatementofPurpose....................................................................................31.2Objectives................................................................................................3

    1.2.1Goals&Benefits...............................................................................31.2.2Functions&Features.........................................................................3

    2Design..........................................................................................42.1BlockDiagrams..........................................................................................4

    2.1.1SystemOverview...............................................................................42.1.2Device..........................................................................................42.1.3HostSoftware..................................................................................4

    2.2BlockDescriptions.......................................................................................52.2.1Microcontroller.................................................................................52.2.2PressureSensor...............................................................................62.2.3MotionSensingUnit:Accelerometer&Gyroscope............................................72.2.4Button/Switch................................................................................82.2.5PowerSupplyUnit.............................................................................92.2.6BluetoothTransceiver........................................................................112.2.7StatusLEDs..................................................................................11

    2.3SchematicsofOverallSystem..........................................................................122.4SoftwareFlowchart.....................................................................................13

    2.4.1DeviceSoftware...............................................................................132.4.2DeviceSoftwareFiniteStateMachine.......................................................142.4.3HostServiceSoftware........................................................................142.4.4Front-EndApplication........................................................................15

    2.5SimulationsandCalculations..........................................................................152.5.1SensorResolution............................................................................152.5.2PowerConsumption.........................................................................162.5.3PlaneofWriting,PositionandOrientationDetermination..................................172.5.4ForceCalculation............................................................................20

    3RequirementsandVerification................................................................223.1Requirements&Verifications..........................................................................22

    3.1.1Microcontroller................................................................................223.1.2PressureSensor..............................................................................223.1.3MotionSensingUnit:Accelerometer&Gyroscope...........................................223.1.4Button/Switch...............................................................................233.1.5PowerSupplyUnit............................................................................233.1.6BluetoothTransceiver.......................................................................243.1.7StatusLEDs..................................................................................24

    3.2ToleranceAnalysis.....................................................................................243.3Safety...................................................................................................253.4EthicalIssues...........................................................................................26

    1

  • 4CostandSchedule.............................................................................274.1CostAnalysis............................................................................................27

    4.1.1Labor..........................................................................................274.1.2Parts..........................................................................................274.1.3GrandTotal...................................................................................27

    4.2Schedule...............................................................................................28

    5References....................................................................................29

    2

  • 1Introduction

    1.1StatementofPurpose

    Theprojectgoalistodevelopadigitalpenthatcandefineanyflatsurfaceofarbitrarysizeasacanvasanddigitallydrawonit.Thiseffectivelyturnsaspatialspaceintoatemporarydigitalworkspacewithminimaldependency.

    Thestylusallowsusertodefinethesizeofthecanvasandisabletorecorddrawingsessionsevenunconnectedtohost.Pencilleadwillalsobeappendedtothetipofstylustodisplaythedrawingandprovideuserfeedbackonthecanvaschosen.Thecalculationsforposition,pressure,errorcompensation,andcanvasspacedefinitionwillbedonein-house.Weexpecttoprovidepowerusinghard-wiredvoltagesupply,andthenchangetomicro-USBrechargeablebatterylater.Theplug-and-play,draw-on-any-surfacedesignallowsformanycreativeuses,suchasinalectureroomwherelecturersandstudentscancollaborateinagraphicaldiscussionwithouthavingtowalkuptotheblackboard.

    Ourprojectfixestheproblemofhavingascreentoosmalltodrawonortoachievedesiredlevelofdetail.Additionally,usingastylusorafingerfordrawingmayblocktheviewofthewholeimage,butusingthispen,youwillbeabletocollaboratewithothersonatouchscreenwithoutunexpectedtouchtriggersandblocking.Hence,theinvisiblecanvasdigitalpencanbeavaluableplatformforapplicationsthatrequiresharinginteractionamongusers.1.2Objectives

    1.2.1Goals&Benefits:

    Eliminatestheneedofreceiving-endhardware Setupofcanvasdimensionistransparenttothehost Allowscollaborativesharingofinformation/drawings Minimaldependency

    1.2.2Functions&Features:

    (x,y,z,r,p,y)locationsensor Userfeedbackoncanvasshownbyattachedpencillead Buttonsforcanvasdefinition Switchforturningon/offcircuit Pressuresensor Lightweight Auto-Calibration Balanceddesignforportability Bluetoothmoduleforintercommunications Micro-USBrechargeablebattery

    3

  • 2Design2.1BlockDiagrams2.1.1SystemOverview

    Figure1.Top-LevelSystemBlockDiagram

    2.1.2Device

    Figure2 .DeviceBlockDiagram2.1.3HostSoftware

    Figure3 .BlockDiagramforHost-SideSystemSetup

    4

  • 2.2BlockDescriptions

    2.2.1Microcontroller(ATmega328P-PU)Input:1.8-5.5Vpowerinput,3-axisaccelerationandangularvelocitydata,voltagemeasurementforforce,buttonsandswitchstatusbitsOutput:Commandstoread/write3-axisdata,commandstotransmitpositionandpressureoverserialbluetoothdataThisunitpollstheaccelerationandorientationdatafromMPU-60503-AxisAccelerometerthroughI2Cinterface(SCLandSDApins),measuresanalogvoltagefromananalogGPIOpinconnectedtoaForceSensitiveResistor(FSR),andreadsfromdigitalGPIOpinsforswitchandbuttonstates.Theacquiredmeasurementsarethenprocessedtoyieldappropriatevaluestobesentwirelesslytothehost(HC-05bluetoothmodule).DataprocessingmodelsarediscussedfurtherinSimulationsandCalculationssection.TheATmega328microcontrollerwillbepoweredbya+3Vsourceregulatedbya+3.7Vbatteryandintegratedwiththeaccelerator,FSR,switches,andbluetoothmoduleonaPCB.ApinlayoutsummaryoftheseinterfacesisshowninFigure4:

    Figure4 .ATmega328interfacestoothercomponents

    5

  • Pin Function Connection

    1 RESETsignal,activehigh toresetbutton

    2 RXD,serialreceive toTXDofHC-05BTmodule

    3 TXD,serialsend toRXDofHC-05BTmodule

    7,20 VCC/AVCC,digital/analogvoltagesupply toregulatedsupply(+3V)

    8,22 GND,ground togroundsupply

    9 XTAL1,externalclockinput1 tooscillator

    10 XTAL2,externalclockinput2 tooscillator

    15 PB1,digitalGPIOpin todebugbutton

    18 PB4,digitalGPIOpin topencontrolbutton

    21 AREF,analogreferencevoltage(topofinputvoltagerange)

    toregulatedsupply(+3V)

    23 ADC0,analogpin toforcesensorcircuit

    27 SDA,I2Cdataline toSDAofMC3410

    28 SCL,I2Cclockline toSCLofMC3410

    Table1.PinconnectionfortheATmega328toothercomponents

    2.2.2PressureSensor(ForceSensitiveResistor)Input:PhysicalforceonsensorOutput:ResistancechangeofthesensorcomponentThepressuresensorisaForceSensitiveResistor(FSR)whoseresistancechangesbasedonappliedpressure.Thecomponentwillbeconnectedseriallytoa10kresistortotheground,allowingtheresistanceoftheFSRtobecalculatedbasedonthevoltagemeasuredfromthejunctionusingthevoltagedividerrule.ThedebugandpencontrolbuttonswillbeimplementedalongwiththeFSRcircuit,asshowninFigure5.ForcecalculationfromjunctionvoltagewillbefurtherdiscussedinSimulationsandCalculationssection.

    Figure5 .FSRcircuitandpushbuttonsschematic

    6

  • 2.2.3Accelerometer(MPU-6050Module3-AxisGyroscope+Accelerometer)Input:PhysicalmovementandorientationofthesensorchipOutput:DigitalaccelerationandorientationdatathroughI2CdatalineTheMPU-6050isalow-noise,integrateddigitaloutput3-axisgyroscope+accelerometer.ThisunitwillbeassembledonPCBwithmicrocontroller,wirelesstransmitter,andpowersupply.Inthisproject,wewillneedtodetectthesufficientrangesof2gforaccelerometer.Theavailablerangeofgyroscopeisfrom250-2000degree/sec.Thesampleratecanbesetto1024samples/secondandthelowpassfilterisprogrammablefrom8to512Hzbandwidth.Theoutputdatawillbedigitizedinto16bitsandfeedintomicrocontrollerviaI2Ccommunicationprotocol.ApinfunctionandconnectionsummaryisshownbelowinTable2.

    Pin Function Connection

    6 AUX_DA(I2CMasterserialdata) Toexternalsensors

    7 AUX_CL(I2CMasterserialclock) Toexternalsensors

    8 VLOGIC 1.71VtoVDD

    9 AD0 I2CSlaveaddressLSB

    12 INT(Interruptdigitaloutput) Totempoleoropen-drain

    13 VDD Topowersupply

    18 GND ToGround

    23 SCL TomicrocontrollerSCL

    24 SDA TomicrocontrollerSDA

    Table2.PinconnectionfortheMPU-6050

    Figure6.MotionSensingUnit

    7

  • Figure7 .MPU-60503-Axisgyroscope+accelerometerschematic

    2.2.4Buttons/Switch

    Input:PhysicalbuttonandswitchtriggersOutput:DigitalsignaltoATmega328GPIOpinsonthemicrocontroller

    Buttonsandswitchcomponentsserveasactiveuserinputofthisdevice.SwitchTheswitchisanon/offswitchofthewholecircuit.Whentheswitchisheldforafewseconds,the

    circuitwillpoweroff.

    ResetButton(toATmega328pin1)TheresetbuttonresetsATmega328microcontrollerthroughanactive-highresetpin.

    PenFunctionButton(toATmega328pin15)Eachpressonthisbuttontogglesoperationmodeofthedevice,consistingofcanvasdefinitionmode

    anddrawingmode.Whenondrawingmode,themovementofthedevicewillbeprocessedandsentto

    thehost.Whileincanvasmode,thedevicewillappearasstationarytothehost(i.e.themostrecent

    datawhileondrawingmodeisrepeatedlysenttothehostwithpressuredataoverwrittento0).

    DebugButton(toATmega328pin16)Thedebugbuttontriggersasoftwareroutineimplementedinamicrocontroller.Thiswillbeusedto

    triggerusefulblinkpatternsfordebugging,andisdesignedtobeanoptionalbutton.

    8

  • 2.2.5PowerSupplyUnitInput:Rechargeable+3.7VLi-PolyBatteryOutput:+3.3V5%forMPU-60503-AxisGyroscope+Accelerometer

    +3.3V 5%forATmega328Microcontroller+3.3V 5%forHC-05WirelessBluetoothmodule

    Ourpenreceivespowerinputfromthe+3.7Vbattery.However,+3.7Vishigherthanthevoltageneededforsomemodules,soresistorswillbeincludedinthepowermoduletopulldown+3.7Vtootherusefulvoltages,inordertosupplypowertothemicrocontroller,wirelesstransceiver,andaccelerometer.Additionally,moreresistorswillbeaddedasneededtoensurethecurrentthroughtheFSRdoesnotexceed+1mA.ThepowerrequirementsforallthecomponentsfromthedeviceareshownbelowinTable3:

    Devices Voltage/CurrentRequirements

    MPU-60503-AxisGyroscope+Accelerometer VDD:2.375-3.46VVLOGIC:1.8VorVDD

    ATmega328P-PUMicrocontroller MaxVoltage:+3.3Vor+5V

    30ftWirelessRFTransceiverBluetooth MaxVoltage:+3.3Vinput

    RoundForce-SensitiveResistor(FSR)-Interlink402 MaxCurrentDensity:1mA/cm2MiniPushButtonSwitch Max:50mA,24VDC

    LP2953Low-DropoutVoltageRegulator InputVoltage)Max:+30V,Min:-20VOutputVoltage)Max:+29V,Min:+1.23VFixedOutput)Options:+3.3V,+5V

    LithiumIonPolymer(Li-Poly)Battery OutputVoltage:+3.7V

    Table3.PowerRequirementsforallcomponentsfromthedeviceTherechargeablebatteryrequires+3.7Vtocharge.Alinearregulatorwillbeusedtoprovidethereferencevoltageat+3.3V,asshownbelowinFigure8.

    Figure8.PowerModuleBlockDiagram

    9

  • Thelinearregulatorforcesafixedvoltagetoappearattheregulatoroutputterminal.Theoutput

    voltageiscontrolledbyafeedbackloop.LDO(Low-Dropout)regulatorischosenspecificallyforour

    projectduetoitscompatibilitywithbattery-poweredapplications.NotonlythatLDOregulatorsutilize

    availableinputvoltagemorefully,buttheyalsoreducepowerdissipationandhenceimprovecost

    savings.

    LP2953isamicropowervoltageregulatorsthatgiveverylowdropoutvoltage.Ithastwofixedoutput

    options,+3.3Vand+5V,which+3.3Vwillbeusedforourcircuitdesign.Alongwiththepowersupply,

    thelinearregulatorwillbesufficienttosupply+3.3Vforothercomponents,suchastheBluetooth

    moduleandmicrocontroller.

    Figure9.LP2952LinearRegulatorschematic

    Pin Function Connection

    1,8,9,16 GND,Ground togroundsupply

    2,7,10,11 NC,noconnections -

    3 OUT,regulatedoutputvoltage toothercomponentsasVCC,

    connecttoSENSEandcapacitor

    toground

    4 SENSE,feedbackvoltagesenseinput connecttoOUTandcapacitorto

    ground

    13 VTAP,internalresistordividerinput shorttoFEE

    14 FB,erroramplifiernoninvertinginput shorttoVTAP

    15 IN,regulatorpowerinput tobattery

    Table4.Pinconnectionfor LP2952LinearRegulator

    10

  • 2.2.6BluetoothTransceiverInput:+1.8V5%powersupply,pre-processedcanvaspositionandactionsfromthemicrocontrollerOutput:datatransmittedtohostdevice(bluetoothprotocol)TheserialportBluetoothmodulates3Mbpsenhanceddataratewithcomplete2.4GHzradiotransceiverandbaseband.

    PINName PIN PadType Description

    GND 13,21,22 VSS Groundpot

    3.3VCC 12 3.3VCC Integrated3.3Vsupplywithon-chiplinearregulatoroutputwithin3.15-3.3V

    AIO0,AIO1 9,10 Bi-Directional Programmableinput/outputline

    PIO0,PIO1 23,24 Bi-DirectionalRXEN(23)/TXEN(24)

    Programmableinput/outputline,controloutputforLNA(23)/PA(24)(iffitted)

    Table5.PinconnectionsforHC-05bluetoothtransceiver

    Figure10 .HC-05BluetoothTransceiverschematic

    2.2.7StatusLEDs

    Input:Signalsfrombutton/switchOutput:TwoLEDlights,DigitalsignalstoATmega328microcontrollerGreenLED(LEDG,toATmega328pin12)ThisLEDindicatesthatthedataissuccessfullybeingtransmittedtothehostdeviceviaBluetooth.IneachtransmissioneventtheLEDwillblinkonce.OrangeLED(LEDO,toATmega328pin13)ThisLEDindicatesthattheuserisactivatingthepentobeinadrawingmode.Thisiscontrolleddirectlybythemicrocontrollerandthebutton/switchintegratedintothecircuit.

    11

  • 2.3SchematicsofOverallSystem

    Figure11 .CircuitSchematic

    12

  • 2.4SoftwareFlowchart2.4.1.DeviceSoftware

    Figure12 .Top-LevelDeviceSoftwareAlgorithm

    13

  • 2.4.2DeviceSoftwareFiniteStateMachine

    ThisfiguredemonstratesthelogicintheActionblocksh...

Recommended

View more >