RGB Binary Counter

by braulio777 in Circuits > Electronics

2026 Views, 11 Favorites, 0 Comments

RGB Binary Counter

RGB Binary Counter

This binary counter was developed with the use of RGB LED's and a pair of switches for manipulating the results while an Arduino platform will program the project. That is, the binary code implies either lighting up green LED's or blue LED's when a switch 1 is high or a switch 2 is high respectively. Then the resulting binary code is one can even be lighting up red LED's when both switches are high or lighting up green or blue LED's when its respective switch is high.

What you will need:
Soldering iron and solder

Wire strippers and cutter

Needle nose pliers

Multimeter

22 AWG wire, 1 meter

9 Volt Battery

Bill of Materials

3078.jpg
3079.jpg
3082.jpg
3083.jpg

1 Arduino Uno Proto Shield (PCB only)

1 Arduino Uno R3 DIP Edition (Revision 3)

1 ABS Plastic Enclosure for Arduino Boards - Fits UNO or MEGA

1 Connector Unshrouded Header 40 Position 2.54mm Straight Thru-Hole 4

4-Pin 5mm Water Clear RGB LED - Common Cathode

4 LED Mounting Hardware LowPro T1-3/4 Clear

12 Resistor Carbon Film 470 Ohm 1/4 Watt 5%

2 Resistor Carbon Film 10k Ohm 1/4 Watt 5%

2 6.2mm Diameter SPST OFF-(ON) Round Tactile Pushbutton Switch - White Button

1 Cable USB2.0 A/B 3 Feet Black USB-A Male To USB-B Male

1 9V Battery Snap with 2.1mm Barrel Plug

Schematic Diagram

RGB_Binary_Counter_from_1_15_SCH_schem.png

This is an important step because it's the plan of your whole project. Observe carefully each part of the schematic so that you can complete the project successfully.

Installing the First RGB LED

Installing_the_first_RGB.jpg

Install the first RGB LED in combination with its respective resistors; that is, connect one resistor to red pin, other to green pin, and the other to blue pin RGB LED while the remaining resistor leads to Arduino pin 2, 3, and 4 respectively.

Installing the Second RGB LED

Installing_the_second_RGB.jpg
Back_side_the_second_RGB.jpg

Install the second RGB LED in combination with its respective resistors; that is, connect one resistor to red pin, other to green pin, and the other to blue pin RGB LED while the remaining resistor leads to Arduino pin 5, 6, and 7 respectively. Also, realize how the sequence is. Because you shouldn't forget the sequence of the RGB LED's, check the back side of your PCB so that you can see the common cathodes are d1, d2, d3, and d4 respectively from the first LED to the last LED.

Installing the Third RGB LED

Installing_the_third_RGB.jpg
Back_side_the_third_RGB.jpg

Install the third RGB LED in combination with its respective resistors; that is, connect one resistor to red pin, other to green pin, and the other to blue pin RGB LED while the remaining resistor leads to Arduino pin 8, 9, and 10 respectively. Next, check the back side of your PCB so that you can see the arrange of the RGB LED's because the common cathodes are d1, d2, d3, and d4 individually from the first LED to the last LED.

Installing the Last RGB LED

Installing_the_last_RGB.jpg
Back_side_the_last_RGB.jpg

Install the last RGB LED in combination with its respective resistors; that is, connect one resistor to red pin, other to green pin, and the other to blue pin RGB LED while the remaining resistor leads to Arduino pin 11, 12, and 13 respectively. Next, check the back side of your PCB so that you can see the arrange of the RGB LED's because the common cathodes are d1, d2, d3, and d4 individually from the first LED to the last LED.

Installing the Two Switches

Installing_the_two_Switches.jpg
Back_side_the_Switches.jpg

Installing the two switches (S1, and S2), you can see the precise position of each of them for making the respective connections correctly so that you can observe in the back side of your PCB, the installation of one pin of each switch on the 5V track while the remaining pins on a free track to be connected to the resistors of 10K and Arduino pins later.

Installing the Resitors of 10K

Installing_the_resitors_10k.jpg
Back_side_the_resistors_10k.jpg

Install each resistor of 10k to its respective switch while the remaining leads to GND, and note each resistor of 10K should both be connected to its corresponding switch pin and Arduino pin A0 (14),and A1 (15) respectively from switch1 (S1) to switch2 (S2).

Back Side of the RGB LED Digits Installed

Back_side_the_digits_RGB.jpg

Connect d1, d2, d3, and d4 to A2 (16), A3 (17), A4 (18), and A5 (19) respectively.

Cut the Essential Pins

Cut_pins_need.jpg

Cut the pins that you will need in next step.

Insert the Pins in the Arduino Uno

Inserting_the_pins.jpg

Insert the pins previously prepared in the step #10 in the Arduino Uno

Inserting the PCB on the Arduino for Soldering the Pins

Soldering-previously_installed_and_GND.jpg

Insert the PCB on the Arduino Uno so that you can solder the pins previously installed.

Back Side of Uninstalling the PCB

Unintalling_PCB.jpg
Unintalling_PCB_back_side.jpg

Uninstalling the PCB from Arduino, you can check the back side connections and observe if everything is OK in your project almost done.

Install the PCB Again

Inserting_the_PCB_again.jpg

Inserting the PCB on the Arduino again, you are ready to think about installing the LED Mounting Hardware in your RGB LED's.

Inserting the LED Mounting Hardware

Inserting_the_LED_Mounting_Hardware.jpg

Insert the PCB again and mount the LED Mounting Hardware on each RGB of your project.

Install Your Project Inside an Arduino Enclosure

Installing_the_enclosure.jpg

Install the project completed inside an Arduino enclosure

Uploading the Code

Uploading_the_code.jpg

For uploading the code, go to: http://pastebin.com/7dSbeFLb

Pressing S1

Pressing_switch1.jpg
Pressing_switch1A.jpg
Pressing_switch1B.jpg

Pressing S1, the green LED's will light up and generate binary code from 1 to 15 (0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111).

Pressing S2

Pressing_switch2.jpg
3363.jpg
3505.jpg
3504.jpg
3364.jpg

Pressing S2, the blue LED's will light up and generate binary code from 1 to 15 (0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111).

Pressing Both S1 and S2

Pressing_both_S1_S2.jpg
2305.jpg
3482.jpg
3512.jpg
3513.jpg
3515.jpg
3516.jpg
3517.jpg
3519.jpg

Pressing both S1 and S2, the red LED's will light up and generate binary code from 1 to 15 (0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111).