SparkFun Troubleshooting Tips
So you have followed the instructions, and the part or project does not work as expected. You even tried to do exactly what the hookup guide and tutorial told you to do! Part of working with electronics and programming is diagnosing the problem and finding a remedy to get the part to function. Don't worry; it happens to the best of us, and challenges only help us learn and grow. Let's try to find out what may be going on in your circuit!
Check Your Connections
Is the part or project connecting? Let's clarify what it means to "check your connections." A common method of troubleshooting is to check your hardware connections and power for physical problems.
Any loose connections can cause problems because it will cause your circuit to be incomplete. It is best to double-check wired connections just in case a wire was connected incorrectly or is loose. The images below show poor electrical connections for prototyping due to the thin wires being inserted into a breadboard and female header sockets. Any bumps and vibrations applied to the circuit can cause the circuit to lose its connection.
The small wires connected to the breadboard may become loose depending on how it was manufactured and how much wear was applied to the metal strip. The thin wires connected in the female headers are worse due to the tolerance of the socket.
For a more secure connection, it would be better to solder the wires to header pins and add heat shrink. You can also make an adapter using the SparkFun snappable protoboard or make a custom shield using any of the prototyping boards.
Shorts in your circuit can cause problems if there is a pin touching something that it is not supposed to. Make sure that components are not getting extremely hot to the touch. If pins are shorting, remove power and check to see if a loose wire is touching something that it should not. Make sure the board is not on top of a metal table.
Sometimes a wire or cable is bad, causing the circuit to not connect. You can try checking the circuit with a multimeter set to measure continuity. Otherwise, try using a different wire or cable.
Certain cables are designed to be charging cables, so there might not be any data lines connected in the USB cable. Also, there might be internal micro tears in the cables. We recommend checking and using a different USB cable. We had an instance where a customer was using USB cables from his school's lab to upload code to an Arduino. Three out of the four cables were bad because they were damaged. The fourth cable worked with his device. You might want to try ordering a brand-new USB cable if that is the case.
Certain components have a certain polarity and will only function when it is connected in the correct position. Make sure that the component is populated correctly. This can range from batteries, integrated circuits, microcontrollers, transistors, voltage regulators, electrolytic capacitors, diodes. For more information, check out our tutorial on polarity.
If everything appears to be wired correctly, you might want to try going back to the beginning and looking at the basic hookup. Also, disconnecting the parts and rewiring each circuit can help troubleshoot. This will assist in narrowing down the problem.
Keep in mind that two parts may be named similarly or look the same, but in reality they are not. For example, while an Arduino Mega 2560 has the name Arduino in it, it may not be a direct replacement for a circuit that uses an Arduino Uno R3. There are a few subtle differences that some may not be aware of (i.e., different pin locations, limitations in Software Serial, board definition, etc). Sometimes you may need to redefine a pin or rewire the circuit to get it working as expected.
Make sure that you are grabbing the correct part from your parts bin by double-checking the IC's label. As an example, the TMP36 is not the same as a BJT transistor. While the package appears to be the same, they are different! This is common in our SparkFun Inventor's Kit. In another case, a customer had used a different n-channel mosfet. While the n-channel mosfet looked the same, the specs were different, causing the transistor to not fully turn on in the circuit.
Check Your Solder Joints
Ah yes, we check the connections once again. If you are trying to connect a breakout board on a breadboard using wires, you will want to make sure that the connection between the breakout board and the wire is sufficient. The three images shown below are not ideal solder joints.
In the first image, there are no solder joints connecting the header pins to the breadboard. This is a great idea if you need help soldering header pins, but not if you are trying to connect the Pro Mini to other breakout boards.
The second image might have solder, but the joints are not ideal. The first pin along row 30 has no solder. The pin on row 29 has some solder on the header, but there is no contact with the board. The pin on row 28 is OK, but it has too much solder on it. Some of the solder blob is also extending from the pin. The pins on row 27 and 26 have an unintentional solder jumper. The pin on row 25 may have solder on the through-hole pad and pin, but it is not connecting. The only pin that seems to have an ideal solder joint is the RST pin on row 21. We would want to rework all the other pins by reheating the pins or adding more solder to make sure the pins have a sufficient solder joint. Additionally, there are unintentional solder jumpers connecting between pins on the Atmega328P IC. To remove unintentional solder jumpers, try using a solder wick and checking out the next question.
The third image clearly shows the 1x12 header incorrectly soldered on the Pro Mini. Solder should be applied with the shorter side of the header. The black housing holding the pin should be between the PCB and the breadboard. Additionally, the solder joints are extending the length of the pins. The Pro Mini is not able to be fully inserted into a breadboard due to the length of the straight header pins.
The solution would be to add solder or rework the solder joints for a secure connection. The image below has ideal solder joints on the Pro Mini. For more information about soldering and ideal solder joints, check out our tutorial for through-hole soldering.
Depending on the circuit, you may want to have a solder jumper on a certain part of the board. If there are unintentional solder jumpers on the IC or header pins, the solution would be to rework the board and remove the solder jumper.
Below is an example of a solder joint that was not intentional for the "Simon Says" PTH Soldering Kit.
To fix, you could grab a solder wick to remove the solder jumper. For more information on how to use a solder wick, try checking out the Troubleshooting section here labeled "Solder Jumpers."
If you are using water-soluble flux, you want to make sure to remove any water soluble flux residue that is left on the board. This is to prevent pin oxidation and temporary shorts between pins caused by dendrites. Below is an image of water-soluble flux residue left on a production panel.
While some circuits may work fine with the flux left in place, we have seen dirty boards wreak havoc on boards that are sending a signal through a serial UART (i.e., uploading code to an Arduino or sending an ASCII character to another UART) or I2C. It is better to avoid any issues caused by water-soluble flux left on the board. In fact, the SparkFun boards that we assembled are washed if they use this type of flux!
To remove water-soluble flux residue, you can use a little deionized water or isopropyl alcohol and a toothbrush. Alternatives to deionized water may be to use non-mineral bottled water first before tap water for hobby use. However, deposits from tap water could form and cause problems in the future. Using compressed air, you would dry the board to remove any excess flux residue or water that is on the board. Hot air from a heat gun or rework station can also be used to dry the board.
Certain components are sensitive to water, so you should be careful about getting these components wet. Here is a short list of components that should avoid contact with water:
- Character LCDs
- 7-Segment LED Displays
- GPS Modules
- Wireless Modules
- Barometric Pressure Sensors
- Slide Potentiometers
- Heart Rate Monitor ICs
If water gets trapped in them and you power the board, it will probably damage the component.
Length of Wire
Depending on the conducting material that you are using, the resistance of conductive thread and wires can increase over a certain distance. This is more apparent with conductive thread and the solution may be to double your thread.
If you are using wire over a distance of more than a few hundred feet, you may also notice issues. For example, there have been a few cases where an I2C sensor was not working properly after a certain length. Since I2C was designed to work over a short distance, sensors can have issues sending data when used over a certain number of feet. The solution may be to adjust the pull-up resistors or be clever in sending data (i.e., using a microcontroller for each sensor node and adding a wireless device).
Check Another Computer
We recommend checking with another computer to see if the device can work. We've had issues where a device was not working on a customer's laptop but was working on his/her computer. There was something with the settings of the computer that was preventing them from using the device properly.
Try connecting directly to a USB port instead of through a USB hub. The device might not be getting enough power or might not be communicating correctly. Also, there can be issues with using some USB-to-serial converters with USB 3.0. Try testing on a different computer. In some instances, customers were able to get it working on a USB 2.0 hub when the device was not working with a USB 3.0 port.
Check Your Logic Levels
Not all boards use the same voltage for logic levels. For example, the RedBoard Programmed with Arduino and the Arduino Uno R3 use 5V logic. However, if you move to other boards like the ESP8266, SAMD21, Arduino Due or Raspberry Pi, the I/O pins are not 5V tolerant. Make sure the logic levels match or are tolerant with whatever device you are connecting to the development board.
If the signal only needs to be converted down, you could use three 10k ohm resistors to build a voltage divider. For signals being sent both directions, you could use a logic level converter (i.e., Bi-Directional Logic Level Converter, PCA9306 Level Translator, TXB0104 Voltage Level Translator, etc.) to communicate safely. For more information about logic levels, try checking out the tutorial below.
Stacking Multiple Boards
• Are you stacking more than one board (i.e., Arduino Shield, Raspberry Pi HAT, Beaglebone Cape, etc.) together on top of your development board?
It may be possible to stack boards together, but that depends on the pins each board is using. Try checking out the board's design files, schematic and basic example code to determine what pins are being used for each shield. You may need to reroute pins, redefine pins or change the serial addresses (i.e., I2C, SPI) in the code when stacking multiple board together with a development board. When using multiple boards, you will need to combine example code to get it working in the project.
Check Your Location for Interference
Is there magic in the air or ghosts in your electronics? Maybe. Or you can just try using the board in a different location. This is common among GPS receivers if you are using it inside a building. To avoid GPS lock problems, try using the GPS receiver closer to the perimeter of the building, outside, in a different location to avoid surrounding buildings, or using an external antenna that extends outside.
We've also seen problems with ultrasonic sensors when used in certain parts of our building. For example, the HC-SR04 ultrasonic sensor would work fine in one location of the building, but we noticed that the HVAC's acoustic noise was tuned just enough to interfere with the sensor. To avoid this noise, we had to use the sensor in a different part of the building.
Using a magnetometer and seeing abnormal readings? This might be caused by hard and soft irons in the environment. Try looking at this old tutorial from our retired 9DOF Razor to find more about hard and soft irons.
Check Your Power
Make sure that you have a power supply that is able to provide the power that your system needs. For example, if you are lighting up three WS2812B addressable LEDs with an Arduino, a 5V/1A power supply would be sufficient. However, this is a different story if you are lighting up two or more 5M addressable LED strips. For such large installations, you would need a beefy power supply for long lengths and probably need to add power between each 5M segment.
If a power supply is not able to provide enough power, your microcontroller or single-board computer may brown out. As another example, the Raspberry Pi 3 consumes just a bit more current compared to its previous models. While the previous 5V/2A power supplies worked for the earlier generations of the Raspberry Pi, a 5.1V/2.5A power supply is needed to power the Pi 3 sufficiently.
Try checking your power supply. It's possible that the motors are causing a dip in voltage and causing the microcontroller to brown out. It is usually suggested to have an external power supply connected to the motors to prevent brownouts and resetting the microcontroller. Make sure to connect the GND to the rest of the system for reference. You could also use a beefier power supply that is able to provide enough power for both the motor and microcontroller.
• Why does my project work with a power supply connected to a wall outlet but not with a 9V battery?
Depending on the battery chemistry and the manufacturer of the battery, the discharge rate may be different from a power supply that is connected to a wall outlet. The internal resistance is higher for 9V batteries compared with other battery types. Also, the internal resistance varies among manufacturers. Therefore, it is not an ideal source for high-current applications. You may want to consider using other battery chemistries to power the project.
• My project was working fine when connected to the wall outlet for a few months, but it is now not working as expected.
Try power cycling the project by removing power and powering the circuit back up. If there is a reset button, you may be able to just hit that button. You may need to unplug the power supply from the wall outlet, disconnect the power Vin, wait a few seconds, reconnect the power supply to Vin, and insert the power supply back into the wall outlet. Try testing the wall adapter with a multimeter to see if it is still outputting power or plugging a known good lamp into the wall outlet.
Heat dissipation is normal when using a motor driver and motor. Depending on how hard the driver IC is being pushed and the power supply being used, you may need a heatsink to achieve the full potential of the motor driver. Such breakout boards are usually designed to help with some heat dissipation. In addition to adding a heatsink, there are methods of dealing with heat.
Electrostatic Discharge (ESD)
Certain devices are sensitive to static electricity. When moving around, a person can build up static electricity and discharge it through the board. It can be worse during the winter when walking over carpet. Make sure to touch a metal cabinet to ground yourself. While some boards can handle a few minor shocks, the IC can be damaged after a certain point.
Limitations of the Product
When a product is released to the wild, it might not be used as intended. For example, usually you think of LEDs as emitting light. However, it is possible to use a microcontroller and LED to detect light.
Now don't expect all components to be able to do what they are not intended to do. For example, the XBee Series 1 transceiver may be able to transmit data wirelessly, but do not expect it to be able to stream video reliably like a WiFi dongle. The specifications (i.e., data rate) are different.
Try checking to see if you are using the correct WiFi network name and password. It is possible that the credentials were entered incorrectly. The example codes provided with WiFi-enabled devices (like the SparkFun ESP8266 Thing Development Board) require you to manually enter the network name and password.
Just like checking another computer, you may want to try testing the WiFi-enabled device on another WiFi network. Using a WiFi-enabled device can be a problem if you are using the device in a school network. Due to a school's configuration, you may need to contact your local IT department that manages the wireless network to allow the device to connect. It also may be possible that the wireless router is damaged or not compatible with the wireless-enabled device.
Placing a wireless device inside a metal enclosure (i.e., a Faraday cage) essentially limits and can block any electromagnetic fields. Signals being sent or received will not be able to be transmitted. Try using an external antenna so that the transceiver is able to extend outside of the metal enclosure.