Arduino Uno resets when plugged into computer for data download

After gathering data from a stand-alone Arduino Uno, I tried to transfer that data to the computer but unfortunately when plugged into the computer it resets and my data is lost.

When I connect a capacitor of 1uF or larger between the reset pin and ground on the Arduino board it fixes the problem. Unfortunately, when this capacitor is present, I cannot upload changes to the software. Maybe I could incorporate a switch to switch the capacitor in and out of circuit to accommodate this problem but surely there must be a more sophisticated method to get around this problem.

Has anyone found a satisfactory solution to this?

Thanks in anticipation of a reply.

Don

Hi and welcome.

This is a feature, the board is supposed to do that.
But this isn't always desirable, as you found out.
So the board was designed so you can change this behavior.
If you take a look at the top side of the PCB (click !) of the Uno R3, you'll notice 2 solderpads next to the crystal, marked "RESET EN".
If you take another real close look, you'll also see that these are connected by a trace.
If you carefully cut that trace, the automatic reset will be disabled.
Next time you want to upload, you need to connect these solderpads.
The pads aren't trough hole pads, and the spacing differs, so you can't put a jumper header to it.

MAS3:
The pads aren't trough hole pads, and the spacing differs, so you can't put a jumper header to it.

Not in it, but you can with care solder a 2-pin jumper on it. You can probably find a miniature switch to solder over it.

So let's see - which do you propose to do more frequently in actual use? I suspect it is the data download, so cut the jumper and upload by pressing the reset switch and releasing it the moment you see the "Done Compiling" message in the IDE.

Give a bit of thought to what you want...

In order to upload a sketch, the board has to be reset, so that it runs the bootloader and can receive code. The way this is done is with the DTR pin. That is brought low when a serial connection opens, and it's capacitively coupled to RST, so the transition to low becomes a pulse, resetting the board.

That's why the two behaviors interact like that. You need autoreset to upload sketches, but you also have a use case that demands not using autoreset.

There is no solution that does not involve physically actuating something - either you knacker reset entirely, and use the reset button (I find this hard to pull off - I don't like having to play twitch reflex games to upload a sketch, if I wanted that I'd be running a video game, not the Arduino IDE), or you connect the extra cap to disable it when downloading data.... Or you could modify your code so that a reset was not problematic when downloading the data (this may not be practical, of course, if the data is being stored in volatile memory :wink: )

It was a pretty boneheaded design decision to not provide through-holes for a RST_EN jumper, so we could cut the trace and install header for a jumper.

Thanks for the replies and the forum welcome.

My board was purchased via eBay see below

http://www.ebay.com.au/itm/141248769799

I cannot find the 2 solderpads mentioned on this particular board so my solution is to just include a push button switch on the box which houses the board. When I need to upload code, I press the switch and this disconnects the capacitor from reset to ground and this seems to work OK.

Maybe I have missed something on this board that allows a better method but this works.

Gaggymoon:
I cannot find the 2 solder pads mentioned on this particular board so my solution is to just include a push button switch on the box which houses the board. When I need to upload code, I press the switch and this disconnects the capacitor from reset to ground and this seems to work OK.

You are right! The jumper is missing!

In fact, this board is by definition, simply not a UNO in the first place, it (along with others incorrectly described) is an enhanced form of the older Duemilanove (using an alternate USB chip).

A preferred way to enable auto-reset would be to identify and remove the reset capacitor, wiring the pads from that to your switch with the capacitor now in series. Alternatively, removing the capacitor, soldering a 2-pin header to the position, and attaching the capacitor to a 2-pin female header.

Why preferred? Well, for one thing, the reset capacitor to ground is a “bodgie” approach which strictly speaking, excessively loads the DTR line on the USB chip. This matter is somewhat arguable.

That is a cheaper version of an Uno.
You can see that there is no Arduino or "made in Italy" text on the photos, nor the silkscreen artwork which is supposed to identify an original Arduino.
It uses a cheaper main chip, and a cheaper USB to serial adapter.
It also doesn't have the jumper.
It does have a 4 pin header named X1, of which the 4th. pin is connected to the DTR signal of the USB/serial converter.
The 1st. pin is identified by a square solderpad instead of the round ones.
You can also see that that pin 4 leads to capacitor C8.

You could cut the trace between the pad and C8, and solder a switch (as suggested by Paul__B) to the pad, and to the capacitor, bridging the trace you just cut.

MAS3:
That is a cheaper version of an UNO.

Frankly, it is not in any way a UNO - nor are many similar.

A UNO is defined by the 8U2 or 16U2 as the USB chip with the secondary ISP header. If it does not have that, then it is simply not[ b] a UNO in the Arduino sense. It is a Duemilanove, nothing more.

And just noticed - to add insult to injury, the only relation to a “UNO R3” is the SDA and SCL pins! It’s a nice board in many ways with extra pinouts, but to call it a UNO is just so wrong! :stuck_out_tongue_closed_eyes:
And the SMD version - which is quite OK except that you cannot replace a damaged processor.