Powering an arduino

Hello friends. I am having a big doubt.. Can we power an arduino from the USB(i.e. the arduino connected to the PC) and simultaneously connect external devices like relay or motor which has a different power source. I know that the GND of all the power sources must be tied together at a common point.
Is this type of connection safe? Will it affect the arduino board (any sort of arduino).

I have faced few problems when I did this. Either my bootloader crashed or my board did not work fine. What should I do to prevent this and what are the alternatives for such a scenario?

Please help me guys.

And thanks in advance.

There should be no problem doing it this way and your description sounds correct.

Can you give us a schematic of how you have this wired?

More info on the exact symptoms you are having would be very helpful also.

its not safe to turn on the arduino simultaneously with USB & Powersupply. I have already tested usually nothing happen(without motor) , if you trying to run relay & motor its not advisable.

in order avoid this problem, i recommend use USB only for uploading code.
Based on motor specification choose external regulator like 7812 or LM2596 module to power arduino & run motor (http://www.ebay.in/itm/221815039658?aff_source=Sok-Goog)

If you want to debug program; use USB to TTL out kit.(Generic PL2303 Usb To Rs232 Ttl Converter Adapter for Aurdino Nano Raspberry PI : Amazon.in: Home & Kitchen).

Yes - please provide a picture or drawing of your hardware setup.
And perhaps list the components that you are using.

ji_bala94:
Hello friends. I am having a big doubt.. Can we power an arduino from the USB(i.e. the arduino connected to the PC) and simultaneously connect external devices like relay or motor which has a different power source. I know that the GND of all the power sources must be tied together at a common point.
Is this type of connection safe? Will it affect the arduino board (any sort of arduino).

I have faced few problems when I did this. Either my bootloader crashed or my board did not work fine. What should I do to prevent this and what are the alternatives for such a scenario?

Please help me guys.

And thanks in advance.

Correct wiring should prevent it. Have you a multimeter to check circuits?

Very small current from Arduino can switch transistors and relay modules without danger to the controller, this is standard procedure.

Inductive loads like motors need protection from back surge when the field collapses, but that is usually a diode and a cap or two in the circuit.

There are chips called opto-isolators that inside have a led and a detector. They are rated against 1000's of volts, 5000, 7500, 10000+ volts though I doubt that you need them but they can run different voltages on the two sides and never touch.