Introduction: How to Make a "chameleon" With Arduino

Picture of How to Make a "chameleon" With Arduino

You must have seen chameleons changing colors and blending in the surroundings, in an amazing way. The way that chameleons actually do this is really molecular. If you look at the skin of a chameleon, you find that they have several layers of specialised cells called chromatophores and these are cells that can change colour. And that's where I came up with an idea of building a device that acts alike, with arduino.

Step 1: Intro

Picture of Intro

You must have seen chameleons changing colors and blending in the surroundings, in an amazing way. The way that chameleons actually do this is really molecular. If you look at the skin of a chameleon, you find that they have several layers of specialised cells called chromatophores and these are cells that can change colour. And that's where I came up with an idea of building a device that acts alike, with arduino.

Hardware Used

TCS3200 Color Sensor from DFRobot, $7.90

Arduino Nano from DFRobot, $22.00

Light Disc with 7 SMD RGB LED, $8.90

Breadboard, x1

Jumper Cables, a few

Here I used Arduino Nano because I want the device to be as compact as possible with a low power consumption. However, if you do not have power or sizing requirements, any other Arduino microcontroller will just do the job —— and saves money.

Step 2: Wiring

Picture of Wiring

To connect the TCS3200 Color Sensor with Nano, you'll need to expand some extra ports. The wirings should follow correctly with the program, to ensure functionality. Connect the LED port of color sensor with 3.3V on Nano. See attached wiring diagram for details.

Step 3: Programming

After all wirings done, you can now go to Arduino IDE and upload the codes for your chameleon. Note: the Metro Library is needed. You can find it here and install it in advance.

Here I leave a zip file with the the code.

 

Step 4: Test and Enjoy!

Picture of Test and Enjoy!

I used different colored papers to do demo tests. Just put the colored paper beneath the color sensor, and it starts to change color accordingly! Looks a bit more like a "chameleon" now :p

The sensor data will also be affected by ambient light, so it works better in the night.

The container I used is a printed vase found on Thingiverse, I am sure you will easily find a nicer one at home or made by your self.

Enjoy.

Comments

oanhhoang (author)2016-12-24

I get chameleon code.zip. but can not open code with winrar. every help me open code.zip

aliasjanedoe (author)2016-01-19

I'm also getting errors with the code. I do have Metro installed. Anybody ever find a solution to this? Thanks.

CharlieC14 (author)2015-08-16

fishhome (author)2015-03-15

hi mindminus,,

A great project you got here.. i am new to using an arduino and when i tried this project i am facing a few errors even after i have the metro installed.. please could u have a look and let me know, i have uploaded a picture as well.. thanks

KristinW1 (author)2014-12-30

Hey, I have this thing all wired up but the code has quite a few error messages. Do you have an updated code? thanks!

TommyO1 (author)2014-10-21

Hi,
I really want to use your example, since its perfect for a project I'm working on. Although I get this error message trying to use it.
I downloaded Metro from this link:
https://github.com/thomasfredericks/Metro-Arduino-...
As I can find on the net, this lib might be modified. Can you post or link to the version of Metro you are using?
Thx :-)

carlos_bernal (author)2014-08-04

Where's the zip file? Thanks

yashara (author)2014-05-04

HI, I want to do this project but I'm having a difficulty buying the
"Light Disc with 7 SMD RGB LED" but I have found an alternative
component found on ebay http://www.ebay.ph/itm/Cyclic-RGBuino-Shield-V3-0-Arduino-Compatible-/270951123760?pt=LH_DefaultDomain_0&hash=item3f15f20b30
yet I don't know if it'll work because I'm not into this profession.
Also the code will be affected right? Will you please help me? Thank you so much!

Gustaaf (author)2014-04-09

Hi, I am very enthusiastic about this project, but when I try to upload your code into my arduino micro, (Metro library installed) I get a number of metro related error messages. Can you please advce me what I do wrong?

mindminus (author)Gustaaf2014-04-09

Hi,

Can you post an image of the error message you've encountered? Thanks

Gustaaf (author)mindminus2014-04-19

Hi, mindminus

Below you will find the error message.

thnx.

Gustaaf (author)2014-04-19

Hi, mindminus

Could you please have a look at the error message I get?

I would very much like to finish this project and I am curious about the result.

Thank you.

Gustaaf (author)2014-04-11

Hi,

This is the image of the error message, I am sure I installed the Metro Library.

If I compile and transfer Metro examples they work flawless.

Kind regards

HCHAVEZ05 (author)2014-04-02

hi again! in the post indicates that there is a wiring diagram attached but i cant see it, tnx!

mindminus (author)HCHAVEZ052014-04-09

The wiring diagrams are in the pics attached in step2.

HCHAVEZ05 (author)mindminus2014-04-10

thanks i already do the Project is awesome!

HCHAVEZ05 (author)2014-04-02

Hi nice Project!, i have some problems, can you help me? pls. at the moment to compile the code, the next errors are indicated.

HCHAVEZ05 (author)HCHAVEZ052014-04-10

I already have the Metro Library, thanks !

mindminus (author)HCHAVEZ052014-04-09

Hi,

This is probably because you have not installed the metro library from Arduino.

PeckLauros (author)2014-03-30

good idea!

dfiddle (author)2014-03-25

Thanks to both of you. That did it! Mindminus- This is really an excellent work. Well done!!

dfiddle (author)2014-03-23

This is a great project!- I am determined to get it to work. Can you tell me what pin equates to 3.3 V OUT (-) on the Arduino? (Connects to one of the GND on the photo sensor). I have an UNO and it only has a 3.3V Out (+). Thanks!

mindminus (author)dfiddle2014-03-24

Hi, I suggest connecting the GND on UNO as a replacement of 3.3V Out (-).

Mega2560 (author)dfiddle2014-03-24

You mean the negative electrode of the 3.3V? It is the GND as the same as 5V.(If I get your meaning correctly)

Electric_LED (author)2014-03-19

Awesome! Does it work with Arduino Uno?

Mega2560 (author)Electric_LED2014-03-19

yes,of course

clockworkfish (author)2014-03-19

Thats really clever!

This is awesome, nice job!

About This Instructable

33,115views

208favorites

License:

Bio: You either hate me or love me.
Add instructable to: