How To Make Color Shorting Machine Arduino Based

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

instructables

How to Make Color Sorting Machine Arduino Based

by Mr innovative

In this Instructable i will show you how to make a Before we proceed further I would like to tell you
simple color sorting machine machine using about JLCPCB.COM.
Arduino and TCS230,TCS3200 color sensor with JLCPCB are the leader in PCB manufacturing they
servo motors. have a world class PCB production line, that ensure
the fast and Quality PCB production in really very
In this project Color sensor detect the color of candy a ordable rates. if you have any PCB need please try
and generate output in this output sensor data JLCPCB.COM
transfer to arduino arduino will process those data
according to code uploaded in it and command First watch the video of Machine
servo to move and sort color candy on basis of there
color.

Step 1: Video

How to Make Color Sorting Machine Arduino Based: Page 1


//www.youtube.com/embed/pEQDG7iNwKY

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 Sorting Machine Arduino Based: Page 2


Step 3: Electrical Drawing

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

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

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

S1-------------------------D3
Connect TOP servo signal wire at D7 pin of arduino
S2-------------------------D4
Connect Bottom servo signal wire at D8 pin of
S3------------------------D5 arduino

OUT----------------------D6

How to Make Color Sorting Machine Arduino Based: Page 3


Step 4: Machine Assembley

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

How to Make Color Sorting Machine Arduino Based: Page 4


Download

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

How to Make Color Sorting Machine Arduino Based: Page 5


Step 6: Final Step (Loading Code & Sensor Data Study)

How to Make Color Sorting Machine Arduino Based: Page 6


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

So rst wire the sensor and arduino as shown in picture so i can say that
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
You are getting some value like the uctuate sensor values.

R= ** G= ** B= ** in this way take the readings of di erent colors which


you need to use and add those values in code at this
** are any numbers place

now bring color sheet in front of the sensor you will see if(R<25 & R>15 & G<33 & G>23) {color = 1; // YELLOW }
the RGB numbers are change and keeps repeating as
soon as you keep that color sheet in front of that sensor. if(R<55 & R>45 & G<49 & G>39) {color = 2; // GREEN }

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

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

Download

https://www.instructables.com/ORIG/FFH/MNRH/J5K6UMDT/FFHMNRHJ5K6UMDT.ino

Hello, Can I replace the sensor with an arduino camera like OV7670 VGA
camera? Should I use the same modules if i use an arduino camera? My
idea is: the camera will take a picture of the object, then it will
How to Make Color Sorting Machine Arduino Based: Page 7
take a histogram of the picture or another process which takes the color
of the object and recognize the color of the object. Everything is the
same in process but I only want to change the sensor with camera.
it was fun :)

Dear Sir, I apologize in the first place, in case you are upset with my query, and regarding your
"instructable: Arudino based color shorting machine", I have built, following your instructions, to
the letter, both in As regards the hardware as in the software, the software recognizes the colors,
and through the Monitor Series, which I apply in the section of the sketch "if (R <25 & R> 15 & G
<33 & G> 23) { color = 1; // YELLOW}, the numbers that my TCS gives, are different, which I do
not think that matters, or yes ?. Well the question is as follows, only the upper servo works, the
lower one (or bottom) it gets stuck, without moving, and making a very soft hum If I change the
pin of the servo that does not activate-it does not work, the one that supplies the candies, pin D8,
to pin D7, then..oh !!! magic, if it works, I have checked, line by line, and many times, the code, all
correct, I have changed the TCS3200, for others that I have in my workshop, I have changed
servos, A Rano Nano, cables, everything, and nothing! I beg of you, if you are so kind, to tell me
what the problem may be, and to solve it, I will be extremely grateful.
Atentamene
Daniel
what do the red dots in the wiring diagram mean? Shared pins? What sort of wire do I need to
connect multiple inputs to the same pin?

How to Make Color Sorting Machine Arduino Based: Page 8

You might also like