Little help with USB power

Hi! Probably I have the on-board +5 vdc regulator chip in my Arduino Mega defective. Because nothing works when I plug in a external power source. But plugged the USB works normal.

Then I had an idea. Adapting a USB cable connecting the positive and negative poles to a power source that generates 5V. This will works? And if my source force have 9V, still works to?

Thanks! :stuck_out_tongue:

AlamBaier:
And if my source force have 9V, still works to?

No. Do not connect 9V to the USB side of your board.

Then I had an idea. Adapting a USB cable connecting the positive and negative poles to a power source that generates 5V. This will works?

Yes. You can safely power your board from any regulated 5V DC power supply.

Thank you Coding Badly!!!
Could tell me what value of resistors I can use to reduce my 9v battery to 5v in a protoboard?
My knowledge of electronics are small ...

AlamBaier:
Thank you Coding Badly!!!
Could tell me what value of resistors I can use to reduce my 9v battery to 5v in a protoboard?
My knowledge of electronics are small ...

You need a 5v supply... I don't think a voltage divider would work as the voltage would sag with load.

A 5v regulator 7805 would be fine...

Splendid! thank you so much cjdelphi!