The corresponding colour value is displayed in the first row as Rxxx Gxxx Bxxx, where xxx are the numbers for RGB colours, respectively. The RGB LED emits the light of a colour, which is controlled by the potmeters (VR1 through VR3). Thus, the 8-bit value controls the duty cycle of the PWM, thereby controlling the intensity of the colour. 4: PCB pattern of the RGB colour code generator Screenshot of the source program is shown in Fig. Since resolution of the PWM module of the board is 8-bit, the 10-bit analogue value is converted into 8-bit value by the program. The analogue-to-digital converter (ADC) of Arduino converts the analogue value into a 10-bit digital value. The program continuously scans the analogue input of the board. These are connected to analogue inputs A0, A1 and A2 of Arduino board. Intensity of each colour is controlled by potmeters VR1, VR2 and VR3. The 16×2 LCD wired in 4-bit mode is used to display the value of each colour in the first row and the hex value in the second row. Three potentiometers control intensity of the RGB LED. 1: Circuit of the RGB colour code generatorĪrduino board is the brain of the circuit that performs colour generation using pulse width modulation (PWM). ![]() It is built around Arduino Uno board (Board1), 16×2 LCD (LCD1), RGB LED (RGB1) and a few other components. Circuit and working for RGB Colour Code GeneratorĬircuit diagram of the RGB colour code generator is shown in Fig. Presented here is the circuit for learning the concept of RGB colour code generator and the respective hex codes of those colours. Similarly, Web designing using HTML or any other language requires the hex code of a particular colour in the design. This technique is used in TVs, mobiles etc. Red, green and blue (RGB) are the basic colours for generating various other colours by mixing colours in a particular proportion.
0 Comments
Leave a Reply. |