MCP23017 Port Expander and ESPHome: Add More I/O Pins to Your Project
Published at : 22 Dec 2025
In this video, I'll take a look at using the MCP23017 16 port I/O expander with an ESP8266 (or ESP32) and ESPHome to add from 16 to 128 additional digital I/O pins to your project using just the 2-wire I2C bus from the ESP board. I'll cover the pin out, connections and limitations of the MCP23017, the ESPHome code and finally show how I use multiple port expanders to control 72 individual LEDs and three push buttons from a single ESP board to build a completely impractical clock!.
Chapter Links: ============= 00:00 Intro 01:26 ESP and MCP23017 Overview 03:57 Pinout and Limitations 06:29 ESPHome Component Mapping 07:28 Basic Bench Test 10:10 ESPHome Bench Test Config 11:29 Multiple expander wiring and ESPHome Config 13:07 A Crazy Clock Example with 75 I/O Pins 14:34 Building the Clock Face 16:16 Building the Clock Controller 18:44 Testing the Final Clock Build 19:36 Wrap Up And Other Ideas
Parts Used or Shown: =================== You may not need all these parts, or may need additional parts, depending upon your particular project. This is just a list of what I used or showed in the video:
Some of these links may be Amazon affiliate links. Use of these links will not affect your pricing, but as an affiliate this channel may earn a small commission if you make a purchase. Any commission earned will go towards future projects and videos.