Programming an UNO clone using a FTDI cable

Hi All,

Can anyone shine some light on this, I have an UNO Clone 328 chip with a bootloader installed, also installed is a 'blinky' sketch, working as expected (the chip was programmed in an UNO board).
The problem is if I try to reprogram the chip using a known working FTDI cable (5V version). All pins and hardware have been checked and rechecked ie Tx to Rx and Rx to Tx etc. I know the cable is good because it works with an Arduino mini pro 5V 16MHz board. Please see attached jpg of a typical programming of the mini, data is visible however if you look at the clone no data. All setting have been checked I've increased the cap to 200nF to increase the reset pules.

Any clues?

ATB Dan

Hi,

danomahoney:
Can anyone shine some light on this, I have an UNO Clone 328 chip with a bootloader installed, also installed is a 'blinky' sketch, working as expected (the chip was programmed in an UNO board).

Did you overwrite the bootloader when you installed the blinky sketch?

Hi Again Coding Badly,

I've just checked, removed the chip, put into an official UNO board and successfully reprogrammed, so the bootloader is OK, the cable is OK, unless there are different drivers or code running the cable during the programming of the different Arduino board version in the Arduino environment, do you know about these things?

I have also just checked the driver version, as I'm using an Intel based Win7 Pro PC I see the driver version is 2.8.26.0, the FTDI site indicates 2.08.24.

Just to prove if the problem, I'm going to try reprogramming the chip in an official board using the FTDI cable but this time monitor and capture the data line with logic probe.

Is there a clear description of the programming process describing the handshaking, pulse timing and the like somewhere, I've looked to on avail?

ATB Dan

Try manually resetting. Release the reset pushbutton just as Uploading... is displayed in the greenish bar between the edit window and the status window.

Hi Coding Badly,

I've tried the manual reset on an official UNO board, it works as you can see below.

Cheers for your help.

ATB Dan

You are welcome. If you need help with your auto-reset circuit, I suspect someone in General Electronics will lend a hand.

An up date, I've been looking at this problem off and on for a while and now see the cause of the problem, it's the version of bootloader. The UNO is programmed with the Optiboot 4.4, the FTDI cable and the 'Sparkfun' Breakout board do not work with this version. I'm now using the Duemilanove bootloader and it works fine.

The UNO is programmed with the Optiboot 4.4, the FTDI cable and the 'Sparkfun' Breakout board do not work with this version. I'm now using the Duemilanove bootloader and it works fine.

That is a rather puzzling statement and conclusion. How did you come to that? Is see no reason that one can't use any type of USB TTL serial converter chip or module or cable assuming you wire it up correctly and utilize the DTR or RTS signal if avalible as it is for the Sparkfun FTDI basic breakout board. The serial bootloader on most any arduino 8/168/328/1280/2560 based boards are agnostic as far as what is supplying the serial data to the AVR chip that the bootloader code interacts with.

Therefore I think your conclusion is incorrect or you are misunderstanding something.

Lefty

The Label is wrong on the power jumper.. It sez Default 3V3 and is shown 'jumpered' to 5 V.

Bob

The UNO is programmed with the Optiboot 4.4, the FTDI cable and the 'Sparkfun' Breakout board do not work with this version. I'm now using the Duemilanove bootloader and it works fine.

When attempting to program the clone with optiboot and the ftdi cable, did you select "Uno" as the board type?
The board type to use is strongly (exclusively perhaps) dependent on the bootloader, rather than the cabling details. If you had selected, say, "Arduino Pro with m328" because it is also uploaded via FTDI, that would have been wrong.

One thing about the FTDI cable that nobody mentioned is it uses RTS instead of DTR.
The FTDI Friend [similar 6-pin female header I/F] uses DTR, however. Also, both of
these come in 5V and 3.3V versions.

For the cable, you need to go to "Control Panel > System > Hardware > device manager"
for the comport, and select "set RTS on close".

Hi Fokes,

I've checked all the usual TX/RX reversal, 5V or 3.3V, RTS, DTR, board type and auto reset hardware, havn't got to the root cause yet, but going back to an older bootloader does work. I do think it is related to reset, and as some has suggested try a manual reset, however I found it very difficult to get the timing correct for it the work.

I have come to this conclusion because I an able to program an Arduino Mini Pro 5V with the FTDI lead and b'board, I checked the b'loader version on said Mini Pro using a sketch, reprogrammed the clone with the same b'loader and it works reliably.

So I'm convinced it's b'loader based, may be the root is due to some acknowledgement signal or timing etc. It seems that OPTIbootloaded and the FTDI Chip are not compatible, (handshaking etc, hardware is not a problem). The UNO uses a 8U2 device with a build-in USB controller. If someone is interested in using a clone UNO I would suggest buying a, https://www.sparkfun.com/products/10277, a 8U2 b'board, this should work without problems.

When I have time I will investigate further, may even buy the above.

ATB Dan, living and learning:-)

danomahoney:
Hi Fokes,

I've checked all the usual TX/RX reversal, 5V or 3.3V, RTS, DTR, board type and auto reset hardware, havn't got to the root cause yet, but going back to an older bootloader does work. I do think it is related to reset, and as some has suggested try a manual reset, however I found it very difficult to get the timing correct for it the work.

The easiest way to perform a manual reset that I was told about and tried is to press and hold down the reset button, then press upload, and when you see the first blink on the USB serial recieve LED release the reset button. That works pretty reliably for me.

I have come to this conclusion because I an able to program an Arduino Mini Pro 5V with the FTDI lead and b'board, I checked the b'loader version on said Mini Pro using a sketch, reprogrammed the clone with the same b'loader and it works reliably.

So I'm convinced it's b'loader based, may be the root is due to some acknowledgement signal or timing etc. It seems that OPTIbootloaded and the FTDI Chip are not compatible, (handshaking etc, hardware is not a problem). The UNO uses a 8U2 device with a build-in USB controller. If someone is interested in using a clone UNO I would suggest buying a, ATMEGA8U2 Breakout - DEV-10277 - SparkFun Electronics, a 8U2 b'board, this should work without problems.

Well I have installed the Uno optibootloader on all my 328 based boards, including older ones having a on-board FTDI chip and all works well as long as I remember to select Uno as the board type. Again the bootloader has no knowledge by what means the serial data is getting to pins 0 and 1, just that the programming data is coming at the correct baudrate from the IDE/AVRDUDE.

Lefty

When I have time I will investigate further, may even buy the above.

ATB Dan, living and learning:-)

It's vaguely possible, given the serial speeds involved, that SOME FTDI adapters might not work with SOME arduino clones using optiboot. The 115200bps serial rate used by optiboot is not particularly accurate on a 16MHz AVR. If (say) neither the AVR nor the FTDI had a crystal-controlled clock it's possible that you could get "unlucky" to the point where they could not reliably communicate.

It seems that OPTIbootloaded and the FTDI Chip are not compatible, (handshaking etc, hardware is not a problem).

99% of the time, I use either the FTDI cable or the FTDI Friend, both of which use FTDI chips,
and they work with both 16Mhz optiboot [UNO] and Duemilanove bootloader chips. So the issue
isn't one of compatibility.

That's interesting Westfw,

I didn't mention it but while I was waiting for the breakout board to arrive I hacked an UNO board with the 328 removed, soldered a wire to the auto reset cap (because I wanted to test the clone circuit as much as possible), connected this and GND, TX, RX to a 6 way leaded socket (pin-out as per FTDI cable, CTS tied to GND and 5V not necessary as clone has own) and was able to program with 100% success. The clone board has a 16MHz crystal with 2 x 22pF caps, auto reset cap 100nF. The supply rails are clean with plenty of decoupling.

When I've got time I will make some measurements with a 'scope and post the findings.

ATB Dan

westfw:
The 115200bps serial rate used by optiboot is not particularly accurate on a 16MHz AVR. If (say)
neither the AVR nor the FTDI had a crystal-controlled clock ...

I can imagine this problem would get worse at higher baud rates. Why on earth do they
put a 5% tolerance ceramic resonator in the UNO along with using optiboot at 115200?

a 5% tolerance ceramic resonator

That's extremely unlikely. I couldn't even find any 5% resonators. (I did find a bunch of 0.5% resonators (which is more typical) whose "short descriptions" were missing the decimal points, so it LOOKED like they might be 5%. But they weren't.)

Oops, misfire, it is 0.5%, not 5%. Still many times worse than 20-50 PPM for crystals, which
is 0.002-0.005% [if in error again, well, maths isn't strong in the mornings].