A USB cable with auto-reset for less than 4 $

Hello,

I have a standalone atmega328 on a breadoard with the bootloader for Duemilanove. For programming, I use a USB to TTL converter bought on eBay for less than 4 $, shipping included.:

It was working perfectly but I had to press manually the reset button of the atmega in order to upload the sketch. Reading this page http://www.arduino.cc/playground/Learning/AutoResetRetrofit I saw that autoreset needs a 0,1µF capacitor between DTR signal and Pin0 (reset Pin) of the atmega.

According to the datasheet of CP2102, DTR corresponds to the Pin 28.

I then soldered a capacitor between Pin28 and R2 which is connected to the RST Pin of the adapter:

It was not easy and I had to work under the microscope.

So, yesterday I discovered that there is probably another solution.

When seaching eBay for “USB to TTL”, you will come across another layout of adapter, still with CP2102 chip:

As you can see, there is a hole already connected to DTR where you can solder a pin or a wire. This hole can be connected to the reset pin of the atmega through a 0,1 µF capacitor.

I saw that autoreset needs a 0,1µF capacitor between DTR signal and Pin0 (reset Pin) of the atmega.

So why did you :-

I then soldered a capacitor between Pin28 and R2 which is connected to the RST Pin of the adapter:

RST is not the DTR pin.

The other problem with this chip is that when using the Mac drivers under Snow Leopard it will not pulse this pin so auto reset will not work at all. It was fine under previous Mac OSs. I have told them about this and they promised a new driver but this was over two years ago and as yet nothing.

So why did you soldered a capacitor between Pin28 and R2 which is connected to the RST Pin of the adapter. RST is not the DTR pin.

Well, the RST pin of the adapter is useless for the arduino and I needed a pin for DTR signal. RST pin is connected to +5V though R2 and probably to the RST pin of CP2102. Before cutting any trace, I soldered the capacitor and tried to upload a sketch. As the autoreset was functioning, I didn't cut any trace

The other problem with this chip is that when using the Mac drivers under Snow Leopard it will not pulse this pin so auto reset will not work at all. It was fine under previous Mac OSs. I have told them about this and they promised a new driver but this was over two years ago and as yet nothing.

I was not aware of this incompatibility between DTR and the Mac OS. Is it the same problem with DSR. It is sometimes related that it can trigger the autoreset ?

Edited: the RST pin of the adapter is useless for the arduino

Is it the same problem with DSR

Yes, nothing gets toggled when opening the serial port therefore the auto reset will not work what ever you do on a Mac.

Grumpy_Mike: Nothing gets toggled when opening the serial port

As long as you can toggle your finger for manual reset, there is some hope ;)

I couldn't resist any longer : I bought the black adapter. 3.97 US$ for the adapter with 5 cables, shipping included. Unbeatable ! It often takes 2 weeks from Hong Kong to Europe. I will report when it has arrived.

As long as you can toggle your finger for manual reset, there is some hope

Yes indeed I have two of these chips in an in circuit programmer I use when making stand alone stuff. It is just sometimes I go on a run of it failing to load and other times it is fine.

A few days ago I received the black USB to RS232 (TTL level) adapter. I soldered a 4 pins male header on the right side in order to easily connect the DTR signal.

Despite many attempts, I was unable to program a single sketch neither with manual reset nor automatic reset. I don't know the reason. The loopback test connecting Rx and Tx together is OK. I really don't understand what is happening. I will report if I find something.

Jean-Marie: A few days ago I received the black USB to RS232 (TTL level) adapter. I soldered a 4 pins male header on the right side in order to easily connect the DTR signal.

Despite many attempts, I was unable to program a single sketch neither with manual reset nor automatic reset. I don't know the reason. The loopback test connecting Rx and Tx together is OK. I really don't understand what is happening. I will report if I find something.

I too bought the black model a couple of weeks ago. Installed a .1ufd cap from the DTR pad to the RST connector pin. Cut the existing trace on the back for the RST signal. Works great.

Lefty

Hello Lefty

Fantastic ! I will have to check a bit further to find out why it doesn't work. I could try to upload a small program to check the RS232 connection with a terminal. If it works for you, either my adapter is out or one of my connections is bad. The funny thing is that I have no problem to upload a sketch with my first adapter (the red one).

Hurrah !!!

I found where was the problem. Usually, the Tx signal of the PC or the adapter is connected to Rx pin of the Atmega. Well, in the case of my black adapter, Tx of the adapter has to be connected to Tx of the atmega and the two Rx signals are also to be connected together. This way, I could manage to upload a sketch with the manual reset. But connecting DTR to the reset through a cap didn't work for an automatic reset.

These inverted Tx and Rx reminded me the inverted cables of the null modem. So instead of connecting DTR to the reset, I tried with DSR. And it was successful !

I guess the other signals are also inverted, according to the null modem.

@ Lefty: I would be very interested to know how your black adapter is labelled. Could you compare it with the pictures I put on the forum ?

@ Lefty: I would be very interested to know how your black adapter is labelled. Could you compare it with the pictures I put on the forum ?

Well mine is identical to the black one in your picture in this thread, even down to the silk screening. I bought it from this seller:

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=190544446821&ssPageName=STRK:MEWNX:IT

I just wired it up again to my genuine Arduino Duemilanove to just make sure all was as I said. You are correct in that the module does not follow the arduino convention of what the TXD and RXD mean. This module uses it's RXD pin as a output pin and it's TXD pin as it's input pin.

I wired:

module arduino 5V to 5V GND to GND TXD to TX (pin 1) RXD to RX (pin 0) RST to RESET

Again the auto-reset mod was to solder a .1ufd cap from the DTR pad (far left pad on top edge of the pic) to the base of the RST pin on the module connector. Then I cut the trace that was going to the RST connector pin.

I was able to load sketches with no error, including one that sends data out the serial port and seen on the arduino IDE serial monitor, it worked fine. Only change on the arduino IDE is that the comm port number for the module (com6) is different then the normal one for my arduino 2009 (com5). So at least for my module, the auto reset function works.

The only change from normal operations is that you won't see the send and receive leds blinking during uploading as the data is not coming and going from the on-board FTDI chip which drive those two leds, but rather from this external usb serial converter module, which does not have send and receive leds.

EDIT: By the way I use a PC terminal program called Brey terminal, which allows one to click on or off the DTR signal, and I checked with a meter hooked to the DTR pad and ground, and DTR on = ground and DTR off = +3.3vdc, so I don't know why the DTR pad didn't work for you, and don't have a clue why the DSR pad does work for you as the auto-reset signal.

Lefty

Too bad that chip has such a small footprint, I would consider putting it on boards in place of the FT232RL. Those pins are 0.65mm pitch, these are 0.5mm.

Thanks to Jean-Marie and Retroleftie for this info.

This was very helpfull. (i was getting tired of resetting the board everytime i needed to upload a sketch).

Btw: I'm using a barebones freeduino (which doesn't have a USB to TTL converter on board) with that same second adapter (the black one). I soldered a wire to that DTR hole and tried it with and without the 0.1microF condenser. It works.

The main diference is that i didn't cut the adapter RST and simply do not use that pin (i use the soldered wire instead).

Parameters used: Board "Arduino Nano w/ ATmega328" Programmer "AVRISP mk II"

Regards, Nuno

This Programmer "AVRISP mk II" does not apply when downloading code via the serial interface.

The MKii is an ISP programmer that connects to the ICSP header for installing bootloaders, or for installing a sketc with no bootloader.