Cheat Sheet

Arduino Projects For Dummies

From Arduino Projects For Dummies by Brock Craft

Before you begin creating electronics projects with Arduino, get to know the symbols used in schematics; go over a color code chart to help you decipher resistor values; and explore some hardware and software troubleshooting tips.

Arduino Projects Schematic Symbols

When building Arduino projects, you often need to consult a schematic. Have a look at the following table, which shows the common schematic symbols you encounter when building Arduino projects:

image0.jpg

Troubleshooting Your Arduino Electronics Project

If your Arduino electronics project isn't working, you have to check both your hardware and your software. Start with your hardware and then move on to the software. Troubleshoot your electronics project by following these steps to check for the most common problems.

Troubleshooting hardware in a problematic electronics project

Review the following steps to check for hardware problems:

  1. Check your hardware connections.

    Look for open connections. The most frequent cause of problems is things simply being disconnected. Also check for short circuits. This can anywhere wires are touching or connected that they shouldn't be. Make sure that you are using your Arduino's digital inputs for sensors that give a digital output (either HIGH or LOW) and analog inputs for sensors that output a variable voltage.

  2. Check your power.

    Make sure that you have enough power then make sure it's getting to the right place. Confirm your power indicator lights are on. If you are powering external components from your Arduino but they don't seem to be working, try powering them independently from your Arduino by using a battery or external power supply.

  3. Check for hot components and funny smells.

    Locate any components that may be too hot to touch. They are probably wired incorrectly or receiving too much power. Sniff your components for anything that might seem to smell like burning. This is a definite indication of an incorrect connection, and you should disconnect the power right away. Replace any damaged components and recheck your circuit for incorrect connections before powering up.

  4. Check your output values.

    Use a multimeter to measure the voltages from your devices. Make sure that you are getting +5 volts for digital HIGH values and 0 volts for LOW values. Test your digital sensors to make sure they are outputting the correct values. Test your analog sensors to make sure they are providing a voltage that ranges from 0 to 5 volts.

  5. Check your digital inputs and outputs.

    If you have run too much current (more than 40mA) on a digital or analog pin, you've overdriven the pin, and it may have stopped operating. If you suspect a pin is dead, try using an adjacent pin by changing your code accordingly. If that solves the problem, you might have a dead pin.

Troubleshooting software in a problematic electronics project

Review the following steps to check for software problems:

  1. Check your syntax.

    The most common problem is a missing semicolon at the end of a line. Probably the second most common problem is a missing curly bracket. Also, look for typos, incorrect spelling, or a mismatch in capitals or lowercase text, because Arduino code is case sensitive. If there's an error in your code, the IDE will usually highlight the line where the error occurred.

  2. Use the serial monitor.

    Use Serial.println() statements at key points in your code to output the contents of variables to the serial monitor. You can also print messages to the serial monitor at important points in your code. You may need to also add a delay() statement to provide a moment, so you can read the value(s) as they are printed to the screen.

  3. Check your inputs and outputs.

    Locate any components that may be too hot to touch. They are probably wired incorrectly or receiving too much power. Sniff your components for anything that might seem to smell like it's burning. This is a definite indication of an incorrect connection and you should disconnect the power right away. Replace any damaged components and re-check your circuit for incorrect connections before powering up.

  4. Use a simulator or emulator.

    You can use Arduino simulators that mimic the behavior of the Arduino and emulators for the AVR chip family. These are technical tools aimed at engineers and give you a wealth of information about your code, as it's running. Download one of these tools to try running your code on a virtual Arduino on your computer.

  5. Check the forums.

    The official Arduino website, Adafruit, Sparkfun, and Element14 have Arduino forums where people post discussions. Those communities are filled with people who just want to get their Arduinos to do cool stuff. They are almost always helpful and supportive.

Arduino Projects: Resistor Color Codes for Electronics

When building Arduino electronics projects, you often need to consult a schematic or identify a resistor. Use this table to identify a resistor's value, in Ohms, from its color code:

Color 1st Digit 2nd Digit 3rd Digit Multiplier Tolerance
Black 0 0 0 1
Brown 1 1 1 10 1%
Red 2 2 2 100 2%
Orange 3 3 3 1000
Yellow 4 4 4 10,000
Green 5 5 5 100,000
Blue 6 6 6 1,000,000
Violet 7 7 7
Grey 8 8 8
White 9 9 9
Gold 0.1 5%
Silver 0.01 10%

Example: A 4,700Ω (4.7K Ω) resistor with yellow, violet, orange, and gold stripes:

Color Yellow Violet Orange Gold
Value 4 7 X 1000 ±5%
  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement

Inside Dummies.com