Introduction: Programmable Encoder

This project is a programmable encoder because its functionality depends on an Arduino Uno and its suitable code. Since the project is an encoder generates the numbers from 0 - 9, it'll also need a common cathode display and some switches for showing its practical use. Because this programmable encoder is ideal if you want to learn to manipulate switches in an Arduino environment, it'd be recommended its lecture and analysis so that you can better your projects with this new knowledge if this knowledge is unknown for you. Also, knowing about coding switches give you an extra skill for developing much more projects and ideas that you have. Then, for uploading the code, go to: http://pastebin.com/b6iUs1bh

Important Note:

If your project is dependable switches one, this this project is a good option so that you can begin or continue learning about manipulating switches in an Arduino environment.

What you will need:
Soldering Iron Solder

Wire #22 (5m)

Nose pliers

Wire cutter

9 Volt Battery

Step 1: List of Materials

Picture of List of Materials

1 Arduino MEGA Protoboard PCB (Rev3)

1 Arduino Uno R3 DIP Edition (Revision 3)

1 Red Common Cathode Display 697nm LHDP/RHDP

7 Resistor Carbon Film 220 Ohm 1/4 Watt 5%

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

11 Switch Push Button Tactile Single Pole Single Throw Off Momentary (On)

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

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

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

Picture of Schematic Diagram

The schematic diagram shows clearly how to connect the switches and the common cathode display to the corresponding Arduino pins.

Step 3: Identifying the Common Cathode Display

Picture of Identifying the Common Cathode Display

This step shows the corresponding CC display pins from A to G.

Step 4: Installing the Common Cathode Display

Picture of Installing the Common Cathode Display

Once installed the CC display in the PCB, identify the corresponding pins form A to G so that you can connect them correctly later.

Step 5: Connecting the Resistors to CC Display

Picture of Connecting the Resistors to CC Display

Connect the 7 resistors of 220 Ohm to your common cathode(CC) display and Arduino Uno respectively and according to the connections showed in the photo. That is, the resistors are connected between Arduino Uno and the CC display pins and you shouldn't also forget the connection to GND from CC display pin 16.

Step 6: Install 10 Resistors of 10k

Picture of Install 10 Resistors of 10k

Install 10 resistors of 10K without forgetting the common connection to GND while leaving free the remaining leads of those resistors installed.

Step 7: Install the 11 Switches

Picture of Install the 11 Switches

Once installed the 11 switches, define and mark each switch with its respective number so that you can identify them. That is, you will have a keyboard from 0 to 9 and Clear.

Step 8: Connecting the Switches to +5V

Picture of Connecting the Switches to +5V

Each switch should be connected to +5V, so you need to take a pin of each switch to be connected to +5V while the remaining pin of each switch will be connected to an Arduino pin and a resistor of 10K respectively.

Step 9: Connecting the Switches: Clear, 9, and 8

Picture of Connecting the Switches: Clear, 9, and 8

Connect the switches marked with a clear, 9, and 8 to D3, D4, and D5 Arduino pins respectively.

Step 10: Connecting the Switches: 7, 6, 5, and 4

Picture of Connecting the Switches: 7, 6, 5, and 4

Connect the switches marked with the numbers: 7, 6, 5, and 4 to D6, D7, D8, and D9 Arduino pins individually.

Step 11: Connecting the Switches: 3, 2, 1, and 0

Picture of Connecting the Switches: 3, 2, 1, and 0

Connect the switches labeled with a 3, 2, 1, and 0 to D10, D11, D12, and D13 Arduino pins respectively.

Step 12: Connecting the 11th Resistor of 10K

Picture of Connecting the 11th Resistor of 10K

Once connected the 11th resistor of 10K and without forgetting the connection to GND also, draw connections from the remaining leads of the 11 resistors of 10K now to D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, and D13 Arduino pins individually.

Step 13: Preparing the Pins

Picture of Preparing the Pins

Prepare the 6, 6, 7, and 2 pins for your project.

Step 14: Insert the Pins in Your Arduino

Picture of Insert the Pins in Your Arduino

Insert the pins previously prepared in your Arduino so that you can solder them later.

Step 15: Soldering the Pins Previously Inserted in Your Arduino

Picture of Soldering the Pins Previously Inserted in Your Arduino

Solder the pins previously inserted inside your Arduino so that you can join them with the PCB of your project.

Step 16: Uninstall Your PCB Completed

Picture of Uninstall Your PCB Completed

Uninstall your PCB completed so that you can observe its backside and check if its connections are correct.

Step 17: Reinstall the PCB Newly

Picture of Reinstall the PCB Newly

Reinstall newly the PCB on the Arduino so that you can present your project completed.

Step 18: Install the Project Completed Inside Your Arduino Enclosure

Picture of Install the Project Completed Inside Your Arduino Enclosure

Now, it's time of installing your project completed inside your Arduino enclosure so that you are prepared to upload the code.

Step 19: Upload the Code

Picture of Upload the Code

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

Step 20: Install the Clip 9V Battery

Picture of Install the Clip 9V Battery

Installing the clip 9 volt battery, you can use your 9V battery.

Step 21: Using the Project

Picture of Using the Project

Once uploaded the code of your project, you can use it. Just press any switch and a number will appear in the display, except when you press clear.

Comments

braulio777 (author)2016-12-09

You can do your own project by modifying the code at:

http://pastebin.com/b6iUs1bh

braulio777 (author)2016-12-09

If you want to upload the code for this project, you need to visit the next site:

http://pastebin.com/b6iUs1bh

braulio777 (author)2016-12-08

LEATHERWORKING classes are now free in this site.

braulio777 (author)2016-12-08

BREAD classes are now free in this site.

braulio777 (author)2016-12-08

PHOTOGRAPHY classes are now free in this site.

braulio777 (author)2016-12-08

CANNING PRESERVING classes are now free in this site.

braulio777 (author)2016-12-07

WOODWORKING classes are now free in this site.

braulio777 (author)2016-12-06

GLUE classes are now free in this site.

braulio777 (author)2016-12-06

CONCRETE classes are now free in this site.

braulio777 (author)2016-12-06

MEAT classes are now free in this site.

braulio777 (author)2016-12-06

WEARABLE ELECTRONICS classes are now free in this site.

braulio777 (author)2016-12-06

RASPBERRY PI classes are now free in this site.

braulio777 (author)2016-12-06

LASER CUTTING classes are now free in this site.

braulio777 (author)2016-12-06

LAMPS classes are now free in this site.

braulio777 (author)2016-12-06

CNC classes are now free in this site.

braulio777 (author)2016-12-06

3D PRINTING classes are now free in this site.

braulio777 (author)2016-12-06

Robots classes are now free in this site.

braulio777 (author)2016-12-06

Electronic classes are now free in this site.

braulio777 (author)2016-12-06

Arduino classes are now free in this site.

braulio777 (author)2016-12-06

LEDS & LIGHTING classes are now free in this site.

braulio777 (author)2016-12-05

You can do the best designs with switches.

braulio777 (author)2016-12-04

You can program with switches too.

braulio777 (author)2016-11-30

I like to program with switches.

braulio777 (author)2016-11-30

This project is for whose like to design with switches.

braulio777 (author)2016-11-28

Program an encoder by using switches so that you can learn how it works.

braulio777 (author)2016-11-28

You can design an encoder.

braulio777 (author)2016-11-28

This project is for you.

braulio777 (author)2016-11-28

Encoder is basic design.

braulio777 (author)2016-11-28

This project can be done if you are thinking in designing an encoder.

braulio777 (author)2016-11-28

I enjoyed doing this project truly.

braulio777 (author)2016-11-28

Thank you for viewing my project.

braulio777 (author)2016-11-27

This type of projects are an example so that you can use switches and so you can designing your own projects.