Go Down

Topic: Tutorial for hacking a CP2102 USB from ebay and uploading a sketch to an Atmega (Read 18870 times) previous topic - next topic

msev

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.

James C4S

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.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

msev

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?

James C4S

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

msev

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?

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.

retrolefty

Quote
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

RandallR

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

msev

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!

xl97

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

msev


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?

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.
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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

RandallR

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.


CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up