Sei sulla pagina 1di 8

instructables

How to Make Color Shorting Machine Arduino Based

by Mr innovative

In this Instructable i will show you how to make a command servo to move and short color candy on
simple color shorting machine machine using basis of there color.
Arduino and TCS230,TCS3200 color sensor with
servo motors.

In this project Color sensor detect the color of


candy and generate output in this output sensor First watch the video of Machine
data transfer to arduino arduino will process
those data according to code uploaded in it and

Step 1: Video

//www.youtube.com/embed/pEQDG7iNwKY

How to Make Color Shorting Machine Arduino Based: Page 1


Step 2: Components Required

1) Arduino NANO : - http://amzn.to/2v6ICSm

2) Color sensor :- http://amzn.to/2vHvosg

3) Servo motor :- http://amzn.to/2vHvosg3)

4) Cardboard

5) Color candy

How to Make Color Shorting Machine Arduino Based: Page 2


Step 3: Electrical Drawing

Do wiring as shown in figure VCC---------------------5V

Color Sensor Arduino GND--------------------GND

SO-------------------------D2

S1-------------------------D3
Connect TOP servo signal wire at D7 pin of
S2-------------------------D4 arduino

S3------------------------D5 Connect Bottom servo signal wire at D8 pin of


arduino
OUT----------------------D6

How to Make Color Shorting Machine Arduino Based: Page 3


Step 4: Machine Assembley

Download the attached PDF file for complete Glue all the parts as shown in figure,
dimension of machine
To make transparent feed tube i used empty cold
Bring some cardboard pieces draft the model as drink bottle cut it and took a piece out of it
per given dimension on cardboard sheet
and fold that sheet in tube like shape and secure
carefully cut those pieces make sure are with transparent, keep the diameter of tube
accurately cutted to avoid any malfunction during according to the size of candy so they can pass
machine run. through it easily at same time not also very loose..

How to Make Color Shorting Machine Arduino Based: Page 4


Download (https://cdn.instructables.com/ORIG/FT5/2AUL/J5K6UKGC/FT52AULJ5K6UKGC.pdf)
http://www.instructables.com/ORIG/FT5/2AUL/J5K6UKGC/FT52AULJ5K6UKGC.pdf

(https://cdn.instructables.com/ORIG/FT5/2AUL/J5K6UKGC/FT52AULJ5K6UKGC.pdf)

Step 5: Basics of Color Sensor TCS230,3200

The TCS230 programmable color light-to-frequency sharing of a microcontroller input line. The light-to-
converter combines configurable silicon photodiodes frequency converter reads an 8 x 8 array of
and photodiodes. Sixteen photodiodes have blue filters,
16 photodiodes have green filters, 16 photodiodes
a current-to-frequency converter on single monolithic have red filters, and 16 photodiodes are clear with no
CMOS integrated circuit. The output is a square wave filters. The four types (colors) of photodiodes are
(50% duty cycle) with frequency directly proportional interdigitated to minimize the effect of non-uniformity
to light intensity (irradiance). The full-scale output of incident irradiance. All 16 photodiodes of the same
frequency can be scaled by one of three preset color are connected in parallel and which type of
values via two control input pins. Digital inputs and photodiode the device uses during operation is pin-
digital output allow direct interface to a microcontroller selectable. Photodiodes are 120 µm x 120 µm in size
or other logic circuitry. Output enable (OE) places the and are on 144-µm centers.
output in the high-impedance state for multiple-unit

How to Make Color Shorting Machine Arduino Based: Page 5


How to Make Color Shorting Machine Arduino Based: Page 6
Step 6: Final Step (Loading Code & Sensor Data Study)

Before going further we must know what vale will sensor i get
sensor gives when different colors are take in fornt of
the sensor R=22 G=29 B=32

So first wire the sensor and arduino as shown in so i can say that
picture you may skip to attache those servo at this
point of time. if (R>17 & R<27 & G>25 & G<34)

Load the code attached here to your arduino board COLOR=YELLOW;

open the serial monitor here i kept margin of +-5 for RGB values to
compensate the fluctuate sensor values.
You are getting some value like
in this way take the readings of different colors which
R= ** G= ** B= ** you need to use and add those values in code at this
place
** are any numbers
if(R<25 & R>15 & G<33 & G>23) {color = 1; //
now bring color sheet in front of the sensor you will YELLOW }
see the RGB numbers are change and keeps
repeating as soon as you keep that color sheet in if(R<55 & R>45 & G<49 & G>39) {color = 2; //
front of that sensor. GREEN }

you will get different set of RGB numbers for different, if(R<70 & R>60 & G<10 & G>20){color = 3; // PINK }

so it is clear that sensor detect different colors and if(R<7 & R>11 & G<21 & G>35){color = 4; // Red
gives different value.
and upload the code connect the both servos fix all
now we have to write down the RGB value for the the required components load the color candy in tube
color which are going to use in project and your machine is ready to short the candy of
different colors.
for example when i bring YELLOW color in front of

How to Make Color Shorting Machine Arduino Based: Page 7


http://www.instructables.com/ORIG/FFH/MNRH/J5K6UMDT/FFHMNRHJ5K6UMDT.ino
… Download (https://cdn.instructables.com/ORIG/FFH/MNRH/J5K6UMDT/FFHMNRHJ5K6UMDT.ino)

(https://cdn.instructables.com/ORIG/FFH/MNRH/J5K6UMDT/FFHMNRHJ5K6UMDT.ino)

How to Make Color Shorting Machine Arduino Based: Page 8

Potrebbero piacerti anche