members
Basics: Project 086h Arduino Uno, RF 315/330/433 MHz XD-FST/XD-RF-5V Transmitter/Receiver - LM35 tem
of Acoptex.com in UNO
Basics: Project 086h
Project name: Arduino Uno, RF 315/330/433 MHz XD-FST/XD-RF-5V Transmitter/Receiver - LM35 temperature
Tags: Arduino, Arduino Uno, RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver, way to communicate between, VirtualWire, Virtual Wire, LM35, LM35 temperature sensor, 433 MHZ RF communication between Arduino boards, transmitting and receiving the sensor data
Attachments: receiversketch, transmittersketch, library
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.Arduino Uno R3 (you can also use the other version of Arduino) 2 pcs
2. Arduino IDE ( you can download it from here )
3.Jumper cables F-M, M-M
4. LM35 sensor 1 pc
5. Resistor 1 KOhm 1 pc
6. RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver module 1 pc
7. Breadboard 1 pc
General
We will learn how to use Arduino board (UNO) with RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver module and VirtualWire library to establish communication on 433 MHZ RF, send and receive the LM35 temperature sensor data.
This project targets:
- Establish 433 MHZ RF communication between two Arduino Uno boards;
- Read the temperature from LM35 sensor connected to Arduino Uno #1 board and display in Serial monitor;
- Send temperature from LM35 sensor to another Arduino Uno #2 board;
- Print received temperature in Serial Monitor of Arduino Uno #2 board.
Understanding the LM35 sensor
LM35 is a precision IC temperature sensor with its output proportional to the temperature (in oC). The sensor circuitry is sealed and therefore it is not subjected to oxidation and other processes. With LM35, temperature can be measured more accurately than with a thermistor. It also possess low self heating and does not cause more than 0.1 oC temperature rise in still air.
The operating temperature range is from -55°C to 150°C. The output voltage varies by 10mV in response to every oC rise/fall in ambient temperature, i.e., its scale factor is 0.01V/ oC.
You can find the datasheet 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 LM35 sensor.
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.
Wiring
433MHz RF Transmitter Arduino Uno
GND GND
VCC 5V
DATA OUT D11
A0 connected to LM35 sensor data pin
GND connected to LM35 sensor GND pin
5V connected to LM35 sensor power supply pin
433MHz RF Receiver Arduino Uno
GND GND
VCC 5V
DATA IN D12
Step by Step instruction
- Do wiring for 433 RF Ttransmitter and 433 RF Receiver.
- 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.
- Open Arduino IDE.
- Plug your Adruino Uno board with 433 MHZ RF transmitter into your PC USB port.
- Select the correct board and com port.
- Compile and upload the transmittersketch to your Adruino Uno board with 433 MHZ RF transmitter.
- Open Arduino IDE portable version.
- Plug your Adruino Uno board with 433 MHZ RF receiver into your PC USB port.
- Select the correct board and com port.
- Compile and upload receiversketch to your your Adruino Uno board with 433 MHZ RF receiver.
- Open the Serial Monitor at a baud rate of 9600 (we had ports COM5 and COM8). You will see the same sensor data dispalyed. It means that 433 mhz RF communication has been established successfully.
Code
We will write two different codes for this project. One of the codes is to control the transmitter and the other to control the receiver. We will use the VirtualWire library, to send and receive data.
The algorithm behind the code is simple. For the transmitter, obtain the temperature in Celsius and temperature in Fahrenheit values from the LM35 temperature sensor, send via the RF transmitter to the receiver and display in Serial Monitor. For the receiver, obtain the temperature in Celsius and temperature in Fahrenheit values sent by the transmitter using the RF Receiver module and display in Serial Monitor.
Transmitter code
We start by including the VirtualWire library. After this, we declare the pin of the Arduino Uno #1 to which our LM35 sensor is connected. Next, we indicate the pin of the Arduino Uno #1 which will be used as our data transmission pin (which is connected to the data pin of the RF transmitter module) and create a struct package which will be used for sending the data. Next, we define the type for the package.
In void setup() function where we set the TX pin and other parameters to initialize the RF module.
In the void loop() function where we obtain the temperature in Celsius and temperature in Fahrenheit and display it in the Serial Monitor using the read sensor function. After obtaining, the data sent using the vw_send() function. A 2 seconds delay time is implemented to create an interval between the data and ensure one is sent before the other.
Receiver code
We start by including the VirtualWire library. Then, we declare the pin (receive_pin) of the Arduino Uno #2 to which the data pin of the RF receiver module is connected and create char variables to hold the temperatureC and temperatureF values.
We create a struct package similar to the one within the transmitter code. Next, we define the type for the package.
In the void setup() function where we initialize the RF receiver module setting the bit rate and starting the receiver PLL.
In the void loop() function we start by checking if a message has been received using the vw_have_message() function. If a message was received, we extract the temperature in Celsius and temperature in Fahrenheit data from it and display it in the Serial Monitor.
Summary
We learnt how to use Arduino board (UNO) with RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver module and VirtualWire library to establish communication on 433 MHZ RF, send and receive the LM35 temperature sensor data.
Libraries:
- All libraries attached on the begining of this project description.
- VirtualWire library included.
VirtualWire is an Arduino library that provides features to send short messages, without addressing, retransmit or acknowledgment, a bit like UDP over wireless, using ASK (amplitude shift keying). Supports a number of inexpensive radio transmitters and receivers.This library allow You to send and receive data"byte" and string easilyVirtualWire is an Arduino library that provides features to send short messages, without addressing, retransmit or acknowledgment, a bit like UDP over wireless, using ASK (amplitude shift keying). Supports a number of inexpensive radio transmitters and receivers.
This library allow You to send and receive data"byte" and string easily. 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 attachment on the begining of this project
Other projects of Acoptex.com










Viewed: 3552 times