Electronic – I2C Relay Circuit shorting & sparking

i2crelayshort-circuit

I'm having trouble diagnosing a faulty circuit. Here's the schematic, which is based on this instructables build. This is part of a bigger circuit, but I have tested it in isolation on a fresh board.

enter image description here

Link to the Eagle file (This is part of a bigger board, but hopefully this helps)

The purpose of the circuit is to drive 16 relays using I2C communication. I'm currently testing with an Arduino Mega. I'm using the MCP23017 for the 16 I/O pins, and two ULN2803ADWR darling transistor arrays to sink 5v on each G5Q-14 DC5 relay coil.

The circuit seems to be correct – I've gotten it to run a few times and the Arduino can successfully switch the relay. After less than a minute or so, pins 9 and 10 on the MCP (+5v and GND) start sparking and smoking. I've tested this on two PCBs meticulously testing for shorts between pins before turning it on – same issue. I also only encounter this issue once introducing the relay to the circuit.

I also find that pins 9 and 10 become connected after the sparking occurs. Not until I apply the soldering iron do they go back to being disconnected. Is it common that very close pins will bond when things get that hot?

I have no idea what's causing this short. Does it seem like a physical error or a circuit design error?

Note that:

  • In my circuit, the MCP is floating on A0 A1 A2 (address pins). Does this matter?
  • On my PCB, the MCP pin 9 (+5v) is connected after the relay coils (the trace goes from the +5v source, through each coil, then to the MCP). Could that be causing an issue?

Best Answer

Seems like there are probably multiple issues on your board. I can't speak to the sparking you're seeing, but the MCP23017 does require the address pins to be biased, according to page 11 of the datasheet:

enter image description here

I'm not sure if you're trying to use a specific address or not, but your software will need to reference whichever address is selected via these address pins. If you don't care what the address is, I'd just ground all three pins to use address '0100000':

enter image description here