Programmable Encoder

by braulio777 in Circuits > Arduino

1271 Views, 9 Favorites, 0 Comments

Programmable Encoder

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

List of Materials

392.jpg
393.jpg
394.jpg

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

Schematic Diagram

Programmable_Encoder_schem.png

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

Identifying the Common Cathode Display

Common_cathode_display.png

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

Installing the Common Cathode Display

1204.jpg
Installing_the_common_cathode_display_Intructables.jpg

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

Connecting the Resistors to CC Display

Connecting_the-resistors_to_LED_Display_Intructables.jpg
1290.jpg
1295.jpg

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.

Install 10 Resistors of 10k

Installing_10_10K_resistors.jpg
1312.jpg

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

Install the 11 Switches

Installing_the_switches_and_identify_the _num_each_sw.jpg

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.

Connecting the Switches to +5V

Common_connection_switch_to_5V.jpg
1331.jpg
1332.jpg

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.

Connecting the Switches: Clear, 9, and 8

Connecting_Switches_clear_9_8.jpg
1359.jpg

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

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

Connecting_Switches_7_6_5_4.jpg
1365.jpg

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

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

Connecting_Switches_3_2_1_0.jpg
1381.jpg

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

Connecting the 11th Resistor of 10K

Connecting_the_11th_resistor_10K_draw_connections_from_D3_D13_to_the_11_res_10k.jpg
1425.jpg
1426.jpg

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.

Preparing the Pins

Preparing_the_pins.jpg
1454.jpg

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

Insert the Pins in Your Arduino

Inserting_the_pins_onto_Arduino_sockets.jpg
1469.jpg

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

Soldering the Pins Previously Inserted in Your Arduino

Solder_the_pins_previously_installed.jpg
Soldering_the_pins.jpg

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

Uninstall Your PCB Completed

Checking_the_connections.jpg
1485.jpg
1486.jpg

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

Reinstall the PCB Newly

Reinstall_the_PCB.jpg

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

Install the Project Completed Inside Your Arduino Enclosure

Reinstall_newly_the_PCB_completed_and_install_it_inside_its_enclosure.jpg
1957.jpg

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

Upload the Code

Upload_the_code.jpg
1971.jpg
1972.jpg

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

Install the Clip 9V Battery

Install_the_battery_clip_and_its_battery.jpg
1987.jpg

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

Using the Project

Using_the_project.jpg
1325.jpg
1327.jpg
1328.jpg
1329.jpg
1330.jpg
1331.jpg
1332.jpg
1333.jpg
1335.jpg
1337.jpg

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.