Arduino code won't upload with Ethernet Shield attached...

Hello all

Kind of a newbie here... :blush:

Been playing with my Arduino Boards for a while. i have an UNO and a Duemilanove 328.

I've been able to program both of them no problem for weeks. Any example project I try will compile and upload with no issue.

I recently got an Ethernet shield...I'm trying some test sketches and no matter which board I try with the shield attached i get:

avrdude: stk500_getsync(): not in sync: resp=0x00

As I said, without the Ethernet shield attached all is bliss....

Do I have a bad shield or am I just doing something stupid.

Thanks in advance for any and all wisdom. :fearful:

Robert

Some ethernet shields cause a problem with the reset from the usb port. If the Arduino doesn't get the reset, it won't start the bootloader.

Install the shield, and when you start to upload the code, press and release the reset button on the Arduino/shield. See if the code uploads then.

You can also try to update the arduino firmware and remove a resistor on the board.I dont remeber now the location on the board but it fix the problem.

Just curious, did you buy the board from eBay?

I have exactly the same problem. Did one of the offered solutions work for you?

I'll try to reset the arduino and ethernet shield before uploading the sketch later.

I know this is an old thread, but I want to share my solution with others.

I bought a couple of the PoE ready shields from China off eBay and was having the same issue. The problem is too much capacitance on the reset line when the shield is plugged in. Here is the solution:

Look at http://arduino.cc/en/uploads/Main/arduino-ethernet-shield-06-schematic.pdf

The issue is c3 (100n cap). It is located on the Ethernet shield, at the bottom left hand corner of the reset switch (the resistor is above and to the left of the cap). Mine was brown. Just float it off with a soldering iron, and viola!

If you are interested in what is going on, watch it with a scope.

Thanks!

Wow, removing that capacitor made my day :slight_smile:

Hi All

I am using the arduino uno with an Ethernet shield. My arduino works perfectly fine but when I connect the Ethernet shield to the arduino the whole thing doesn't turn on anymore.

Has anyone come across this issue before ?

ross12:
I am using the arduino uno with an Ethernet shield. My arduino works perfectly fine but when I connect the Ethernet shield to the arduino the whole thing doesn't turn on anymore.

Has anyone come across this issue before ?

  • power off
  • remove the shield from the Arduino
  • power on
  • then load the example sketch "BareMinimum" or "Blink" to the Arduino
  • power off
  • then put the Ethernet shield back again on the Arduino
  • power on
    And always make sure, that there must be a little distance between the USB connector on the Arduino and the soldering side of the Ethernet shield: Do not create a short circuit with the shield and the USB connector on the Arduino board!

Thanks for your help. It worked. Now both the arduino and the Ethernet shield are on.
Can you tell me what I was doing wrong please?

ross12:
Thanks for your help. It worked. Now both the arduino and the Ethernet shield are on.
Can you tell me what I was doing wrong please?

Either you created a short circuit between the USB connector of the Arduino board and the soldering side of the Ethernet shield.

Or you had missed to load a harmless sketch to the board BEFORE putting the Ethernet shield on it. Harmless sketches would be in case of the Ethernet shield:

  • BareMinimum
  • Blink
  • all sketches that are for the Ethernet shield

In Arduino it is either possible to create a short circuit by hardware, and it is also possible to create a short circuit by software, is you use a wrong sketch for the hardware connected to the Arduino.

So before connecting a new hardware to the Arduino:
Always load either a harmless sketch (BareMinimum, Blink) or a sketch suitable for the hardware to be connected to the board, BEFORE actually connecting the hardware to the Arduino.

Hi All,

Loading a harmless sketch did not solve the problem.
Pressing the reset button before uploading did not solve the problem.

First:
I have an Arduino Uno R3 and an Ethernet shield.
The Ethernet shield was purchased on Ebay (an image of it is attached) and
has a Wiznet5100 chip.

The problem is that I cannot upload a sketch while the Ethernet shield is connected.
Everything works fine if I disconnect the shield when uploading. After I upload, I
connect the shield and the Webserver and SD card work just fine.

Since it is a pain to disconnect, upload, reconnect the shield after each edit, I'm
hoping someone can help me resolve the issue.

I saw atmegatron's post indicating that removing C3 may solve the problem.
However, looking at the schematic (link included in his post), I can't seem to find C3.
I see C1 through C15 on the schematic (but not C3). I'm hoping someone can repost
my posted shield image with the correct capacitor circled in red (or something) so that
people like myself can feel more confident about desoldering the correct component.

This is the output I receive when the ethernet shield is connected while uploading:

Global variables use 453 bytes (22%) of dynamic memory, leaving 1,595 bytes for local variables. Maximum is 2,048 bytes.

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10
avrdude: stk500_recv(): programmer is not responding

ridge:
The problem is that I cannot upload a sketch while the Ethernet shield is connected.
Everything works fine if I disconnect the shield when uploading. After I upload, I
connect the shield and the Webserver and SD card work just fine.

Please check if "upload with manual reset" is working.

Do it like that:

  • press and hold down the reset button on the board
  • start the sketch upload from the Arduino IDE (reset button still pressed)
  • wait while compiling the sketch (reset button still pressed)
  • as soon as the status line changes to "Uploading..." release the reset button immediately

Does that help uploading with the shield attached?

Thanks for your response.

Unfortunately, no, it doesn't help.
I tried pressing the RESET button on the Arduino Uno first.
I tried pressing the RESET button on the Ethernet shield second.
Then, I tried pressing both RESET buttons.
I tried to release the button as soon as "Uploading" appears.

ridge:
Unfortunately, no, it doesn't help.

Is there any other other hardware connected to the Arduino or Ethernet-Shield?

Is there a SD card inserted in the SD slot of the Ethernet shield?

Does the problem occur with a sketch written by your own?
Or does the problem occur with any of the Ethernet example sketches?

All sketches I've tried (examples as well as my own modified examples)
work fine as long as I disconnect the shield, cycle power on the UNO,
upload, then reconnect the shield.

No, there is no other hardware connected except for ethernet RJ45
and USB cable.

ridge:
All sketches I've tried (examples as well as my own modified examples)
work fine as long as I disconnect the shield, cycle power on the UNO,
upload, then reconnect the shield.

Sorry, I'm completely clueless what might be wrong with your hardware.

If it were my hardware, I'd start exchanging each component:

  • change USB cable
  • change Ethernet shield
  • change UNO board
  • try upload from another PC
    To find out which hardware (USB cable, shield, board or PC) causes the failure.

Thanks for your responses.

I cannot use another UNO board or another Ethernet shield (I don't have others).
However, I've tried using a PC (Windows 7) as well as a Mac (Mavericks).
I'm using IDE 1.6.1 (I noticed that 1.6.3 is available so I can try that).

However, I'm thinking that atmegatron's solution may work. I'm hoping several
people have tried it and can confirm that solves the problem.

atmegatron's solution works fine for my arduino!
Thank you!!