NodeMCU: the open source IoT platform

ESP8266

NodeMCU is an open-source module for implementing an IoT (Internet of Things) platform . It uses firmware running on the Espressif Systems ESP8266 SoC , which we've already reviewed on this blog, and hardware based on the ESP-12 module, with 11 GPIO connections, one of which is a 10-bit analog GPIO (1024 possible digital values), as you may have read in that same article I'm referencing.

The term NodeMCU refers to the firmware , not the development kits, although lately it's often used synonymously with the entire platform. Also, you should know that these modules initially used Lua as their language, but as you'll see, that has evolved. In fact, they were based on the eLua project and the non-operational Espressif SDK for the ESP8266, using open-source projects to provide missing components like lua-cjson, spiffs, etc. If you're unfamiliar, Lua is a lightweight, structured, imperative programming language with extensible semantics, designed to be used as an interpreted language.

NodeMCU

nodemcu

This module has become very popular among ESP8266 users, as it is being widely used for IoT projects, which are so fashionable these days. After Espressif Systems began marketing the ESP8266 in 2013, the first NodeMCU firmware files were uploaded to GitHub a year later, in October 2014. Two months later, at the end of that year, the project began expanding to include an open-source hardware platform.

Gradually, the project was developed and more libraries were added , such as Contiki's MQTT library, enabling the platform to support the MQTT IoT protocol, using Lua for access. Another important update arrived in 2015 when Devsaurus ported the u8glib library to NodeMCU, allowing it to easily control LCD, OLED, and VGA displays. The original developers gradually left the project in the summer of 2015, making way for independent contributors. By 2016, NodeMCU already included more than 40 different modules…

Also included would be the ESP8266 Core for Arduino IDE , to work with the platform using Arduino development boards, which allowed many users and makers to create their own projects using this platform.

Pinout

Regarding the pinout , it was already analyzed in the other article about the ESP8266 on the blog, but the most important pins are:

  • Pin 0 *: GPIO 16 for GPIO read / write only.
  • Pin 1: GPIO 5
  • Pin 2: GPIO 4
  • Pin 3: GPIO 0
  • Pin 4: GPIO 2
  • Pin 5: GPIO 14
  • Pin 6: GPIO 12
  • Pin 7: GPIO 13
  • Pin 8: GPIO 15
  • Pin 9: GPIO 3
  • Pin 10: GPIO 1
  • Pin 11: GPIO 9
  • Pin 12: GPIO 10
  • Others are reserved, or serve for power supply (GND, Vcc), and for other signals.

The available pins may vary depending on the version or model, but these are the typical ones.

Other features of the NodeMCU

The NodeMCU is similarly priced to the ESP-201, at around €7 on Amazon , and comes with everything you need included, making it incredibly easy to use. Some modules cost over €10, but they include additional components such as LCD panels, etc.

You can download the firmware that controls it for free from GitHub , and you can use languages ​​like C++, Python, BASIC, JavaScript, and others such as Lua. Remember that it's open source, so you can learn from this project or modify it freely if you need to add features or change any parameters.

What does the development board include?

The NodeMCU development board typically includes a microUSB port for programming and powering, a serial-to-USB converter, the pinouts mentioned in the pinout section, and an integrated LED and reset button. Of course, since it includes the ESP8266 SoC for WiFi connectivity, a coiled antenna is also printed on the PCB.

However, since there are several manufacturers, versions, and models , each has its own philosophy and may include its own extras or have different criteria depending on the board's intended purpose. For example, as you will see later, an ESP12 chip can be replaced with an ESP12E in some models, or the CH340G instead of the CP2102 for serial conversion, and so on.

The main manufacturers of NodeMCU boards are typically Amica, FBlue, Lolin/Wemos, DOIT/SmartArduino, AZ-Delivery, etc. In addition to the different suppliers, you'll also find several versions:

  • 1st Generation: The devkit v0.9 is the original version of the NodeMCU with ESP12 with 4MB flash on the ESP8266, but with fewer GPIO pins than the ESP12E version that current models are based on. Now it is obsolete and you cannot buy it.
  • 2th Generation: it is version v1.0 / v2.0, created by Amica, a German company Gerwin Janssen to improve the previous v0.9. They liked it so much that it ended up being the official version of NodeMCU. Started using ESP12E and with an extra row of pins for connections. Other manufacturers also ended up copying this version, using this open-hardware model as a base.
  • 3th Generation- v1.0 / v3 was designed by Lolin / Wemos when they decided to create an improved prototype with some minor changes. The main change was to mount a CH340G serial converter instead of the CP2102, making the USB port more robust. It is currently the best-selling model.

For now, these are the most important developments you should know about, although some may have become more obsolete.

What can be done with NodeMCU?

What you can do with a NodeMCU board for IoT can vary greatly, and the only limit is your imagination. But here are some examples of ideas you can implement thanks to its features for internet control, communication, and more.

  • Create your own Weather Station with humidity, temperature sensors, etc., and being able to receive the measurement results from any point with an Internet connection. Of course you can use any other type of sensors or elements to create similar projects.
  • Connected automation, causing an action to be triggered by an impulse, such as controlling LED lights, switching relays, activating any type of actuator, etc.
  • Create a NTP server, and other types of services for your connected devices.
  • Positioning systems for interiors of homes or buildings using GPS.
  • Toys of all kinds, domótica of the house, etc.

More information – Arduino Tutorials

Now you know the most important features of NodeMCU boards and you can start using them in your future IoT projects along with your Arduino boards and similar boards…


Add as preferred source in Google