Autonomous Sensor and Control Platform Rover • • • • • Tae Lee Josh Reitsema Scott Zhong Mike Chao Mark Winter Detailed Subassembly • • • • • Scott – Main control and Processing Tae – Motor Control Hardware Mark – Sensor interfaces Mike – Wireless Communications Josh – Video and High Level Control Software System Overview Mainboard • • • • 68HC11K1 XCS10 EPROM and SRAM Bus Drivers Motor Controls • What we have: • Two Pittman GM8000 series DC GearMotors • HEDS-9000 series optical encoder • The plan: • Use two LMD18200T H-Bridges to control the motors • PWM is used to control speed (Duty Cycle) • High/Low logic for direction • Brake feature • HEDS – 9000 series optical encoder • These will give rotational/direction information of each motor • HCTL 2020 Decoder 16-bit • Decodes quadrature signal from the HEDS-9000 • Outputs a count (rotational speed) and direction signal • Provides interface to MPU Motor Current Delivery • H-Bridge • Use two LMD18200T H-Bridges to control the motors • • • • Duty Cycle of PWM determines current sent to motors (Speed) Direction pin determines which way the motor spins Brake Pin Thermal sensor Note: Optical Isolation between MPU and H-bridge FROM THE MOTORS HEDS-9000 Encoder/ HCTL 2020 Decoder • HEDS-9000 • • • • Optical Incremental Encoder Module Used with a code wheel, detects rotary position (Shaft Encoder) Fairy accurate – 500 CPR (counts per revolution) Produces two signals which need to be decoded • HCTL 2020 Decoder • • • • Decodes two signals into a count signal and direction signal The decoded signals are available on external Pins (5 & 16) Provides bus interface between encoder and MPU/FPGA Operates well in noisy environments (Motors) • Note: Optical Isolation Between Decoder and FPGA • To the MPU/FPGA MPU / FPGA • FPGA • Create latches in FPGA, work as registers • Registers hold decoded position information • The registers are updated continually with new position information (we can control how often it latches the new signal) • HC11K1 • When needed, goes out to FPGA and grabs contents of register • HC11 will use information and compute PWM adjustments • PWM is sent out from HC11 Recent Discovery LMD18200T with a LM629 Motion Control Device The Sensor Subsystem and Interface • Polling logic in the FPGA requests data from a sensor address on the sensor address bus. • The sensor addressed is enabled and gets data, which it outputs to the sensor data bus. • The data is taken off the sensor data bus into a memory mapped latch and the polling logic continues to the next address. Advantages • This interface should allow for the addition of several more sensors without any hardware changes as long as they have a unique address • This interface could be modified to use the I2C bus interface, thereby reducing the sensor interface footprint. Schematic for Polling Logic IR Sensors/Driver • Upon enable, begin outputting a clock signal of ~38kHz to IR LEDs. • Wait a few clock cycles. Then enable output from all 6 of the IR sensors and place it on the data bus. Schematic for IR Sensor/Driver Ultrasonic Sensor/Driver • Once enabled send a single pulse of width period ~25.3us to selected transducer unit. Begin counting time units. • Blank input from transducer for a short period in order to avoid hearing the sound as it leaves. • Once input is received stop counter and output its value to the data bus. Simplifications • In order to get the sensor interface up and running, we will put all of the logic into the FPGA, which means that the interface will be internal to the FPGA for now. • One of the possible extensions would be to use a second FPGA or discrete logic so that other sensor could indeed be added on at a later date. WiFi communication Lantronix WiPort • Communicates with HC11 using RS232 • Wireless gateway for RS232 transmission • Advertised indoor range of 300 ft. • Bandwidth limited by serial clock RS232 • HC11 uses a UART with the standard non-return-to-zero format • Same format as RS232 • Selectable bit rate up to 20 kbps SCI (Port D) Pinouts • • • RXD TXD GND receive data transmit data ground pin 2 pin 3 pin 5 Sample Transmission • • • • Received interrupt from RDRF (received data register full Read from input buffer SCDR Decode the character received Change the duty cycle of the PWM output. Interrupt From Data Register Read From SCDR Decode Transmission Write to PWDTY1/2 Web Based Control • The wi-fi creates an IP-address for a web page which is where the user interface will be located. • The web-page will utilize Java applets as a GUI for the user to send information to the robot such as turn, or speed up, run preset autonomous programs, etc. and also to receive information such as video and positioning measurements in a user friendly manner. • The web-control basically will call basic sub functions that are preset into the ROM or RAM which will then send instructions to the motor controller. Video System • The video camera will be mounted into the front of the robot • The data will not be sent through the wi-fi due to bandwidth concerns • A button on the webpage will access the direct feed through an applet • No significant processing of the video will be done Example Webpage Autonomous Control and Sensor Platform Rover F Velocity KILL SWITCH L R Incoming Data: B X: 1.8 M Y: 25 M Open Video Applet Wall Follow Search Area Speed : 3 m/sec ... Avoid Objects Parts List • • • • • • • Rover (Pebbles III) H-Bridge and Control Circuit Lantronix WiPort Mainboard and FPGA IR and Sonar Baby Monitor w/Video Capture Quality hours spent in Capstone • Total $0 $100 $300 Charge it to Tom Included $400 Priceless $800 Schedule Thanks