MAKE Asks: Tricky Troubleshooting

Technology
MAKE Asks: Tricky Troubleshooting


Make: Asks is a new weekly column where we ask you, our readers, for responses to maker-related questions. We hope the column will spark interesting conversation and that we’ll get to know more about each other.

When using an XBee for the first time, I found that if I tried to run the “Hello World” code, I could only get my flashing LED to work if I unplugged one of my indicator LEDs, and vice versa. After going through what I thought was every possible troubleshooting measure, it turned out the culprit was a weak solder joint where the power was coming through. It provided enough juice for just a couple of LEDs, but no more than that. It took a while to figure out but it was one of my most maddening problems to fix.

This week’s question: What was a bug or tricky problem on a project you’ve done, and what did you finally do to figure it out and get it working?

Post your responses in the comments section.

24 thoughts on “MAKE Asks: Tricky Troubleshooting

  1. Abram (@abetusk) says:

    I have two:

    The first was when I was trying to get button input from an ATTiny13 that was driving four servo motors. The servos had some preset motions depending on how you tapped the button. If I pressed and held the button, it was fine, but I had one ‘mode’ where I tapped the button and the servos went wild. Eventually I found out it was due to noise on the button input line. I was trying to drive the four servos from a 9V battery and it just couldn’t service the current draw (I found out the servos can draw upwards of .75A when stalled for a total of 3A potential draw). When I replaced the battery with an appropriate LiPo, it worked fine.

    The second was when I was still working on the same project, I had soldered everything onto perf board and it was working just fine. I packaged everything up and tried it again and it didn’t work. I unpacked it and it worked fine. I packaged it up again, and it didn’t work. I unpacked it again and after some fiddling I noticed that jostling the perfboard around would make the motors jitter. Eventually I tracked it down to a loose connection. Infuriating when things work intermittently!

    Oh, sorry, one more. I thought I would be clever and dremel out the trace of a length of copper on some protoboard I was working with so that I could put a header in line with the trace and have it straddle the dremelled out portion (instead of laying it out across two different traces on the protoboard). After some light soldering and mild use, the traces came right off of the protoboard! Arg!

  2. Ross Hershberger says:

    Fixing a GAS Ampzilla stereo amp from the ’70s that had a slow but steady DC drift that I couldn’t adjust out. I checked every cap, resistor and semiconductor multiple times but just couldn’t trace the problem. It’s a complex multi-stage circuit with DC negative feedback from output to input to more or less set the DC operating level and gain, then an OPAMP servo to trim the DC, PLUS a trimpot. Finally I ‘shotgunned’ the front end, replacing every part. That fixed it. I still don’t know what was wrong, but five days on the bench was too long. Sometimes you just wipe the slate and start over.

  3. Kevin Granade says:

    I was prototyping a BCD clock on a breadboard, had the uC talking happily to a RTC and a shift register feeding a small bank of LEDs (first project, so these were major accomplishments for me). Once I had it setting, retrieving, and displaying the time properly, I left it running overnight to check the accuracy of the RTC.

    When I checked it the next morning, the time was too early by hours, so I looked at it funny, wrote down the time it was displaying, and went to work. When I returned home, it was several more hours slow, so I noted the time again and crawled through my code and the chip reference sheets. Repeat for another day, and I noticed it was losing the exact same amount of time. Hypothesizing that it was resetting at a certain time, I adjusted the start time in my code and eventually confirmed that it was resetting at a certain time.

    Once I found the time, I set the code to initialize to just a minute or so before that time, and tried to determine how to get some internal state displayed on the breadboard. While I was pondering, the circuit was sitting there resetting once a minute like clockwork (couldn’t resist). After a few cycles, the final clue appeared, the smell of burning plastic! I checked the temperature of the main voltage regulator for my breadboard, and confirmed that it was searing hot, I had found my culprit, the voltage regulator’s thermal shutoff was cutting the power and resetting the circuit. I quickly realized it was happening when a certain NUMBER of my LEDs were powered on at the same time, I wasn’t doing any PWM on them, so it only took 10 LEDs or so to draw enough power to overheat my voltage regulator.

    Lesson learned, don’t underestimate how much current a small circuit can draw.

  4. NickS says:

    I built an helmet a’la Daft Punk that would flash words on an LED grid. While it worked really well, it wouldn’t display some words and started over from the beginning of the sequence. I spent a few days debugging my code until I noticed that the bad words all involved a large number of LEDs being on at the same time. The voltage near the uC was reaching the brownout level, resetting everything. It started back up so quickly it looked like a code issue. A quick cap near the uC fixed everything.

  5. gordwait@gmail.com says:

    Two different instances of effectively the same thing :

    I had an oscilloscope wired up to a prototype, set to trigger on an error.
    Every so often the scope would trigger, but I could not make any sense of the “error”. The hardware kept on working even though it should have shut down due to the error.

    In the first instance I finally noticed that I heard an audible “click” right when the scope triggered, and discovered that the soldering iron on the bench would send an “EMP” out any time it’s thermocouple clicked on to heat up the tip, causing the scope to fire.

    The second time (years later, different hardware) I noticed that I could trigger the scope just by bumping the metal footrest bar on the workbench, which caused a metal on metal scrape, and generate enough RF again to trigger the scope!

    Yeesh..

  6. andrew kieran says:

    for the longest time i thought i had a shonky arduino. sometimes it wouldnt be recognised on usb even though it was sucking power. i eventually discovered it doesnt show up as a usb device when theres spmething plugged into m 5v

  7. Bradley Gawthrop (@talldarknweirdo) says:

    I’ve wasted an astonishing amount of my life chasing problems that ended up being bad leads of one kind or another. breadboard wires and alligator clips are prime examples. Alligator clips where the wire has been folded under the insulation and crimped in place are prone to random intermittent failures which can be a real pain in the neck to locate. If you have a circuit being mysteriously or intermittently odd, it wouldn’t hurt to start by changing out all your wires.having to re-notice where everything plugs in on a breadboard can also help you find places you’ve goofed up, so it’s a two-prong troubleshooting assault. :)

  8. Kel says:

    I’m a Police Officer and I build “bait cars”, like the ones on the TV show. I had a vehicle that kept giving false alarms at really random times. All of the inputs to the microprocessor were looking for a ground condition to go into alarm. I kept troubleshooting and troubleshooting. I eventually replaced the processor thinking it was bad, and the new one did the same thing. Finally I built a small circuit to collapse a relay when a ground occurred and it triggered a local beeper. I had the car sitting for a few hours when suddenly it triggered while no one was anywhere around the car. I isolated each input and tried again and again. Finally I discovered a slight resistance on one of the inputs, specifically the wire leading to the switch for the hood of the vehicle. I checked the switch and it was fine. Finally I started tracing the wire back and discovered that there was a very small nick in the wire where it went between two pieces of body metal. The paint on the car contained enough lead that it would act as a resistor causing not a huge short to ground, but enough to throw off the microprocessor. When a little heat from the afternoon sun warmed up the metal of the car, the resistance lowered enough to trigger my makeshift relay sensor. Took forever to find this, even longer to figure out why it was so sporadic.

  9. werewolf says:

    I bought an almost-soviet motorcycle (Jawa from year 1990) when I was young and knew nothing about motors (my family never had a car or even motorized lawnmower, only things I had some experience with were bicycle and few electric toys). The motorcycle soon broke down. The problem was that one of the two cylinders stopped working. But not for all time – both cylinders worked when I started it up cold, but when I went to ride, soon one switched off. But by the time I managed to pull out the sparkplug or open up some parts to reveal other pieces of ignition system, it had cooled down just enouch to work again. Repeatedly.

    During that exploration of mysterious fault I had funny ride, I can’t leave out from the story: I had to go uphill while one of the cylinders was off and torque very weak. It went like that: disengage the clutch and turn gas til rpm goes pretty high, then engage clutch and go til the rpm comes down near too low, repeat and hope the driver behind you does not get too mad as you are going way too slow.

    Then I tried to identify the problem by swithing parts of ignition system (plugs, coils, wires) from one cylinder to another. I came to conclusion that everything else works but only thing I was not able to check was capacitors (didn’t find a way or courage to remove them then with my little knowledge) so it probably had to be capacitor.

    Then I finally found someone with knowledge who agreed to help me. He took the motorcycle to his garage for winter and did quite some maintenance for free which was nice of him. But his opinion was that the cylinder had to be untight and therefore shut down which he had already taken care of. In the spring we tested it out – and it still had the same fault.

    And new capacitor – as the worst amateur me had suspected – solved the problem. At least a month of the first riding season and a winter had passed since the beginning of the problem.

  10. GoodHart says:

    Back as a newbie, I was being overly ambitious and started working on constructing a digital voice recorder/playback module from Radio Shack’s old chip for that purpose. At $25 a few decades ago, I was going to get this to work one way or another.

    At the time, my soldering skills were “ok”, and I managed to get it all together and working….well, somewhat working. SURE, it’d record my voice, but I also was getting “another voice” from someone not even in the room. I erased and erased and played it back showing myself it was blank, recorded and got the voice again (other then my own).

    After long hours of trying different things to track down the source, I decided I must be picking up AM (popular at the time) radio signals from the downtown radio station. I grounded myself better. Big mistake. That merely made ME a better antena. FINALLY, I enclosed the entire device in a metal box, grounded it to the power source, and placed a few coils and caps strategically along the ground plane to help dissipate the signal. I was able to reduce most of the “noise” as long as I didn’t “pick up the box” while recording :-)

  11. Alex Swavely says:

    I had to replace the alternator in my car because a bolt jiggled loose and it fried the internal regulator trying to keep charging with the belt loose. No problem there – swap in new alt, bolt and belt and off I go.

    A month goes by, and it stops charging again. I check the bolt and belt, they’re fine, so I take it back on warranty exchange. It goes fine for another month, then goes out again, this time taking the battery with it.

    I get it going again, etc. This goes on, round and round, for over a year. At one point, I even took to driving it with spare batteries in the trunk.

    Three alternators, two batteries and a handful of belts later, with much head scratching from everyone I talked to about it, I finally discover that the whole problem from the start was caused by a slowly failing water pump bearing. I only figured it out because it finally got bad enough to make a noise in the range of human hearing.

  12. Karl Lunt says:

    My toughest fix involved the Atmel ATmega1284p, back in its early days (2009). I had built up a simple board with the MCU, a crystal, and serial connection. I dropped in firmware for a Basic interpreter that I was developing.

    I could print out anything I wanted to the serial port, but if I tried to enter text on the serial port, the board would crash and reset after only four or five characters. This was repeatable and consistent.

    The interpreter (about 33K bytes in size) worked when built for other MCUs and run on other boards, so I was *pretty* sure the code was OK, but I’m always suspicious of my own code, so I begin slicing out pieces, trying to isolate the error. Eventually, it became obvious that the error was caused solely by receiving chars on the MCU’s Rx line.

    I erased the chip and dropped in code that blinked an LED but did not do any serial I/O. With the LED blinking, I then hooked up the serial port and started typing chars; everything worked fine.

    Finally, I modified the code slightly, to blink the LED using a subroutine call. This meant that any corruption of the MCU’s RAM would likely cause the program to run away at some point, as the stack would get clobbered. This time, when I ran the program and started typing chars, the LED blinked erratically, indicating that the MCU had reset itself.

    After discussions with the experts at AVRFreaks, I determined that signals on the Rx input, even if I wasn’t using the serial port in my code, caused corruption in the on-chip RAM. The solution I used was to add a small series resistor on the Rx input to the MCU, along with a small capacitor to ground. This cleared up the problem completely, even running at 115K baud.

    It sucks when the bug you are tracking turns out to be a flaw in the MCU implementation, but sometimes, that’s how it goes. You can find full details on my website: http://www.seanet.com/~karllunt/1284pmemprob.html

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

In addition to being an online editor for MAKE Magazine, Michael Colombo works in fabrication, electronics, sound design, music production and performance (Yes. All that.) In the past he has also been a childrens' educator and entertainer, and holds a Masters degree from NYU's Interactive Telecommunications Program.

View more articles by Michael Colombo

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK