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

Hi there, like the title of the thread says, I'm interested if there is a tutorial available that explains how to use a CP2102 USB from ebay and uploading a sketch to an Atmega...And if it works with the latest arduino environment,...and also where to find relevant drivers for Windows Vista.

Regards,

Edit: maybe I should put this topic in Device hacking? please move if you think so.

Download the drivers from Silicon Labs. Connect tx to RX and vice versa.

It will show up as a virtual com port just like the FTDI chip.

But I’ve read that you have to modify it in someway to make the auto-reset feature possible? Do you have pics of that mod?

http://www.google.com/search?q=arduino+cp2102

Yeah I've already found the link but I'm a bit concerned about the commentarys of people that they didn't get it to work..hope they are just incompetent :)

There seems to be a few different ways to go about it...Which one would you recommend?

This one: http://www.ebay.com/itm/USB-To-TTL-COM-Converter-Module-buildin-in-CP2102-NEW-/251039882204?pt=LH_DefaultDomain_0&hash=item3a73249bdc

That one in the ebay link looks a bit different than the one the guys are hacking...Does this one also require hacking?

The problem that I found is that the “Reset” pin on the board is not one you can use to reset your Aquino and start you download. It is an input to the CP2102 to reset the converter chip.

The board I got off eBay had an exposed DTR. You need a Capacitor between this ‘pin’ and reset (pin 1) on the Atmel chip.

I attached a couple photos of a board like mine. I got it to work without too much difficulty.

That one in the ebay link looks a bit different than the one the guys are hacking...Does this one also require hacking?

Yes, but it may be very difficult to hack as I don't see a DTR signal pad to attach to. The DTR signal is avalibe on the CP2101 chip, but it's very difficult to solder anything to those small spaced chip pins. Doesn't mean it can't be used but you may not be able to get it to utilize the auto-reset function and will have to use a well timed manual push button reset on the arduino board prior/during uploading.

Lefty

You may need to spend another $3 and get one with a DTR solder point.

I didn't yet ordered anything..so I'll order that black one that looks like the one you guys are hacking..made my decision easier, thanks!

As retro mentions.. a simple, timed button press (reset button) will eliminate the need for any DTR/RESET pad on the FTDI cable end..

I have done it a million times on standalone and breadboard projects... (a couple of custom boards, that did NOT have a reset button.. I just used my real Arduino as a passive/pass-through device to upload sketches...by removing the Atmega chip in my true Arduino)

this thread may help:

http://arduino.cc/forum/index.php/topic,5453.msg41846.html#msg41846

RandallR: The problem that I found is that the "Reset" pin on the board is not one you can use to reset your Aquino and start you download. It is an input to the CP2102 to reset the converter chip.

The board I got off eBay had an exposed DTR. You need a Capacitor between this 'pin' and reset (pin 1) on the Atmel chip.

I attached a couple photos of a board like mine. I got it to work without too much difficulty.

Why do you need the cap, doesn't the arduino pro mini for example already have a cap onboard?

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. Adding one results in series capacitance of (C1*C2)/(C1+C5), or 0.05uF with two 0.1uF caps. DTR generated reset may or may not be enough to properoly reset the 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 :D

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.