5

members

Easy Basics: Project 086f ESP8266 ESP-12E module, RF 315/330/433 MHz XD-RF-5V Receiver - LED control

of Acoptex.com in ESP8266 ESP-12

Basics: Project 086f

Project name: ESP8266 ESP-12E module, RF 315/330/433 MHz XD-RF-5V Receiver - LED control

Tags: Arduino, Arduino IDE, ESP8266 ESP-12E module, ESP, ESP8266, WI FI module, ESP-12E, LoLin NODEMCU V3, NODEMCU, RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver, way to communicate between ESP8266 ESP-12E, ESP8266 ESP-12E 433 RF, NODEMCU 433 RF

Attachments: library1receiversketch

In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):

1.ESP8266 ESP-12E module with micro USB cable 1 pc

2. Jumper cables F-M, F-F

3. Breadboard 1 pc

4. LED 1 pc

5. Resistor 220 Ohm 1 pc

6. RF 315/330/433 MHz XD-RF-5V Receiver module 1 pc

7. 433 Mhz RF remote control SCT2260 chipset 1 pc

8. Battery 12V 24A for remote control 1 pc 

9. Arduino IDE (you can download it here)

General

We will learn how to use ESP8266 ESP-12E module and 433 MHZ RF Receiver module to control LED with remote control (433 MHZ RF Transmitter). 

Understanding the ESP8266 ESP-12E WI FI module (LoLin NODEMCU V3)

You can read more about it here.

Understanding the RF 315/330/433 MHz XD-RF-5V Receiver

You can read more about it here and here.

Understanding the 433 Mhz RF remote control SCT2260 chipset universal

You can read about it here.

Signals and connections of the RF 315/330/433 MHz XD-RF-5V Receiver

Transmitter (TX) pins:
ATAD (DATA) - output signal coded by first Arduino board
GND - should be connected to ground , (-) of power supply
VCC - should be connected to power supply +3V - +12V
Receiver (RX) pins:
DATA - there are two pins, it doesn't matter which one to connect to second Arduino board, as long as you use only one of the DATA pins.
GND - should be connected to second Arduino board ground pin
VCC - should be connected to second Arduino board 5V pin.

Receiver (RX) pins:

DATA - there are two pins, it doesn't matter which one to connect to second Arduino board, as long as you use only one of the DATA pins.

GND - should be connected to second Arduino board ground pin

VCC - should be connected to second Arduino board 5V pin.

Signals and connections of the ESP8266 ESP-12E WI FI module (LoLin NODEMCU V3)

TX - transmit pin. GPIO pin

RX  - receive pin.  GPIO pin

3V3 (or 3V or 3.3V) - power supply pin (3-3.6V). 

GND ( or G) - ground pin.

RST - reset pin. Keep it on high (3.3V) for normal operation. Put it on 0V to reset the chip.

EN - Chip enable. Keep it on high (3.3V) for normal operation.

Vin - External power supply 5VDC.

D0-D8 - GPIO (General Purpose Input Output) pins 

D5-D8 - SPI interface

D1-D2– I²C/TWI Interface

SC (or CMD) - (Chip Select) - the pin that the master can use to enable and disable specific devices. GPIO pin

SO (or SDO) - Master In Slave Out (MISO) - SPI communication. The Slave line for sending data to the master. GPIO pin

SK (or CLK) - SCK (Serial Clock) - SPI communication.The clock pulses which synchronize data transmission generated by the master. GPIO pin

S1 (or SD1) - Master Out/Slave In (MOSI). SPI communication. The Master line for sending data to the peripherals. GPIO pin

S2 (or SD2) - GPIO pin

S3 (or SD3) - GPIO pin

VU (or VUSB) - external power 5VDC.

A0 - ADC output.

RSV - reserved

Wiring

433MHz RF Receiver Nodemcu 1.0

GND                 G (GND)

VCC                 VU (5V)

                       D1 (GPIO 5) connected to LED+

                       G (GND) connected to LED-

DATA IN           D3 (GPIO 0)

Step by Step instruction

1. Adding ESP8266 platform to Arduino IDE

The Arduino environment has to be set up to make it compatible with the ESP8266 ESP-12E module. We are using PC with Windows 7 64 bit OS.

  1. Download and install the Arduino IDE. You can download it here 
  2. Open Arduino IDE. 
  3. Open the Preferences window from the Arduino IDE. Go to File -> Preferences.
  4. Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field and click the “OK” button. If you already have a URL in there, and want to keep it, you can separate multiple URLs by placing a comma between them. (Arduino 1.6.5 added an expanded text box, separate links in here by line.)
  5. Open Boards manager. Go to Tools -> Board -> Boards Manager…

  6. There should be a couple new entries in addition to the standard Arduino boards. Look for esp8266. or scroll down to the ESP8266 entry (usually at the bottom). Select the ESP8266 entry. When you click it an install option will appear. Select the latest version and click install
  7. The board definitions and tools for the ESP8266 include a whole new set of gcc, g++, and other reasonably large, compiled binaries, so it may take a few minutes to download and install (the archived file is ~110MB). Once the installation has completed, an Arduino-blue “INSTALLED” will appear next to the entry.

2. Uploading sketch to ESP8266 ESP-12E development board

If you’re using an ESP-12E NodeMCU Kit, uploading the sketch is very simple, since it has built-in programmer. 

Before use ESP8266 ESP-12E WI FI module (LoLin NODEMCU V3), you need to download the manufacture's driver (CH340)  for this chip and install it in your PC. Here is the link. See the description of driver installation package below: CH340 / CH341 USB to serial WINDOWS driver installation package that supports 32/64 bit Windows 10 / 8.1 / 8/7 / VISTA / XP, SERVER 2016/2012/2008/2003, 2000 / ME / 98, through Microsoft digital signature authentication, support USB to 3-wire and 9-wire serial port, with the product release To the end user. Applicable scope: CH340G, CH340C, CH340B, CH340E, CH340T, CH340R, CH341A, CH341T, CH341H chips.

If you have CP2102 chip then  you need to download the manufacture's driver for this chip and install it in your PC. Driver for MacWindowsLinux or more.. 

  1. Do wiring for 433 MHZ RF Receiver.
  2. Open Arduino IDE.
  3. Plug your ESP8266 ESP-12E module into your PC USB port.
  4. Choose your NodeMCU board. Go to Tools -> Board -> NodeMCU 1.0 (ESP-12E Module)
  5. Select the correct com port.
  6. Compile and upload receiversketch to your ESP8266 ESP-12E module connected to 433 RF receiver. 
  7. Open the Serial Monitor at a baud rate of 9600 (we had port COM8). 
  8. When you use 433 RF Transmitter (remote control) you will get the message that it is bad code and it will print your transmitted code in Serial monitor. Let's check the code for remote control buttons A and B (we have 13954628 (A) and 13954625 (B)).
  9. Modify the receiversketch with your codes (we have 13954628 (A) and 13954625 (B)and upload to your ESP8266 ESP-12E module connected to 433 RF receiver.

  10. You can turn ON the LED with button A and turn OFF the LED with button B of you remote control.

Code

Its very simple. We used a decimal code 24 bits in this project.

Summary

We have learnt how to use ESP8266 ESP-12E module and 433 MHZ RF Receiver module to control LED with remote control (433 MHZ RF Transmitter). 

Libraries

  • All libraries attached on the begining of this project description.
  • RCSwitch library included. Download, unzip  and add to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC. You can read more about it here.

Sketch

  • See on the begining of this project


Other projects of Acoptex.com
Medium Basics: Project 083w Sipeed Maixduino board - Using PlatformIO IDE of Acoptex.com in Sipeed Maixduino 08-08-2019
Medium Basics: Project 083e Sipeed Maixduino board - Uploading MaixPy of Acoptex.com in Sipeed Maixduino 04-08-2019
Medium Basics: Project 083f Sipeed Maixduino board - Using MycroPython of Acoptex.com in Sipeed Maixduino 04-08-2019

Published at 22-07-2019
Viewed: 17682 times