Colorful World

1,182

7

2

Introduction: Colorful World

Reference source:Here

RGB Colorful World is a night light made by RGB color sensors. It can easily change and choose the color you want according to your current mood. You can have the night light color you want, once you use it to sense the bright-colored object.

//

Modify Part (original):

- Original name: RGB Color Picker

Supplies

You will need:

- Arduino Leonardo (Or other) - Buy here

- TCS3200 RGB Sencer (Or other) - Buy here

- LCD Panel (1602 IIC/I2C) - Buy here

- Pushbutton (any kind)

- 4.7kΩ Resistor (x1)

- 10kΩ Resistor (x1)

- 220Ω Resistor (x2)

- RGB LED - Buy here

- BreadBoard

- Night light lampshade

- Carton

//

Modify Part (original):

- Arduino Pro Micro

- LCD panels without I2C

- TCS34725 RGB Sensor

- 3D Printer

Step 1: Connecting All the Elements to the Breadboard

Before we install everything at once, it is safer to test each item one by one. Because if you have installed everything but it doesn’t work, you can hardly find out what went wrong.

The wiring of different Arduinos will be different. If you are using other Arduino, you can search the wiring diagram and code from other projects.

Now we will introduce how to connect the wire:

- RGB color sensor

GND_there are two GND, both are connected to the negative pole of the breadboard (the negative pole should pull wire to the Arduino GND)

OUT_connect to pin8 of Arduino

S2→Arduinopin10

S3→Arduino pin9

VCC_there are two VCC, both are connected to the positive pole of the breadboard (the positive pole needs to pull a wire to the 5v of the Arduino)

S0→Arduino pin12

S1→Arduino pin11

- LCD panel

GND_connected to the negative of the breadboard

VCC_connected to breadboard positive

SDA→Arduino pin2

SCL→Arduino pin3

- Button

Use the pin to insert the two-wire on the breadboard

Left-side wire_connect a 10kΩ resistor and then pull a wire to Arduino analog A1.

Right-side wire_Divided into two sides:

The first side: pull wire to the positive side of the breadboard.

The second side is: connect a 10kΩ resistor and then connect a line to the negative side of the breadboard.

- RGB LED

RGB LED has 4 pin,Include red, negative, green, blue (short, long, short, short)

Red_ connected to the breadboard and then pull a line to Arduino pin5

The negative electrode _ is directly connected to the negative electrode on the breadboard

Green_ Connect to the breadboard, add a 220Ω resistor and then pull a wire to Arduino pin6

Blue_connect to the breadboard, add a 4.7kΩ resistor and then pull a wire to Arduino pin7

The above is the introduction of circuit connection.

//

Modify Part (original):

The wiring is the same, except for the LCD & color sensing module.

LCD_He originally only used LCD, I change it to I2c LCD.

RGB color sencor_He originally used TCS34725 RGB Sensor, I change it to TCS3200.

Step 2: Writing Code

After the circuit is connected, you can start writing code.

Code is here:Here

Remember to test each part separately!!

Before plugging the USB cable into the Arduino, please carefully check whether all the cables are correct. If there is an incorrect circuit, it may cause damage to the computer or the Arduino board.

The pin can be changed by yourself, according to the circuit on your own circuit board.

//

Modify Part (original):

- The Code of LDC & RGB color sensor has been changed.

- The beginning of LCD display subtitles has also been changed.

- Changed the position of some pins.

Step 3: Make a Container for Your Arduino

Measure the distance between your Arduino and the breadboard, and cut it out with a cardboard box. After bonding, place the component in.

I made a stair-formed container where the button and RGB LED on the upper plane, and the RGB color sensor and LCD are on the lower level. The space inside is relatively large, and will not break the wire. In order to connect the Arduino to the power bank, we should cut a small on the side of the box.

The shell size:

- Higher level

Length: 19.5 / Width: 10.5 / Height: 11cm

- Lower level

Length: 19.5 / Width: 7.5 / Height: 5cm

//

Modify Part (original):

- He used 3D printing to make his container.

Step 4: Using Your Colorful World

Connect the USB cable to the Arduino and after the power is turned on, you can start using it!

Select an item with bright colors, place it 1cm away from the RGB color sensor, and press the button. The color of the item will be displayed on the LCD panel, and then the RGB LED will also illuminate the lamp similar to that color.

Due to the limitations of the LED lamp, it can not illuminate very precise colors. For example, it cannot illuminate black or gray color, because the material of the LED itself is white. Dim and less bright objects will decrease the effect, the surrounding lights and the reflection lights will also cause it to sense the false color, so it is recommended to use it in a dark room.

Be the First to Share

    Recommendations

    • Micro:bit Contest

      Micro:bit Contest
    • Tinkercad Student Design Contest

      Tinkercad Student Design Contest
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge

    2 Comments