Sean Day Diante Reid Liem Huynh
Project Overview To create a vehicle that autonomously follows a moving object using color detection To design a low cost, mobile robot that can track objects based on image processing Implement all of the parts using the Atmel microcontroller Track any color specified by the user
Requirements Operate solely on 7.2 V Ni-Cad battery for at least 1 hour Keep a minimum of 10 inches away from target at all time. Have a dimension of no more than 12x15 inches Track object within color range “ “
Top Level Diagram CMUCam2+ Maxbotix LV-EZ2 Sensors Manager Controller Actuators Environment Images Ultrasonic Signals PWM Centroid and Servo Location Target Location Target Range PWM Software Hardware Environment Target
Microcontroller - Arduino ATMEGA328 USB Interface Cross-platform Easy to program Open source Well documented
Microcontroller Specs Operating Voltage : 5V Digital I/O : 8 Pins PWM: 6 Pins Analog Input : 6 Pins Flash Memory : 32kB Clock Speed : 16 MHz Communication : UART
Printed Circuit Board PCB123 software $100 student credit from sunstone Prototyped on the Arduino board 2 layer design Using through hole and surface mount techniques
Image Processing Goals Color detection Ability to distinguish between specified color and other colors in environment Detect centroid of specified object
Blob Detection Middle Mass Determines if a group of connecting pixels are related to each other by surroundings Efficient in identifying separate objects in a scene
Image Processing Techniques Edge Detection Canny detection Edges are areas where a jump in intensity from one pixel to the next occurs Able to reduce the amount of data processed by filtering out useless information
CMOS vs. CCD Sensor CMOSCCD (charge coupled device) Transistor based Flexible design Average picture quality Low power consumption Low Price Analog device Rigid design Excellent picture quality Power hungry Very Expensive
Choosing a Vision System CMUcam1 CMUcam2 CMUcam3 AVRcam Logitech QuickCam Orbit AF Webcam + RoboRealm
CMUcam Comparison PriceFrame RateResolutionRAMROMSPEED CMUcam1$ fps80x bytes2048 words75 MHz CMUcam2$ fps176 x bytes4096 words75 MHz CMUcam3$ fps352x28864 KB128 KB60MHz AVRcam$ fps88x bytes512bytes16MHZ
CMUcam2+ Vision Sensor Performs image processing duties for AVR Track user defined color blobs at up to 50 Frames Per Second Track motion using frame differencing at 26 Frames Per Second Gather a 28 bin histogram of each color channel Process Horizontally Edge Filtered Images
Why CMUcam2+ Compact Size Frame Buffering Affordable price Multiple Servo Control User Support Histograms
CMUcam2+ Software Open Source Programmable CMUcamGUI Allows user to see from camera’s perspective
Power Needs PartWatts Ultrasonic Sensor50mW H-Bridge10W Steering Servo75mW CMU cam2+1.5W
Voltage Regulation All parts on AVR can run off of 5volts DC Stepping Down 7.2 Volt battery LM7805 regulator
Ultrasonic Sensor Objectives Purpose is to keep AVR within 10 inches of target object Be able to fit on front bumper Will not loose the target object Low power consumption
Ultrasonic Sensor Comparison Sensor ModelPriceSizeOutputPower SRF08$ ” x.79” x.67” Analog/Digital75mW Ping Range Finder $ “ x 1.8 “ x 0.6 “ PWM100mW Maxbotics$ “ x.87 “PWM/Analog10mW
Maxbotics Ultrasonic Sensor Maxbotics EZ2 Will easily fit on bumper Only draws 2mA of current Easy to interface
Interfacing the Sensor Pulse Width Modulation 147 microseconds/inch Analog Input (Vcc/512)/inch Communication RS-232 Serial Predetermined distance controlled by C progam
H-Bridge Pololu High-Power Motor Driver 18v15 70A stall current 1.3” x 0.8” 15A continuous output Max PWM frequency 40Hz
Batteries
Chassis 4 wheel drive 2 front turning wheels 2 rear wheels for going backward and forward 1 DC motor 1 Hobby servo Rooms for expansion
DC Motor Speed 19,200 Rpm Stall Current 32A No Load current 1.3A Operating Voltage 3.6 to 6V
HiTec HS-311 Servo Pan, Tilt, Steering Max speed .15sec/60 ° Stall Torque oz/in Operating Voltage V
Sensors Manager getRange() Returns range from Ultrasonic Sensor in inches getCentroid() Returns centroid location of target in x and y format getPan() Returns location of panning servo getTilt() Returns location of tilting servo
Centroid tracking Tracking the object’s centroid 14488
Coordinate Transformation CMUcam to Body alignment Body Frame, CMUcam Frame β Servo Positions 128, 0° 210, 90°46, -90° β Servo PosOffset -90 ° °0° ° Offset = 44 sin( β ) Centroid_B = Centroid_C + Offset Negative Stop Positive Stop
Navigation Flowchart Initialization Forward Straight Forward Right yes no Object' s range <=10 inches? Centroid > 54 Forward Left Centroid < 34 else Stop Object' s range = 10 inches? yes Reverse no yes Object Found? noyes Good Detection? no Enter Search Mode
Search Mode If no detection is found, AVR will go into search mode Pan from negative stop to positive stop (180 ° ) Pan left Object Found? Servo Pos > -90° & < 0? no yes no Pan right Object Found? Servo Pos < 90°? no yes no Exit yes No detection
Fault-tolerance AVR stores the last 10 detections into an array: 1 for hit 0 for miss Confident level is defined by taking the average of the stored values If confident level > 70% then it’s a good detection Confident level= 70% Good Detection!!
Proportional Controller P (Range) Plant + - InputOutput Error Variable speed depends on range from target P gains need to be tuned All control process is done through software
Testing DC Motor/ H-bridge test Range Finding Test CMUcam2+ Pan and Tilt Test
Testing Locomotion test with ultrasonic sensor stationary target Locomotion test with ultrasonic sensor moving target Locomotion test with CMUcam2+ with stationary target Locomotion test with CMUcam2+ with moving target Locomotion test with all sensors
Finances Part Number Part NameQty Expected Cost Real Cost Development Cost Order DateManufacturer N/A Basic Breadboard 1 $ /30/09SparkFun LV-EZ2 Ultrasonic Range Finder Maxbotix LV-EZ2 1 $ /30/09Maxbotix N/A Arduino Starter Kit 1 $ /30/09Arduino SN H-Bridge 3 $ $ /21/09Texas Instruments R245- CMUCAM2 +-Plus CMUcam2+ 1 $ /21/09Acroname FT232R USB to Serial kit 2 $29.00 $ /21/09FTDI Chip n/aBattery/charger2$ /28/09Tenergy HS-311 RC servo2$25 9/3/09HiTec ROB-09107H-Bridge1$ /01/09Pololu n/aChassis1$ /01/09Exceed-RC LM 7805Voltage Regulator6$ /01/09 Fairchild Semiconductors n/aPCB2$100.00$0.00 $ /12/09Sunstone n/aMiscellaneous17$ Total Cost $ $552.25$
Thank you, feel free to ask any questions…please come next door for demo