Go Down

Topic: MCP23017 I2C I/O Expander to Relay Kit ULN2803 (Read 2447 times) previous topic - next topic

EdwinDB

Jun 03, 2010, 11:53 am Last Edit: Jun 03, 2010, 12:19 pm by edwindb Reason: 1
Hello,

I have succesfully connected an MCP23017 to my Arduino Mega and got it to blink a LED using a 330 Ohm resistor. Now I am trying to drive the relay's on a Velleman K6714-16

K6714-16 datasheet: http://www.velleman.eu/downloads/0/illustrated/illustrated_assembly_manual_k6714-16.pdf

I connected the output pin through a 330 ohm resistor to an input pin on the Velleman K6714-16 and connected the ground pin of the Velleman card to the common ground. For some reason this works for about 5 blinks and then the MCP23017 is blown up. If I use an Arduino digital output pin instead of an MCP23017 pin everything works fine.

I think I do something wrong with the wiring.



Regards,

Edwin

PaulS

The velleman data sheet didn't say anything about the current required to operate the relays. I'm suspecting that the current requirements are greater than the MCP23017 can handle.

Grumpy_Mike

#2
Jun 03, 2010, 03:12 pm Last Edit: Jun 03, 2010, 03:12 pm by Grumpy_Mike Reason: 1
Quote
I'm suspecting that the current requirements are greater than the MCP23017 can handle.


Yes but it is going through a 330R resistor so that should limit the current to a safe value. Even if it is not enough to drive the relay.

Maybe the relay coil doesn't have any back EMF diodes and that is blowing the device where as you have just been lucky so far using the arduino pin directly.

EdwinDB

Thank you for the suggestions :)

The problem seems to be related to the MCP23017 itself because I have tried for some time to blink the led and the led stops to blink after about 30 seconds. Sometimes after resetting the arduino the led starts blinking again and sometimes not. The sketch I use is of the centipede library. The chip doesn't seem to blow up it looks as if it needs to have power disconnected to be able to continue.

Regards,

Edwin

Grumpy_Mike

In that case two things to check.
Make sure you have a 4K7 pull up resistor on each of the I2C lines, the internal pull ups are not good enough.
Second add some decoupling to the chip:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Go Up