NodeMcu V3 ESP8266 12E Development Board User Guide
NodeMCU V3 ESP8266E WiFi Development Board
This board can be used in just the same way as an Arduino - digital inputs and outputs can be programmed to react to sensors, turn things on and off and so on. The big advantage here is the built in WiFi which has excellent connectivity through its built in aerial.
It can also be used for direct control using AT commands.
It is therefore an ideal solution for controlling IoT devices, remote data sensing or logging and remote switching both in domestic and industrial products.
Scroll down for information on connections, using with Arduino and reflashing the firmware if you want to go back to using AT commands - also a sample arduino sketch to get started.
CLICK HERE TO PURCHASE NODEMCU V3
CONNECTIONS
Connection to a computer is easy, using a Micro USB cable (the same as on most mobile phones). Most will connect immediately - if this doesn't happen, search for CH340 drivers.
Power In and Out
The USB socket can supply power to programme the board and for running simple sketches. In a fixed product or circuit, power is supplied via the Vin pin and can range between 5v to 12v.
Note: the Vin pin is connected to the input of the voltage regulator to power the board - it is a power input only and cannot be used as a power output.
5 volts
There are no regulated 5v power out pins on this board but Pin VV connects directly to the USB power input, so depending on your supply, you will get approximately 5v from this pin.
3 volts
There are 3 power out pins on the board, supplying 3.3v from the voltage regulator labelled 3v
Ground
There are 5 ground pins labelled G
Data Pins
There are 12 available Data/GPIO pins available using 3.3v logic level.
If you are programming (eg in Arduino sketches) the number of the data pin in the programme will be different to the labelling on the board. Here is a chart of the data pin labels:
Data Pin | Board Pin |
0 | D3 |
1 | D10 (TX) |
2 | D4 |
3 | D9 (RX) |
4 | D2 |
5 | D1 |
9 | S3 |
12 | D6 |
13 | D7 |
14 | D5 |
15 | D8 |
16 | D0 |
SPI and I2C interfaces are also available:
Pin | Board Label |
SPI | |
MOSI | S1 |
CS | SC |
MISO | SO |
CLK | SK |
I2C | |
SCL | D3 |
SDA | D4 |
USING NODEMCU V3 WITH ARDUINO
Libraries and information for connection to the Arduino IDE are available on GitHub.
This is how to set up your installation to include NodeMCU in your Arduino sketches:
Go to your Arduino IDE and choose File>Preferences
Where it says Additional Board Manager URLs copy and paste this link:
https://arduino.esp8266.com/stable/package_esp8266com_index.json
Click OK
Then go to Tools>Board>Board Manager and scroll down to find ESP8266
Check you have found the latest version and click Install
When everything has finished installing, you should find a variety of options for ESP8266 in the Arduino Board menu.
Choose your com port and then the board - NodeMCU 1.0 (ESP8266E Module)
The connection speed of 115200 should be fine, and you should now be able to connect to your NodeMCU V3 board
It's a good idea to try something simple first, such as a Blink sketch to make sure everything is working and that your connection/data transfer is working. Note: the LED_BUILTIN function on the ESP8266 is inverted - on when LOW and off when HIGH. Here's an example to copy and paste:
#define LED_BUILTIN 2
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
digitalWrite(LED_BUILTIN, HIGH);
delay(2000);
}
WiFi
The next step is to look in the 'examples' sketches which will have been installed when you downloaded the arduino libraries. WiFi Scan is a good one to try first - upload the sketch, open the Serial Monitor and the NodeMCU will display a list of nearby networks. It has a sensitive antenna and I found in my tests that it discovered several local networks in nearby properties.
You can then modify these sketches and adapt them to your own use. This can include displaying information such as temperature, humidity, switching status and so on via web pages on a computer or phone.
CLICK HERE TO PURCHASE NODEMCU V3
USING NODEMCU V3 WITH AT COMMANDS
If you connect your NodeMCU to your computer via USB and then open the Arduino Serial Monitor (it doesn't matter about the sketch that is open, as long as you do not upload it) then you can communicate with it directly using AT commands.
If you have already uploaded an Arduino sketch to your board, then you will need to re-flash the firmware to do this.
Basic AT Commands
Sending AT should get the response of:
OK
Then try AT+GMR
This should be followed by a summary of information about the installed firmware.
AT+CWMODE=1
will set the WiFi board into 'station' mode
Now try AT+CWLAP
A list of nearby WiFi access points will appear in serial monitor.
Espressif offers a detailed document on AT commands for their modules here:
https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf
and a shorter document of examples here:
https://www.espressif.com/sites/default/files/documentation/4b-esp8266_at_command_examples_en.pdf
If you find you cannot access the AT command set (perhaps because you have previously used the board with Arduino IDE or other software) then you will need to re-flash the firmware.
Flashing the Firmware
A firmware flashing tool is available from GitHub here:
https://github.com/nodemcu/nodemcu-flasher
Download the tool, click on it and it will run without installation.
You will need a firmware bin file to flash to it - that can be found by searching online.
Here is a link to the GitHub NodeMcu Firmware:
https://github.com/nodemcu/nodemcu-firmware
Connect your board and choose the COM Port.
In the Config tab, click the file logo (cogwheel) and navigate to your firmware bin.
In the Advanced tab choose:
Baudrate 9600
Flash size 4MByte
Flashspeed 40MHz
SPI Mode DIO
When you're ready, go back to the Operation tab and click Flash.
A progress bar will appear and will slowly upload the firmware to your board.
This really is slow - it may take several minutes.
When finished, the board will be reset and you will be able to use it with AT Commands.