Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: vanduino on Dec 08, 2011, 07:13 am

Title: Driving Mega2560 from external 5V bricks USB port
Post by: vanduino on Dec 08, 2011, 07:13 am
I have an application that wants to use the extended ports and processing power of the Mega2560. Basically the Mega plugs into a backplane where it can have more than one shield , as well as other circuits that plug into the backplane by card slots.

So far, this arrangement works well. But if I power the backplane by way of the 5V supply on the Mega, there is less than 500mA available, which is not enough for some of my additional TTL circuits. I have been supplying 5V for the backplane and the Mega from an external supply. This works fine until I plug a USB cable into the Mega for programming. At that point there is 5V from the external supply on the Mega's 5V pin ( I am not using the Vin pin ) and 5V from the USB port. This works for about a day, then the Mega's USB port will brick. ( I went through 3 Megas before I figured this out. Ouch).The difference in voltage between the 5V supply and the USB port is from zero up to 100mv.

What I think I am going to have to do is adjust my external supply from 5V to 9V and apply it to the Vin pin. That way the internal power switch on the Mega should switch safely between external and USB power. I will then have to provide an additional 5V supply for any additional TTL.

Will this work or am I missing something here?

Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: SurferTim on Dec 08, 2011, 01:36 pm
Thanks for that tip!! I was about to do the same thing. I would have been unhappy.

I would use the onboard regulator if it wasn't such a crappy, underrated, linear "POS".

Edit: I guess nobody that builds these got far enough in the voltage regulator datasheets to find this:
http://www.national.com/mpf/LM/LM2595.html

My second remark above is a little harsh. I did not mean that as derogatory as it appears. The regulator is fine for a Mega with no shield and a supply voltage less than 10v.

But my Mega with an ethernet shield and a power supply of 9v, and in just a few seconds, the regulator is too hot to touch. At 13 volt supply (minimum automotive) it would get twice as hot.  :smiley-eek:
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: SurferTim on Dec 09, 2011, 02:43 pm
Is it possible you blew the 500ma fuse on the usb power input? Since you have a couple bad boards, can you try connecting one the bad boards and check the voltage on the fuse. It appears to be the gold colored smd marked "500J" next to the usb port. See if you have 5v on each side of that. If not, the usb port will not get power. According to the schematic, that is the only way the usb chip gets power.

I used the usb case as ground for the volt check.

If it is blown, it appears you could "jump" that fuse with a second fuse.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: vanduino on Dec 10, 2011, 02:54 am
SurferTim, Thanks for the response. Fuses look good. Both boards I tested are obviously getting power from USB; LEDs are on. One is recognized by XP device manager, but cannot communicate on TX/RX. The other cannot be recognized as a USB device. Both Mega's when powered up run the last sketch uploaded.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: smeezekitty on Dec 11, 2011, 09:46 am
I do not see how using two power sources should damage the arduino. The difference between a regulated 5v power supply and the USB port should be minimal and not harmful. 
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: SurferTim on Dec 11, 2011, 01:18 pm

I do not see how using two power sources should damage the arduino. The difference between a regulated 5v power supply and the USB port should be minimal and not harmful.  

Do you have a Mega powered by 5v and the usb power supply and it does ok?
Is it guaranteed enough to be covered under the Arduino warranty if I try it?

Add: The schematic shows the fet T2 (lower right in schematic) connects the usb power supply and the 5v rail. The fet is controlled by Vin, not +5v. If Vin is less than 6.6v, the fet gate is low. I wonder what that does if the 5v rail is powered directly, rather than by the regulator from Vin?

Another thing about the schematic that concerns me. The IC5B next to it uses Vin as a comparator input to a LM358 powered by 5v. If Vin is higher than 10v, you are overdriving the IC5B positive input.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Mar 29, 2012, 01:23 am
I can confirm this problem, as I too just fried the usb ports on three mega's, doing the exact same thing. And since it doesn't happen immediately upon plugging in both power supplies you get fooled into thinking you must have done something else wrong, thus you plug in another mega, it works, for awhile, then stops talking, and about this time you've got suspicions, but you're obligated to plug in and kill a third one to confirm it....ouch is right.

Here's the link to my post for what it's worth.
http://arduino.cc/forum/index.php/topic,98728.0.html

Does anybody involved in the mega r3's design have any thoughts on what's going on here?
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Mar 30, 2012, 03:56 am
I have now encountered a 4'th mega r3 that is encountering usb communication difficulties - and I'm about 99.9% certain I have NEVER plugged this one into two power supplies - only the usb power. The trouble began with seeing 'garble' when the mega was reset, my sketch should print 'status' to the serial port upon reset and 'sometimes' it was garbled. Huh...Maybe just trash on the line I thought. But then, when I pushed the reset button it began not writing to the serial port at all sometimes. I'd have to close the arduino ide's comm window, unplug/replug the usb cable back in, reopen the comm window, and then upon reset could get it to speak on an intermittent basis. Sometimes it would stop talking after 5 resets, sometimes after 3 resets, one one round I got all the way to 24 resets before it stopped talking.

At that point I moved from the macintosh over to the pc and found the exact same symptoms (ocasional garble, and dying after some low number of resets).

At that point I grabbed a mega rev2, loaded the exact same software onto it, and it works perfectly.
I went back to the mega rev3, reloaded the software - and it's intermittent, and it got worse the longer it was on. It looks to me like I'm catching the beginnings of a usb controller chip failure.

So, it's beginning to look like a bad batch of mega rev 3, or a design flaw, one or the other, to me. I'll be working on the mega rev2 all day and tomorrow, and will keep it continuously powered up and will report back later.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: smeezekitty on Mar 30, 2012, 05:53 am

I have now encountered a 4'th mega r3 that is encountering usb communication difficulties - and I'm about 99.9% certain I have NEVER plugged this one into two power supplies - only the usb power. The trouble began with seeing 'garble' when the mega was reset, my sketch should print 'status' to the serial port upon reset and 'sometimes' it was garbled. Huh...Maybe just trash on the line I thought. But then, when I pushed the reset button it began not writing to the serial port at all sometimes. I'd have to close the arduino ide's comm window, unplug/replug the usb cable back in, reopen the comm window, and then upon reset could get it to speak on an intermittent basis. Sometimes it would stop talking after 5 resets, sometimes after 3 resets, one one round I got all the way to 24 resets before it stopped talking.

At that point I moved from the macintosh over to the pc and found the exact same symptoms (ocasional garble, and dying after some low number of resets).

At that point I grabbed a mega rev2, loaded the exact same software onto it, and it works perfectly.
I went back to the mega rev3, reloaded the software - and it's intermittent, and it got worse the longer it was on. It looks to me like I'm catching the beginnings of a usb controller chip failure.

So, it's beginning to look like a bad batch of mega rev 3, or a design flaw, one or the other, to me. I'll be working on the mega rev2 all day and tomorrow, and will keep it continuously powered up and will report back later.


Usually digital chips do not go intermittent (they can but usually dont).
Make sure the USB cable is good, may sure nothing is connected to pins 0 & 1. If that fails, you can try reloading the firmware on the 8U2.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Mar 30, 2012, 06:26 am
It's not the cable, tried two, and nothing at all was connected to the board except the usb cable during the tests - no shields, nothing. I've got an AVRISP MKII and would love to know how to rewrite the firmware onto the 8u2 just to see if it can a) revive the three that had been plugged into two power supplies and b) to see if it helps the one that's become unstable.

Do you know where I can find instructions for reloading the 8u2's firmware? I looked for that info but failed to find it when the boards began going bad.

Regarding "Usually digital chips do not go intermittent (they can but usually dont)" - I understand and agree but that's what appears to be happening. But something weird is happening that's for sure. In the case where the boards were plugged into the two power supplies it doesn't make sense that the 8u2's would be damaged when the processor wasn't, unless it's the size of the chips? The 8u2's are a lot smaller and if something bad was happening in power supply land then their smaller size might have dissipated less heat? And caused them to self-destruct before the processor did?

There are mysteries here folks. Could the the design team of the mega r3 please run some tests using dual supplies or talk about the circuit theory issues that are relevant here please?

The power supply I used was an OKI-78SR 5v dc-dc regulator being powered by a wall wart 12vdc power supply which measured about 16vdc unloaded, and about 15v when plugged into the arduino/shield stack.

And while I've got your ear, could someone please fix the broken eagle file .zip download so I can see exactly where things are going on the board please? (The .zip downloads is corrupted and neither a mac or a pc can open the download)

Thanks.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: smeezekitty on Mar 30, 2012, 06:49 am

Do you know where I can find instructions for reloading the 8u2's firmware? I looked for that info but failed to find it when the boards began going bad.

http://arduino.cc/en/Hacking/DFUProgramming8U2
Quote


Regarding "Usually digital chips do not go intermittent (they can but usually dont)" - I understand and agree but that's what appears to be happening. But something weird is happening that's for sure. In the case where the boards were plugged into the two power supplies it doesn't make sense that the 8u2's would be damaged when the processor wasn't, unless it's the size of the chips? The 8u2's are a lot smaller and if something bad was happening in power supply land then their smaller size might have dissipated less heat? And caused them to self-destruct before the processor did?

What about cold solder joints or a fried trace from the voltage differential?
Quote

There are mysteries here folks. Could the the design team of the mega r3 please run some tests using dual supplies or talk about the circuit theory issues that are relevant here please?

Unfortunately the design team is usually not all that receptive.
Quote

The power supply I used was an OKI-78SR 5v dc-dc regulator being powered by a wall wart 12vdc power supply which measured about 16vdc unloaded, and about 15v when plugged into the arduino/shield stack.

Did you test the regulator output loaded and unloaded to make sure it never exceeds 5.5v?
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Mar 31, 2012, 08:45 pm
Aloha, thanks for the help, and I'll check the items you mentioned as soon as I can and report back, working against a software deadline at the moment...
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 03, 2012, 04:18 am
Hi Folks, I need some crystal clear, can't fail instructions. I've got several mega's whose usb ports are not recognized anymore. So I decided to try reloading the firmware onto the 16u2 on the mega r3. The instructions available, from various sources conflict with each other, or don't specifically address EXACTLY what to do, in EXACTLY what sequence. What I have managed to do is to brick one of my remaining good mega's such that it's serial port no longer appears.

What I did (that bricked my mega) is to plug an avrispmkii into the icsp socket in the corner of the board, next to the 16u2 and then did the following from avrdude, according to the instruction in the firmware section of github, which didn't work and had to be modified to use the correct hex file name, and reference the avrdude config file:

/Applications/Dev/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C /Applications/Dev/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -p at90usb82 -F -P usb -c avrispmkii -U flash:w:Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

And here, is what avrdude told me, note that the device signature is not what it was expecting....

------------------------------------------------------------------------------------

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9489
avrdude: Expected signature for AT90USB82 is 1E 93 82
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex"
avrdude: input file Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex auto detected as raw binary
avrdude: writing flash (8192 bytes):

Writing | ################################################## | 100% 2.53s

avrdude: 8192 bytes of flash written
avrdude: verifying flash memory against Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex:
avrdude: load data flash data from input file Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex:
avrdude: input file Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex auto detected as raw binary
avrdude: input file Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex contains 8192 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.34s

avrdude: verifying ...
avrdude: 8192 bytes of flash verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xD9"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD9:
avrdude: load data hfuse data from input file 0xD9:
avrdude: input file 0xD9 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xF4"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xF4:
avrdude: load data efuse data from input file 0xF4:
avrdude: input file 0xF4 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0x0F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0F:
avrdude: load data lock data from input file 0x0F:
avrdude: input file 0x0F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.
------------------------------------------------------------------------------------


Again, this bricked the mega.

My question is this, does anybody know EXACTLY what to do, in EXACTLY what sequence, omitting no steps (including where to plugin the programmer, as all the instructions I've seen assume you already know this, and yet to an experienced developer who's diving into this level of the arduino (reluctantly) - it's not so clear).

How do you do a total and complete factory level restore to an arduino mega rev3 ?

Frustrated, (but grateful for help I've received so far),
Kurt
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 03, 2012, 04:30 am
The really frustrating part about this is that I know if you have the right files to burn, and the correct abra-cadbra spells to invoke that this 'reload' everything is a 5 minute procedure, and so far I bet I've burned up 6-8 hours over the last couple of days trying to find the correct magic spells to no avail...
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: Louis Davis on Apr 03, 2012, 05:42 am
I think you want to use at90usb162 instead of at90usb82 if you are trying to program a atmega16u2 part.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 03, 2012, 05:58 am
After another hour of experimentation I found something that worked:

The following instructions are for Macintosh/osX (Lion), with the Arduino IDE 1.0.0 installed in the applications folder.

1) Plugin a usb cable to the arduino mega rev3 in order to supply it with power.

2) Plugin an avrispmkII programmer into the 6 pin icsp1 jack located adjacent to the usb connector (observe pin1 orientation via the dot on the board).

3) Open a terminal window, paste in the following command and execute it:

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -p m16u2 -F -P usb -c avrispmkii -U flash:w:/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/firmwares/Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex  -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

4) Unplug both the programmer and the usb cable, then plug the usb cable in and the mac (and the pc) should recognize the usb port as long as the arduino mega rev 3 is KNOWN TO BE GOOD.

Note that I had to alter the '-p' device code to 'm16u2', AND I had to use the .hex file that was contained in the arduino IDE's firmwares folder which was 21kb - The one I downloaded from git hub was 93kb, I have no idea why, but I do know that the instructions above work for me.

NOTE THAT THESE INSTRUCTIONS DID NOT REPAIR THE BOARDS THAT I THOUGHT WERE DAMAGED HOWEVER.

In one case the programmer indicated there were verify errors and did not restore the dead board.
In another case the programmer indicated the burn was successful but again did not restore the board.

The reprogramming only worked on the board that I bricked by apparently erasing the 16u2, or uploaded bad firmware.

Thus it still appears to me that I have 3 dead mega's and no clue as to WHY they're dead. Per-the-above-help, I have verified that the external regulator puts out a nice steady 4.98 volts both loaded, and unloaded and ripple is within the OKI-78's specifications.

Anybody have any other thoughts on the matter?

Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: smeezekitty on Apr 03, 2012, 06:49 am

In one case the programmer indicated there were verify errors and did not restore the dead board.
In another case the programmer indicated the burn was successful but again did not restore the board.

I find usually verification errors are not caused by a bad chip although they can be.
If the programmer indicated that the burn was successful, it is highly likely that the chip is ok.
I do not know why the USB port would not show up but it seems like in atleast the second case, the chip is likely still good.
At this point, I am totally confused.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 03, 2012, 08:20 am
I'm confused too! - But I'll retry the one that didn't have verify errors just to make sure, I'll report back on that. Thanks.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 04, 2012, 02:39 am
I just retried the 16u2 firmware reloads on two of the arduino mega rev 3's - one reports the burn was ok, one reports verification errors, and neither can be recognized. I don't think there's anything left to try....
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 07, 2012, 12:43 pm
Regarding my suspicion that simultaneously providing both usb power and external power to a mega2560 can damage the 16u2 (usb controller chip) I am now removing transistor T2 from the mega2560. This transistor is what allows usb power to be connected to the 5vdc bus. Removing it totally prevents usb power from being used.

Note that you cannot just clip the 5vdc wire (or an unpowered hub I think) because the usb power is applied to the 16u2 and is used to power an internal component which is used to provide power to the data lines. I tried this first, and it resulted in very very shaky usb connections. Sometimes it would connect, most times it wouldn't.

But removing T2 removes usb power from the 5vdc bus AND yet still allows usb communications to work properly.

to be continued...
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: SurferTim on Apr 07, 2012, 01:16 pm
Thanks for that info. I thought T2 may be the culprit back in reply #5.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 07, 2012, 02:12 pm
I'm not sure it's the culprit, but removing it prevents using both power supplies simultaneously while allowing usb communications. What do you think T2 might be doing to damage the 16u2?
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: SurferTim on Apr 07, 2012, 02:19 pm
It was just a suspicion. You should know soon. How long would they last with T2 on the board?

edit: I don't know, but the gate on it is only disabled (gate high) by the voltage on Vin being higher than 6.6vdc. If you power the device with +5v, the gate is left low, which enables the fet T2. They don't do a great job conduction reversed, but they do.

Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 08, 2012, 12:56 am
I'd say the boards died within a 2-3 day time frame. I can't pin it down any closer than that because the usb cable was only plugged in intermittently but if I had to guess I'd say they had maybe 4-5 hours of time plugged into both usb and external power.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: SurferTim on Apr 08, 2012, 02:19 pm
@kurt6string: Keep me posted on the results of your test. I have a project I put on hold until this is resolved.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 08, 2012, 02:24 pm
We should know in a couple of days if the particular board I removed T2 from dies. But this won't be a very definitive test in that I'm sticking with this one particular mega, running on external power from an OKI-78 dc-dc converter. If it dies, then the OKI-78 is probably doing it or, it's a bad batch of 16u2's....I'd suggest just starting your project on a board with T2 removed to be on the safe side.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: vanduino on Apr 10, 2012, 11:36 pm
Hi folks, I am the Original Poster for this thread. Appreciations to SurferTim and kurt6string for digging deeper into this.

I was told on several forums that there should be no problem powering the Mega from the 5V rail, but my drawer of bricked Megas kept getting fuller. They were all R2, none were R3. The only R3 I have has been exempted from drinking at the 5V trough because I was running out of $$, so I modified my backplane to power it from 7V in the Vin pin. It was a bother, but it has not bricked. Here's the algorithm:

1) Mega2560 R2 powered from external 5V regulated (+-2%) works fine.
2) Plug and unplug USB cable over a few hours.
3) Mega is no longer recognized as device by system. USB port disappears from IDE. Mega still runs last sketch but new one can't be loaded through USB port.
4) Buy new Mega R2. Repeat steps 1-3.
5) Repeat step 4 a few more times.
6) Buy Mega R3, but have second thoughts about the 5V rail.
7) Power Mega R3 by Vin pin. After 1 month of use, USB still works. Also Ruggeduino (Uno clone) works without problem in same circuit.

While this alone does not conclusively prove there is a design flaw or limitation in the Mega power circuit, the rest of this thread supports the idea. Can't prove R3 survives any better than the R2. I like kurt6string's idea about removing T2, but disappointed that he wasn't able to recover his bricked Megas. I am going to try his procedure when I get a chance.  Maybe some of my bricked Megas can load sketches from their ICSP ports.

Modifying the Megas by removing T2 is not a solution for me. I need a plug-and-play. At this point, I am going to keep external supplies away from the 5V pin and provide the power through Vin. Perhaps this problem will be addressed in R4.

(Now... what to do with these bricked Megas?)

Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 10, 2012, 11:42 pm
Note that I've sent emails to both sales and team at arduino.cc asking them to look at this problem AND to fix the broken zip file containing the rev3 reference design. First I emailed sales, then a week later forwared to team, after 10 days or so I still haven't received a reply and the broken zip file is still un-openable....nobody's home....
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: SurferTim on Apr 10, 2012, 11:48 pm
Others have power supply problems related to a power supply (Vin in this case) in conjunction with the usb power.
Take a look at the o-scope displays in reply #6 here.  :smiley-eek:
http://arduino.cc/forum/index.php/topic,100362.0.html
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 11, 2012, 08:15 am

(Now... what to do with these bricked Megas?)


I think they should be sent back to the vendor with a warranty replacement request. The vendors get away with a lot that wouldn't be tolerated in consumer products under the umbrella 'electronic hobbyists'. And in this case I think that replacements are justified. I hope to do this as soon as I have a talk with my customer, who purchased the boards I used in development. My usage of the boards falls within all the documented specifications, and there are no caveats mentioned about usb and external power. If distributors start getting boards back then that drives change at the manufacturing level.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: vanduino on Apr 12, 2012, 03:57 am
That reminds me, one of the Megas I bricked was an R3 from Radio Shack. They took it back, no questions ( < 30 days).  So the r3's brick as easily as the r2's.

The others were evilbay items. Tough luck.

Good reason to buy these things from established vendors with return policy.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: vanduino on Apr 12, 2012, 04:09 am
Is this USB bricking on 5V external power confined to the Mega? Anyone heard of it on the Uno or Nano?

I am planning on hooking a Nano to my backplane. Don't need another brick. I'll contact Gravitech (manuf) and see if they will warranty it.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: DojoDave on Apr 12, 2012, 07:24 pm
Hello,

David Cuartielles from the Arduino Team here. I have been following this discussion trying to figure out what has been going on in this case.

Please note the following. We do not recommend connecting the Mega boards powering them from the 5V connector. Not the Uno R3 either. The voltage regulators we were using in the past (Arduino Serial, NG, Duemilanove, Diecimila, and part of the Uno's) would allow doing that. But the new way we use to bring power into the boards will not ensure the boards to work properly. That 5V pin is meant to be used to power sensors and low-current devices.

The fact that this issue is showing after a certain amount of hours of operation seems to be due to stress material. However I am just talking without scientific proof. Our hardware team is going to put some boards under test to check this point and see if there is a deterministic way to measure how long the boards run on this mode. I know this will not be of any help for your project as you seem to be interested in powering things from that 5v connector.

On the other hand, since our previous boards allowed this type of functionality, when documenting the new boards we copied material from the documentation files to the previous boards. There is one line about the 5v that says (and I quote textually):

Quote
5V. The regulated power supply used to power the microcontroller and other components on the board. This can come either from VIN via an on-board regulator, or be supplied by USB or another regulated 5V supply.


.. that last part should not be there:

Quote
or be supplied by USB or another regulated 5V supply


If you want to power up your boards you should be using the Power Jack, Vin, or the USB port.

This is obviously an error on our side and we will replace the original Arduino boards you got bricked. Please send me an email to: d.cuartielles AT arduino DOT cc with the serial numbers of the damaged boards and their models. Include your preferred shipping address. I will make sure the same boards are shipped to you the minute after I get that email.

I am sorry for the non-Arduino branded boards. As you know we don't support those.

Thanks for your understanding and thanks for helping us finding out this error in our documentation. We will fix that immediately.

/d
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: SurferTim on Apr 12, 2012, 07:35 pm
Hi David. Is there any chance of getting a switching regulator with a wider input range?
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: smeezekitty on Apr 12, 2012, 08:59 pm
I think that being able to be powered by 5v directly is essential functionality.
Many times people only have access to a 3-5v source that can be connected directly to the 5v pin.
In many cases 6.5v or more cannot be obtained.
It seems like a redesign maybe needed. Have you considered ultra-low voltage dropping diodes?
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 12, 2012, 09:48 pm
David,

I want to thank you and the entire Arduino team for standing by your products. The offer to replace the boards is very much appreciated as each and every board we purchased was intended to go into the first actual customer installations of a new product. Getting to this point has been very expensive for the new co. that designed and built the first prototypes of the new product. Even though the Arduino's were among the less expensive of the components involved every little bit helps, and the replacement boards should hopefully end up in the hands of actual customers (buried inside little black boxes!).

Your reply, and the honesty within is very much appreciated, and we will do all we can spread the word that Arduino and the people behind it are a good investment.

Now then, (and grinning) - while you're changing the mega2560 documentation on the web site could you please get somebody to fix that broken zip file containing the reference design for the rev3?

Thanks,
Kurt Olsen
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 12, 2012, 09:59 pm

Maybe some of my bricked Megas can load sketches from their ICSP ports.


In my case, the mega's with dead usb ports could still have sketches uploaded via the ICSP.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: DojoDave on Apr 12, 2012, 10:11 pm
Hej,

even if this a little bit off topic. I changed the files for the Mega ADK and Mega this morning. I just double checked a second ago that the files can be downloaded and that they uncompress with no problems. You should make sure you are using Eagle 6 or later to open those design files. We are always working with the latest version of Eagle and those files were generated with those.

Again, we identified a communication problem between our editorial server (the one where we prepare the documentation for you)  and our production server (the one you get documentation and files from) after we moved the whole server to a much more powerful machine. This problem includes that the zip files when copied from one server to the other they get corrupted, they loose the last two bytes.

I haven't been able of identifying the reason for this yet. Better said, I know why it happens, I just haven't figured out how to solve it in a way that doesn't imply a big hack to our current proxy server. So we have to manually upload the zip files to the production server after we have published the page and for the new R3 Mega and Mega ADK we didn't notice in the first place.

Thanks,

/d
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on Apr 12, 2012, 10:27 pm
Hi David,

Thank you, unfortunately the changes to the mega2560 zip file haven't taken effect yet (from hawaii), here's the link that the web site gives me:

http://arduino.cc/en/uploads/Main/arduino-mega2560_R3-reference-design.zip

Thanks for working on this, I'll try again later.

Mahalo,
Kurt


Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: the9375 on Apr 24, 2012, 12:21 am
Hello all!  I recently ran into this same problem, and I wanted to share my workaround for getting away with using an external regulator without wrecking the USB connection.  Obviously I can't be 100% certain that this will fix the issue, but so far my mega board isn't bricked yet so hopefully it will continue to work.

There are two problems with using an external regulated supply.  First, at least what I've read from this thread, it seems like the onboard voltage regulator is not as tolerant of reverse voltages as on other Arduino boards.  To fix this issue, I simply removed the external regulator from the board.  I used hot air to desolder the regulator, but I'm sure you could remove the regulator just by prying it off (should probably cut the traces first to avoid delaminating too much of the board if you try it).  I guess I should mention that I'm working with the Mega Pro 2560 5v board from Sparkfun.  This is probably not the ideal solution if you're using the Arduino board for different projects, but in my case the board I'm using is part of a permanent project, so having to remove the regulator is not such a big deal in my case. 

The second problem is that, with the configuration I usually use to program the Arduino (FTDI basic breakout, again from Sparkfun), The 5v USB supply and the 5v from my external regulator are both connected together, which can act like a short circuit.  In theory if two ideal voltage sources are wired together, unless the two voltages are exactly the same, there will be infinite current flow between the two voltage sources.  It may work out that under certain conditions this is something you can get away with, but based on the fact that people's boards are getting bricked that doesn't seem to be the case here.

Here's my workaround.  Instead of using my usual FTDI board I bought just a straight breakout bord of all the FTDI chip's signals (http://www.sparkfun.com/products/718).  In the FTDI datasheet, it explains that the chip can handle two separate power supplies.  The power from the USB host should be connected to the VCC pin (which it is in the breakout board I linked to), and the power from your external regulator should be supplied to the VCCIO pin, which acts as the supply for the UART end of the FTDI chip.  Conveniently, the voltage on VCCIO doesn't have to match the voltage supplied on the VCC pin.  Now, in the breakout board I linked to, VCC and VCCIO are connected together by a solder jumper.  If you just cut the jumper with a knife and connect your external 5v (or whatever voltage you're running your Arduino at) power to the VCCIO pin.  At this point you just have to wire the breakout board to a connector so you can attach it to the serial programming header on the Arduino board.

If you do both of these things, then there's no chance of current back-flowing through the regulator, and there are no power supplies that are shorted together.  Seems to be working for me so far.

If there's anything I've unintentionally been unclear about, just let me know.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: bobprescott on May 04, 2012, 06:25 pm
I'm glad that I saw this thread  before I hooked up my Mega, it saved me a ruined board. I'm running off of a 80's vintage backplane, with a typical 5v supply. The supply runs hot, about 5.25 volts. Thanks to seeing these posts I disconnect the Mega2560 from the external supply while programing, then disconect the USB when installed. Works so far. The one time I left the USB conneced when attached to external supply, the Mega USB IC got hot fast.
I also use a modified USB cable with the 5v line cut for when I need to get data while running.

Since the problem is known and can break boards, how about a sticky, or a warning.
Get the word out
.

Thanks
Bob Prescott
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: smeezekitty on May 04, 2012, 09:14 pm

I'm glad that I saw this thread  before I hooked up my Mega, it saved me a ruined board. I'm running off of a 80's vintage backplane, with a typical 5v supply. The supply runs hot, about 5.25 volts. Thanks to seeing these posts I disconnect the Mega2560 from the external supply while programing, then disconect the USB when installed. Works so far. The one time I left the USB conneced when attached to external supply, the Mega USB IC got hot fast.
I also use a modified USB cable with the 5v line cut for when I need to get data while running.

Since the problem is known and can break boards, how about a sticky, or a warning.
Get the word out
.

Thanks
Bob Prescott

0.25 is alot of differential between two power supplies. Enough to dissipate several hundred milliamps in the board.
With < 0.1v differential, I don't really see why it would be a problem but with .25, I would avoid it.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: vanduino on May 05, 2012, 12:47 am
In the original post, I mentioned that the differential  between my external 5V supply and the USB power was < 100mV.  Generally less than 25mV, every time I checked. I still bricked the USB ports of several Megas. I wish I had checked the temperature of the chips, but it took me a while to localize the problem, because they did not appear to fail at once. It was only when I tried to reload sketches that I realized I had a problem.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: bobprescott on May 05, 2012, 02:11 am
.25 is a hugh differance, I know, and old power supplies designed for TTL usually had some kick. But it really only matters if power supplies are shorted together, which is unexpected.   I'm sure I can open the supply and adjust it down. Might have to change a resistor.

What does irk me a bit, is that I picked the Arduino Mega2560 specifically because it could run off of an external 5v supply.
Now I have to kludge a wall-wart, and redo my shield to separate supplies? I guess  I'll live with it, not the end of the world.

Bob





Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: vanduino on May 06, 2012, 12:23 pm
Quote
.25 is a hugh differance, I know, and old power supplies designed for TTL usually had some kick.


My experience  was with a  differential of 0.025V . That does not seem to me a so big as to account for the failure of an IC. I suspect something else is involved. Could the unplugging and plugging of the USB cable while connected to an external 5V supply generate some kind of spike or reverse voltage?
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: kurt6string on May 06, 2012, 12:48 pm
You can just remove that transistor that connects usb to the 5v rail - easy mod, takes 30 seconds, seems to work fine. After the mod you MUST supply power via the 5v bus, usb power won't work after that.
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: borutg on Oct 01, 2012, 01:51 pm
Does anyone have seeeduino pcb board design files ready for external power supply that has 24 V, with a switching power supply or something like that, to avoid overheating due to 24 V to 5 V conversion?
Title: Re: Driving Mega2560 from external 5V bricks USB port
Post by: LROBBINS on Dec 05, 2012, 08:21 pm
I noticed in reading this thread that someone asked about the Nano, but never got an answer.  The Nano V3 schematic shows the USB 5V connected to the 5V from the linear regulator via a Schottky diode.  (Checking a board under a stereoscope shows that this is indeed the case.)  This is the reason that the Nano's serial-to-USB chip cannot be powered from Vin, but I think it should allow simultaneously connecting an external supply to the 5V pin and connecting a powered USB cable.  PLEASE correct me if I'm wrong!
Ciao,
Lenny