V-Tech Design

Building a Doduino

Intro: This project was an exercise in building an Arduino like ATMEGA328P board from scratch using a 3x4 inch Veroboard. The main objective was to provide better build-in I/O capability out of the box, so most projects will not need an I/O shield to perform common tasks. This makes the whole setup cheaper than trying to do this with an Arduino and I/O shield as well as a good Arduino learning exercise for new users.

If you are new to Veroboards (Stripboard) and would like a better understanding see: "What is a Veroboard?"

The result is a decent package that includes a ULN2803A for higher current driving capability on 8 ports. This allows you to drive DC motors, Stepper Motors and relays of up to 500ma and 50V!. The power for the ULN2803A comes from a separate connection shown at the bottom right of the board.

As for the board power it can come from the USBTinyISP, USB to Serial converter or 7-18volt external power supply connected to the terminal screws at the top right corner of the board as shown above.

There is also a ribbon cable LCD port for an KTM-S1201 LCD, which could be adapted to any 4 channel LCD and lastly a USB to Serial connector, which with an optional $6 (ebay) USB to Serial board gives you Serial communications if needed.

The entire build was around $24 including the LCD, but I also added a $10 USBTinyISP to use as the primary programmer therefore allowing the full capacity of the ATMEGA328P without requiring a Bootloader. Of course you are welcome to use a bootloader if you decide to go that direction. You will require the USB to Serial board for that.

A Link is provided at the end of the project for using the USBTinyISP as the primary programmer in the Arduino IDE or ATMEL Studio 6 with no bootloader. Awesome!

Let's get started!

Component List

  • 2 x 220 Ohm resistors (LEDs R3/R2)
  • 1 x 120 Ohm resistor (ICSP Reset R4)
  • 1 x 10k Ohm resistor (328P Reset R1)
  • 2 x 22pF Ceramic Capacitors (Crystal C1/C2)
  • 2 x .1uf Ceramic Capacitor (C3-Decoupler,C6-Reset)
  • 2 x 10 uf Electrolytic Capacitor (LM7805 5V Power C4/C5)
  • 1 x ATMEGA328P Microcontroller
  • 1 x 28 pin narrow IC socket (MCU optional)
  • 1 x 16mhz Crystal
  • 1 x ULN2803A Darlingtion Transistor Array (High power IC)
  • 1 x 18 pin narrow IC socket (optional)
  • 1 x LM7805 TO-220 5v Voltage Regulator
  • 2 x Power switches (optional but recommended)
  • 3 x 40 pin breakaway square female headers (round shown)
  • 1 x 2 pin male header (optional for Crystal)
  • 1 x 6 pin long pin female header bent to 90 deg (male shown)
  • 1 x Microswitch (Reset)
  • 2 x LEDs (Power and Activity)
  • 1 x 10k PDIP Potentiometer (for LCD Contrast)
  • 1 x KTM-S1201 LCD or other 4 wire dataline LCD (Optional)
  • 12 x 2 pin screw terminals (optional but recommended)
  • 1 x 3x4 Veroboard (Epoxy or Phenolic)
  • 1 x Roll of tie wire (solid strand ethernet cable works)

Cutting the Veroboard Tracks

First step is to get rid of some of the Veroboard tracks using "Stripboard cutter", which can be made cheaply. See: "Stripboard Cutter." You need to cut all the tracks marked with yellow strips below:


NOTE: The ICSP and LCD cuts cannot be made with the Stripboard cutter as they are between the rows of holes. You can do this with sharp knife or Dremel tool as shown by the yellow arrows above. Also the purple dots indicate where you need to join tracks using a solder bridge. Once the holes are cut in the Veroboard you should remove the surface oxidization with a scotchpad or fine sandpaper and clean with Isopropyl or Acetone. If you are new to soldering now would be a good time to watch this video: "How to Solder Correctly"

Wiring the Veroboard Board

The next step is relatively simple, but does require a soldering iron. Make sure to get a flux pen or flux of some sort as it's the magic sauce to good soldering.

There are roughly 3 dozen tie wires to run so it should take under an 1-2 hours to complete:

The rest of the soldering should go pretty easy from here as it's mostly big items. Just be careful with the polarity on the LEDs (D1/D2) and 10 uf Capacitors (C4/C5) and Pin 1 of the 28 (ATMEGA328P) and 18 pin socket (ULN2803A) or IC (if soldered directly). You can see pin 1 on the sockets marked with a round GREEN dot in the placement diagram.

Finished Rear:

Finished Front with optional USB to Serial adapter:

For the Crystal I prefer to mount it on a 2 pin male header so I can easily change them out for different speeds when experimenting:

I didn't want the USB to Serial adapter sticking out from the boards as it is cleaner to mount it back on the Veroboard and you don't tend to break it off. To accomplish this the connector had to be bent from a long pin header:

You can still disconnect it for other projects but it stays put. Depending on the USB to Serial board you select the height of the long pin header will be different. This is the one I purchased:

Before you power up the board make sure you check all the wiring and track cuts. It's easy to cut the wrong spot or wire the wrong hole.

To use this board for Arduino projects you need to either install a bootloader or use the USBtinyISP as your primary programmer. I selected the latter because you need the USBTinyISP or another Ardunio to burn a bootloader anyway. So why not just use the USBtinyISP to program the Arduino from the IDE? See: USBTiny in the Arduino IDE


Have fun with your new Doduino!