loading

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

Step 1: Bill of Materials

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

Step 2: Schematic Diagram

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.

Step 3: Installing the First RGB LED

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.

Step 4: Installing the Second RGB LED

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.

Step 5: Installing the Third RGB LED

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.

Step 6: Installing the Last RGB LED

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.

Step 7: Installing the Two Switches

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.

Step 8: Installing the Resitors of 10K

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).

Step 9: Back Side of the RGB LED Digits Installed

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

Step 10: Cut the Essential Pins

Cut the pins that you will need in next step.

Step 11: Insert the Pins in the Arduino Uno

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

Step 12: Inserting the PCB on the Arduino for Soldering the Pins

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

Step 13: Back Side of Uninstalling the PCB

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

Step 14: Install the PCB Again

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

Step 15: Inserting the LED Mounting Hardware

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

Step 16: Install Your Project Inside an Arduino Enclosure

Install the project completed inside an Arduino enclosure

Step 17: Uploading the Code

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

Step 18: Pressing S1

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).

Step 19: Pressing S2

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).

Step 20: Pressing Both S1 and S2

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).

<p>You can do your own project by modifying the code at:</p><p>http://pastebin.com/7dSbeFLb</p>
<p>If you want to upload the code for this project, you need to visit the next site:</p><p>http://pastebin.com/7dSbeFLb</p>
<p>LEATHERWORKING classes are now free in this site.</p>
<p>PHOTOGRAPHY classes are now free in this site.</p>
<p>BREAD classes are now free in this site.</p>
<p>CANNING PRESERVING classes are now free in this site.</p>
<p>WOODWORKING classes are now free in this site.</p>
<p>GLUE classes are now free in this site.</p>
<p>CONCRETE classes are now free in this site.</p>
<p>MEAT classes are now free in this site.</p>
<p>WEARABLE ELECTRONICS classes are now free in this site.</p>
<p>RASPBERRY PI classes are now free in this site.</p>
<p>LASER CUTTING classes are now free in this site.</p>
<p>LAMPS classes are now free in this site.</p>
<p>CNC classes are now free in this site.</p>
<p>3D PRINTING classes are now free in this site.</p>
<p>Robots classes are now free in this site.</p>
<p>Electronc classes are now free in this site.</p>
<p>Arduino classes are now free in this site.</p>
<p>LEDS &amp; LIGHTING classes are now free in this site.</p>
<p>We have a compromise to develop more projects with RGB LEDs and sharing them.</p>
<p>Think in designing with RGB LEDs and switches for your next projects.</p>
<p>It's interesting design with either switches or RGB LEDs.</p>
<p>RGB LED is always a challenge.</p>
<p>Combine different colors with RGB LEDs will be my next project.</p>
<p>RGB binary counter implies three different set of codes.</p>
<p>This project is for you.</p>
<p>RGB LEDs is important design with Arduino.</p>
<p>This project is interesting because you can use RGB LEDs and binary code.</p>
<p>Thank you for viewing my project.</p>
<p>I enjoyed developing this project truly.</p>
<p>RGB LEDs and switches are a good beginning in Arduino projects. </p>

About This Instructable

965views

11favorites

License:

More by braulio777:LED Bargraph Counter 4-Digit Yellow Binary Counter 2-Digit Green Binary Counter 
Add instructable to: