Pages: [1] 2 3 4   Go Down
Author Topic: Tutorial for hacking a CP2102 USB from ebay and uploading a sketch to an Atmega  (Read 16392 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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?
« Last Edit: April 15, 2012, 04:46:15 pm by msev » Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 322
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* CP2102 Back.jpg (51.5 KB, 600x600 - viewed 226 times.)

* CP2102 Front.jpg (55.92 KB, 600x600 - viewed 303 times.)
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 322
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1249
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged


0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27089
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Sr. Member
****
Karma: 1
Posts: 322
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27089
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1] 2 3 4   Go Up
Jump to: