The next step is to check for short circuits between 5V and GND on your project. Connect your Arduino to your breadboard by running a jumper from the 5V and GND connections to the positive and negative rails of the breadboard. (Notice we are following the “divide and rule” principle by connecting only these two jumpers, and not all the jumpers for your project.) If the green PWR LED turns off, remove the jumpers immediately. This means there is a big mistake in your circuit and you have a “short circuit” somewhere. When this happens, your board draws too much current and the power gets cut off to protect the computer.
NOTE
If you’re concerned that you may damage your computer, remember that almost all computers limit the amount of current a USB device can draw. If the device tries to take too much current, the computer immediately disables power on the USB port. Also, the Arduino board is fitted with a polyfuse, a current-protection device that resets itself when the fault is removed.
If you’re really paranoid, you can always connect the Arduino board through a self-powered USB hub. In this case, if it all goes horribly wrong, the USB hub is the one that will be pushing up daisies, not your computer.
If you’re getting a short circuit, you have to start the “simplification and segmentation” process. What you must do is go through every sensor and actuator in the project and connect just one at a time until you identify the part or connection that is causing the short circuit.
Alternately, or in addition to, remove all your jumper wires and build your circuit again. Often you will unconsciously correct a mistake you made the first time. The second time you build your circuit you have 100% more experience
The first thing to start from is always the power supply (the connections from 5V and GND). Look around and make sure that each part of the circuit is powered properly. The most likely cause is a jumper that is in the wrong place. Other causes might be an incorrect component such as a resistor with too small a value, or a switch or transistor that is connecting 5V to GND. Less likely but also possible is a piece of wire or a screw that happens to be touching both 5V and GND somewhere. Check also that the polarity is correct on any polarized components, ICs, or modules. We’ve seen some components which, when 5V and GND are swapped, behave like a short circuit.
Working step by step and making one single modification at a time is the number one rule for fixing stuff. This rule was hammered into my young head by my school professor and first employer, Maurizio Pirola. Every time I’m debugging something and things don’t look good (and believe me, it happens a lot), his face pops in my head saying, “One modification at a time…one modification at a time” and that’s usually when I fix everything. This is very important, because you will know what fixed the problem. (It’s all too easy to lose track of which modification actually solved the problem, which is why it’s so important to make one at a time.)
Each debugging experience will build up in your head a “knowledge base” of defects and possible fixes. And before you know it, you’ll become an expert. This will make you look very cool, because as soon as a newbie says, “This doesn’t work!” you’ll give it a quick look and have the answer in a split second.
Leave a Reply