RGB Colour Generator using Arduino

Basically, RGB represent three basic colour RED GREEN and BLUE which is used in our digital system for generation various other colour. The project ‘RGB Colour Generator using Arduino’ is basically a tutorial on how to generate colour code and hex code of that color.

Circuit Description of RGB Colour Generator using Arduino

The circuit of RGB colour generating using arduino is basically designed using a microcontroller unit (Arduino uno), a 16×2 alpha numeric LCD, a RGB LED and few resistor and variable resistor. The circuit diagram is shown in figure 1.

The 100Ω resistor is connected across anode at RGB1 as shown in circuit diagram these three resistors is basically current limiting resistor which control the flow of electron and save the RGB LED from burning. Variable resistor VR1 to VR3 is used to control the intensity of RGB LED. The wiper of VR1 is connected to analog pin A0 of arduino uno. Similarly, wiper of VR2 and VR3 is connected to pin A1 and A2 respectively. These variable resistor is used to control the intensity of RGB LED.

Resistor R4 is use to limit the current flowing to the backlight of LCD where variable resistor VR4 is used to adjust the contrast of LCD.

LCD is used here in order to display the value of color and hex value of colour code. The colour code value is displayed in 1st row of LCD where Hex code is displayed in 2nd row of LCD.

As the arduino board is of 8-bit thus it need to convert 10-bit digital value to 8-bit which is used to controlled the PWM duty cycle.

The colour value is showed in 1st row in the form of Rxxx Gxxx Bxxx where xxx represent the numerical value. The second row shows the HEX value in the form of HEXxxxxxx.

Other project using arduino posted in bestengineeringprojects.com

  1. Smart Dustbin using Arduino Uno
  2. Earthquake detector | Indicator Circuit using Vibration Sensor
  3. Car Lock System using Arduino and GSM
  4. Sound Level Meter Circuit using Arduino
  5. Arduino Based Car Reverse Alarm

Software Code:

The complete code of RGB Colour generating using arduino is written in arduino programming language and burned using Arduino IDE. The code is given below you can directly download and used in your projects.

 

PARTS LIST OF RGB COLOUR GENERATING USING ARDUINO

Resistors (all ¼-watt, ± 5% Carbon)
R1, R4 = 100 Ω

R2 = 270 Ω

R3 = 330 Ω

VR1 – VR3 = 10 KΩ Potmeter

VR4 = 10 k Ω Preset

Semiconductors
RBG1 = Common Cathode RGB LED

Board1 = Arduino Uno Board

Miscellaneous
LCD1 = 16×2 Alphanumeric Display

 

Leave a Comment