Download presentation
Presentation is loading. Please wait.
1
Automated Colored Balls Sorter Presented By : Mihir Daftari Ka Fai Ng Woo Jin Park
2
Project Description Objective Applications Papers Textiles Metals How does it work?
3
System Connections
4
C328-7640 JPEG Compression VGA Camera Module Camera Details: Low-cost ($47) & low- powered (3.3V) and very small in size RS-232 interface: A wide range of baud rates ranging from 9600 to 115.2K bps for transferring images Built-in color conversion circuits for 4 gray/16 gray/256 gray/12-bit RGB/16-bit RGB images. Auto detect baud rate and make connection to the host
5
Camera operations and features On-board EEPROM provides a command-based interface to external host via RS-232. A RS-232 transceiver set-up has to be used as communication interface. The MAX3232CUE chip is used.
6
The command set
7
Command protocol to take an uncompressed snapshot
8
Sample picture taken at 640X480 resolution
9
Sample picture from the camera The picture is displayed using the MATLAB ‘ imshow ’ function. Details: Resolution: 80 x 60 Color type: 12 bit color 4 bits for Red, 4 bits for Green and 4 bits for Blue Total Size: 7200 bytes
10
Sample picture.. This is a picture taken of a red ball on a black background (a black binder here) This is the type of image that is expected to be seen in the project. Color detection algorithm will be run on this type of images. It takes less than 6 seconds to transfer the entire image from the camera to the host.
11
Vector distance algorithm for color detection Lets say we are searching for “ green ” color. Pure green exists when the values of the pixels are R = 0, G = 255, B = 0. The pixel we took in is a vector Pixel = [R G B] The eculedian distance between those 2 vectors is D = sqrt((R-0)^2 + (G-255)^2 + (B-0)^2)
12
Code So the algorithm goes for each pixel { 1.compute the distance between that pixel and the reference color (D) 2.if D<Threshold then current pixel is accepted else current pixel is NOT accepted }
13
Threshold "Threshold" is a constant value and has to be set manually according on the "tolerance" desired for application (a high value of Threshold means that less "clear" green pixels will be considered as green, whereas a lower value of Threshold will make the algorithm quite "strict")
14
Actuator Stepper Motor Precise positioning High static torque for blocking the ball from moving toward the camera Rotate 90 º at 7.5 º per full step (12 steps) Half-stepping method (24 steps) to eliminate stiff movement of Full-stepping method
15
Stepper Motor Controller ULN2064 – Quad Darlington Switches
16
Commands and Step Sequence Commands RCW: Rotate counterclockwise 90 º Pause: Step motor stops Resume: Step motor resumes rotational movement When pause activates, motor will pause after the last RCW is finish executing Allow future expansion or additional commands Sample Step Sequence Step NumberCoil ACoil BCoil CCoil D 11001 21000 31100 40100 50110 60010 70011 80001
17
Ball Dispensing Mechanism Motor arm pushes one ball at the bottom of the tube Next ball falls after previous ball has been pushed out
18
User Interface: GUI & Commands Serial Communication RS-232 Javax.comm package Default Commands: Start System Stop System Override Commands: Pause System Resume System Clear
19
Proposed Bit Patterns Commands Bit Pattern (8 bits)Commands 10000000Start 01000000Stop 00100000Pause 00010000Resume 00001000Clear Balls Status Bit Pattern (8 bits)System Status 00000100Running 00000010Paused 00000001Stopped 11111111Error
20
Operating Conditions Uniform black background Single colored ball Brightly lit room Size of the ball
21
Potential Difficulties Jamming of balls “ Extreme ” shades of red, green or blue might not be detected Poor lighting conditions Motor controller overheats
22
Budget
23
DEMO
24
Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.