[Electronic clinic] I have been using the NodeMCU ESP8266 module for quite a while in various Arduino-based and IoT-related projects. here you will learn how to use the NodeMCU with the GSM SIM900 module together in advanced-level projects. The PCB used in this project is sponsored by PCBWay, a professional PCB manufacturing company. You can try their services at very low prices: only $5 for 10 PCBs and $30 for a total of 20 PCBs, including assembly. Additionally, new members receive a $5 bonus. The Gerber files for the NodeMCU ESP8266 breakout board can be downloaded from PCBWay’s official website, with a link provided in the description.
The main advantage of using the NodeMCU with the GSM module is that if you have an internet connection and the NodeMCU is connected via Wi-Fi, you can monitor sensor data in real-time from anywhere around the world using the Blink application or any other IoT platform. You will also be able to receive alert messages via the GSM network. In situations where the internet is unavailable, you won’t be able to monitor the data in real-time, but you will still receive alert messages via the GSM network each time the sensor crosses a predefined threshold.
For demonstration purposes, I have connected a variable resistor and a push button. You can use any type of analog or digital sensor for this project.
This is the GSM SIM900 module. The first thing you’ll notice is that it lacks an onboard voltage regulator, so be careful when applying voltage, as exceeding 5V can easily damage the module. The idle voltage for this GSM module is 4.7V, but you can power the GSM SIM900 module with a 5V adapter. If you don’t have a 5V adapter, you can create your own power supply using an LM317T adjustable voltage regulator.
There are a few things I really like about the GSM SIM900 module It is one of the cheapest GSM modules available on the market. It can easily be interfaced with 5V-supported controller boards like Arduino Uno, Arduino Mega, Arduino Nano, etc., as well as with 3.3V control boards like the NodeMCU, ESP8266, and ESP32.
The external 5V regulated power supply connects to the GSM module. The module has a total of nine main pins, with three pins unconnected. Pin 1 and Pin 2 are the 5V and ground pins, which will remain unconnected as I will use an external power supply. Pin 3 is the 5V TXD, and Pin 4 is the 5V RXD. Pin 5 is the 3.3V TXD, and Pin 6 is the 3.3V RXD. The NodeMCU is based on a 3.3V controller, so we will use the 3.3V TXD and RXD pins for communication with the GSM SIM900 module.
The power supply is based on the voltage regulator IC of LM7805. A 12V adapter or solar panel is connected to the regulator, and capacitors (470µF) are placed at the input and output. A 330Ω resistor is connected in series with a 2.5V LED as a current-limiting resistor. The regulated output is connected to the NodeMCU ESP8266 Wi-Fi module, and the ground is connected to the ground of both the NodeMCU and GSM modules.
The 3.3V TXD and RXD pins of the GSM SIM900 module are connected to the corresponding pins of the NodeMCU. The ground pin of the GSM SIM900 module is connected to the NodeMCU’s ground.
As I explained earlier, the recommended voltage for the GSM module is 4.7V-5V. The wiper of the potentiometer (variable resistor) is connected to the A0 pin of the NodeMCU, and the other two legs are connected to the 3.3V and ground pins of the NodeMCU. A push button is connected in series with a 10K pull-up resistor. A wire from the middle of the resistor and button connects to the digital pin D0 on the NodeMCU. When the switch is open, 3.3V is given as input to the digital pin; when the switch is closed, ground is applied instead.
Instead of a push button, you could use other sensors such as an IR sensor or a smoke sensor. That’s a brief overview of the circuit diagram.
Finally, I connected everything as per the circuit diagram. Now, let’s proceed to create the Blink application. Before you start programming, make sure to download all the necessary libraries from my website, electronically.net.com. The links are available in the description. A variable resistor is connected to analog pin A0, and the push button is connected to digital pin D0. The rest of the instructions are similar to those used in my previous IoT and GSM projects, where I simply combined the two codes.



