Ethernet Shield sketch not working when powered with USB DC adapter

My problem sounds exactly like this one, which never got an answer:

I have an Arduino Uno R3, and an Ethernet Shield W5200. The sketch is a basic Ethernet-Serial chat sketch, modified for the W5200 library, with a couple of simple modifications I made regarding which characters get echoed to where. The sketch works fine when powered by a USB cable connected to my computer's USB port (e.g. right after uploading the sketch to the board). But when powering the Arduino with a USB cable connected to e.g. an iPhone charger, no dice. The board appears to power up, but the Ethernet library does not initialize properly, the Ethernet Shield lights (4 lights) come on steady but do not blink as they did before, and the board does not respond to any inputs.

I checked voltages in the two scenarios, and there were some differences:
Vcc: when powered by the computer's USB port: initially 4.7 V, then after a few seconds 4.6 V, then after a few more seconds (when the Ethernet Shield finishes initializing) about 4.0 V. (This seems low, but the board works fine at this voltage.)
But when powered by the DC iPhone charger: voltage constant at 5.01 V. (I surmise that the W5200 chip never got selected and powered up, and is not drawing current)

The chip select (digital pin 10) for the Ethernet Shield board also has slightly different voltages in the two scenarios: about 2.2 V when powered by the computer USB port, and 1.6 V when powered by the wall charger. (I would have thought this should be closer to 0 V when it is asserted, i.e. "low" as opposed to "high"...)

The other obvious difference I noticed is that when connected to computer USB, the main yellow "L" LED on the R3 board does 3 rapid blinks at startup, then after a few seconds, another 3 rapid blinks. But when powered by the DC wall charger, the first 3 blinks are there, but not the second 3.

I am fairly baffled. Of course there could be things happening on that USB cable that I can't see, since the computer is able to communice over it and the DC wall charger isn't (well, less so, anyway). Are either the Serial or Ethernet libraries expecting the device on the other end of the USB cable to do anything specific?

The on board voltage regulator can't handle that much load. Use the USB connector instead, plug it into a phone charger wall adapter. Maybe the adapter you're using is faulty or can't supply enough current.

If that doesn't work, maybe there is a real hardware problem. Can you post some close up images of the shield installation? Check the bottom of the shield for any cut off component leads that are too long and so contact things on the Arduino like the shield around the USB jack.

Is there any additional hardware you didn't mention?

Thanks for the quick response! So, no additional hardware that I didn't mention, and I can't see anything poking out of the bottom of the Ethernet shield that could be contacting the Arduino main board.

My understanding of the on-board voltage regulator is that it is not used when power is supplied via the USB port?

I do notice that the voltage from the DC charger USB port is slightly higher than from the computer's USB port, but I am having a hard time imagining that things would stop working when the voltage is all the way up to the specified 5V instead of a few tenths of a volt below that. Usually it would be the other way around?

I also tried supplying a regulated +5V from a PC power supply to the Arduino's 5V pin, and that produced the same behaviour as the DC USB charger. I don't think a lack of current or voltage is the problem, as far as I can see.

The more mysterious the problem, the more we like to see images...

Ok here is the shield installation:

Yeah, I'm almost sure that on mine, the shield shorted out on the giant USB connector frame which is grounded... I had to trim the leads.. try wedging it up a bit so there's a bit of a gap...

BTW most devices like this should work fine between 4.85 and 5.15 volts or so.

Yeah, I checked that, and the gap seems fine. It looks like this:

I would have thought that if the board were shorted out, it wouldn't work with any power supply.

(In case my initial description wasn't clear, the only difference between my working and non-working scenarios is what's on the other end of the USB cable - either a PC USB port or a phone charger USB port.)

I am tempted to add a resistor to my power supply voltage to reduce it a bit, and see if it works better that way, since that's the only externally measurable difference that I can detect. Hmm

A different charger perhaps? The resistor idea has not much chance of success. And... is anything getting warm/hot? Catching up here and interrupted, I now see you tried a good PSU.

You asked about the power routing on board. Different Arduinos have different arrangements for the negotiation of power from the jack and from the USB plug. There is always a need to do that, so for example the jack power won't run into and destroy the computer USB port. Some are very simple, like the single diode on the Nano. Uno and Mega, better at least I think i remember seeing some MOSFET circuit there to drop the least voltage while switching power.

So although a lot of ideas could be put together, they might never get to the heart of it. First and foremost, you really need to test the shield and Arduino separately.

Well, I tried several different USB wall chargers, and a USB port on another computer, and even a USB hub connected to a USB charger, and none of those worked. Only this particular USB port on this particular computer works. Nothing seems hot to the touch... although I can't touch the parts on the Arduino board very easily because the shield is in the way.

There can be subtleties with the PC connection, for example when it's opened, it usually generates a reset pulse. It also may be invisibly depending on receiving or not receiving characters from the PC. Just some ideas.

I once had some Uno's (clones) that worked fine until attached to a wall adapter, so very similar thing. In that case, it turned out that the board reset was not working. So I added a 10uF cap to the reset line from ground and it worked from then on!

I wondered about the possibility that the library (or USB microprocessor) is waiting for serial characters. I can't rule that out yet. I tried it with and without the Arduino IDE running, and that doesn't seem to matter, but sometimes I notice that it doesn't work even with this particular USB port. I can try a capacitor from reset line to ground, maybe...

Aha, I made some progress! If I plug it into the wall charger, and then hit the reset button on the Ethernet shield, it works! Hmm, what does that tell me?

See this:

Oh okay, there are some helpful tips there. I might experiment with those ideas in order to automate the shield reset. For my current development I can live with manually resetting the shield at bootup. Onward! Thanks for your help!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.