Tutorial for hacking a CP2102 USB from ebay and uploading a sketch to an Atmega

When I was doing my testing, I was breadboarding the bare chip with crystal, caps, and resistor. I didn't get past the blinking LED but I will.

I have not looked too closely at the Pro Mini since for a couple dollars more you can get a Nano with a USB to serial built on the board. It also breadboard quite nicely. I prefer the Nano to the Uno or Duemilanove because it fits so well on a small breadboard.

Thank you very much!

I built 15 promini's into fencing club scoring machines. Didn't need USB interface, so I went with the less expensive pro-mini'.
And when I ran out (due to damaging a couple during debug) I started wiring up my own promini equivalent instead. Have not purchased a real arduino since, just made my own clone versions in multiple styles & quantities.

Do you make them with dip atmegas?

what are you looking for? standalone boards?

but in DIP style?

maybe Anatools.com will help, and his Anarduino kit:

http://www.anatools.com/anarduino/

http://www.anatools.com/anarduino/inst.jsp

I found him great to deal with and very nice.

I used a few of these...they are great and are assembled in like 5 minutes.

@msev - yes.
Also DIP ATMega1284's. Extra IO (32 total), dual hardware serial port.

You can see some of my designs at the link in my signature. Gotta find my FTP password so I can upload some more pic's.

Or here for a minimal component '328:
http://store.nkcelectronics.com/arduino-runtime-board-rev-b.html

I'm looking for a design with the dip package that would ideally have such a pinout for programming pins that it would be directly plug-in friendly for the modified cp2102. Probably I'll have to modify some .brd file of an exsisting minimal arduino project.. It would be nice if there was a topic, a collection of all minimal arduino projects together :smiley:

CrossRoads:
When the arduino has an onboard cap in series from DTR pin to the chip's reset, then a cap is not needed on the CP2102 module.

Thanks for that - I'd been wondering why I'd seen the 0.1uF cap added to the board that RandallR pictured thinking that it shouldn't be needed if the 'arduino' has it's own 0.1uF cap on the reset line.

I guess the idea was to avoid having an extra cap on each clone you build? Too late for me, I always do that.

I'm posting just to confirm for the OP that I bought a pair of the same boards (or at least appear to be the same) that RandallR pictured from dealextreme and the "fix" was as simple as cutting the trace that goes to the RST pin and running a small wire from DTR. No 0.1uF cap needed if your target board already has it.

I also had to swap the TX/RX lines between the CP2102 and the target board (I've seen some boards where this wasn't needed).

Hope this helps,

Brad.

Did you swap them because of the pinout on your arduino, or because the board was mislabeled (that rx was labelled as tx?)?

msev:
Did you swap them because of the pinout on your arduino, or because the board was mislabeled (that rx was labelled as tx?)?

My Arduino board uses the standard FTDI pinout if that helps (I only bought the CP2102's to test). I believe this board actually has RX/TX marked correctly since with my other TTL/USB adapter also crosses TX/RX.

FWIW,

Brad.

its common form what I have seen..

some mark it as to what it GOES to.. an some mark it as what it IS..

once of the first things I try to swap when an FTDI sketch upload fails..

what/where are these boards you are getting?? (that has the DTR pin broke out)

my cheapie cables only ave 4 lines (5 if you count the 3.3v pad) 5v+, GND, RX, TX..

I hve to manually hit the reset button to upload sketches.. not a problem.. but going forward.. some projects wont have a reset button at all.

what/where are these boards you are getting?? (that has the DTR pin broke out)

Here are the ones I bought, can't beat the price:
http://www.ebay.com/itm/370532286388?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

Lefty

you dont have to use the 6-pin header do you?

I mean treat this like any other FTDI cable..yes?

as long as I run 5v+, GND, RX, TX to my chip.. Im good.. I can then use/tap the DTR pad from the bottom of the board to use on the DTR of the circuit Im uploading my sketch to....right?

a shame it was brought out on top like the other pins.

also is there a driver for it?

thanks

@msev,
a board like you describe is easy to make.

xl97:
you dont have to use the 6-pin header do you?

Nope. You can wire it up any way you choose. I do use 6pin headers simply to keep with the standard FTDI pinout.

Note the included (very short) cable actually only has 5pins (you can see that in the picture that Lefty posted).

I mean treat this like any other FTDI cable..yes?

Sure, just get a couple of the 6pin female crimp housings (such as http://www.pololu.com/catalog/product/1905), remove the single pin plastic housing on each pin, and insert the pins in the correct order. Or use whatever size header you want, as long as it matches your board.

I'd suggest testing the pinout first just in case :slight_smile:

as long as I run 5v+, GND, RX, TX to my chip.. Im good.. I can then use/tap the DTR pad from the bottom of the board to use on the DTR of the circuit Im uploading my sketch to....right?

You don't really need to pass 5v, but you've got the idea. I was going to post a picture of a modified board but there isn't much to show - simply a cut trace and a jumper wire. Takes 2 minutes and seems to work great.

also is there a driver for it?

Yup. I think there is a link earlier in this thread. If not, you can find the driver here An Arduino Compatible Using CP2102 – Kerry D. Wong

Hope this helps,

Brad.

thanks for the reply..

even found it a buck cheaper on ebay too:

http://www.ebay.com/itm/130683943875?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1438.l2649

thanks!

CrossRoads:
@msev,
a board like you describe is easy to make.

Are you willing to design it for me since you have a lot of experience (in Eagle)? With Dip atmega328.

Sure - which parts do you want to keep, and how do want the connector?

Thank you very much, you are really kind! it would take ages for me to draw all the connections...I do quite well for a beginner in the schematic editor, but in the board editor I get into trouble :)..

Well I'd like it to be single sided (I think I've already mentioned that :D) and with a dip package atmega and other parts also normal size (let say 3mm leds) not smd size ..

And I'd like the optional parts also (I'm not sure about that pwr led, it just indicates the arduino is being powered right?) and do I need the reset switch, if I have autoreset? I'd like the layout for the programming pins to be as similar as they can be with the modified programmer we are talking about http://www.ebay.com/itm/USB-2-0-UART-TTL-6PIN-Module-Serial-Converter-CP2102-/370532286388?pt=PCC_Drives_Storage_Internal&hash=item564571ffb4#ht_2817wt_1110 ...
I guess I want a female connector if cp2102 has male pins.
I don't need ICSP.

Thats about it I guess :slight_smile:

Also maybe I'd like a led on D13 so I can diagnose if the arduino is properly working with blink sketch (or which pin is it, I know I have a led that blinks on my nano if I upload the sketch on it, its permanently on the board).

Oh another thing, I'd like it to be drawn in Eagle :).

I have another question about the bootloader,..I shouldn't buy atmega with optiboot (or uno bootloader) right, but instead with duemilanove bootloader right?

Also maybe I'd like a led on D13 so I can diagnose if the arduino is properly working with blink sketch (or which pin is it, I know I have a led that blinks on my nano if I upload the sketch on it, its permanently on the board).

Physical chip pin 19 is the arduino digital pin 13. Just wire a resistor and led in series from that pin to ground, with the led cathode lead wired to ground. A 1K resistor is used in the standard arduino board.

Lefty