Isolating Tx/Rx for uploading.

My Ibus project is coming on nicely ( Start of my input on the topic ) so now I have to think about the physical installation.

So far, I have destroyed four Nanos trying to upload to them when the Tx/Rx was connected esewhere. To counter that, I am using a relay in my test rig to disconnect the lines for upload.
Is there any more compact or preferred method for doing this?

The location for the interface will take at least half an hour of undressing the old girl to be able to replace one that has gone bang, so would like to have something pretty foolproof.

Maybe sensing the Nano's USB socket becoming live to switch out the lines perhaps?

When I upload a sketch to my Nanos while TX & RX are connected to something else it doesn't destroy the Nano. It's just a software conflict and the upload doesn't proceed.

It's just programming logic at work -- that won't destroy the Nano.

John.

Off topic totally, but @AJL, have just had a quick squiz at your web site- the Scimitar GTE has to be one of the finest looking vehicles of all time.

If the txRx lines are being held in a logical state and the incoming upload toggles those lines, then we have a dead short?

Ignoring that problem for now, I still need to isolate the lines during upload, all I will have access to will be the USB connector. I am tempted just to go for a mini relay.

I have done this many times and the the Nano is not destroyed. The compiler just reports there is a problem uploading.

AJLElectronics:
If the txRx lines are being held in a logical state and the incoming upload toggles those lines, then we have a dead short?

The Nano has 1K ohm resistors in the Rx and Tx lines between the USB-to-serial chip and the atmega328, so there should be no damage at all.

I am just this minute looking at the schematic, so thanks for that info*. I'm looking to see how I can sense the USB going live to automatically switch out those lines for updating as it will all be hidden in the depths of her undies. My first thought was the Vin but that seems to have Volts on it regardless, hence having a look at the diagram.

  • Strange that I lost three Nanos immediately after trying to upload to them. Switching out the lines on number four has resulted in no failure as yet.

In the absence of any other suggestions, I am going to use a reed relay powered from the incoming 12V supply. That way with the ignition off, the Tx / Rx lines will be disconnected.

I can see what is being said about the protection, I am mystified now as to how I managed to kill them!

AJLElectronics:
I can see what is being said about the protection, I am mystified now as to how I managed to kill them!

Have you determined what is bad about the boards you killed? Only thing I can think of that would physically damage the chip would be if something was actively driving the atmega328 transmit pin while it was transmitting. Have you tried burning the bootloader to see if somehow it became corrupt? Although I'd try double-tapping reset and trying to upload a simple sketch first, in case it was just a problem with a corrupt upload.

I haven't looked as yet but the bootloader suggestion is a useful one to try. The one was taken out of circuit when it started pulling 200mA at idle!

As far as isolating the txrx lines are concerned, the answer is a 74HC126 tri-state buffer. I had to find a plan B after I found that I had ordered 24V relays! It's a far nicer solution anyway and lends itself to SMD if I start getting boards made.

If you really need to isolate you arduino from the PC, there ae isolators available like this .

It's isolation from a peripheral IC that was the problem. With the lines connected it prevented the upload being carried out. It works correctly now with the tri-state buffer.