MCP23017 + other parts have failed twice now on robot

Thread Starter

ecorrales

Joined Nov 8, 2017
1
Please see attached images/ wiring diagrams.

At first I was thinking it was due to noise / spikes etc from the high-current section (motors, controller, etc).. but now I wonder.

Everything worked for quite a while. However the recent failure was much quicker than the first failure.

I have a separate flip on/off switch that separates power to the supporting circuitry. Supporting circuitry includes a 5V 5A step-down regulator, the MCP23017 I2C port expander, an MCP3008 ADC (SPI), four 4-bit 5V-3V bidirectional "bus", six HCSR04 acoustic sensors, two Sharp IR distance sensors.

I very recently added an MPU9265 (9 DoF IMU ) (think MPU6050 or 9250) on the I2C bus. Lately I haven't been powering up the motor section at all, just the Raspberry and the circuits, so I could do development with the IMU only. So the only action on my part is the on/off of the switch.

The 4-bit "bus" (so total 16 I/O) is what separates and level-shifts between all the circuitry, and a Raspberry Pi ' GPIO lines. The Pi is on its own other 5V 5A regulator, and there's an flip on/off switch for that section.

Finally, there's a big switch that powers 12V to the motors and Roboclaw motor controller.

I have not had any issues with the Raspberry, the regulators, the Roboclaw, or the bi-drectional "bus".

However, I have had now two MCP23017 fail over time. Also one (I haven't checked this time if it's gone again) MCP3008 fail (might have been at same time but can't prove it). Also had three HCSR04s fail. Also had both Sharp IR fail.

Like I said, at first I thought it was the motors, etc.

Now I wonder if it's just me constantly turning on / off the switch to the circuitry. And I need to do that to do development, testing, adding new parts, changing.. or because I'm working only with the Raspberry and don't need all the other circuits to be on.

I might also add that I have a NOCO Genius G1100 charger (seems very good quality and very smart) that I have had the practice of it charging while the robot is powered up and on a stand, so I can continue development without draining the main battery all the time.

I think that's it in a nutshell.20180818_162853.jpg top-view-circuits.png 20180817_194427.jpg 20180817_194317.jpg
 

danadak

Joined Mar 10, 2018
4,057
If you have a DSO you could replace the failed parts with equivalent load Rs,
and setup DSO for trigger on out of spec rail voltage, either or both high and
low side, to see if you can capture a transient when you are switching power
or doing other tasks.

DSO on one shot.

Another thing to look at is put a power supply into constant current mode,
set it for part limit on the parts that are failing, take the parts and put into a
seperate proto board with just power hooked up, and look to see if their
current is excessive or super low. If later good possibility part SCR crowbared
and blew open internal bond wires for the supply/substrate connection.
Thats an indication an I/O pin on part was forced outside its supply rails.
If former could also indicate fusing of contacts due to excessive current from
SCR action.

https://en.wikipedia.org/wiki/Latch-up

Another method is delid/decap package and look to see if internal gate ox ruptures,
sign of static damage.



Google "ic package epoxy removal".

http://www.ti.com/lit/an/slya014a/slya014a.pdf

Regards, Dana.
 
Last edited:

ebp

Joined Feb 8, 2018
2,332
I don't see any power supply decoupling on the perf boards. This is absolutely essential. You should have a decent high-frequency cap (e.g. 100 nF ceramic) in parallel with a bulk capacitor of some sort. 10 µF or more of aluminum electrolytic would do. Don't use just the ceramic alone. A good high frequency cap can resonate with the connecting lead inductance and actually cause transients far higher than the power supply rail. A bulk capacitor will flatten the resonant peak.

Power distribution wires should be either twisted into pairs (e.g. +5 V and "ground") or tightly bundled with cable ties. The idea is to minimize the area of the loop bounded by the conductors. If the wires are separated and the loop area is large, the inductance will be high and can cause damaging transient voltages. When the "out" and "return" paths are in close proximity their magnetic fields at least partially cancel, reducing the inductance.When you have separate power and signal commons finding their way back to "somewhere" things are messier, but it is still important to do the best job possible to control unwanted inductance.

You may need to be careful with power sequencing. If something applies a signal to an input of an IC that isn't powered you can have current flow through the protection diodes present on almost all digital and analog I/Os. Small current is usually OK, but the absolute maximum spec can range from as little as 2 mA up to 10 or 20 mA. It is unwise to allow more than half of the absolute maximum. Sometimes series resistors are all that is necessary to limit current. The following is from NXP specifically for their automotive processors, but covers broadly applicable basics well:
https://www.nxp.com/docs/en/application-note/AN4731.pdf

Insofar as is possible, high current paths should not share wiring with signal paths. This again is problematic in many cases, but it is far better to choose something (normally the battery in a case like this) as a "star point" for distribution, especially the common ("ground").

Some switch mode power converters have terrible dynamic performance. DC regulation may be excellent, but voltage overshoots and undershoots can be substantial with fast-changing input voltage or load current. This is simply due to bad design on some of these boards. The only way you can assess it is to use an oscilloscope. A digital scope makes if far easier to catch things like an initial turn-on overshoot.
 

dendad

Joined Feb 20, 2016
4,635
I second the capacitive bypassing. My rule of thumb is to add a 100nF ceramic across each IC's power pins, as close as you can make it.
Then, 10uF tantalum caps here and there. Try to keep your power and signal wires short too.
The place to join the power/0V wires carrying high current, like the motors, to those of the control circuitry, is at the bulk power filter caps. As edp mentions above, try to keep the high currents away from the signal wires. They do not mix.
 
Top