Go Down

Topic: can i plug my arduino simultaneously into the wall and my computer? (Read 2221 times) previous topic - next topic

theycallmesmooth

Hello, I'm new to electronics and was wondering if I could keep my arduino plugged into my computer   and into the outlet at the same time would work or damage the arduino. I want to be able to power my servos and be able to edit code without having to unplug it and re plug it and so forth.

DVDdoug

Yes, you can do that.

I've got a similar situation - a circuit that requires 12V.    When debugging, I leave the USB plugged-in so I can use the serial monitor to "see" what's going on.


Paul__B

It works a lot better if you plug it into a power adaptor, rather than directly into the mains. :smiley-lol:

groundFungus

I would be wary of powering a servo from the Arduino 5V regulator.  The servo can pull the regulated voltage down enough to cause seemingly random resets.

raschemmel

In case you haven't looked at the UNO schematic , when U1A detects more than 3.3V on the External DC Barreljack input (Vin), it turns off mosfet T1, therby disconnecting the arduino 5V  from the USB 5V and disconnecting the 3.3V regulator input from the USB 5V so while you can have your USB plugged in and use it for serial communication while running the arduino off an external power supply, the USB 5V is completely disconnected from the arduino (for obvious reasons).

It is STRICTLY EITHER/ OR

EITHER the arduino is running off USB power ,
OR
it is running off external power

I know you probably weren't talking about the power but just FYI....
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

groundFungus

Running a servo from USB or the 5V regulator is risky as either one is good for about 500mA and a loaded servo can pull twice that. 

Isaac96

Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

Paul__B

What would happen if you used a 4V wallwart?
For what?

(Where do you find a  4V wallwart, by the way?)

Isaac96

I mean if you plugged a 4V wallwart into the barrel jack. Would U1A select it?
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

Wawa

when U1A detects more than 3.3V on the External DC Barreljack input (Vin), it turns off mosfet T1, therby disconnecting the arduino 5V  from the USB 5V and disconnecting the 3.3V regulator input from the USB 5V
Almost right.
The opamp is set to detect >3.3volt on it's input, but there is a 1:1 voltage divider connected to it.

The divider is connected to Vin, so when Vin is >6.6volt, stuff happens.

Then there is the reverse protection diode between DC jack and Vin. That is another 0.7volt.

So external power takes over USB power from 7.3volt on the DC jack.


When you plug a 4volt wall wart into the DC jack, you have 3.3volt on Vin.
The 5volt regulator drops another volt, so 2.3volt on the 5volt rail.
Leo..

raschemmel

Quote
So external power takes over USB power from 7.3volt on the DC jack.

Correct.

When you pug a 4volt wall wart into the DC jack, you have 3.3volt on Vin.
The 5volt regulator drops another volt, so 2.3volt on the 5volt rail.
Yes & No
T1 is still on until external dc >=7.3V so arduino is running off USB until then.

If there is no USB , T1 is  on so the onboard 5v regulator does what you say. The second part is correct with the proviso that if you plug USB in while your 4V wall wart is connected the 5V rail jumps back up to 5V.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Go Up