How to design a Wireless Blind Stick using nRF24L01 Module?

by Apr 19, 2021Projects

Introduction

Let’s learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic sensor, transceiver module. Furthermore, in the receiver part, we have an Arduino Nano microcontroller, Buzzer, transceiver module. Additionally, both are powered using a 7805 voltage regulator from a Battery. Thus we can monitor for objects present in front of blind stick and alert wirelessly.

Hardware Requirements

  1. Arduino nano Microcontroller
  2. Ultrasonic sensor
  3. Buzzer
  4. 7805 Voltage regulator IC
  5. nRF24L01 transceiver modules
  6. 9V Battery
  7. PCB

Software Requirements

  1. Arduino IDE

Design of Voltage Regulator

Firstly, it’s necessary to start with designing a voltage regulator. Since we make use of a 9V battery but the requirement is 5V, thus it is necessary to regulate the voltage to 5V. For this reason, we make use of 7805 IC, which regulates the output voltage to 5V. Thus circuit has to be rigged up as shown in the below figure.

Circuit of Voltage regulator

Circuit Diagram for Transmitter part

Secondly, we design a transmitter circuit consisting of an Arduino nano microcontroller, nrf24l01 module. Thus the ultrasonic sensor continuously monitors if there is any object in front of the stick. As a result of object detection, immediately a signal is sent to the Receiver section using the nrf24l01 module.

Circuit of Transmitter part
ARDUINO PINS
pin 2Ultrasonic sensor(Trig pin)
pin3Ultrasonic sensor(Echo pin)
Pin 7nrf(CE)
Pin 8nrf(CS)
Pin 13nrf(SCK)
Pin 11nrf(MOSI)
Pin 12nrf(MISO)
3.3vvcc(nrf)
gndgnd(nrf)
Pin Configuration

Circuit Diagram for Receiver part

Finally, we design the receiver part consisting of an Arduino nano microcontroller, Nrf24L01module, and a Buzzer. Thus, if any signal is received, immediately buzzer beeps alerting the person. Hence indicating an object is found in front of the stick.

ARDUINO PINS
pin 2Buzzer
Pin 7nrf(CE)
Pin 8nrf(CS)
Pin 13nrf(SCK)
Pin 11nrf(MOSI)
Pin 12nrf(MISO)
3.3Vvcc(nrf)
gndgnd(nrf)
Pin Configuration

Working part of Transmitter section

Flowchart for transmitter section, monitoring for any object using Ultrasonic sensor

As shown in the flow chart, Initially the power is supplied to the components and microcontroller. Therefore the ultrasonic sensor continuously monitors for any object present within a certain limit. If the object is found then it immediately sends a signal to the receiver part, hence alerting about the danger. While if there is no object found then the ultrasonic sensor keeps monitoring.

Working part of Receiver section

Flowchart of Receiver section, alerting when an object is found

As discussed earlier again we provide power to all components of the receiver section as well. However, in the receiver part, the Nrf module keeps monitoring for incoming signals. As a result of receiving a signal from the transmitter, immediately buzzer starts beeping alerting the person about the object present in front of the stick.

Code for Transmitter part

Finally, we have to design two codes for transmitter and receiver separately. Thus, the below code sets the nRF24L01 module as transmitter and we calculate the distance for object detection using an ultrasonic sensor.

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7,8); // CE, CSN
const byte addresses [6] = {"00001"};  //Setting the two addresses. One for transmitting and one for receiving

int trigpin = 2;
int echopin = 3;
long duration;
int distance;

void setup() 
{
  pinMode(trigpin, OUTPUT);
  pinMode(echopin, INPUT);
  Serial.begin(9600);
  radio.begin();                           //Starting the radio communication
  radio.openWritingPipe(addresses);     //Setting the address at which we will send the data
  radio.stopListening();
}
void loop() 
{  
  digitalWrite(trigpin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigpin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigpin, LOW);
  duration = pulseIn(echopin, HIGH);
  distance = duration * 0.0343 / 2;//distance will be in cm
  if(distance<30)
  {
  radio.write(&distance, sizeof(distance));  //Sending the data
  delay(10); 
  }
}

Code for Receiver part

Similarly, the below code sets nRF24L01 as the receiver and keeps monitoring for the incoming signal. Once the signal is received immediately buzzer beeps alerting the person and stops beeping once object moves away.

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7,8); // CE, CSN
const byte addresses [6] = {"00001"};    //Setting the two addresses. One for transmitting and one for receiving

int distance=0;
int buzz=2;

void setup() 
{
  pinMode(buzz,OUTPUT);
  Serial.begin(9600);
  radio.begin();                            //Starting the radio communication
  radio.openReadingPipe(1, addresses);   //Setting the address at which we will receive the data
  radio.startListening();                 //This sets the module as receiver
}

void loop() 
{
   distance=0;                   
  if (radio.available())                     //Looking for incoming data
  {
    while(radio.available())
    {
    radio.read(&distance, sizeof(distance));
    Serial.println(distance) ; 
    if(distance<25)
    {
      digitalWrite(buzz,HIGH);//Buzzer beeps
      delay(50);
      digitalWrite(buzz,LOW);
      delay(50);
    }
    }
  }
  delay(10);
  }

Result

Transmitter part with object detection
Receiver part with alertness

Summary

Thus, the transmitter and receiver are working as expected without any delay. In conclusion, the designed wireless blind stick is found to be simple with the object detection part and alertness part. In addition to it, we can notice that latency between transmitter and receiver is absent. Thus making it to be alternative for RF transmitter and RF receiver

Creating a multiplication Skill in Alexa using python

Written By Monisha Macharla

Hi, I'm Monisha. I am a tech blogger and a hobbyist. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning!

RELATED POSTS

How to Simulate IoT projects using Cisco Packet Tracer

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

How to implement Machine Learning on IoT based Data?

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....

How to build a Safety Monitoring System for COVID-19

How to build a Safety Monitoring System for COVID-19

It is expected that the world will need to battle the COVID-19 pandemic with precautious measures until an effective vaccine is developed. This project proposes a real-time safety monitoring system for COVID-19. The proposed system would employ an Internet of Things...

Air Quality Monitoring using NodeMCU and MQ2 Sensor – IoT

Air Quality Monitoring using NodeMCU and MQ2 Sensor – IoT

There have been many incidents like explosions and fire due to certain gases leakage. Such incidents can cause dangerous effects if the leakage is not detected at an early stage. Therefore, Measurement and control of these types of toxic gases present in the...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....