I got a MCP23017 expander board and I can’t get it work.
For testing I have connected a 8 LED board.
I have activated the MCP23017 output module in mycodo and I was hoping I can switch the LED’s on and using the “on” and "off’ buttons but nothing happens on the LED side. In mycodo the little success message does pop when pressing those buttons.
The required dependencies are installed.
What kind of “8 LED board”?
Do you mean one of these?
If so, that kind of LED board is only supported in Mycodo when directly connected to the Raspbery Pi’s GPIO-12 or GPIO-18 pins when using the NeoPixel GPIO Output module…
or GPIO-10 when using the NeoPixel SPI Output module.
this is my setup:
The LED board is connected to the outputs of the expander board. I would guess that mycodo does not “know” what is connected to the outputs?
Where are those LED’s sourcing their power from? The Pi’s GPIO?
That’s the main issue I can see from the pics.
Also, Do you have a ground wire going from the GND pin on the expander board all the way back to a ground pin on the Pi?
You should make sure that the expander board and whatever devices are running from it are getting their power from a separate dedicated power source OTHER than the Raspberry Pi’s GPIO pins. If those LEDs are drawing too much current, you’ll damage the Pi.
Other than that, I can’t tell what’s what from the pics, I would need a wiring schematic to understand what you are trying to accomplish.
Just out of curiosity, why do you need an expander, does the Pi not already have enough GPIO pins for what you are trying to do?
Hi Lucid, thanks for your input. I was thinking since flat cable and connects are 10 pins I maybe wrongly assumed that ground was using one of them. I need to check that out.
I have read that an external power source is required when using a lot of current. I think I should apply it to the expander board.
The Pi might have enough I/O to begin with but I want to room to play with so I can add more later. I intend to use this setup to control two rooms next to each other.
Yeah, double check all your wiring, especially grounds, and use a separate power supply on the expander board.
If you are looking for easy I/O expansion, I would also recommend using an inexpensive ESP32 dev board running Tasmota and then you basically have a WiFi GPIO expansion module with 30 more GPIO pins, no need to worry about I2C wire length issues running wires all the way from the pi to the expansion board, and no need to drill holes through your walls for wiring.
You just need to install Mosquitto MQTT broker on the same pi that is running Mycodo, and then you can control the WiFi ESP32 “expander board” using the MQTT modules in Mycodo.
That sounds cool! Thanks!