Introduction: DIY Arduino-Compatible Clone
The Arduino is the ultimate tool in the Maker's arsenal. You should be able to build your own! In the early days of the project, circa 2005, the design was all through-hole parts and communication was via a RS232 serial cable. The files are still available, so you can make your own, and I have, but not many computers have the older serial ports.
The Arduino USB version followed shortly, and probably contributed greatly to the project's success because it allowed easy connection and communication. It did, however come at a cost: the FTDI communication chip only came in a surface mount package. Plans are still available for it as well, but surface mount soldering is beyond most beginners.
Newer Arduino boards use 32U4 chips with built in USB (Leonardo), or separate Atmel chips for USB (UNO), both which still leave us in surface mount territory. At one point there was "TAD" from Dangerous Devices that used a through hole PIC to do USB, but I can't find anything left on the web of them.
So here we are. I firmly believe a beginner, like a Jedi Knight, should be able to build their own Arduino (light sabre). "An elegent weapon from a more civilize age". My solution: make a through-hole FTDI chip using a surface mount package! That allows me to do the surface mount, and offer the remaining project as DIY through-hole! I also designed it in Open Source KiCad, so you can study the design files, modify them, and spin your own version.
If you think this is a stupid idea, or love surface mount soldering, check out my Leonardo Clone, otherwise, read on . . .
Step 1: Parts and Supplies
The full bill of materials is located at https://github.com/aspro648/Arduino/tree/master/D...
The unique parts of this are the circuit boards, one for the Arduino, and one for the FTDI chip. You can have OSH Park make them for you, or use the design files with your favorite board house.
A kit for this project is available on Tindie.com. Purchasing the kit will save you the time and expense of ordering from several different vendors and avoid the minimum PCB order premium. It will also provide you a tested surface-mounted FDTI through-hole chip as well a pre-flashed Atmega.
Tools and Supplies:
For my workshops, I use SparkFun's Beginner's ToolKit which has most of what you need:
- Soldering iron.
- Wire nippers
- Desoldering braid (hopefully not needed, but you never know).
Step 2: Ladies and Gentlemen, Start Your Irons
I'm not going to try and teach you soldering. Here are a couple of my favorite videos that show it much better than I can:
- Find the location on the PCB using the silk screen markings.
- Bend the component leads to fit the foot print.
- Solder the leads.
- Trim the leads
Step 3: Resistors
Let's start with resistors since they are the most plentiful, lowest seating, and easiest to solder. They are more heat resistant and will give you a chance to brush up on your technique. They also have no polarity, so you can put them in either way.
- Start with the three 10K ohm (brown - black - orange -gold), which are in a couple of places on the board (see picture). These are "pull-up" resistors that keep the signal at 5V unless they are actively pulled low.
- Pair of 22 ohm (red - red - black - gold) are in the upper left corner. These are part of the USB communication circuit.
- Pair of 470 ohm (Yellow, Violet, Brown, Gold) are the next ones down. These are current limiting resistors for the RX/TX LEDs.
- Single 4.7K ohm (Yellow, Violet, Red, Gold). An odd-ball for the FTDI VCC signal.
- And finally, a pair of 1K ohm (Brown, Black, Red, Gold). These are current limiting resistors for the power and D13 LEDs (330 ohm would work, but I don't like them too bright).
Step 4: Diode
Next up we have the diode which protects the circuit from reverse current from power jack. Most, but not all components will react poorly to reverse polarity.
It has a polarity which is marked by a silver band on one end.
Match it with the silk screen marking and solder in place.
Step 5: Voltage Regulator (5V)
There are two voltage regulators, and the main one is a 7805 which will regulate twelve volts from the jack down to 5 volts that the Atmega 328 needs. There are large copper features on the printed circuit board to help dissipate heat. Bend the leads so that the back touches the board with the hole aligned with the hole in part and solder in place.
Step 6: Sockets
Sockets allow IC chips to be inserted and removed without soldering. I think of them as insurance because they are cheap and allow you to replace a blown chip or reorient the IC if put in backward. They have a divot in one end to show the direction of the chip, so match it to the silk screen. Solder two pins and then verify it is seated correctly before soldering the remaining pins.
Step 7: Button
Arduino's typically have a reset button to restart the chip if it hangs up or needs to restart. Yours is in the upper left corner. Press it in place and solder.
Step 8: LEDs
There are a number of LEDs to indicate status. LEDs have a polarity. The long leg is the anode, or positive, and goes in the round pad with the "+" next to it. The short leg is the cathode, or negative, and goes in the square pad.
The color is arbitrary, but I typically use:
- Yellow for RX/TX which blink when the chip is communicating or being programmed.
- Green for the the D13 LED which can be used to by the program to indicate events.
- Red to show 5 volt power is available either via USB or the power jack.
Step 9: Ceramic Capacitors
Ceramic capacitors have no polarity.
Power smoothing capacitors are typically used to remove transients from the power supply to chips. The values are typically specified in the component's data sheet.
Each IC chip in our design has a 0.1uF capacitor for power smoothing.
There are two 1uF capacitors for smoothing power around the 3.3 volt regulator.
Additionally, there is a 1uF capacitor that helps with the timing of the software reset function.
Step 10: Electrolytic Capacitors
Electrolytic Capacitors do have a polarity which must be observed. They typically come in larger values than ceramic capacitors, but in this case we have 0.33 uF capacitor for power smoothing around the 7805 regulator.
The long leg of the device is positive and goes in the square pad marked "+". These tend to go "pop" if put in backward, so get it right or you will need a replacement.
Step 11: 3.3 Voltage Regulator
While the Atmega chip runs on 5 volts, the FTDI USB chip needs 3.3 volts to operate correctly. To provide this, we use a MCP1700 and since it requires very little current, it is in a small TO-92-3 package like transistors instead of the big TO-220 package like the 7805.
The device has a flat face. Match it to the silk screen and adjust the component height about a quarter inch above the board. Solder in place.
Step 12: Headers
The beauty of Arduino is the standardized footprint and pinout. The headers allow plugging in "shields" that allow quickly changing hardward configurations as needed.
I typically solder one pin of each header in and then verify the alignment before soldering the remaining pins.
Step 13: Resonator
Atmega chips have an internal resonator which can run at different frequencies up to 8 Mhz. An external timing source allows the chip to run up to 20 Mhz, but, the standard Arduino use 16 Mhz which was the maximum speed of the Atmega8 chips used in the original design.
Most Arduino's use crystals, which are more accurate, but they require additional capacitors. I decided to use a resonator, which is accurate enough for most work. It does not have a polarity, but I usually face the marking outward so curious makers can tell you are running a standard setup.
Step 14: Fuse
Most Arduino don't have fuses, but any Maker who is learning will quite often (at least in my case) hook things up incorrectly. A simple re-setable fuse will help keep from releasing the "magic smoke" necessitating chip replacement. This fuse will open if too much current is pulled, and will reset itself when it cools off. It has no polarity, and kinks in the legs hold it above the board.
Step 15: Headers
Two more headers, these one with male pins. Near the USB connector are three pins which allow switching between USB power and the jack using a jumper. An UNO has circuity to do this automatically, but I haven't been able to replicate that in through-hole form.
The second header is a six-pin "in system programming" header. This allows connecting an external programmer to reprogram the Atmega directly if needed. If you buy my kit, the chip already has firmware loaded, or the Atmega can be removed from the socket and placed directly in a programming socket, so this header is rarely used and therefore optional.
Step 16: Power Jack
Instead of USB, a standard 5.5 x 2.1 mm jack can be used to bring in external power. This supplies the pin marked "Vin" and powers the 7805 voltage regulator which makes 5 volts. The center pin is positive and the input can be up to 35V, although 12V is more typical.
Step 17: USB
Newer Arduinos like the Leonardo use a USB micro connection, but the original USB B connection is robust and cheap and you probably have lots of cables laying around. The two large tabs are not electrically connected, but are soldered for mechanical strength.
Step 18: Chips
Time to install the chips. Verify the orientation. If the socket is in backwards, just ensure the chip is matching the silk screen markings. In the orientation we have been working with, the bottom two chips are upside down.
Insert the chip so the legs are aligned with the holds. ICs come from the manufacture with the legs slightly splayed, so will need to be bent to vertical. This is usually already done for you in my kits. Once you are are sure of the orientation, gently press both sides of the chip. Check to make sure no legs got folded over by accident.
Step 19: Flashing the Bootloader
The bootloader is a small bit of code on the chip that allows loading code easily via USB. It runs for the first few seconds on power up looking for updates, and then launches the existing code.
The Arduino IDE makes flashing firmware easy, but it does require an external programmer. I use my own AVR Programmer, and will of course, sell you a kit for that. If you do have a programmer, you don't really need an Arduino since you can program the chip directly. Kind of a chick-and-egg thing.
Another option is to buy the Atmega with a bootloader already on it: https://www.adafruit.com/product/123
I will point to you the official Arduino instructions since it could easily turn into it's own Instructable if we are not careful: https://www.arduino.cc/en/Hacking/Bootloader
Step 20: Install Power Jumper and Connect
The power jumper is a manual way of selecting the source of power between 5 volts from USB or the power jack. Standard Arduinos have circuitry to switch automatically, but I wasn't able to implement it easily with through hole parts.
If the jumper is not installed, there is no power. If you select the jack, and have nothing plugged in, there is no power. That is why there is a red LED to show you if you have power.
Initially, you want to see if the Arduino communicates via USB, so place the jumper to that setting. Plug your Arduino into your computer at watch carefully. If you get an "unrecognized USB device", unplug and start trouble shooting.
Otherwise, use your Arduino IDE to upload the basic blink sketch. Use "Arduino UNO" as the board. Follow instructions here: https://www.arduino.cc/en/tutorial/blink
Step 21: Troubleshooting
On initial power up, you are always looking for indications of success or failure, and are ready to unplug the board quickly if things are not going as expected. Don't loose heart if success isn't immediate. In my workshops, I try to encourage:
- Patience, this is not always easy, but usually worth it.
- Persistence, you won't solve the problem if you give up .
- Positive Attitude, you can figure this out, even if you need help to do so.
When ever I am struggling with a problem, I always tell myself the harder it is to solve, the bigger the reward or learning will be for solving it.
With that in mind, start with the simple stuff:
- Inspect the solder joints on the back of the board, retouching any joint that looks suspect.
- Check that the IC chips are in the correct orientation and that none of the leads got folding in when inserted.
- Is the red LED on when plugged in? If not, check your power jumper and USB solder joints.
- Check that other components that have polarity are correctly oriented.
- Look for other clues like error messages or components getting hot.
If you are still having trouble, ask for help. I write Instructables because I want to teach and help those who want to learn. Provide a good description of what the symptoms are and what steps you have done to find errors. A high resolution photograph of the front and back of the board may help as well. Never give up. Every struggle is a lesson.
Participated in the
Build a Tool Contest
4 years ago
Very nice instructable. I looks a bit like the one I posted as a Arduino clone but then for the PIC microcontroller (https://www.instructables.com/id/JALPIC-One-Develo... the only mistake I made was to not put the voltage regulator flat on the PCB which I would do in revision 1.
As a suggestion, your 3.3 Volt regulator can supply a maximum of 250 mA and if I am right an ESP8266 Wifi Modules needs more than that so that might be a bit problematic if you want to create an IoT device with your board and that module.
4 years ago
Great Instructable! It’s obvious you’ve taught people before as the detail you’ve include, and positive encouragement, is perfect.
4 years ago
Looks great. Obviously the price will be far above a UNO clone from China, but as a learning project it's great. Having said that, when building yrself, one can always introduce a few modifications, e.g. a number to connect and disconnect the led on pin 13, a port to slot in a Bluetooth module, an I2C port, maybe a connector for an RF module.....
Tip 4 years ago on Step 6
Use a zif socket for the atmega 328 then you can flash the boot loader and run and test a program for a standalone system and easily make modifications if the standalone system has the atmega328 in a socket. Any standalone system can then just have the hardware for what it needs rather than everything the arduino has.