How to make all your electrical parts play really well together as part of your system.
NOTE! This is a Work In Progress.. Comments/suggestions email@example.com
- 1 What do we mean "system"??
- 2 Where should I start?
- 3 How do we minimize problems caused by the little inadvertently-created resistors, capacitors and transformers?
- 4 Oh! It's Easy! [NOT Really]
- 5 Planning for Success and minimizing Aggravation
- 6 Wither Ground.. What IS Ground?
- 7 Connecting Power to Arduino:
- 8 There are typically three ways to power an Arduino:
- 9 (1) Through the USB cable from your computer.
- 10 (2) By connecting an external power supply (typically 9 to 12 volts DC) to the Arduino "External Power" jack.
- 11 (3) By connecting a well-regulated 5.0V power supply directly to the arduino "5V" pin and "GND"
- 12 How to properly power external devices and modules:
- 13 Properly powering High-Power devices:
- 14 A Few Definitions (We don't all speak this language!)
- 15 FootNotes:
What do we mean "system"??
Everything that can affect your project is "part of the system". Things you didn't expect or didn't notice can sneak into your system and affect it.
OK, you have an interesting project in mind, you have acquired the components you feel you need, and you've wired them together. You have written a sketch and uploaded it to Arduino. What could go wrong?
Problems: Sometimes, especially when controlling lights and other loads such as motors, pumps, solenoids etc., problems occur. Symptoms may include:
- Lockup of the Arduino controlling the relays and switching. Everything just stops.
- Loss of ability to communicate with a PC connected to the Arduino by USB
- Noise and erroneous readings on sensors or attached devices when relays or loads are switched
- LCD display stops working or displays the wrong characters
What is really happening here?
You have lots of wires running around close to each other. Electrical Reality says that you have created lots of Little Resistors in these wires. And you've created lots of Little Capacitors that couple the wires together when the voltage on a wire changes. And you've created lots of Little Transformers that couple the wires together when the current flowing in a wire changes.  Read This Section (TBD) for more details. But we will discuss ways to prevent these inadvertent components from causing problems.
Some possible solutions:
- Isolation of Arduino from relays and their switching transistors and power supply ("usually Opto-Isolation")
- Physical isolation of your high power wiring from arduino and it's wiring
- Creating a "Common Ground Point" (usually the negative terminal of your power supply)
- Grounding your Arduino system Common Ground Point to the building ground
- Use of shielded cables for critical circuits, which are usually sensors or wires that can not avoid being close to high-power devices.
Where should I start?
We are talking about Electrical issues here. There is another whole subject of mechanical and packaging for a device that includes Arduino.
We plan to cover that on this other page.
How do we minimize problems caused by the little inadvertently-created resistors, capacitors and transformers?
- Minimize resistance by using thicker wire for higher-power devices.
- Prevent currents from different devices from flowing in the same wire by running separate wires to a Common Ground Point
- Physically separate sensor wires from higher-power device wires
- For analog sensors, use shielded wire whose grounded metal shield prevents capacitive coupling between wires
- Physically separate sensor wires from higher-power device wires. If these wires need to cross, cross at a right angle.
- Make your wire a self-cancelling transformer by twisting it along with a grounded wire to create a "Twisted Pair". For critical low-level signals, use "Shielded Twisted Pair" wire (like most microphone cables).
Oh! It's Easy! [NOT Really]
Lots of times and lots of Arduino examples simply put an Arduino on your desktop with several wires to switches and sensors and wires to LEDs etc. and the USB cable to your computer and they usually Just Work. Why?
The Electrical Reality still is there, but often none of the effects are serious enough to prevent things from working. Most or all of the signals are digital, and have lots of Noise Immunity. CMOS technologies like Arduino chips typically can have unwanted signals that are as much as 30% of the desired digital signal before errors occur. So we get away with it. Then we add more stuff and stuff it all in a small box and then we find we have intermittent problems. Reality has Struck.
Planning for Success and minimizing Aggravation
From a planning perspective there are several subjects we'll cover below. This may a good order to consider them in:
- Grounding: How to set up a common ground point
- How to properly power Arduino
- How to properly power external devices and modules
- Properly powering High-Power devices
- Signal (and Data) lines
- Physical connections, wiring, cabling.
Wither Ground.. What IS Ground?
Ground is a (hopefully single) point that everything electrical is referenced to. When my house was built an 8 foot long copper-coated rod was hammered into the Soil (Ground) and a heavy wire was run inside to become the "Grounding Conductor" for all my house wiring. Your house or apartment or high-rise has a Ground Connection like that somewhere down below. If you have a car or truck, the point where the cable from the negative terminal of the battery is connected to the frame or engine block is "Ground".
Common Ground Point: This is a connection point you create on purpose to help avoid interference problems between different devices. Current from high power devices like motors that are connected directly to Arduino ground can cause the Arduino ground terminal to "bounce around" compared to other devices like sensors. This is called "Ground Bounce" and it can cause errors. By running separate ground wires from Arduino and other devices to a Common Ground Point they do not affect each other. Usually the best Common Ground Point is the negative terminal of the high-powered device's power supply. If your project is housed in a metal chassis or box a good approach is to place a long bolt (perhaps 10-32 or M5 size) in a hole in the metal chassis. Then several different ground wires can all connect at that point, usually with round lugs that fit on the one bolt. A short, heavy wire runs to that point from the negative terminal of all power supplies. If the project has incoming 120V or 240V power, the "Green Ground" of the incoming power cable also goes to the common ground point. That goes back to the building Grounding Conductor which is connected to Earth Ground.
Connecting Power to Arduino:
We have a more-detailed page here: POWERING AN ARDUINO (click)
There are typically three ways to power an Arduino:
(1) Through the USB cable from your computer.
This has a significant limitation of 500 mA (.5 Amps) and Arduino has a 500 mA (automatically resettable) fuse. In addition, many laptops and especially tablets can not supply more than 250 mA or so. Symptoms of overload in USB mode are freezing or resetting of the Arduino, or improper operation of connected devices, especially servos and motors.
(2) By connecting an external power supply (typically 9 to 12 volts DC) to the Arduino "External Power" jack.
The external power connector is on the lower left of an Arduino, like this: (below)
This connector accepts a 5.5mm x 2.1 mm plug that looks like this:
Note: The Yourduino RoboRED allows external voltages up to 20V.
(3) By connecting a well-regulated 5.0V power supply directly to the arduino "5V" pin and "GND"
This is typically done when a system is put together that also needs 5V DC for other purposes and a well-regulated power supply is added.
How to properly power external devices and modules:
If you are connecting low-power modules like LCD displays, Ethernet Interfaces, etc. the Arduino may be able to supply enough current at 5V to run them OK. With a 9V external power supply you may have at most 200 mA at 5V from Arduino due to the small linear type onboard regulator.
The YourDuino RoboRED which is compatible with Arduino UNO can provide up to 2 amps (2000 mA) because of it's switch-mode power supply and run several servos, stepper motors etc. See it HERE
If you are running many devices or higher-power you may need to supply power directly to them (Next section)
Properly powering High-Power devices:
High power devices such as multiple servos, stepper motors, LED strips etc. will need a separate power supply. Arduino can still switch that power, with relays or power transistors, but the power is sourced from a separate power supply.
See our page with details: "Controlling Power With Arduino"
A Few Definitions (We don't all speak this language!)
- Electrical **resistance**, the measure of the degree to which a conductor opposes an electric current through that conductor
- Capacitance is the ability of a body to store an electric charge Wires close to each other have Capacitance between them that can couple signals and noise.
- inductance is the property of an electrical conductor by which a change in current through it induces a [voltage] in both the conductor itself and in any nearby conductors by mutual inductance.
WIP This page is still a Work In Progress.
PLEASE send comments, suggestions, Critique to [firstname.lastname@example.org]
pin connectors: Current rating 2A (3A)
- Power Sequencing
- power options
 My apologies to my High School English teacher Mr. Rapuano for starting these sentences with the conjunction "AND".