Arduino Application Development Procedure Part-2

In the first section Arduino Application Development Procedure Part-1 , I discussed the first step in my process: Idea Generation and Circuit Design Development. In this post, I will provide a parts list, tips for wiring, and a Fritzing diagram with a breadboard view diagram to aid the wiring process.

Parts List (Bill of Materials)

|Brief Description|Digi-Key Part Number|Manufacturer Part Number|Quantity|
|–|–|–|–|–|
|Arduino Mega2560 ATMEGA2560|1050-1018-ND|A000067|1|
|10k Ohm Res 5% 0.25W|CF14JT10K0CT-ND|CF14JT10K0|9|
|Switch Push SPST 0.3A 12V|519PB-ND|50-0015-00|9|
|84.5 Ohm Res 1% Axial 0.25W|84.5XBK-ND|MFR-25FBF52-84R5|9|
|150 Ohm Res 5% Axial 0.25W|CF14JT150RCT-ND|CF14JT150R|9|
|LED Blue/Red Diff T-1 3/4 T/H|1497-1018-ND|XLMDKCBD59M|9|
|Hook-Up 22AWG Solid 6x25FT|1528-1743-ND|1311|1|
|Pliers Needle Nose*|PA1180-ND|PA1180|1|
|Strip Tool 10-22AWG Strand Wire|WM3674-ND|0640160040|1|
The descriptions with an * are optional parts, see wiring tips below. In total, when I purchased the parts, the cost was $94.82 USD. Here is a link to the bill of materials minus the pliers, prices are subject to change: https://www.digikey.com/short/zq489v The link does ask if you want to correct the amount for a few parts because extended prices decrease based on the quantity required.

Part Selection Notes

The actual value calculated for the blue LED was eighty-five ohms and the red LED was one-hundred-fifty-two ohms. Sometimes it is convenient to approximate with one resistor than to try to add up to the exact resistance by wiring them in series. These LEDs can still function on the actual current provided with the adjusted resistor values seen above. If the current is a bit higher than the test current the only thing that may happen is the LED may not last as long due to electrical limitations, but both values are extremely close (most datasheets have absolute maximum current ratings and these resistors I chose definitely fall within tolerance). The 10k resistors are kind of generic pull-down resistors, from experience that value seems to be standard. I did not need to calculate anything for this. I just chose any bi-directional LED with two colors and a common cathode under 40mA, red and blue were convenient since they are completely different colors. The common cathode design allows me to use the same ground point everywhere. Finally, I chose a non-momentary button for easier code implementation. I know debouncing can be an issue with momentary buttons (which I did not want to add to troubleshooting in programming). The only caveat is one player has to reset all the buttons at the end, but I will make that part of the program so the game can reset itself after winning or draw conditions. One more note, my actual wiring on my physical breadboard does not match 100% to the Fritzing diagram, I had different resistors that were close enough and a different breadboard to make wiring a little easier. Use whatever breadboard is comfortable for your design. You can either follow the diagram exactly or improvise with what you have or buy. Wiring is flexible since you just need to make sure things are routed correctly.

Physical Wiring Diagram Using Fritzing

Fritzing is quite a useful program that allows you to create wiring diagrams for several kinds of projects including Arduino. The program has tons of pre-installed boards, parts, and references in its library. I won’t be discussing how to use the program as that is out of the scope of this project. All you need is the diagram I created for wiring purposes to help put this together if you want to (will include a PDF at the end of the post for convenience).


Again, note that the actual resistances for the blue LEDs will not match the physical resistors in the bill of materials. Fritzing allowed eighty-five ohms, but I could not find any parts with that value. Also, I had to use two LEDs in the diagram above per one LED I mentioned in the bill of materials, Fritzing did not have the correct common cathode part, so I improvised. The buttons also don’t match what I have since Fritzing didn’t have non-momentary buttons that were close. They are wired the same, except it has two pins on the physical part instead of four (see the part number for a datasheet). You can start from the breadboard view with wiring (a schematic view automatically generates) in Fritzing. However, there are some bugs with routing that I noticed, so I actually created the electrical schematic first, then wired the physical breadboard. This type of visual wiring diagram is a lot easier to follow when wiring on a real breadboard and it helps tie the concept to what an electrical schematic looks like based on the physical wiring.

Physical Wiring Tips and Picture of What I Setup

Here are some practical tips for wiring a breadboard:

  • Use different colored wires for different kinds of connections; having different colors helps make sure things are connected correctly by reducing mistaken routes. Be consistent with color choices.
  • For example, I used red wires to connect from the red LEDs to their series resistors, blue wires for all the buttons and their inputs, yellow wires for connecting blue LEDs to their series resistors, green wires for ground, white (Fritzing shows gray for easier visibility) wires to connect from the other side of the blue LED resistors to their output ports on the Arduino, and black wires for the other side of the red LED resistors to their output ports on the Arduino. This is why I suggested the 22AWG wire kit from Adafruit in the bill of materials.

  • Use wire strippers to cut the wires to the length where it just reaches a port, having longer wires than necessary is hard to work around at times.
  • Don't always aim to make things the most compact you can. It may look nice to be as compact as possible, but trying to look where wires are supposed to go with closer parts can cause confusion. It's also hard to get fingers or pliers between compactly placed components.
  • Try to snip extra lead lengths off of components with wire leads. Having them close to the breadboard is convenient.
  • Use needle-nose pliers to bend wires or wire leads. Having something smaller than your fingers helps make things as compact as possible as well as getting to places your fingers can't. Also, fingers are not very precise bending tools, so leads and wires can become quite mangled. I had suggested a pair in the bill of materials.
  • If you are working on something with a lot of input and output like this project, try to connect to the most convenient ports. Place wires in the closest ports possible and make sure you can access the other ports you need. This makes setting up the program easier, diagrams being more manageable, and organizes the project.
  • Organize the wires so they don't interfere with parts that need to be seen or accessed. Covering the LEDs with wires would ruin the purpose of the project and covering the buttons would make it difficult to press them without potentially making the wires loose.
Here is the photo of my setup on my breadboard:


The next post will discuss my first step in developing the application that controls the logic of the game.

Download for the Fritzing Bread Board PDF: TTTFRZ_brdbdPDF.pdf (2.9 MB)