Electronic Chameleon

3,094

43

15

Published

Introduction: Electronic Chameleon

About: Electronics engineer who loves to experiment new things.

Ever wondered how the chameleon changes its colour through the changes in environmental colours?

There's something called Melanocyte Stimulating Hormone or MSH. If you want to dig more into this please follow this Link. The stories apart, I wanted to build ambient lighting system or something like the chameleon. This looks cool and also it helps eyes. I had neopixel LED strip and a spare colour sensor. So I just built my Chameleon (Electronic) using Arduino (Microcontroller for everyone) as the brain.

Step 1: Things You Will Need

1. Arduino Nano (Any Arduino is fine) Amazon Link for Arduino Uno

2. Colour Sensor TCS3200 Amazon Link for Colour Sensor

3. Neopixel LED Strip Amazon Link for Neo Pixel LED

4. Jumper wires and power source

Step 2: Brief Intro to Parts

Arduino: Microcontroller which gets the RGB colour sensor data from TCS 3200 and generates the respective PWM signal to control the colour of Neopixel LED Lights.

TCS 3200 Colour Sensor: This sensor contains an array of photodiodes which respond differently to different colours hence it gives out the colour of light falling on the photodiode array. This data can be used to replicate those colours.

Neo Pixel LED: This can generate a lot of colours based on the signal given to it. The name of the IC is WS2812B.

Step 3: Connecting Everything

Connection - Reaction..
The connection has to be done in such a way that Arduino has to read the data from 4 different photodiodes in the TCS 3200.
And reflect back those value as data to neopixel LEDs to replicate the same colour.
4 photodiodes on the sensors are sensitive to 4 different colour combinations. These produce current signals which are converted into frequency signals i.e I to F conversion
This is read by Arduino pins and then given as input to the Neopixel LEDs.
I don't want to go deep into the working of sensors. This can be understood by referring the data sheets of TCS 3200 sensor.

Step 4: Coding

The code for this project is here.

You can download this and unzip the file to find necessary libraries and code. Please put the libraries into the libraries folder of Arduino IDE.
The compile the code and upload it.
The code is self-explanatory. I improve my coding by looking at others codes. Any suggestions to optimise the code are always welcome.

Step 5: Viola... It Works

Here it works.
It's now replicating any colours you are showing it to the sensor. Good applications are
1. Ambient lighting for TV's and PC's
this reduces eye strain as it mimics maximum colour in your screen.
2. Room lighting
3. Mood lighting

4. You can 3D print a chameleon and place all electronics to make it as a real 3D printed chameleon.


Please don't forget to vote me in contests.

Step 6: Working Video

Here's a working video.

Share

    Recommendations

    • Oil Contest

      Oil Contest
    • Creative Misuse Contest

      Creative Misuse Contest
    • Water Contest

      Water Contest

    15 Discussions

    0
    user
    Milen

    2 months ago

    Hi,

    Nice project.

    But I have the following remarks:

    Your code does not correspond to the video you show - on the video you light up all LED's of the strip, your code turns on only single one. (Ok...this can be easily corrected).

    Most problematic I find you circuit- simple following it can create a lot of complications.

    The first problem - the LED strip DO pin instead DIN pin is connected to the arduino data pin. It could work ( I did not try it, but in common it is misleading and can create problems)

    Second problem - in your circuit the TCS3200 OE pin is connected to the arduino 3.3V pin.

    Without checking I connected the sensor to my Arduino Duemilanove board and I almost burned out the FTDI FT232RL. This type of connection loads extremely the build in the chip 3.3V voltage regulator and the chip heats up very much to levels when its temperature protection triggers. The OE pin of TCS3200 shall be connected to GND instead!

    I will suggest you when publishing any circuits to check their functionality preliminary, because you can create a lot of headaches to the others trying to repeat them.

    Best Regards

    Milen

    1 reply

    I'm extremely sorry for the mistake in the circuit diagram. I'll rectify this.

    It's opensource computer hardware or I can simply discribe it as microcontroller for everyone.i.e anyone can learn this without any pre requisites. For more information on this please refer www.arduino.cc

    0
    user
    bf1104

    Question 3 months ago

    Hi again... Can I ask how you attached the sensors to your TV? I'm assuming you used 2 sets?

    1 more answer

    Yeah you can use 2 or more sensors. Or if u want you can use a raspberry pi with camera to calculate maximum colour and then that info van be sent to neopixel LED. For PC you can use some vbscript to give colour values over serial port and then using that colour info to neopixel led.

    Hi - great work ... I can't watch the videos - is there much lag in changing colour?

    Also anyway to integrate with Hue?

    1 more answer

    I have mentioned applications in step 5. Please go through it. Something like this.

    images (4).jpeg