Core2duino (Updated)





Introduction: Core2duino (Updated)

This instructable will show you how to build an Arduino shield that adds another Atmega168/328 on top of your Arduino, giving you an extra complete set of I/O pins to use. That's 12 PWM pins, 12 Analog pins, 4 external interrupts,  or 40 Digital pins total.


*UPDATE* 3-11-10
I re-did the Eagle file and scrapped the R/C header and both of the 7805 voltage regulators. The new design will ONLY draw power from the base Arduino. There was a bit of confusion about the selectable power source of the old design, so I just made it simple. Also, it is now short enough to add an Arduino shield on top. The 2 VIN pins are to supply power to the base Arduino via it's VIN pin (thereby powering the core2duino through the base arduino's 5v regulator). If powered through these pins, voltage should not exceed 12v.

This design is also stackable.. meaning you can add the Core3duino on top of it!


Using I2C, you can connect 1 Arduino (master) to a host of slave Arduino's through Analog ports 4 and 5.

Also, you can add the security of having a completely separate CPU to your project that is unaffected by any code running on the base Arduino.  I use this shield as a failsafe on my R/C lawnmower. The base processor uses the 2 external interrupts to sample and decode 2 servo signals from an R/C transmitter/receiver, while a 3rd servo signal is sent to the Core2duino that controls a relay for the motor-controller power supply. This way, even if there is a problem with the main code and it stops responding, the Core2duino will still be able to carry out it's main function unaffected (which is to kill the power to the bot if anything unusual happens).

I have included the Eagle files needed to build the board. It is basically just a breakout board for the Atmega168, that has it's own power regulation and crystal oscillator. It provides access to the base Arduino's pins by using stackable headers that plug directly into the base Arduino.

It is a fun board to play with and I thought I would share, just in case anyone else has a use for it.

You can check out my other projects at my website:

This board also works with the Core3duino... more pins!

Step 1: What You Need to Get Started

Things you probably need to buy:

1. (1)pc copper clad (3"x4") or assortment
2. (1) 28-pin dip socket
3. 16 mHz crystal resonator w/ built-in capacitor
4. A 2nd Atmega168 with Arduino bootloader
5. stackable header set
6. (2) 6-pos female headers (2) 8-pos female headers .1"
7. (4) male pin headers (optional) .1"

Other things needed:

power LED, any size/color
330 ohm-1k ohm resistor for power led
10k resistor for reset button
reset button
.1uf capacitor optional

etchant solution (muriatic acid + hydrogen peroxide)
paper towels
scotch brite pads
Laser Printer
magazine paper
rubber gloves

Step 2: Download and Print the .brd File

You need a Laser printer. Don't try it with an Inkjet as it will not work.  I have heard bad things about Brother laser printers using strange toner that doesn't transfer to copper, but I use a Brother 7020 and it works great. I have tried several different types of magazine paper and i'm sure that most will work, but if in doubt, use Cosmopolitan. It works well and if you know any women, you should find quite a few of them nearby.

1. Download the  .zip file and EagleCad if you don't already have it.
2. Unzip the .zip file to your computer.
3. Open the .brd file with Eagle.
4. Select the "Layers" option and de-select the "top" layer, leaving the other options as they are.
5. Select Print, make sure you check the boxes "Black" and "Solid" under Options. Then Print to magazine paper.

Carefully cut the printed design to the size of your copper clad. Use a razor blade or scissors, just be sure not to touch the toner with your fingers.

Step 3: Transfer to Copper

These are the generic instructions that I follow anytime I etch my own PCB's:

You need an Iron, a Scotch-brite pad, a few paper towels, and some Acetone.

Before you start, plug in your iron and turn on to highest setting.

1. scrub copper clad with a scotch-brite pad until shiny
2. use acetone on a paper towel to wipe off copper dust from copper clad
3. repeat step 2 until there is NO visible dust being removed, folding the paper towel after each wipe. re-apply acetone as needed. If you don't get ALL the dust off, it will not transfer.
4. Let dry for a few minutes.
5. pre-heat the copper clad with the iron for a minute or so, using a freshly removed piece of magazine paper (the less pictures the better) between the iron and copper clad.
6. remove iron, and CAREFULLY place print onto the copper and press it down.
7. add another piece of magazine paper between your print and the iron to keep from ripping the print.
8. Press hard with iron, moving every 30 seconds for about 3 minutes.
9. remove iron and let cool for 10 minutes.
10. place in container with warm soapy water for 20 minutes to dissolve paper.
11. remove paper with thumb, scrubbing it until it is all gone and there is only toner left.

12. If you have any smeared tracks, clean them up with a small flat-head screwdriver. If you scrape too much away, use fingernail polish to add some more "toner" where needed.

on to etching...

Step 4: Etch

Make a good etching solution:
use 1 part Muriatic Acid (I bought a gallon at Sherwin Williams paint store for $12) to 2 parts Hydrogen Peroxide (the kind you buy at the Pharmacy for $2 a bottle). Always add acid AFTER adding Hydrogen Peroxide.

Use rubber gloves so you don't get burned by the acid.

You only need about 2 cups to etch this size board. It helps if you have an aquarium bubbler and some extra hose to place under the copper while it is etching, as this greatly speeds up the process.

1. mix solution (2 parts hydrogen peroxide, 1 part muriatic acid), and put into plastic container
2. place copper clad into etchant.
3. use bubbler to speed things up
4. when you see that the copper is completely gone, pull it out and wash off with water (outside).
The toner should still be there, and now you can wipe it off with a paper towel and some more Acetone.

Now you should have a copper circuit left, ready to drill holes in.

Step 5: Drill Holes

Now you need to drill the holes in the copper clad board. I recommend using a Drill press, but if you don't have one, a regular drill will work. Try not to cut through any of the traces with the drill bit, as that will make it harder to solder.

This micro carbide drill bit set from Harbor Freight is excellent for the price, as well as a nice drill press if you don't already have one.

Now after you get all those little holes drilled, on to soldering.

Step 6: Solder

Please refer to the pictures below for placement of parts. I can offer a more detailed diagram if anyone is interested.

Note that there are 2 red lines on the Eagle .brd file. These are power traces and need jumper wires placed where the red lines are.

I started by soldering the stackable headers first (outside, then inside), since they are slightly harder to access with the soldering iron.

The 3 holes next to the IC are for the 16mHz resonator and it can go in either way (middle pin is ground, so it doesn't matter)

Then I add the female headers. Next the male pin headers. It is helpful to install these with a jumper holding them to an adjacent header pin, so you don't have to hold them while soldering.

Power LED and resistor next, then the 28-pin socket and power screw-terminals.
Then the 10k pull-up resistor for the reset button as well as the button.

Lastly, I add in the 5v regulator and capacitors, however many I can fit on the board.

There are not that many parts on this board and other than the capacitors and power LED, you don't have to worry about polarity while placing the components (you need to plug the IC's in correctly when you are done, but the sockets can go in either way).

Remember, when soldering, to heat the contacts and let the solder melt onto it. If you try to heat the solder directly, you might end up with a big mess.

Step 7: Enjoy!

Now you are ready to use your Core2duino.

Upload some code and see if it works!

I have written a test sketch that turns all digital pins on and back off to test them. Upload the sketch to both Atmega168 chips and check to make sure all pins get power on both chips.

Once you establish that it works, put your thinking cap on and build something that requires 40 I/O pins and then message me and tell me about it!



  • Epilog Challenge 9

    Epilog Challenge 9
  • Paper Contest 2018

    Paper Contest 2018
  • First Time Author Contest 2018

    First Time Author Contest 2018

We have a be nice policy.
Please be positive and constructive.




 Now I would assume that since I have a 328, that I should have another 328 to match right?

not necessary, they are independent of each other, so if the code on 1 of the chips needs to be much larger, you can use the 328 for that one. I have mixed them with no problems.

So I could use an Atmega8 as the 2nd core, with it's own 8mHz crystal, and do the timming adjustments through software on any of the cores... correct?

Really interesting... the Atmega8 is SO cheap that makes a great candidate for an auxiliar I/O board (with fancier possibilities)!
Maybe a couple of them on the same shield..

Thanks a lot for the instructables!!

Wait, I'm a little confused.... How do you program the second atmega? Does it just get its own binary? How do you hook it up to program it? Looks cool, I'm just not sure how it works.

you can upload the same test code to both Arduino's to see that they work properly, then make up your own code to go on the 2nd Arduino. If you don't yet need a 2nd Arduino (or more commonly, an Arduino Mega) then this instructable is not yet for you. Once you get to the point that you need either more than 6 analog inputs, or more than 20 digital I/O pins, or more than 2 external interrupts, or more than 6 PWM outputs pins..... you will quickly see why this board can be very useful for how cheap it is to make. I used this board to decode a failsafe signal from my R/C receiver to keep it separate from the main processing code, for added safety. If the main processor fails, I can still disable the 200lb bot. You can use it to power 40 LED's, or if you need 12 PWM outputs, or 12 analog inputs, etc....

Ah. So, two programs for the two arduinos. Don't worry, I see the merits of the project, especially for big bots like yours. I would hate to have that running around my neighborhood.

Great idea, johndavid400. I'm just curious why you didn't piggyback off of the Arduino's 5v supply and oscillator. I can understand not sharing the oscillator if that would require soldering directly to the Arduino, but I can't see what the issue would be with sharing the power supply.

It does share the power supply.  You can use the jumpers to select 1 of 3 power sources. You can tie the core2duino directly to the base Arduino +5v (regulated), or you can connect the VIN (voltage In) pins together and let them both use their onboard 5v regulators to supply power, or if you have neither a  USB cable or a DC jack, you can use the screw-terminal on the core2duino to supply power to both itself and the base Arduino. So either one can power the other or just itself. The jumpers allow you to choose which source you want very easily.