Connect with us

MCP23017 with raspberry pi

Discussion in 'Microcontrollers, Programming and IoT' started by Orion96, Aug 24, 2018.

Scroll to continue with content
  1. Orion96


    Dec 18, 2015

    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...)
  2. Bluejets


    Oct 5, 2014
    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.
  3. Orion96


    Dec 18, 2015
  4. brevor


    Apr 9, 2013
    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.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day