I have a circuit board with lots of soldered SMD chips. There are a few I2C components connected to the same bus and the bus is also connected to a "bus switch" isolation switch. Unfortunately the bus is behaving weirdly. It seems to have large capacitance, and my microcontroller seems unable to drive the clock signal low.

If this were on a breadboard I could simply remove components until it worked, and if it was a collection of components connected in series I could look at the signals between components to find where they go weird.

But unfortunately I can't modify the circuit (without a lot of effort anyway), and the components are all connected to the same bus.

Does anyone know of any clever ways of debugging this situation? Or would you resort to removing SMD components?

(By the way, this is one of the things I always hated about electronics - the implicit relationships between everything make it really hard to debug!)

  • \$\begingroup\$ (I hope this question won't be shot down by the "too general" question nazis!) \$\endgroup\$ – Timmmm Jul 29 '14 at 9:50
  • 1
    \$\begingroup\$ I'd say that you might want to avoid the word nazis. Anyway please add a scope photo because I don't understand what the problem is. Does the signal go low too slowly or it does not go low at all? A list of connected devices might help, a sw failure on a slave microcontroller can nail the rail to Vcc. \$\endgroup\$ – Vladimir Cravero Jul 29 '14 at 10:26
  • \$\begingroup\$ Have you bother to probe around and see if the clock line is shorted to Vcc somewhere? \$\endgroup\$ – Matt Young Jul 29 '14 at 12:09

The technique for testing will depend upon whether this is new first article design being debugged for the first time or if it is one board of a known working design that is acting up.

For purposes here I'll assume this is the first case where you've just made this board and are now trying to get it to work.

One technique is to use a sharp cutter like an xacto knife to cut the bus traces at some point in the connection chain. This is a quick way to isolate if the problem is presented by a certain group of the chips or not. After the problem is debugged you can scrape off the solder mask on the cut traces and solder it back together with a short piece of fine wire. This technique is faster than removing individual components and approximates an binary search to the problem if multiple cuts end up needing to be made.

Note that if using the cut trace idea you may need to temporarily patch in a pull-up resistor for the I2C bus if the onboard pullup is on the cut away side of the bus.

Another technique is to use an oscilloscope to look at what the signal looks like when it is being driven by one component or another. For example if the MCU is trying to drive the SCL line you may be able to see some wiggle to the signal. That can lead to giving clues to what may be wrong. For example if it can pull down from 3.3V to 1.2V but no lower the problem could be a too low of pullup resistor value or a short of the SCL line to some other net that wants to be at a high level.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.