Pages: [1]   Go Down
Author Topic: MCP23017 I2C I/O Expander to Relay Kit ULN2803  (Read 1962 times)
0 Members and 1 Guest are viewing this topic.
Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: June 03, 2010, 05:19:55 am by edwindb » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46266
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31554
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: June 03, 2010, 08:12:54 am by Grumpy_Mike » Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the suggestions smiley

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31554
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: