Pages: [1]   Go Down
Author Topic: external 5V at Vin pin, and USB connection - UNO board  (Read 2124 times)
0 Members and 1 Guest are viewing this topic.
Kragujevac, Serbia
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I designed a shield that powers Arduino Uno with 5V trough Vin pin.

For testing purposes I need to connect Uno to PC, and shield to 12V, but shield has a 5V regulator that powers Arduino Uno..

Will I damage anything if I connect Uno to PC with USB cable (that also has 5V supply)?
Logged

      ___   ____
     /__/  /    \      ** Registrovani korisnik Linuksa #291606 **
    /  / \/  /\  \     ** Registered Linux user #291606

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 46029
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Will I damage anything if I connect Uno to PC with USB cable (that also has 5V supply)?
No. The Arduino has a power selector circuit that handles two separate power inputs. When USB power is present, that is used. When it isn't the Vin pin power is used.
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16513
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Will I damage anything if I connect Uno to PC with USB cable (that also has 5V supply)?
No. The Arduino has a power selector circuit that handles two separate power inputs. When USB power is present, that is used. When it isn't the Vin pin power is used.

Actually external power has first switching priority over USB power. USB power is used if only there is no external power avalible.

However it brings another layer of complexity to the game. He is powering his shield via the Vin pin, that then activates both the on-board +5vdc on the Uno board and the +5vdc regulator that he has installed on his shield board. So while the USB +5vdc is isolated via the auto-voltage switching circuit on the Uno board, he is still 'hardwiring" the outputs of two different +5vdc regulators together. And I'm sure that I"ve read in regulator datasheets in the past that they do not recommend that practice. However it will probably work fine even if not a good engineering practice.

One way to eliminate this possible problem is to make sure that the +5vdc power on your shield board does not connect to the +5vdc shield connector power pin. That would keep the two regulators isolated from each other. But then he would have the problem of his shield would not have any +5vdc power if he was running on USB power. Oh the evil webs we weave.

Let us know if it lets any of the magic smoke out.  smiley-grin

Lefty
« Last Edit: February 26, 2011, 09:34:16 pm by retrolefty » Logged

Kragujevac, Serbia
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One way to eliminate this possible problem is to make sure that the +5vdc power on your shield board does not connect to the +5vdc shield connector power pin. That would keep the two regulators isolated from each other. But then he would have the problem of his shield would not have any +5vdc power if he was running on USB power. Oh the evil webs we weave.

I do not understand this part. What do you mean by "+5vdc power on your shield board does not connect to the +5vdc shield connector power pin"? How then would I power Uno when it is not connected to the USB port?

And I will always use it with external power, except now, I need to test if it is doing what it is suppose to, and I need to finish programing.

Here is the schematics, I want to controll idle speed on my car with a little steeper motor, and Daytime Running Lights:


Quote
Let us know if it lets any of the magic smoke out.  smiley-grin

I hope not.  smiley-roll smiley


Please note that that there is an error at this schematics. Vcc should be connected to the +5V pin not to Vin, and, in the lower right corner CLT should be where TEMP is, and vice versa.


* ArDRLidle.png (51.79 KB, 1540x1065 - viewed 148 times.)
« Last Edit: March 06, 2011, 02:46:59 am by Yvan » Logged

      ___   ____
     /__/  /    \      ** Registrovani korisnik Linuksa #291606 **
    /  / \/  /\  \     ** Registered Linux user #291606

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16513
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The schematic helps a lot, you got a lot of stuff going on there. Now a problem is you are routing +5vdc shield voltage (Vcc) to the Arduino uno via the shield's Vin pin? That won't work, the Vin pin on the Uno has to have at least 7 vdc applied to it to power the input of the Uno's 5vdc regulator.

 I thought you might to powering the uno board by wiring the shields vcc to the +5vdc pin on the shield connector, thus then having the two regulator outputs tied together problem I mentioned, if you were also routing voltage via the Vin pin, which your aren't.

This is all giving me a headache.  smiley-grin Anyway I still don't see a perfect way to power the system and still be able to utilize USB power when you wish. But what you have right now is flawed because the uno's regulator's input needs to be 7vdc or higher to operate correctly.

Lefty
« Last Edit: February 27, 2011, 01:46:04 am by retrolefty » Logged

Kragujevac, Serbia
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, I made a mistake, but If I change it like this:


* ArDRLidle2.png (4.1 KB, 320x338 - viewed 50 times.)
Logged

      ___   ____
     /__/  /    \      ** Registrovani korisnik Linuksa #291606 **
    /  / \/  /\  \     ** Registered Linux user #291606

Kragujevac, Serbia
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I changed this, and now my sketch works. I was wondering why it didn't, when Uno was connected to USB with LED's it did, but now it won't switch on the solenoid. smiley

So that's sorted, but I still need to know if I can plug in USB while it is powered via +5V pin from the shield. smiley-confuse
Logged

      ___   ____
     /__/  /    \      ** Registrovani korisnik Linuksa #291606 **
    /  / \/  /\  \     ** Registered Linux user #291606

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16513
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So that's sorted, but I still need to know if I can plug in USB while it is powered via +5V pin from the shield.


It should work ok. However is the 500ma current limit for USB power enough to run both the Uno board and your shield board? The polyfuse in the Uno board will open if current draw is > then 500ma.

Lefty
Logged

Kragujevac, Serbia
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I do not know much about electronics, I coped most of the circuits from the Internet, so can you explain to me what happens when I connect Uno to USB.

I can understand that it can switch to use power from USB, but how can it switch off shield's power too?

How I see it, since there is no chance that both USB and my shield will be at the same voltage (both are ~5V), small current will flow in one direction.

I am probably wrong, but that's why I ask here smiley

BTW, my shield only draws ~40mA.
Logged

      ___   ____
     /__/  /    \      ** Registrovani korisnik Linuksa #291606 **
    /  / \/  /\  \     ** Registered Linux user #291606

Kragujevac, Serbia
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Let us know if it lets any of the magic smoke out.  smiley-grin


I decided not to risk it. I will bend the pin going into +5V, so grounds will be connected, shield will be powered externally, and Uno will get +5V from USB.
Logged

      ___   ____
     /__/  /    \      ** Registrovani korisnik Linuksa #291606 **
    /  / \/  /\  \     ** Registered Linux user #291606

Kragujevac, Serbia
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I finally ended powering Uno with both USB and shield +5V, and nothing is fried, I can confirm that it can be done with no damage to the board.
Logged

      ___   ____
     /__/  /    \      ** Registrovani korisnik Linuksa #291606 **
    /  / \/  /\  \     ** Registered Linux user #291606

Pages: [1]   Go Up
Jump to: