Introduction: How to Make the Easiest Breadboard Arduino Compatible Sanguino / MEGA Equivalent...EVER ! & How to Upload Sketches Straight to It ! UPDATED: APRIL 2017

About: Always trying to help someone, though my own skills are limited, i always hope i can help where possible :) . If we all get roughly under 100 years to live a Lifetime, if we are lucky to reach that far, then i…

Okay so the Title is indeed a bit of a mouthful lol !

Ive been needing to mess around with a desire for MORE Input/Output pins than the Arduino UNO and nowadays the UNO uses an Atmega328 microcontroller, & its limited to only about 20 Input/Output pins :-(

Well if you've been messing around with Breadboard Arduino-UNO setups using the Atmega328 microcontrollers but you need MORE GPIO's (General Purpose Input/Output) Pins without spending alotta cash on an Arduino MEGA, well, then this is also just for you !

Also everytime i find any "Official Instructions for Anything Arduino" there are either NO pictures or theres only one picture of each step but if theres anyone who's only just learning then its not so obvious what things are connected to on a breadboard setup photo so i have made this Guide to show extremely clear and detailed photo's of how this setup is connected up on a breadboard !

This is a comparison guide of a microcontroller in-between the Arduino UNO and MEGA, most of you folks may have heard of the Sanguino right?!? Well this Arduino-Compatible Variant uses the Atmega1284P-PU microcontroller (The Sanguino predecessor of this was the Atmega644 !) and this MIGHTY microcontroller packs a GREAT feature list when compared to the humble Arduino UNO's Atmega328 microcontroller:

Okay so this is a real-quick setup of a Mighty1284 Arduino-Compatible Kit, aimed at Intermediate to Advanced Arduino Users who need a bit more from Breadboard'ing/Protoboard'ing with regards to MORE I/O Pins !

My 1st Arduino Breadboard Guide deals with How to make the Basic Arduino UNO & has all the training and background steps including alternative component choices so this Guide is only going to concentrate on getting the Arduino IDE Software modified Quickly, Easily and to get this Kit Setup on a Prototype Board (aka Breadboard, lol !) and in only a few short but sweet steps !

This is also assuming that you've sourced all the parts needed, and this is more for my reference and so when i do forget how to get this all done and setup, it will always be here for all (including myself, lol x 2 !) to see and explore !

All these components are commonly available through ebay, my favorite electronics superstore, lol, but sometimes it is cheaper to actually go to an actual electronics supplier either online or local town (if your town is lucky to have an electronics store that sells microcontrollers !)

Okay so for this Breadboard Kit, you get the following in a bare-bones package essential to get it up and running but with reverse polarity protection & status LED's: (The Numbers in brackets indicates Quantity)

Ingredients:
(1) ATMEGA Chip: ATMEGA1284P-PU - Supplied with the "Mighty1284 Bootloader" Pre-Loaded
(2) 0.1uF Ceramic Capacitors
(2) 47uF Electrolytic Capacitors
(2) 22pF Ceramic Capacitors
(1) 16 Mhz Quartz Crystal (or 20 Mhz !)
(2) 1k Resistors, 1% Tolerance or 5% Tolerance
(2) 10k Resistors, 1% Tolerance or 5% Tolerance
(1) 1N4004 Voltage Protection Diode
(1) 3mm LED 1 BLUE (For Loading Blink Sketch)
(1) 3mm LED 2 GREEN (Power-On LED)
(1) Tactile Push Switch (6mm x 3mm)
(1) 5v Voltage Regulator (for the sake of this Guide i am using a 300mA {0.3A} Regulator !)
Which is GREAT For Low-Power Battery Operated Projects!

NOTE:
DO NOT USE The Voltage Regulator if You Are Powering this Breadboard Setup Via The USB Adapter
- Instead join the 5v and GND wires from the USB Adapter to the POWER RAILS of the breadboard - Sorted !

Essentials (Do Not Proceed without this Stuff !):

*** Anti-Static Wrist Strap & Grounding Cord *** IF you DONT have an Anti-Static Wrist Strap, you Risk your Microcontroller Being Damaged Beyond any Kind of Repair Through Static Discharge from you - Best be safe than sorry here... !

*** Something To "Ground Yourself-To" Using the Grounding-Cord ! ***

ESD Knowledge

Single Core Wire, 0.6/0.8mm
Breadboard
USB TTL to Serial Converter Adapter ( I will use a cheap but modified PL2303 Module, Modified to Upload Sketches Automatically ! )
Power Source ( Either from 9 to 12v if using Mains/Battery-Pack with use of the Voltage Regulator OR Supplying Power through the USB Module ! )

*** DO NOT TOUCH BARE MICROCONTROLLERS WITHOUT WEARING AN ANTI-STATIC WRIST-STRAP & GROUNDING-CORD ACTUALLY "GROUNDED" - I AM NOT RESPONSIBLE FOR ANY DAMAGE CAUSED TO ANY MICROCONTROLLER/S FOR YOU FAILING TO OBSERVE SPECIAL ATTENTION TO ESD SENSITIVE DEVICES ***

Tools:
Tweezers
Small Needle-Nose Pliers
Wire Strippers OR Stanley/Xacto Knife
Voltmeter or DMM (Digital MultiMeter)

NOTE:
These tools are not all essential but are extremely handy for fault-finding where possible problems are, should anyone encounter any, & at all times, Double-Check, Tripple-Check--- Then CHECK AGAIN BEFORE APPLYING POWER to anything setup on a breadboard and at this point.....

WARNING & DISCLAIMER:

I am NOT Responsible for any Negligence or failure to follow simple health & safety procedures of any tools or Safeguarding Against Any ESD Electronics Sensitive Components that would cause you to unknowingly or accidentally damaging either yourselves or your components & to make sure you know EXACTLY what you are doing when prototyping with electricity, sharp objects & any tools you possess, Please do so with a good measure of common sense - If under-age, make sure an Adult is Supervising you at all times.

Now with all that out the way, lets begin constructing this on the breadboard !

I am using an 830 Tie Point Breadboard but will only use up half of the space so that the rest can be used for your prototyping area to have fun with this exciting microcontroller!

Step 1: Step 1 - the Power Supply

Okay so we will start off with the Power Supply Section, remembering that the way im doing this is to Ultimately save space on your Breadboard but if your well-seasoned with building breadboard circuits, please do as you require !

1st of all, Try to Keep the BLACK & RED Power wires as the same colours as in this Guide because this just makes it easier to see very clearly & quickly if a wrong connection has been made so that it will further aid you in troubleshooting later, in case something was inserted incorrectly, but this breadboard setup has been thoroughly tested and has been tripple to quadruple-checked and then checked once more because overkill is so under-rated & for peace of my mind lol !

Look at the pics below, left and right, start by inserting the RED & BLACK power lines exactly as shown:

Also See that ive marked the breadboard holes with my sharpie pens - Where the INPUTVOLTAGE wires will need to get inserted into - so whether you are using a battery pack or mains DC Voltage, this is where it would need to enter, use only the RECOMMENDED 9v to 12v of input voltage as this will NEVER put a strain on the voltage regulator !



Now follow the next pics below, add the 5v Voltage Regulator, this one is a Low Power Version, Perfect for battery operated projects!

Looking at the regulator as its sitting in the breadboard in the below pics, from left to right the pins are:

 INPUT         --- GND ---          OUTPUT





Now to add the Green Power LED, its 1K Resistor and the BLACK Wire going to the GND rail on the breadboard:




The Lower left pic is showing that there is the flat notch on the LED, that is the NEGATIVE side of the LED so this will need to be placed as shown and the pic on the Lower right is showing the addition of two wires, RED & BLACK connecting the upper and lower power rails of the breadboard together:








Next Add the 1st Electrolytic Capacitor making DOUBLE SURE that the NEGATIVE Side is actually going into the NEGATIVE power rail of the breadboard or capacitors could EXPLODE so do make sure this is checked over a few times lol ! I'll start by placing the Cap (Capacitor!) at the back of the Voltage regulator so these two pics below are from a different angle:




All Cap's have a dotted line (Dashes Actually, if you wanna nit-pick lol) going down the side of the NEGATIVE Lead section on their bodies so just look out for that as & when your inserting them! Also at this time i'll point out that i like to cut all components leads as short as possible, just so that they will sit flush with the breadboard so they dont ever get accidentally yanked-out by a stray wire being hooked up to any of the connection pins later when prototyping !



& Now for the Front Cap:




Now your breadboard should look like this, below:



Now you should just give everything a quick check to make sure it is all correct as now we will test this power section, i will do this by adding a battery-pack to the INPUT holes on the breadboard that i had marked with a RED & BLACK sharpie earlier:

I have also added a SPST Switch to my battery pack, the same battery pack used in my 1st instructable of the Arduino UNO on Breadboard (the Breduino, lol !) so that i can hook everything up, re-check everything is good and when im happy with it all, flip the switch and the Green Status LED Should light up but at this point use your DMM (Digital Multimeter) to make sure that the OUTPUT pin of the voltage regulator is definitely giving out 5v or very close to 5v !




Now you have a Working Power Section !

Onto the Next Setcion - The Microcontroller !

Step 2: The Microcontroller ! Introducing the Atmega1284P-PU MONSTER-KILLER ! Lol

Okay so now we got the right voltage coarsing through the breadboards veins, so-to-speak, lol, now this is the opportune moment to slip on the ANTI-STATIC WRIST-STRAP so that you DON'T accidentally kill the MCU (Micro-Controller-Unit) via ESD Damage, which hopefully you already know about as you've checked out the link in the ingredients list or your a well seasoned veteran and already know how to safeguard against killing MCU's with human-generated static electricity lol !

So with WRIST-STRAP on, place the MCU like so:






i have also created some pin description labels for these MCU's so immediately stuck one to the MCU so that prototyping with its pins is going to be ultimately quicker and easier and at this point you want to add the TWO 0.1uF Ceramic Caps to the MCU's pins as shown below:





With that done, now its time to add the 16 Mhz Crystal, TWO 22pF Caps and a GND wire, check out these next 4 pics below in sequence and follow exactly:







& Now to add the wires to connect the 16 Mhz Crystal & Caps to the XTL1 & XTL2 pins on the MCU: (Below)






Now add a Blue LED & a 1K Resistor to the other side of the MCU:
Also carefully Observe the Flat-Notch on the side of the LED, this is the Cathode or NEGATIVE side so this wants to be connected to GND which i will come to in a minute!




Now i like to use these same colours whenever im making the circuit lines for the Reset Switch, i cut a piece of single core wire and bent it as shown in the pic Below-Left and then inserted it so that the way its been bent wont be hindered by the already present wires:

Also add a 10K Resistor to the RESET pin of the MCU and connect it to the Lower Breadboard POSITIVE RAIL:





Now add a 6mm x 3mm Tactile Momentary Switch, i chose this type of switch specifically because its thinner, takes up less space on a breadboard and less complicated than its usual 6mm x 6mm square brother which has 4 pins, this thinner version only has 2 so its kinda fool-proof to use too, lol !

So add the switch to the Green wire that was just placed into the breadboard, then the other side of the switch to the GND Pin of the Voltage Regulator (MIDDLE Pin!) as that was a nice tidy & out-of-the-way connection to make about here: (Below)

Also Add two POSITIVE & two NEGATIVE wires for powering the MCU from the breadboard Power Rails, shown below-right:






And finally the last two connections that need to be made, is the GND wire for the Blue LED which is shown below-left, and also i always like to add some kind of voltage protection in with these types of circuits so i will be adding a 1N4004 Reverse Polarity Protection Diode and this will DIRECTLY Replace the INPUT POSITIVE wire that goes to the INPUT Leg of the Voltage Regulator which is shown in the below-right pic:

NOTE:
CAREFULLY OBSERVE
which direction the "Stripe" on the Protection Diode is pointing towards when connecting it, please make DOUBLE SURE it is the right way - what this does is protect the voltage regulator from accidentally connecting up the wrong polarity INPUT voltage so just in case you or i had placed the POSITIVE INPUT Lead on the NEGATIVE and vice versa, then there wouldn't be any damage caused!



And thats it !

Quite nice and easy with these pin description labels, so now your breadboard should look like this:






You should have taken about half of the breadboard, Now you can use the other half for your prototyping needs, but theres just one more thing to do and thats to upload a test sketch to this breadboard setup so that we know for 100% sure that it is all connected okay and you will be able to continue with your own Arduino Projects!

Here's a look at the full breadboard:




Onto the next & final Section - Uploading a test sketch to the MIGHTY1284P-PU ('P' indicates "Pico-Power" and the 'PU' refers to the Plastic DIP Package of this MCU !) Arduino Compatible Breadboard Setup, The Mighty1284 for short lol !

Step 3: Setting Up the Arduino IDE & Uploading a Test Sketch !

Now at the time of writing this guide, Arduino IDE 1.0.2 has just come out and is the latest version of the Arduino Software so this is what we will be modifying to use with the Mighty1284 breadboard setup !

1st thing to do is to download the Latest Version of the Arduino IDE from the main webpage (click link !)

The next thing to do is to download the actual Mighty1284 files which were created by this Guy who runs a website called maniacbug and full credits go to him for making these files, a HUGE job so a MAJOR Thanks maniacbug !

Okay so now you got all the files, unzip both Zip Files onto your Desktop, i say desktop because its the easiest place where everyone knows how to get to so this will make the next part a cake-walk !

Now DO NOT START THE ARDUINO IDE SOFTWARE...YET...

Once the Unzipped folders are on your desktop, BOTH the "mighty-1284p-master" & the Latest Arduino IDE, copy the whole 'mighty-1284p-master' Folder and simply paste INTO the Arduino IDE's folder called 'hardware' and leave it there ! thats it !

Now start the Arduino IDE and look in the Tools > Board section and you will now see a board called the:

                                               "Mighty 1284p 16Mhz using Optiboot"




Select that and now connect up your fav USB TTL to Serial Converter Adapter - for this guide i am using a cheap and cheerful PL2303 Module that ive highly modified with the expert help of another fellow instructable Author, L.O.G - Lazy Old Geek - Thanks again L.O.G !!

Now the Mighty1284 has TWO UARTs to unlike the Arduino UNO, it has TX0, RX0 & TX1 & RX1, for uploading sketches, TX0 & RX0 are used and needed:


PL2303:                  Mighty1284 on Breadboard:
5v---------------POSITIVE Power-Rail on Breaboard
GND------------NEGATIVE Power-Rail on Breadboard
    TX-----------------RX on Atmega1284P-PU MCU
    RX-----------------TX on Atmega1284P-PU MCU
RESET-----------RESET Pin on Atmega1284P-PU MCU

Now navigate to the Blink Sketch in the Examples list on the arduino IDE and plug in the PL2303 Module, or your fav USB TTL to Serial Converter Adapter but before you upload, you need to slightly modify the Blink Sketch because if you remember back when adding the Blue-LED on the breaboard, we added it to Pin D3 (Digital Pin 3) so all we need to do is change everytime it says '13' on the blink sketch to 3 and there a real quick way to do this too, when in the sketch, hold CTRL and press 'F' - this will bring up the 'Find' dialogue box, in the boxes simply write the value you want it to find and then write in the corresponding box the value you want to replace it with and then simply click the button named 'Replace All' and then close that box down ! (see pic below)




And now finally Hit Upload !!

Wait a Few seconds and if you've made this circuit as directed then it should upload perfectly and then the Blue LED should come to life and start blinking away !

Another reason how i know this Guide to be correct is because i had already prototyped this onto a breadboard and while creating this guide i had made a secondary Mighty1284 on a breadboard, downloaded the files needed and modified the Arduino IDE files on my Laptop and now i have two breadboard Mighty1284's BOTH Blinking their Blue LED's !



So if something hasnt gone quite right with yours, go back and re-check everything again as it all works as advertised (please feel free to ask questions too but please do bear-in-mind that i am also learning this stuff, so try give constructive criticisms if yer absolutely have-to !) and as ive followed my own instructions and got this working, twice now, Although we are only human so mistakes do get made from time to time and if ive slipped up somewhere in this Guide then please feel free to let me know where it was i made a mistake and i will endeavour to correct it asap ! Well, as soon as Humanly possible lol !

Happy breadboarding and enjoy your new found freedom with MORE Digital & Analogue Input/Output Pins !