Connecting Peripherals to Arduino

Hi,

This might be a silly thing to ask but here goes, Is it okay to plug in servos or any other type of shield for that matter to Arduino while it is connected to the PC and an external power source?? Is it necessary to always switch the power off and disconnect from PC if we have to plug in another servo or to remove it from the Arduino, or from a shield?

thanks in advance.

you can but its not the wisest thing in the world (this is why I complain that arduino needs a simple toggle switch for power) when you hot plug things not well protected electrically all sorts of nasties could potentially happen.

Human error is the biggest elephant in the room, but other things like ESD, bouncing pins, current inrush all invite failure, either instant or slowly over time its just not a good idea unless its been designed to.

akilahennayake: Is it necessary to always switch the power off and disconnect from PC if we have to plug in another servo or to remove it from the Arduino, or from a shield?

Yes. It is -always- best to remove all sources of power before modifying or otherwise altering a circuit. At best, to not do so is careless, at worst, it could be dangerous. After modifying the circuit, you should also double check your work and the work around your changes (and ideally, the entire circuit) before applying power (you may discover a short, or a moved/dislocated wire, or something else - this is especially true when prototyping on a solderless breadboard).

Obviously for the the latter I am not speaking of an Arduino or other low voltage/low current electronic or electrical circuits; but it is best to get into the habit early, because if not, you may find yourself in the future working with higher voltages and/or currents, and make one small slip-up - and a fire, small explosion, or electrocution will result.

This practice of removing power should almost always extend as well to using test instrumentation as well. Remove all power, connect the test instrument leads where they are needed, check all connections, etc (for any shorts or other issues that may have occurred while connecting the leads), then re-apply power noting your measurements. At no time should you attempt to move the leads or any other part of the circuit. Once again, this is to get into a habit, before you get hurt in the future (or burn out an expensive component, or something like that).

In the event that you -must- probe dynamically, do so using -one- probe only, keeping the other hand far away from the circuit under test (this is called the "one-hand in pocket" rule); disconnect the circuit, attach the negative/ground lead of the meter or test instrument where needed, put your other hand in your pocket, turn on the power, and -carefully- probe with the other lead (taking care not to cause problems like shorts in the circuit under test). This method, again, is something to make a habit. It can still be useful, especially when working with high-voltage or high-current circuits. It was a particularly necessary thing to do back in the days of tube-powered circuits, hot-chassis, and CRT television repair; if you got a jolt of electricity through you, with one hand in your pocket it was unlikely that the jolt would cross over your heart (leading to possible defibrillation, death, etc).

All of the above may, again, seem like a lot of unnecessary work for simple hobby electronics, and for the most part, it is. The idea, though, is to instill good habits early, so as to avoid a problem of entrenched "bad-habits" should you find yourself in the future working on higher power circuits.

totally agree, its good to be in a cautious state when dealing with these things, I was working with 100 volts DC the other day and highly aware of what I was doing so I didnt get nailed to the wall. I was also working on a simple 555 timer running at 8.5 volts, wasnt aware of what exactly I was doing and smoked the durn thing, while hot plugging it.

Wow..Good thing I asked then...Thanks a lot...I mean ALOT for helping me out here...