Maker Pro
Maker Pro

MCP23017 with raspberry pi

Orion96

Dec 18, 2015
26
Joined
Dec 18, 2015
Messages
26
Hi

I have a raspberry pi with a MCP23017 to control a 16 channel relay board.

My problem is that when everything starts up each MCP23017 pin is 0 and all the relays are on.
But, I thought that a "0" is off? but then again if "0" is low that would pull it to ground right? making it turn on.

I'm using node red for all this, as you can probably tell I'm new to coding(although I have done a short B4A course)

If anyone could help me I would be grateful.
My end goal is just to have the relays stay off when everything powers back on(say after a power outage) and then be able to have the raspberry turn them on as I want( I'll play around with motion sensors and remote controlling...)
 

Bluejets

Oct 5, 2014
6,938
Joined
Oct 5, 2014
Messages
6,938
What is the relay board?

0 is low but can be active low result depending on what is connected on the output, how you have the program and how you connect the circuit.
 

brevor

Apr 9, 2013
87
Joined
Apr 9, 2013
Messages
87
On the MCP23017 all the I/O lines default to inputs on power up. You need to set them so all the relays will be off before you configure the I/O lines as outputs.
 
Top