Welcome to another Voltlog, in this video we’re going to take a look at an easy way of adding more GPIOs to your project because if you’ve been tinkering with electronics at some point sooner or later you’re going to need more GPIOS than what’s available from your microcontroller.
Sometimes manufacturers do offer a higher pin count package with more GPIOs with approximately the same CPU inside but in the case of an ESP32 module for example, that’s all you get and if you need more than you are out of luck as far as options from the manufacturer. And even if the manufacturer does offer a higher pin count option, those are usually more expensive and given the current chip shortage that we’re going through, they might not be available for purchase.
I had such a need recently for a design of mine so I decided to do this video to show you an option that you can use for expanding the GPIO capability of your circuit. In my case it was the ESP32 thermostat valve controller circuit, which makes use of pretty much all of the available GPIO so if I wanted to add some extra output channels I have no more available GPIO.
Luckily this problem is not new, it has been around since the introduction of digital processors so there is a very convenient solution to our problem in the form of GPIO expanders. They can come in many shapes and sizes but the key feature is that they usually take a serial input which means a low pin count for the input and they provide a number of different outputs depending on the package. So here is for example the datasheet for a very popular GPIO expander chip, this is the PCF8574, the datasheet is from NXP but this is manufactured by different companies and this is a big plus because there is a higher chance of finding these in stock.