Home » Blog » Radio » Shortwave Radio » NodeMCU Expansion Options for IoT Control

NodeMCU Expansion Options for IoT Control

nodemcu expansion

NodeMCU expansion solutions provided you with great wireless control of your projects and multiple control pins at low cost.

I love working with the NodeMCU (ESP8266 12E) microcontroller. Once programmed, this little device just shows up on your home network, ready to work. NodeMCU contains a powerful computer, as well as an integrated WIFI system on chip. I find its only downside as a limited number of GPIO.

You can accomplish NodeMCU expansion easily with a couple of approaches. For one, you can attach several I2C GPIO expander boards, as shown in the lower part of the picture. I2C serial communications works with two wires for data an clock, as well as two wires for VCC and Ground. As shown above, I have added sixteen digital IO to the NodeMCU.

While these GPIO expander boards will work with a 3.3V NodeMCU, you might run into voltage drop problems. I find I can control four relays at once with no problems, but more than that and you get intermittent results.

A more elegant solution is to slave the NodeMCU to an Arduino, as shown top above. You can use the Arduino to power the NodeMCU. Communications is handled through Software Serial over two wires. Be careful, though, as you are mixing a 3.3V NodeMCU with a 5V Arduino. I am told that the GPIO pins are 5 volt tolerant, and the above set-up works fine for me.

If you want, you can insert a level shifting module between the devices for extra peace of mind.

NodeMCU Expansion adds WIFI to Arduino at low cost

Both Arduino and NodeMCU are easy to program with the Arduino IDE or Visual Micro. You can program the NodeMCU as simply a command pass-thru and put you control code in the Arduino. Or, you can put your control code in the NodeMCU and just use the Arduino to switch multiple control pins. Either way is good.

My approach is to control with the NodeMCU, as you can reprogram everything on the fly using OTA, or Over the Air. Notice how I have put everything together with 3D printed M3 screws, mounting posts and plastic base.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.