Transcript Document
Team Ninja Introduction/Overview Implementation of Subsystems – MCU board – Chassis/Motor/Motor Driver – Sensor Parts List Schedule Division of Labor MCU Board MCU Board Block Diagram MCU Pinout MC68711K4 Microprocessor Features – 8-bit opcodes and data – 16-bit addressing – 8 A/D Converters – 4 PWM signal generators – Non-multiplexed address and data lines Timing Diagram XC95108 CPLD Implementation – Chip select device – All other on board logic CPLD vs FPGA – Simpler ECS-2200B Clock Clock for the microprocessor 8 MHz speed Reset Button Input that resets our microprocessor Inverters de-bounce signal AT29C256 EPROM Features – Fast read access time – 70ns – Fast program time 64 byte program time – 10 ms Chip erase time – 10 ms – Typical Endurance > 10,000 cycles EPROM Timing Diagrams Samsung 428 SRAM Features – Organization 32K x 8 – Low Data Retention Voltage Power System MC7805 Voltage Regulator – Outputs Steady 5V – Large Input Voltage Range (7.5V – 18V) Power Busses Bypass Capacitors (0.1uF) Infrared Sensors Using Sharp GP2D120 IR sensors – Max of 8 sensors (high cost) Above, below, and forward sensors – Analog Output Consistent voltage curve vs distance – Low power consumption 150 mW / sensor max IR Sensor limitations High Cost per unit ($15) – Unfeasible to be covered on all sides Need to ensure unit always “looks forward” before driving – Up to 8 sensors on front side Positioned to see: – Directly forward – 45 deg angle upward of directly forward – 45 deg angle below directly forward Infrared Sensors Infrared Sensors Output Characteristic 0-15 cm to right Device 1 and 2 averages and spec sheet 0-50cm below 3 Datasheet spec Device2avg Analog output voltage (V) Device 1 and 2 averages and spec sheet 3.5 Analog output voltage (V) 3 2.5 Device1avg 2.5 2 1.5 1 2 Datasheet spec Device2avg 0.5 1.5 0 2 4 Device1avg 6 8 10 Distance to reflected object (cm) 1 0.5 0 0 5 10 15 20 25 30 Distance to reflected object (cm) 35 40 45 50 12 14 A/D Conversion HC711K4 provides 8 multiplexed inputs to an A/D converter Continuously sample inputs IR sensor directly connected to multiplexed MCU input A/D Conversion Provides 8 bits of resolution Output of A/D converter is $00-$FF stored in register – VRH controls maximum voltage seen Will use VRH = 3.0 V Sampled Voltage > VRH – Data stored = $FF – VRL controls minimum voltage seen Will use VRL = 0.8 V Sampled Voltage < VRL – Data stored = $00 – Linearly scaled in between $00 - $FF – 8.5 mV resolution using above VRH and VRL A/D Reconstruction Convert Voltage-Distance table to $00-$FF format for easy lookup – $00 = 15 cm…$01 = 15 cm…$FE = 3cm…$FF = 3cm Constraint: Need to know how close to wall start position is Fix: always start more than 5cm away from wall Device 1 and 2 averages and spec sheet 3 Datasheet spec Device2avg Analog output voltage (V) Device1avg 2.5 2 1.5 1 0.5 0 2 4 6 8 10 Distance to reflected object (cm) 12 14 A/D Reconstruction 7-Segment LED 7-segment LED displays current position – 1 display per sensor Hex display – 3-9 cm displayed as 3-9 – 10-15 cm displayed as A –F Assistance in debugging movement – Why did it turn when it wasn’t even near a wall? A/D Reconstruction 7-Segment LED Implementation Encode distance measurement into signal displayable by 7-segment LED Write result to $2000-$2FFF – Reserved for LED latches by CS CPLD Latch this data using 8-bit latch – Connect to display with pull-up resistors 3-F displayed on 7-segment LED Battery Power Constraints MCU board requirements: – 8V - 30V Voltage regulator limits to 5V, 1A Max of 1000mAh Motor requirements: – 2000mAh / motor Step-up voltage to ~10V Monitor battery charge to prevent going below 10% charge Battery Power Solution: Tether 5000mAh batteries expensive, heavy, and/or difficult to recharge Tethered approach 1 or 2 cables attached to exterior power supply Too complicated to complete on time Focus of project: intelligent movement of device Programming: Overview Always Move Forward No objects detected IR Check Check for obstacle Turn, Change Direction Object detected Programming: Moving Forward No Object Detected Set internal Latch Move Moving N/S Turn Forward Both On Motor PWM Count Steps Driver Moving E/W N/S PWM Step ~200Hz the Motor Count Steps E/W Always Programming: IR Check Always Initialize A/D IR sensor’s A/D conversion Result register Distance Estimation Calculation 7-seg LED latch 7-seg LED Compare to VoltageDistance table Object Detected Objected Detected? No Object Detected Threshold i.e. 4 cm Object detected (straight ahead) Set R wheel latch Programming: Turning (Always Turn Left) R wheel forward R Wheel Motor Driver Check for obstacle PWM ~200 Hz Clear L wheel backward L wheel latch Rotate Direction 45deg L Wheel Motor Driver Done Turning STP-MTR-17048 Bipolar Motor Stepper Motor 1.8 degrees/step Lightweight 6.0 lbs Maximum Load 2.0A Rated Current 0.59Nm Maximum Holding Torque Motor/Driver Works Best Above 200Hz Motor Needs at Least 16W of Power Bipolar Stepper Motor Driver One Driver for Each Stepper Motor Powered at 8-30V Direction Step Optoisolation Dual H-Bridge Chassis Assembly 1.65ft Diameter Round Plexiglas Swivel Wheels Vacuum 14.4 V 30 Watts 7.2V Rechargeable Battery Parts List STP-MTR-17048 Bipolar Motors (2) Quasar 3158 Bipolar Stepper Motor Driver (2) 3”x13/16” Wheels (2) Swivel Wheels (2) Sensors (8) Plexiglas Chassis HC711K4 Microprocessor XC95108 CPLD ECS-2200B Clock AT29C256 ROM Samsung K6x0808C1D-DF70 RAM MC7805 Voltage Regulator 7-Segment LEDs (8) Vacuum (Black and Decker Cyclone) Schedule Status Connects Motor With U-Bolts Done With Chassis Assembly Done With Sensors MCU Board connected and running CPLD Programmed Processor Resetting Correctly ROM connected Plan of Attack Milestone 1 – MCU board completely done – Sensor input to MCU – MCU output to motor drivers – Basic vehicle movement Milestone 2 – Intelligent movement based on sensor input – Integration of vacuum – User interface Division of Labor Kevin – Microcontroller Programming – MCU board – Communication Between Devices Tim – Peripheral Sensors – MCU board – Sensor Logic Simone – Mobility Functions – Chassis – Mobility Logic – Track Distance/Make Internal Map – Vacuum Integration Conclusion Implementation of Subsystems – MCU board – Chassis/Motor/Motor Driver – Sensor Parts List Schedule Division of Labor Questions? [email protected] [email protected] [email protected]