370 likes | 524 Views
Liter Liquid Tending Robot. Julie Lam Kevin Chang Jason Smith Andrew Jenkins. Objectives. Move using tracks and motor Receive order by using Keypad and LCD Delivering an assortment of drink through controlled valves
E N D
LiterLiquid Tending Robot Julie Lam Kevin Chang Jason Smith Andrew Jenkins
Objectives • Move using tracks and motor • Receive order by using Keypad and LCD • Delivering an assortment of drink through controlled valves • Read customer information (tab, name, preferences) through magstripe reader. • Follow route using sensors. • Pre-recorded voice prompts. Core Goals Extensions
Block Diagram SRAM SRAM ROM ROM FPGA FPGA Card Card LCD LCD Registers Registers Reader Reader Microcontroller Microcontroller Keypad Keypad Interrupts Interrupts Path Path A/D A/D Sensor Sensor Motors Motors Power Power Supply Supply 12V_UNREG Washer Pumps Valve 110VAC 110VAC 15V Solenoids 5V 5V -15V
Status • 68HC11 is up, running uC code from ROM, read/writing to RAM, communicating via RS-232 to host PC. • Interrupt-driven communication. • Unregulated power supply complete, provides plenty of power for washer pumps and motors (>2A). • Tested with pumps – works. • Motor base turns, moves, varies speed; with bench setup (not a Puerile design).
FPGA- XCS10 Kevin Chang
FPGA Overview • XCS10 FPGA device • Interface between microcontroller and ‘dumb’ peripheral devices. • Chip selection based on address bus • Registers for valve controls and motor controls. • Interrupt detector and interrupt controller.
Microcontroller-HC11 Jason Smith
MICROCONTROLLER Store ROM information into registers Selects the LCD Outputs the ROM information FPGA Tells ROM to place information on the bus Selects LCD to receive information from the data bus LCD
MICROCONTROLLER Processes pump selection and duration Outputs above information onto the address and data buses Receives interrupt FPGA Selects appropriate pump and outputs power to transistor Uses decrementer to hold selected pump for the duration Send interrupt when finished Pumps
MICROCONTROLLER Outputs direction, speed, and stop command FPGA Controls the motor inputs Uses direction input to output to motor Stores speed input to the duty cycle register Uses stop command to turn off motors Motor
MICROCONTROLLER Performs ADC of light sensor photo transistors Processes light sensor data for path correction or stop command Outputs appropriate data to FPGA FPGA Selects light sensors Light Sensors
MICROCONTROLLER Receives interrupt Reads from FPGA interrupt register Reads card information and location from card data shift register FPGA Generates XIRQ interrupt when card leaves card reader Stores serial card data into shift register as card is swiped Card reader
RS-232 • Receives and sends debugging commands to the microcontroller.
High level microcontroller processes • Priority queuing • Priority interrupt control • Processing orders • Processing path following algorithm • Processing card reader information
Interface Circuits • Pump Control Circuit • Motor Control Circuit • Line Follower Sensors • Keypad Interface • LCD Interface
Motor Control Circuit • Uses L293D Motor Driver • DC Gear Motors • Input 2x PWM signal (square wave, ~1kHz, duty cycle->speed). • Input 2x direction signal. • Provide motor power (12VDC, 400mA). • FPGA provides PWM, direction.
Pump Control Circuit • TTL compatible (FPGA). • P-channel Power MOSFET dissipates 190mW. • 6N138 Darlington Optoisolator (CTR 2000%) Pump Current Monitor • 0.05 Ohm Current-Sense resistor, common for all high-power (> 1W) applications. • LM6462 Rail-to-rail OpAmp->Current Reference • 6N135 Analog Optoisolator (CTR ~20%)
Line Follower • LED current adjustable, >= 1mA • LED on/off controlled by FET, TTL/CMOS compatible. • Phototransistor senses light level, believe ~1mA peak current. • Will add OpAmp to expand signal if needed. • Uses 4 channels of CD4051 Analog Multiplexer, select controlled by FPGA.
Magnetic Card Reader • 3 Mag Card Readers • Outputs “Card Inserted” signal – used to enable the FPGA shift register • Outputs “Data Clock” – used to clock the data into the FPGA shift register • Outputs “Data” – the data.
Keypad • MM74C922 decodes Row/Column Keypad into 4 bits data. • Double buffer register. • Debounce capacitor. • Data available signal.
LCD Interface • CrystalFontz CFAH-2004A-RMC-JP • 20x4 Character Display, parallel interface, red backlight
Power Supply Julie Lam
Power Supply Tech • From ~110VAC Wall outlet, fused. • One transformer from ~110VAC to 12VDC • Using a bridge rectifier, diode and large cap for the circuit. • Using a pre-assembled 110VA to 5VDC @ 1.8A power supply for Logic devices (with +/- 15 for Analog). • Using an unregulated power supply for peripherals such as motor and pumps (~12VDC, > 2A).
Milestone 1 • 1st PCB rev completed and ordered • Complete and working setup for motor, pumps and other hardware • Communication between microcontroller and FPGA • Initial integration of motor, pumps and software controls
Milestone 2 • All software coded • Completed integration of design • Begin testing full system
Division of Labor • Kevin Chang and Julie Lam • FPGA pump control, motor control interfacing and Programming • Jason Smith and Andrew Jenkins • Microcontroller and motor interfacing and Programming