Arduino Colour Sensor Under 1$

About: I am a 16 year old guy who is passionate about Arduino and programming,I like science but I love programming,I am also interested in robotics......

So here is my first instructable,Coming to the topic,this is an arduino compatible colour sensor that is extremely made at low cost(don't go on the image I ruined it whole while de attaching it from the robot)....

Step 1: Gathering the Materials

1-10k ohm resistor
3-All pins(you can also use male header pins)
4-A perfboard or a copper clad board
5-An led(white I recommend)

Step 2: The Circuit Diagram

The signal pin could be attached to any of the analog in pins on arduino(by my program its A0 )

Step 3: The Etching Traces

The traces should look like this,you may be wondering what is the use of all pins???,because of lack of male header pins,I used them as a connector(by cutting off their heads)...

Step 4: The ARDUINO Code

Note-This code only distnguishes between black and white for other colours it may be modified and the analog in values may vary....

int value1 = 930; // these value
int value2 = 890;//must be
//changed by experimenting

void setup(){

void loop(){
if (analogRead(A0) > value1)
{Serial.println("Its White");}
else if (analogRead(A0) > value2)
{Serial.println("Its black or something except white");}
else{Serial.println("There is no colour");}

Step 5: About Me

I am a 14 year old guy who loves arduino and programming,I like science and want to become an engineer.Pleeeeease vote for me,in the sensor and first time author contest,your single vote can make me win,so pleeease...

Step 6: What's Next??

My next instructable will deal with controlling AC current using Arduino through Bluetooth....



    • Tape Contest

      Tape Contest
    • Organization Contest

      Organization Contest
    • Pie Contest

      Pie Contest

    2 Discussions


    2 years ago

    What colour of LED did you use for this project?

    1 reply
    Daniyal Shamsi 154jfudger

    Reply 2 years ago

    I mentioned,the leds that I used were white,you can use any colour but that may effect the program a bit....