Step 3: Section 3 - Uploading Sketches with 3 Different USB Modules!

Section 3 - Uploading Sketches with 3 Different USB Modules!

Now we will upload the 'Blink' sketch to the Breduino using Three different USB modules (These are the only ones i have !) and show how to connect these upto  the Breduino and the pins needed to Upload Sketches:

The test Sketch we will be using is called 'Blink' and is found in the Arduino IDE under; FILE>EXAMPLES>BASICS>BLINK - this is the sketch we will use to upload to the Breduino !

The 'Blink' Sketch is a batch of instructions (Arduino Code) that will enable any Arduino-Based Hardware to Flash (or 'Blink') an LED that is Connected to PIN 13 of an Arduino/Arduino Compatible (Breduino!) and will flash the LED every 1000ms (ms=milliseconds) so basically every 1 second but this can be changed in the sketch to suit you!

Here are are a few of locations to find the correct Drivers for the USB Modules that i have used to Upload sketches:

FTDI Driver (Choose from: Windows, Mac, Linux)
PL2303 Driver (Choose from: Windows, Mac, Linux)
CP2102 Driver (Choose from: Windows, Mac, Linux)

Arduino IDE - Integrated Development Environment (Software) {Im using version 1.0.1 at the time of this instructable !}

NB: When on the Prolific Website to Download the Driver for the PL2303 USB Module , if ever asked to sign-in, just use their default Log-in Details:
Username: GUEST
Password: GUEST

When you want to see a Full-Size picture in this instructable, just click on the little pencil icon that appears on the TOP-LEFT hand corner of any Picture in the pictures list Just After the Step number, eg, Step 1, Step 2, Step 3 and find the picture in the list you want to enlarge from my references in my notes and then on the next page that opens up click the link just under the picture next to the words "original file:" and it will open up FULL SCREEN and show you all the glory of a nice beautiful high resolution image!! (BUT!!! if ANY of my pictures are NOT-CLEAR please please please tell me which picture & under which step and i will correct the fuzzy picture if any, many thanks!)


This has "Software RESET" capability {SEE NOTE1 after the instructable!} - so no more manually pressing the reset button when uploading sketches & no more 'Precisely Timing' the annoyingly-difficult time it takes to Press the Arduino's RESET Button (The Manual Reset- Way)...

Although this has the Auto-Reset feature it is a tad expensive.

The PL2303

The picture above is from a PL2303 module i modified to take advantage of the "Automatic Reset" of Uploading Sketches (Software Reset) so all you'd need to do is hit the Upload Button on the Arduino IDE Software and sit-back until your sketch uploads! See end of this Guide to find out how to get one thats already modified or if you'd like to modify it yourself then the link to those instructions are there too!!!)

This PL2303 USB Module isnt the easiest to modify as it involves soldering a capacitor leg to a very fine pitch SMD IC but if you can get your hands on some casting resin, this is what you can do with it, heres what ive done to protect the fine-pitch soldering on the PL2303 modules:

Also changed the Red power LED to a Blue one too !

The CP2102

The one pictured has already been modified for Auto Sketch Uploading but this module is the easiest out of all these USB TTL to Serial Modules to modify for Automatic Sketch Uploading, my modules now come heatshrink protected (Only the Auto-Reset Modules !) and as always with most of my gear, instructions are provided where needed !

These DONT come configured for Auto-Reset as standard (i Configure and solder the SMD parts myself) and if you havent bought a specific "AUTO-RESET-ENABLED" CP2102 Module then you will need to make the modifications on this board yourself, and you must use a 0.1uF Capacitor on the Reset Pin of the microcontroller - all parts needed are always supplied as well as the instructions being emailed to you ;-) Look for the CP2102 Modification you need to do to the Standard CP2102 Module at the end of this guide before the "Troubleshooting" Section !

If your CP2102 Module DOES NOT have heatshrink on it (Recently Coming with Heatshrink as Standard now) then its not configured for Auto-Reset unless you bought an Auto-Reset-Enabled CP2102 Module !!!

First we'll start Uploading the Usual 'Blink' Sketch Found in the Arduino IDE and using the Cheaper PL2303 USB Adapter:
Okay check out the picture Below - i have written onto the side of my breadboard the Exact-Pin-Connections You will need to enable you to Upload Sketches and Connect up the USB Adapter (PL2302)!

The picture below shows the RESET PIN on the Breduino along with the -, +, RX & TX on the left on the breadboard !

Now look at the pictures Below on all 3 of the USB Modules, their pin connections are always used in the same way to connect to your Breduino, just be sure that you connect up the correct pins to the breadboard!

For the modified PL2303 module (middle photo) Observe the Pin Connections and look at the very top Pin (The Soldered Extra Pin in GOLD , above the 3V3 Pin) - That is the Reset Pin that will need to be connected to the RESET Pin on the Breduino!

Basically you connect the pins like-for-like as shown Below:


USB BUBII                           Breduino:
DTR                            To      RESET PIN
3v3 (This is 3.3v)      To      NC * (See Note1)
VCC (This is 5v)       To       RED + Sign PIN on Breduino * (See Note1)
TXD                             To      TX
RXD                            To      RX
GND                           To       BLACK - Sign on Breduino

PL2303:                                    Breduino:
3v3 (This is 3.3v)         To        NC * (See Note1)
VCC (This is 5v)          To        RED + Sign PIN on Breduino * (See Note1)
TXD                                To        TX
RXD                               To        RX
GND                              To         BLACK - Sign on Breduino

CP2102:                                  Breduino:
RST                            To         RESET PIN
3v3 (This is 3.3v)      To        NC * (See Note1)
VCC (This is 5v)       To         RED + Sign PIN on Breduino * (See Note1)
TXD                             To        TX
RXD                            To        RX
GND                            To        BLACK - Sign on Breduino

CP2102:                                  Breduino:

DTR PIN***                To         RESET PIN ***VIA A 0.1uF Capacitor !!!
3v3 (This is 3.3v)      To        NC * (See Note1)
VCC (This is 5v)       To         RED + Sign PIN on Breduino * (See Note1)
TXD                             To        TX
RXD                            To        RX
GND                            To        BLACK - Sign on Breduino

The Reason im choosing to power up the Breduino with the USB Module's 5v Output is just out of happenstance and you could just as easily substitute the 5v connection for the 3.3v Pin on any of the Modules Instead as it will work either way because the ATMEGA328P-PU Microcontroller is able to work from a range of 1.8 Volts to 5.5 Volts... (info found in the ATMEGA Chip's Datasheet!) ***BUT*** for 3.3v operation you will need to use the 3.3v Bootloader on the Atmega328 and also an 8Mhz Crystal !

Okay so now check a Third & Final time, after Checking of all the connections (CHECK, DOUBLE-CHECK and TRIPPLE-CHECK Every wire link & connection!) Open up the Arduino IDE software BEFORE plugging in any USB module and just Check a few settings to make this will work first-time !

Firstly we must select the correct 'Board' in the Arduino IDE, Look at the picture Below (Picture 8) and make sure that Under:
Tools>Board>Arduino Uno is selected... (My Kits all have the Arduino UNO Bootloader & others bootloaded upon request!)

Now you must select the correct "COM" PORT so the Arduino IDE will know exactly where the PL2303 USB Module is and where to send the sketch so after opening up the Arduino IDE just look at the picture Below, my computer didnt have any 'COM' PORTS in-use until i inserted the USB Module so i did that just to show you that a COM PORT will show-up in the Arduino IDE and you must select it and make sure there is a 'TICK' next to the COM PORT number as shown, mine is COM9...

But if you do have a few COM PORTS in use, just simply disconnect all wires from the USB Module and insert it in a free USB Port on your computer and see what COM PORTS open up in the Arduino IDE, then disconnect the USB Module from your computer and when the COM PORT Disappears from the
Arduino IDE then you will have found the correct COM-PORT-Number that is assigned to your USB Module !

Next look at the picture Below and make sure that the 'Programmer' is set to AVRISP mkII - from what ive seen in the few short weeks of learning about the Arduino IDE Software is that this setting is already set to AVRISP mkII but just in case it isnt, no harm in checking !

After you've re-connected up all the wires from the USB Module to the Breduino again and BEFORE PLUGGING IN THE USB ADAPTER INTO A USB PORT --
- PHYSICALLY GO OVER THIS ENTIRE GUIDE AGAIN TO MAKE TRIPPLE-SURE ALL CONNECTIONS ARE CORRECT and that you have the Correct Polarity of components inserted the right way round into your breadboard like diode, LED's, voltage regulator, capacitors etc to avoid any problems/damage/errors to the Breduino or your USB Module !

I have followed this exact Guide and made another Breduino so now have TWO Breduino's that have the blink sketch uploaded to them and the PIN13 LED blinking away on both of them successfully so i know that this all works! (and constructive criticism is always welcome if you'd like to leave a comment below or Rate this a generous 5-stars or however many you think this guide deserves, i would be deeply honoured & grateful by this gesture!)

Now look at the picture Below, this is the location you will find the 'Blink' Sketch - select this Sketch and another Arduino IDE Window will open-up as shown in the pictures below...

NOW CONNECT the USB Adapter to a free USB Port on your computer and just double check that all the settings you've just gone through are still all selected and everything's ok ! ! !

Then click on the 'Verify' button which is the 1st Circle Shaped-Button (Under 'File') and it has a 'TICK' on it, After its been Verified, Click the 'Upload' Button right next to the Verify button as shown in the pictures Below:

if you've connected it all correctly the Arduino IDE Software will go through the process of 'Compiling' the Sketch and as soon as thats done it will start Uploading to the ATMEGA328P-PU Microcontroller that is sitting on the Breadboard and all you need to do is Sit-Back and watch the magic happen WITHOUT Timing however many seconds it takes to "Manually press the RESET Button" to Upload Sketches because Any of my Modified PL2303 or CP2102 USB Adapters will "AUTOMATICALLY" reset the Breduino (& EVERY other Arduino/Arduino Compatible!) so that the Sketch will Upload Successfully EVERY-TIME you UPLOAD a Sketch !!! AND WITHOUT adding a 0.1uF {100nF} Capacitor to the Reset PIN of the ATMEGA328P-PU Microcontroller !)

As soon as it finishes uploading your Arduino IDE Should look Like the picture Below with the Pin 13 LED Blinking away !!!!

*** If The Sketch didnt Upload Correctly Look Back Over ALL your Breduino Connections, Re-Check Everything and MAKE SURE you have installed the relevant DRIVER for your USB Adapter & like i said at the beginning of this Guide that Even the Experts Can Sometimes get the most simplest of things wrong in circuits (The honest ones who own-up-to-their-mistakes, lol !) NOT saying that im an expert in anyway as i also clearly stated that i am only still learning within The Wonderful World of Arduino but i know that this Breduino Works as i have tested this entire instructable on the very Breduino i have taken the pictures from and it works like a charm everytime! ***

Also something that i couldnt find so easily online through my good research assistant, Google, is a way to Take the Sketch off of the Arduino or Arduino Compatible
(Breduino!) or 'Cancel' the Sketch, so what i found buried in an Arduino.cc Forum was how to save my own sketch that 'Cancels' an Uploaded Sketch

All you need to do is go to create a new sketch in the Arduino IDE (File>New) and type this in:
void setup(){}
void loop(){}

Then SAVE this Sketch (File>Save or File>Save As) and you will also have what it took me HOURS and HOURS of Trawling through the Arduino Forums & Google to find a way for a beginner like me to kill an uploaded sketch from an Adruino/Arduino Compatible !!!

I hope you have as much fun making a Breduino for yourself with all the different options of how to create on of these for yourself and if its not too much trouble please
please please dont forget to 'Rate' this instructable between 1 to 5 stars at the very top-right of these pages as i would be most - grateful and deeply appreciative of that
and also please please please feel free to leave comments for constructive criticism or suggestions on this instructable at the end & many many thanks in advance !!!

I Personally solder & Modify the PL2303 & CP2102 USB Modules in the Ebay Link at the Top of this page then finally encase the whole module in clear plastic, sand it with 3 different grades of sand paper ranging from Rough to Smooth then sand it again with smooth finishing with an expensive GLASSPAPER
(not sand paper) and finally polish it to a gleaming shine and i sell these on ebay fully made to take special advantage of the "Automatic Reset (Software Reset)" of the breadboard Arduino OR any other Arduino so all you need to do is simply press 'Upload' on the Arduino IDE Software and wait a few seconds until your sketch has uploaded without tediously and annoyingly failing to upload sketches "The Manual Way" by timing however many seconds it takes in order to press the Arduino Reset Switch and successfully uploading sketches!

I charge a reasonable price for all the work it takes to modify these modules and its alot of hard work as i dont have power tools and each module is crafted by hand so if your interested in one just visit my ebay page that has them being sold and not as expensive as any other Arduino USB TTL to Serial Converter & including postage & packing costs ! but so sorry, only selling to mainland UK at the moment folks so do apologize on that one!

How to Configure and Correctly Use the CP2102 Module

that was NOT Bought as an "AUTO-RESET-ENABLED"


As these modules are ALL made in China, the designs for these modules are used for a great many other purposes (So i have seen online via google !) so to get them to work to send the all important Auto-Reset-Signal to Arduino Hardware is to use the DTR Pin NOT THE "RST" PIN as that will RESET THE USB MODULE !!! (BTW: For whatever reason the USB module needs to be reset like this is beyond me and i have no idea WHY the Chinese have designed this module like this in the 1st place !)

Okay So...... the Pin that sends the Auto-Reset-Signal to Arduino Hardware is called the 'DTR' pin, which stands for: DATA TERMINAL READY.

This USB Module is one of a very Very VERY Select Few, if not the ONLY ONE capable of modifying for our Arduino Uses with the least amount of soldering or SMD soldering !

This is where the All Important DTR pin is located on the USB Module and you can see from underneath the module that it says the 3 letters 'DTR' which can be better seen in the picture on the right, below (Above the pin named 'DSR')

And on the top side of the CP2102 module, the DTR Pin is the one with a box drawn around it near the tag "J3" as shown below:

The photo above-right shows where you will need to solder the supplied 1-Pin Male Header Pin to the DTR Pin of this USB Module to take advantage of the Autoreset Function of this module !

Once soldered, DO NOT USE THE RST PIN (ONLY THE BOUGHT AUTO-REST-ENABLED CP2102 Can make use of the RST PIN !)

Now here's how to connect:

1st Insert the Also Supplied 0.1uF Ceramic Disc Capacitor into two breadboard holes leading absolutely no-where lol:

Now link your newly soldered pin on the CP2102 module to the 1st Leg of this 0.1uF Capacitor, pictured below i am using a Blue wire to enter the hole of the 1st Leg of the 0.1uF capacitor:

And now Link the 2nd Leg of the 0.1uF capacitor to the RESET pin of the microcontroller as shown in the photo below (Another Blue wire, Lol !! ):

Now connect up your USB Module to the Breadboard Connections you made earlier and as mentioned earlier above for the STANDARD VERSION of the CP2102, here it is again:

CP2102:                                  Breduino:
DTR PIN***                To         RESET PIN *** VIA A 0.1uF Capacitor !!!
3v3 (This is 3.3v)      To        NC * (See Note1)
VCC (This is 5v)       To         RED + Sign PIN on Breduino * (See Note1)
TXD                             To        TX
RXD                            To        RX
GND                            To        BLACK - Sign on Breduino

However... if you happen to have bought a PL2303 Module, There is an instructable on how to solder the 0.1uF (100nF) Capacitor on this great & awesome website and if you fancy trying to do it yourself and save a few pennies, a chap named LOG (Lazy Old Geek!) has helped us all out and made an extremely great instructable right HERE with all the procedure that i also used - so if you'd like to do it yourself then by all means feel free to do so, also as i only have a limited batch of these that i make and also i am severely mobility impaired so it takes a two weeks to produce only 7 of these as i dont have power-tools and my condition prevents me from making as much as i'd like but for those interested in acquiring one check out my ebay page where these are being sold HERE !


Now and again some folks get the Dreaded error message (& just in case you're wondering, yes this happens to me too lol):

:avrdude.exe: stk500_getsync(): not in sync: resp=0x00

When trying to upload.....

This error message is extremely cryptic...

: Having a meaning that is mysterious or obscure.
(or of a crossword-nature):  Having difficult clues that indicate the solutions indirectly

Right, so all this error message tells us is that something is preventing the Arduino IDE from successfully uploading a sketch, but what it DOESNT tell us is where the Problem is !!!! - LOL !!!!

Okay so onto the Troubleshooting !

Check these things and make sure all is in order:

Breadboard Checks:

1. The usual suspect and a 'CURE-ALL' solution to breadboard setups NOT working as they should is always the AGE-OLD problem that many people Dont Know (95% of people, lol {And Yup, i was ALSO in that 95%, lol}) is the problem of ENLARGED BREADBOARD HOLES !!!!!
Due to using big TO-220 Type parts ( Voltage Regulators, MOSFETs, Power Transistors etc ), mainly because of these large pin components, breadboard holes are PERMANENTLY Enlarged and the best way to test if a breadboard hole has been damaged by a large pin component is to take the thinnest resistor lead (Leg) you can find, insert it into your 'Suspected' enlarged breadboard hole and then remove it ever so gently and if you feel any resistance of the resistor staying in the breadboard, then thats a good sign of the hole not being permanently enlarged... On the other hand, if the resistor Leg comes out of the hole without the breadboard putting up any sort of a fight to keep it in the hole, then thats a breadboard hole thats been permanently enlarged. Here's a how-to to fix that problem, but follow my tip in the Power Supply Section (Section 1) for what  to do with the Big TO-220 Type components, Prevention is always better than a Cure ! ! !

2. Check the RESET Pin on the microcontroller has a 10K pullup Resistor going to +5v Rail on the breadboard.

3. Check that there is also a 10K Pullup Resistor going from the RX Pin of the microcontroller to an empty pin hole not connected to anything on the breadboard (This empty pin hole is where the RX from the USB Module plugs into !!!).

4. Check your cables for continuity, meaning check that they are not broken, you can do this using a DMM (Digital Multi-Meter), there is usually the sign of a Diode and the DMM beeps continuously when there is a connection all the way through a wire indicating that there is full continuity in that cable/wire !

5. DISCONNECT ANY WIRES GOING TO THE RX PIN OF THE MICROCONTROLLER While you are Doing the Upload (Meaning ONLY have the RX wire from the USB Module going to RX on the microcontroller !!!), here is a great Link after HOURS, DAYS, WEEKS & MONTHS of trawling through forum posts, all to NO AVAIL - AND some posts even go to mention THROWING AWAY your setup !!! huh, WHY throw away a perfectly good setup JUST BECAUSE "they" didnt know how to get it running or gave up troubleshooting lol ! Anyhoo, here's the link (MAJOR THANKS to Keith Parkansky for actually finding this out AND documenting it!)


USB Module Checks:

1. Do you have the correct Driver Installed for the USB Module you are Using from the Driver links at the beginning of Section 3 ?

2. have you tried uploading with:
TX from USB Module connected to TX on Microcontroller, RX from USB Module connected to RX on the Microcontroller
TX from USB Module connected to RX on Microcontroller, RX from USB Module connected to TX on the Microcontroller

3. Have you soldered the 1-Pin Male pin header to the DTR Pin if using the STANDARD CP2102 module ?!?

4. Is your 0.1uF capacitor in place as it should be from these instructions ( Again, Only needed if using the STANDARD CP2102 Module ) ?!?

5. If you have a STANDARD CP2102 Module, you Need To Use The "DTR" pin instead of the RST Pin !!!

6a. Have you tried using a different USB Port ?

NOTE: About USB Ports:
The only sure-fire way i know of linking any USB to a pc is by linking a USB Extension cable (2 meters should be fine) from 'Only' one of the back USB ports on the computer leading to a USB Hub and make sure you buy a USB Hub thats powered (Has its own power plug!) and then use this for your USB useage that will sit comfortably on your desktop, give you plenty of USB ports and never ever have USB errors that windows usually gives when you try to connect digital camera's to USB ports as they try to always take about 1-2Amps yet pc USB ports are severely limited to 500mA (0.5A !!) !

I repaired computers for 13 years so this is all from experience lol

6b. Are you using a USB Port direct from your computer or a USB Hub ? Have you tried direct from your computer and, or, a USB Hub - if your computer's USB ports are not accessible - ?

Arduino IDE Checks:

1. Did you know that you can open up Multiple instances of the Arduino IDE ? Well this means you can open up the Arduino IDE 10 times and have them all up on your desktop !

Im not too sure if they will all work as needed like this and havent tested multiple uses like this but from my own humble experience, after the Arduino IDE has been open for a good 15-20 minutes of repeated FAILED tires to upload, it doesnt quite like this behaviour and so needs a restart, so Shut down all instances ( all open windows of the Arduino IDE ) of the Arduino IDE and then open it up again from fresh, this usually cures alot of the uploading problems too.

Windows Computer Users Checks: ( ! )

If your like me and have your Windows Computer running 24 hours a day, inevitably computers start experiencing Glitches or abnormal behaviour where something "should" work but "all of a sudden doesnt" - Guess What !!! Its because we're using a WINDOWS computer !!!!!!! !!!!!! !!!!!!

Mac & Linux users are probably laughing at this point lol....

1. Restart PC....... lol
2. Try Uploading Again

You'll be amazed at how many problems this solves LOL x 2 !!!

And if youve reached this point and your STILL not getting your Arduino Hardware to Upload the Blink Sketch:

Yelp for Help !

If all else fails, email me a couple of "Clear" photo's of:

1: Your Breadboard Setup,

2: Your USB Module,

so that myself & the mad scientist can troubleshoot the setup and see whats going on, so there will be less hair-yanking done by all lol ;-)

BTW, the mad scientist is my Alter-Ego, lol ;-)

& Remember, i will always try my very best to help troubleshoot problems & setups, im also still learning the very nature of Arduino myself, most who buy my kits have oodles more experience than i have, but i will always try to troubleshoot your breadboard setups and have the tenacity not to give up when other sellers will start palming you off with excuses rather than solutions, so please bear in mind that im trying to help, so please, be nice, there's always a logical solution to why setups dont work and 9 times out of 10 its something so simple that one could kick themselves for not noticing it in the 1st place ;-)

And on that bombshell, just show me the setup photo's, always happy to help solve these problems and together we'll have alot less hair-yanking going on lol ;-)

Go Back To Step 2                                   Go Back To Step 1                                       Go Back To Intro

About This Instructable


97 favorites


Bio: Always modifying something !!! (Why "Stuff" cant come as you need it or why Stuff has to be repaired just after the warranty OR if the ... More »
More by offtherails2010: How To Make The Easiest Breadboard Arduino-Compatible Sanguino-Equivalent...EVER ! & How to Upload Sketches Straight to it !! How To Make The Easiest Breadboard Arduino Uno...EVER ! - The Breduino ! (& How to Upload Sketches Straight to it !!) With Additional Hardware Options - UPDATED - JULY 2013 How To Duplicate & Prototype Your Own RC Car Parts Cheaply! Final Update 20-03-2012 !
Add instructable to: