Warning: Declaration of Db::query($query) should be compatible with mysqli::query($query, $resultmode = NULL) in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 29

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/u1300519/data/www/acoptex.com/_lib/CacheLite/Lite.php on line 757

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/u1300519/data/www/acoptex.com/_lib/CacheLite/Lite.php on line 757

Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 64

Warning: mysqli_fetch_array() expects parameter 2 to be int, string given in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 64

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/u1300519/data/www/acoptex.com/_lib/CacheLite/Lite.php on line 757

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/u1300519/data/www/acoptex.com/_lib/CacheLite/Lite.php on line 757

Warning: Cannot modify header information - headers already sent by (output started at /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php:0) in /var/www/u1300519/data/www/acoptex.com/_config/config.php on line 168

Warning: session_start(): Cannot start session when headers already sent in /var/www/u1300519/data/www/acoptex.com/_config/config.php on line 169

Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 92

Warning: mysqli_fetch_array() expects parameter 2 to be int, string given in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 92

Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 64

Warning: mysqli_fetch_array() expects parameter 2 to be int, string given in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 64
jobs.html_title
1

member

Easy Basics: Project 086e ESP8266 ESP-12E module, RF 315/330/433 MHz XD-FST/XD-RF-5V Transmitter/Receiver

of Acoptex.com in ESP8266 ESP-12

Basics: Project 086e

Project name: ESP8266 ESP-12E module, RF 315/330/433 MHz XD-FST/XD-RF-5V Transmitter/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: library1transmittersketch, receiversketch

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 2 pcs

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-FST / XD-RF-5V Transmitter / Receiver module 1 pc

General

We will learn how to use ESP8266 ESP-12E module with RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver module to control LED. 

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-FST / XD-RF-5V Transmitter / Receiver

433MHz RF Transmitter

This very little transmitter is quite simple. The heart of the module is the SAW resonator which is tuned for 433.xx MHz operation. There is a switching transistor and a few passive components too.

When a logic HIGH is applied to the DATA input, the oscillator runs producing a constant RF output carrier wave at 433.xx MHz and when the DATA input is taken to logic LOW, the oscillator stops. This technique is known as Amplitude Shift Keying.

433MHz RF Receiver

It is a simple receiver module which consists of a RF tuned circuit and a couple of OP Amps to amplify the received carrier wave from the transmitter. The amplified signal is further fed to a PLL (Phase Lock Loop) which enables the decoder to "lock" onto a stream of digital bits which gives better decoded output and noise immunity.

Amplitude Shift Keying (ASK)

For sending the digital data over radio, these modules use a technique called Amplitude Shift Keying or ASK. In Amplitude Shift Keying the amplitude (i.e. the level) of the carrier wave (in our case it’s a 433MHz signal) is changed in response to the incoming data signal.

This is very similar to the analog technique of amplitude modulation which you might be familiar with if you’re familiar with AM radio. It’s sometimes called binary amplitude shift keying because there are only two levels we are concerned with. You can think of it as an ON/OFF switch.

For Digital 1 – This drives the carrier at full strength.

For Digital 0 – This cuts the carrier off completely. This is how the Amplitude modulation looks like:

Amplitude Shift keying has the advantage of being very simple to implement. It is quite simple to design the decoder circuitry. Also ASK needs less bandwidth than other modulation techniques like FSK (Frequency Shift Keying). This is one of the reasons for being inexpensive.

The disadvantage however is that ASK is susceptible to interference from other radio devices and background noise.  But as long as you keep your data transmission to a relatively slow speed it can work reliably in most environments.

You can read more about them here.

Signals and connections of the RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / 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.

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.

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 Transmitter  Nodemcu 1.0

GND                 G (GND)

VCC                  VU (5V)

DATA OUT         D2 (GPIO 4)

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 RF Ttransmitter and 433 RF Receiver.
  2. If you want to be able to monitor both ports in this project you will need to install Arduino IDE and download a portable version of Arduino IDE (download zip file and unzip it in directory Portable). You will be able to upload transmitter and receiver sketches same time and monitor different ports.
  3. Open Arduino IDE.
  4. Plug your ESP8266 ESP-12E module into your PC USB port.
  5. Choose your NodeMCU board. Go to Tools -> Board -> NodeMCU 1.0 (ESP-12E Module)
  6. Select the correct com port.
  7. Compile and upload the transmittersketch to your ESP8266 ESP-12E module connected to 433 RF Transmitter.
  8. Compile and upload receiversketch to your ESP8266 ESP-12E module connected to 433 RF receiver. 
  9. Open the Serial Monitor at a baud rate of 9600 (we had port COM8). 
  10. If you use another REMOTE (433 RF Transmitter) you will get the message that it is bad code and it will print your transmitted code in Serial monitor.
  11. You will see that the LED turns ON/OFF every 3 seconds.

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 with RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver module to control LED. 

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

jobs.published_at
jobs.viewed