Crafting Your Unique Arduino Creation: A DIY Project Guide

Build Your Own Arduino

Using affordable components and a solderless breadboard, you have the ability to swiftly and effortlessly construct your own Arduino setup. This approach proves invaluable for prototyping new design concepts or when avoiding the need to dismantle existing setups for Arduino usage. The following example illustrates the process of connecting components on your breadboard, with detailed explanations provided as we progress through this project.
Figure 1-1: Breadboard Arduino with USB programming ability.
Before beginning, ensure that you have all the required items listed in the components section. If you need to acquire any parts, they are available for purchase on my website at www.ArduinoFun.com. Alternatively, you can refer to the list of several other websites at the back of this book that offer Arduino-related items. Additionally, please review the note regarding the TTL-232R cable in the programming options section before making a purchase.
To commence, the initial task involves establishing power supply. Positioned with your breadboard and components before you, let’s embark on the setup! This step involves configuring the breadboard Arduino to receive a stable +5 Volts power supply, achieved through the utilization of a 7805 voltage regulator.
Figure 1-2:
Power setup with LED indicator.

To activate the voltage regulator, a power supply exceeding 5V is required. A typical 9V battery with a snap connector is well-suited for this purpose. Power will be introduced into the breadboard via designated red and black terminals.

Begin by placing one of the 10uF capacitors across the designated squares on the breadboard. Note that capacitors have a longer leg known as the Anode (Positive) and a shorter leg referred to as the Cathode (Negative), often marked with a stripe. Position the capacitor accordingly.

To bridge the gap across the breadboard’s empty space, insert two hook-up wires—one for positive (red) and one for ground (black)—to ensure continuous power flow.

Next, insert the 7805 voltage regulator, which features three legs. When viewed from the front, the left leg corresponds to voltage in (Vin), the middle leg is for ground (GND), and the third leg is for voltage out (Vout). Align the left leg with the positive power input and connect the second leg to ground.

Connect a ground wire from the voltage regulator to the ground rail on the breadboard, and then connect the Vout wire (third leg of the voltage regulator) to the positive rail. Attach the second 10uF capacitor to the power rail, ensuring correct orientation based on the Positive and Negative markings.

For troubleshooting purposes, it’s advisable to incorporate an LED status indicator. To achieve this, connect the power rails on the right and left sides of the breadboard, pairing positive with positive and negative with negative wires at the bottom of the breadboard.

Figure 1-3: Left and Right Power Rail Connections.

Having power on the left and right power rail will also help to keep your breadboard organized when providing power to the various components.

Figure 1-4: For the LED status indicator, connect a 220Ω resistor

Well done, your breadboard is now configured to receive +5V power. You’re ready to proceed to the next phase of the circuit design. Our next task is to prepare the ATmega168 or 328 chip. Before we delve into this, let’s examine the function of each pin on the chip in relation to Arduino functions. Please note: While the ATmega328 operates at a similar speed and has the same pinout, it boasts over twice the flash memory (30k vs. 14k) and double the EEPROM (1Kb vs. 512b).

Figure 1-5: Arduino Pin Mapping

The ATmega168 chip, manufactured by Atmel, may not correspond precisely to the references provided above if you consult its datasheet. This discrepancy arises because Arduino has its own pin functions, which I’ve outlined solely for this illustration. For accurate pin references or comparison, you can obtain the datasheet from www.atmel.com. With an understanding of the pin layout, we can proceed to connect the remaining components.

Firstly, we’ll establish the support circuitry for one side of the chip before addressing the other side. Pin one of most chips is typically marked with an identifier. Examining the ATmega168 or 328, you’ll observe a u-shaped notch at the top alongside a small dot, indicating pin 1.

Figure 1-6: Supporting circuitry pins 15-28

Start by connecting a jumper wire from the GND power bus to pin 22. Then, extend jumper wires from the positive power bus to pin 20 (AVCC), which supplies voltage to the ADC converter. It’s essential to connect this pin to power, whether or not the ADC is in use. Additionally, attach another jumper wire from the positive bus to pin 21, serving as the analog reference pin for the ADC.

On the Arduino, pin 13 serves as the LED pin. Although the pin number on the actual chip is 19, you will consistently reference it as Pin 13 when uploading your sketch code and for all projects.

To connect the LED, incorporate a 220Ω resistor bridging from GND to the cathode of the LED. Then, connect a jumper wire from the anode of the LED to pin 19.

Transitioning to the other side of the chip, your setup is nearly complete!

Figure 1-6: Supporting circuitry pins 1-14

Position the small tact switch above the ATmega168 chip, close to the pin 1 marker. This switch serves as the Arduino reset button. Prior to uploading a new sketch to the chip, press this switch once.

Connect a small jumper wire from pin 1 to the lower leg of the switch. Then, attach the 10K resistor from power to the pin 1 row on the breadboard. Finally, connect a GND jumper wire to the upper leg of the switch.

Attach power and GND jumpers to pin 7 (VCC) and pin 8 (GND). Install the 16MHz clock crystal to pins 9 and 10, followed by connecting two .22pF capacitors from pins 9 and 10 to GND.

Your basic breadboard Arduino setup is now assembled. While you could stop here and transfer a pre-programmed chip from your Arduino board to the breadboard, it’s recommended to proceed with adding programming pins for flexibility.

Alternatively, instead of using the 16MHz clock crystal, you can opt for a 16 MHz ceramic resonator with built-in capacitors, three-terminal SIP package. In this case, arrange your breadboard differently, with the resonator’s middle leg connected to ground and the other two legs to pins 9 and 10 on the ATmega168 chip.

Identify a space on the breadboard with six columns not in contact with other components. Insert a row of six male header pins here, labeled as follows from left to right: GND, NC, 5V, TX, RX, NC (or pins 1, 2, 3, 4, 5, 6).

From the power bus rail, connect the GND wire to pin 1 and a wire from power to pin 3. The NC pins (not connected) can be linked to GND if desired.

Connect a wire from pin 2 on the ATmega168 chip (Arduino RX pin) to pin 4 (TX) on the programming headers. Likewise, connect pin 3 (Arduino TX) on the ATmega168 chip to pin 5 (RX) on the header pins.

The communication setup is as follows: ATmega168 RX to Header Pin TX, and ATmega168 TX to Header Pin RX. Now your breadboard Arduino is ready for programming.

Programming Options

The initial choice is to acquire a TTL-232R 3.3V USB – TTL Level Serial Cable, which is available for purchase on websites such as www.adafruit.com or www.ftdichip.com.

Alternatively, I recommend two other options, both of which are breakout boards offered by SparkFun.com. These options include:

– FT232RL USB to Serial Breakout Board, identified by SKU: BOB-0071. Please note that this choice occupies more space on your breadboard.
– FTDI Basic Breakout – 3.3V, designated by SKU: DEV-08772. This option, especially when paired with right angle male headers, proves to be the most effective among the three as it offers better stability on the breadboard.

Build Your Own Arduino

Verify your connections thoroughly, ensuring the 9V battery remains disconnected, and establish your programming setup. Launch the Arduino IDE and navigate to the Example sketch files, located under Digital. Load the Blink sketch.

From the file menu, access Serial Port and select the appropriate COM port corresponding to your USB cable connection (e.g., COM1, COM9, etc.).

In the file menu under Tools/Board, choose one of the following options based on your breadboard Arduino configuration:
• Arduino Duemilanove w/ATmega328
• Arduino Decimila, Duemilanove, or Nano w/ATmega128 (depending on the chip used with your breadboard Arduino)

Now, click the upload icon and proceed to press the reset button on your breadboard. If you’re utilizing one of the SparkFun breakout boards, observe the RX and TX lights blinking, indicating data transmission. Occasionally, allow a few seconds after clicking the upload button before pressing the reset switch. If encountering difficulties, experiment with timing between the two actions.

Once the sketch uploads successfully, the LED on pin 13 will blink in a one-second on, one-second off pattern until either a new sketch is uploaded or the power is turned off.

After code upload completion, you can disconnect the programming board and rely on your 9V battery for power.

Troubleshooting

• Insufficient Power – Ensure that your power source supplies voltage higher than 5V.
• Power On, No Functionality – Double-check all connections to ensure proper connectivity.
• Upload Error – Consult www.arduino.cc and search for the specific error message encountered. Additionally, explore the forums for valuable assistance and troubleshooting tips.


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top