Arduino Colour Sensor Under 1$

Introduction: Arduino Colour Sensor Under 1$

About: Hey! I'm 19 now. I used to make all this stuff way back! If you're still enjoying it,Thank You!

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....

First Time Author Contest 2016

Participated in the
First Time Author Contest 2016

Sensors Contest 2016

Participated in the
Sensors Contest 2016

Be the First to Share


    • Tinkercad to Fusion 360 Challenge

      Tinkercad to Fusion 360 Challenge
    • Make It Modular: Student Design Challenge

      Make It Modular: Student Design Challenge
    • Stick It Challenge

      Stick It Challenge



    Question 2 years ago

    Would the code possibly be able to be modified so that many different colours can be recognised?


    5 years ago

    What colour of LED did you use for this project?

    Daniyal Shamsi
    Daniyal Shamsi

    Reply 5 years ago

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