NodeMCU is a module to implement an open source IoT (Internet of Things) platform. It uses a firmware running on the Espressif Systems ESP8266 SoC that we already analyzed in this blog, and a hardware based on the ESP-12 module, with 11 GPIO connections, one of them 10-bit analogical (1024 possible digital values), as you could read in the same article that I refer to.
The term NodeMCU refers to the firmware and not to the development kits, although lately it is used as a synonym for the whole platform. Also, you should know that these modules used as Lua language, at the beginning, but as you will see that has evolved. In fact, they were based on the eLua project and the non-operational Espressif SDK for ESP8266, and using open source projects to compose the missing parts like lua-cjson, spiffs, etc. In case you don’t know it, Lua is an imperative and structured programming language light enough to be used as an interpreted language with extensible semantics.
This module has become very popular among those using the ESP8266, as it is being used to a great extent for IoT projects, so fashionable nowadays. After starting to market Espressif Systems’ ESP8266 in 2013, a year later, in October 2014, the first NodeMCU firmware files were sent to GitHub. Two months later, at the end of that year, the project began to expand to include an open hardware platform as well.
Little by little, more libraries were developed and added to the project, like Contiki’s MQTT, so that the platform would support the MQTT IoT protocol, using Lua for its access. Another important update would come in 2015, when Devsaurus ported the u8glib library to NodeMCU, allowing it to easily control LCD, OLED and VGA type displays. Gradually, all the original developers left the project in the summer of 2015 and made way for freelancers. 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 with Arduino development boards, which allowed many users and makers to create their own projects using this platform.
As for the Pinout, it was already analyzed in the other blog article about ESP8266, but the most outstanding pins are
- Pin 0*: GPIO 16 for read/write GPIO only.
- Pin 1: GPIO 5
- Pin 2: GPIO 4
- Pint 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 (GND, Vcc), and for other signals.
The available pins may vary depending on the version or model, but those are the typical ones.
Other features of the NodeMCU
The NodeMCU is similar in price to the ESP-201, with approx. 7 Euro on Amazon, with everything you need included, so it couldn’t be easier to use. Some modules exceed 10 Euros, but integrate some additional elements, such as LCD panels, etc.
What does the development board include?
The development board NodeMCU usually includes in the kit has its microUSB port to program and power it, and serial-USB converter, the terminals I have mentioned in the section of pinout, LED and reset button integrated into the board. Of course, by including the ESP8266 SoC to have WiFi connectivity, a coil shaped antenna has also been screen printed on the PCB.
However, as there are several manufacturers, versions and models, each of them has its own philosophy and may include its own extras or have different criteria depending on the purpose for which the board has been designed. For example, as you will see below, an ESP12 chip can be replaced by an ESP12E in some models, or the CH340G instead of the CP2102 for the serial conversion, etc.
Generally, the main manufacturers of NodeMCU boards are Amica, FBlue, Lolin/Wemos, DOIT/SmartArduino, AZ-Delivery, etc. Besides the different suppliers, you will 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 less GPIO pins than the ESP12E version on which the current models are based. Now it is obsolete and you can’t buy it.
- 2nd Generation: is the version v1.0/v2.0, created by Amica, a company of the German Gerwin Janssen to improve the previous v0.9. It liked it so much that it ended up becoming the official version of NodeMCU. He started using ESP12E and with an additional row of pins for connections. Other manufacturers also ended up copying this version, using this open-hardware model as a base.
- 3rd 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 CP2102, making the USB port more robust. It is currently the best-selling model.
For the moment, these are the most important developments you should know, even if some of them are already obsolete.
What can be done with NodeMCU?
What you can do with a NodeMCU board on IoT can vary greatly, and the limit is your imagination. But here are some examples of ideas that you can implement thanks to the functions for control from the Internet, communication, etc.
- Create your own weather station with humidity and temperature sensors, etc., and be able to receive 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 automatisms, making that in front of an impulse an action is triggered, like the control of LED lights, switching of relays, activation of any type of actuator, etc.
- Create a NTP server, and other type of services for your connected devices.
- Indoor positioning systems for homes or buildings using GPS.
- Toys of all kinds, home automation, etc.
More information – Arduino Tutorials
Now you know the most important features of NodeMCU boards and you can start using in your future IoT projects together with your Arduino and similar boards…