Embedded Systems Sensors and OdometrySensing vs. PerceptionReconstructionEmbodied Perceptual SystemsSensor Drivers and Interface CircuitryLight Sensors - PhotoresistorLight Sensors - PhototransistorLight Sensors - Pyroelectric SensorsOther Common Sensor TechnologiesOdometry - photoreflectorsOdometry - photoreflectorsOdometry Project - 3 lab meetingsQuadrature Encoder6811 System Interrupt StructureSlide 15Slide 16Slide 17Example: PhotoreflectorCreating Binaries (.icb files) from Assembly Code (.asm files)Laboratory for Perceptual Robotics – Department of Computer ScienceEmbedded SystemsSensors and Odometry2Laboratory for Perceptual Robotics – Department of Computer ScienceSensing vs. Perceptiontransducers - devices that convert some physical phenomenon into electrical signalsA/D conversion - the conversion from analog signal (0-5V) into a fixed precision (typically 8-12 bits) digital representationperception - the interpretation of signals derived from transducers in order to estimate state information required for control.observability - if state x(t0) can be determined given measurements z(t) in the interval between t0 and t1, then x(t0) is observable. If x(t) is observable for all t, x is completely observable.controllability - a system is controllable at time t1>t0 if a suitable control u(t) can be found to drive the system from an arbitrary x(t0) to another arbitrary state x(t1).3Laboratory for Perceptual Robotics – Department of Computer ScienceReconstruction Stimulus = f(World) World = f-1(S)• function, f(), is only partially known,• in general, the inverse of f() is not well-conditioned• time spent “perceiving” often renders world models obsolete4Laboratory for Perceptual Robotics – Department of Computer ScienceEmbodied Perceptual Systemsrich sensor feedbackinteractiontime series feedbackknowledge can fill ininaccessible detail5Laboratory for Perceptual Robotics – Department of Computer ScienceSensor Drivers and Interface Circuitryphotosensors, micro switches, microphones, pyroelectric, near IR reflectance, sonar, strain gauges, gyroscopes, accelerometers, force, compasses, vision,...sensitivity S - a property of the transducer and describes the x (physical quantity) that is required to produce a r (change in response)... r/r = S (x/x)range, R - the range in the observable quantity x that maps onto the 0-5 V transducer outputresolution - the smallest x that can be observed, i.e., R/255 (linear transducer and 8-bit A/D).6Laboratory for Perceptual Robotics – Department of Computer ScienceLight Sensors - Photoresistorvoltage divider Vsignal = (5V) RR/(R + RR)•choose R=RR when ambient light is midrange•Cadmium Sulfide (CdS)•cheap7Laboratory for Perceptual Robotics – Department of Computer ScienceLight Sensors - Phototransistorgreater sensitivity8Laboratory for Perceptual Robotics – Department of Computer ScienceLight Sensors - Pyroelectric Sensors lithium tantalate crystal is heated by thermal radiation inducing chargetuned to 8-10 m radiation - respond to human IR signaturemotion detecting burglar alarmEltec 442-3 sensor - two elements, Fresnel optics, output proportional to the difference between the charge on the left crystal and the charge on the right crystal.9Laboratory for Perceptual Robotics – Department of Computer ScienceOther Common Sensor TechnologiesForce•strain gauges - foil, conductive ink•piezoelectric films•conductive rubber•capacitive force•rheostatic fluidsSound•microphones•sonarPosition•microswitches•shaft encoders•gyros•tilt/compassesProprioceptive• battery-level• motor current - stall, external force• temperature10Laboratory for Perceptual Robotics – Department of Computer ScienceOdometry - photoreflectors11Laboratory for Perceptual Robotics – Department of Computer ScienceOdometry - photoreflectors12Laboratory for Perceptual Robotics – Department of Computer ScienceOdometry Project - 3 lab meetingsBreadboard P5587, measure output properties, monitor output with HandyBoardInterrupt-based pulse counter, build simple/quadrature encoderEstimate (x,y,t), servo---rotate, translate schemesensor signal+5V supplyground13Laboratory for Perceptual Robotics – Department of Computer ScienceQuadrature Encoder14Laboratory for Perceptual Robotics – Department of Computer Science6811 System Interrupt StructureTimer-counter hardware is connected to 6811 port A - IC3 register associated with PA0 can generate interrupt every rising edge.System interrupts - 1000 Hz, used for OS time keeping and other periodic functions (LCD display)Binary programs can install themselves into the system interrupt structure6811 interrupt vector points to run-time interrupt handlersUser can hijack the pointer and use it to point to a user defined handler, and arrange it so that after the user handler completes, it goes to the run-time interrupt code.15Laboratory for Perceptual Robotics – Department of Computer Science6811 System Interrupt StructureAt end of every fetch-decode-execute cycle:CPU checks enabled interruptsiff interruptSave registers, flags, pgm counterLoad interrupt vector into pgm counterExecute interrupt codeRTI - restore and resumeMasking - interrupts can interrupt interrupts16Laboratory for Perceptual Robotics – Department of Computer Science6811 System Interrupt StructureIC systemSoftwareinterruptdriver6811 interrupt vectordedicated RAM locationRTIbefore user installation17Laboratory for Perceptual Robotics – Department of Computer Science6811 System Interrupt Structureafter user installation6811 interrupt vectordedicated RAM locationIC systemSoftwareinterruptdriverRTIuser asmprogramJMP18Laboratory for Perceptual Robotics – Department of Computer ScienceExample: Photoreflector* 6811 registersTOC4INT equ $BFE2* digital input registerDIGIN equ $7000org MAIN_START* Variables accessible from Cvariable_dir fdb 1variable_count fdb 0* Internal variables (not accessible from C)state fdb 0* Install module into 1KHz IC system interrupt on TOC4subroutine_initialize_module:ldd TOC4INT ; ptr to original vectorstd interrupt_code_exit+1 ; install for our exitldd #interrupt_code_start ; ptr to our routinestd TOC4INT ; install at TOC4
View Full Document