Loading Items

About This Project

Have you ever thought of transmitting data without using Bluetooth and WiFi means ? This question might come in your mind that is it possible to get data with other means?  My answer is Yes it is possible to transmit data from one side to the other side by using radio frequency. Radio frequency data has more coverage range then other Bluetooth module. Anyone with little knowledge can deal with radio frequency. In this tutorial i am going to make a wireless transmission project for transmitting the data of temperature sensor under low power condition using radio frequency module.
Request Access

Project Info

Skills

No skills have been added

Meet The Makers

Join Team
  • gul janjua
    • User:gul janjua
    • Rank:Master Apprentice
    • Projects:4
    • Joined:2016

No Comments yet. Why don't you add one?

.How is this going to work?

This project will be using a wireless transmission of temperature sensor data under low power condition using radio frequency to your PC. The project is divided into 2 parts. The Transmitter portion as well as the receiver portion First, I am going to read the temperature sensor data on the transmitter end. Then using the radio frequency module I will be transmitting the data to the radio frequency module at the receiver end. Then receiver will transmit the data to the PC via serial communication. This project is quite simple, and can be easily modified to become very useful.


.What we are going to use?

In this project, with little modifications, you can transmit the data of any sensor of your choice. I am transmitting the data of a temperature sensor. The parts needed for this project are as follows:

.1. nRF24L01

nRF24L01 is a 2.4GHz Radio frequency ( RF) transceiver. It can act as either a receiver or a transmitter. It is a ultra low power ( ULP ) transmitter and receiver. It can run on coin cell batteries for months (or even years!). Other important features of the NRF24L01 are:

  • 1 MBPs and 2MBPs on-air data rate.
  • Low cost single transceiver
  • Compatible with other nRf24E and nRF240 series module
nRF24 has many applications like it can be used in gaming , sport and fitness, toys and also in consumer electronics.

.2. LM35

LM35 is a small integrated temperature sensor. It is used in power supplies , HVAC, and battery management applications. In this project i am using this sensor for measuring the outdoor temperature. Its output voltage is linearly proportional to the centigrade temperature, and it is suited for remote applications. It is a 3 pin IC, and very portable to use with arduino.

.Connections

.1. Transmitter

Connections of transmitter ends are quite simple. Just connect nRf24 and Lm35 with the Arduino as follows:

nRF24L01 -> Arduino

+Ve -> 3V3
-Ve -> GND
3 -> D7
4 -> D8
5 -> D13 (CS)
6 -> D11 (MOSI)
7 -> D12 (MISO)

LM35 -> Arduino

+Ve -> 5V
GND -> GND
Vo -> A0


.2. Receiver

nRF24L01 -> Arduino

+Ve -> 3V3
-Ve -> GND
3 -> D7
4 -> D8
5 -> D13 (CS)
6 -> D11 (MOSI)
7 -> D12 (MISO)

.Software

Similar to hardware, the software portion also needs to be broken into two sections. One for transmitter, and the other for the receiver. The transmitter portion will receive data from the Lm35 and send the data through nRf24. nRF24 at the receiver end will receive the data and display it on the serial monitor.

Transmitter code


#include <SPI.h>
#include "RF24.h"

RF24 myRadio (7, 8);
byte addresses[][6] = {"0"};

struct package
{
  float temperature_C = 0.0;
  float temperature_F = 0.0;
};

typedef struct package Package;
Package data;

void setup() {
  Serial.begin(115200);
  Serial.print("Starting BME280");
  //Calling .begin() causes the settings to be loaded


  myRadio.begin();
  myRadio.setChannel(115);
  myRadio.setPALevel(RF24_PA_MAX);
  myRadio.setDataRate( RF24_250KBPS ) ;
  myRadio.openWritingPipe( addresses[0]);
  Serial.println("Temp_C\t\tTemp_F");
  delay(1000);
}

void loop() {
  int temp_val = analogRead(A0);
  float val = (temp_val / 1024) * 5000;
  data.temperature_C = val / 10;
  data.temperature_F = (data.temperature_C * 9) / 5 + 32;
  myRadio.write(&data, sizeof(data));
  Serial.print( data.temperature_C);
  Serial.print(" *C\t");
  Serial.print(data.temperature_F);
  Serial.println(" *F\t");
  delay(1000);
}

Receiver Code


#include <SPI.h>
#include "RF24.h"

RF24 myRadio (7, 8);
struct package
{
  float temperature_C = 0.0;
  float temperature_F = 0.0;
};

byte addresses[][6] = {"0"};
typedef struct package Package;
Package data;

void setup() {
  Serial.begin(115200);
  delay(1000);
  myRadio.begin();
  myRadio.setChannel(115);
  myRadio.setPALevel(RF24_PA_MAX);
  myRadio.setDataRate( RF24_250KBPS ) ;
  myRadio.openReadingPipe(1, addresses[0]);
  myRadio.startListening();
  Serial.println("Temp_C\t\tTemp_F");
}

void loop() {
  if ( myRadio.available())
  {
    while (myRadio.available())
    {
      myRadio.read( &data, sizeof(data) );
    }
    Serial.print(data.temperature_C); Serial.print(" *C\t");
    Serial.print(data.temperature_F); Serial.println(" *F\t");
  }

}

.Testing our work



.For Outdoor Use:

You can enclose this package in any airtight box for outside use to save circuit from rain and rust. I also used an air tight box to enclose the circuit:


  Details Downloads Size Get it

Transmitter Code

Last updated on 12/05/2016

by gul janjua

279 924b

Receiver Code

Last updated on 12/05/2016

by gul janjua

298 772b
Qty   Item Where to Find Est. Cost More Info
2 Arduino Uno

Arduino Uno

$16.06 3 links  
1 LM35 Temperature Sensor Item Number: TI LM35

LM35 Temperature Sensor

Item #: TI LM35

High accuracy solid state

$2.69 2 files  
 
Pinout

Pinout

Updated 12/05/2016 by swym_admin
Datasheet

Datasheet

Updated 12/05/2016 by swym_admin
2 nrf24l01 -  Ultra Low Power Wireless Module Item Number: nrf24l01

nrf24l01 - Ultra Low Power Wireless Module

Item #: nrf24l01

$5 1 link