Ultrasonic Distance Measurement NRF905 Wireless Transmission System Based on Arduino




About: www.ICStation.com is a top store of electronic, which specializes in all kinds of IC products, such IC accessories, Module, Robots, Development Board, Transistor, Capacitor and so on. We're located in She...

ICStation Team introduce you this ultrasonic distance measurement NRF905 wireless transmission system with ICStation UNO and Mega 2560 compatible with Arduino. The working voltage is DC5V. It uses ultrasonic to measure distance and realizes wireless transmission with NRF905. The minimum accuracy of this design is one centimeter. The measuring effect is best between 3 and 100 centimeter. It can be used in the area where has no high demand of accuracy, such as the obstacle avoidance of robot and the distance detection alarm when reversing a car.


1.When start up, the hardware initializes. The ranging module displays the prompt characters. After the initialization of the ultrasonic module finishes, it begins to display the measuring distance and starts the wireless transmission.

2.When the transmitting module works, you will see the sending end of the development board flash, at the same time, the value displayed on the LCD1602 refreshes continually.

3.In the receiving end, when receives the data successfully, the LED on the development board flashes and data is sent to the upper computer to display.

4.When change the distance between the object under test and ranging module, observe the data displayed on the LCD1602 in the sending end and the upper computer in the receiving end. When to increase and decrease the measuring distance, the displayed data changes correspondingly and the response accuracy is 1centimeter.

Code for your reference

RX part:


TX part:


Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Components List

Step 2: The Hardware Schematic Diagram of Receiving End

Step 3: The Schematic Diagram of Sending End

Step 4: Connect NRF905 Module to the ICStation UNO

Define the NRF905 module and ICStation UNO as following and connect the sending end and receiving end.
TXEN=5; TRX_CE=6;PWR=A0;CSN=4;AM=7;DR=3;CD=2; MOSI=11;MISO=12;SCK=13 ;

Step 5: Connect the Ultrasonic Ranging Module to the ICStation UNO

The definition of the pins of HC-SR04 module as the picture shows.

Define other functional pins as following:

TrigPin=8 EchoPin=9

Step 6: Connect the LCD 1602 to the ICStation UNO

Define other functional pins as following:

RS=A1, E=A2,D4=A3,D5=A4,D6=A5,D7=10

Step 7: The Whole Effect of Sending End After Connection

Step 8: The Whole Effect of Receiving End

Step 9: Video to Show the Effect

Sensors Contest

Participated in the
Sensors Contest

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    15 Discussions


    2 years ago

    I have it working on Arduino IDE 1.6.13 using the updated library at https://github.com/zkemble/nRF905


    3 years ago

    yes I had same problem until added NRF905 library to first version of arduino IDE 1.05 program. Will not work on latest Arduino IDE 1.6.7 program


    4 years ago on Introduction

    cada vez que eu tentei compilar o código apresenta o seguinte erro:

    /home/maciel/sketchbook/libraries/NRF905/NRF905.cpp:16:33: erro: variável 'freq_tab' deve ser const, a fim de ser colocado em secção só de leitura por meio de '__attribute __ ((progmem))'

    PROGMEM unsigned int freq_tab [10] = {


    Você pode me Dizer Por qué?


    4 years ago on Introduction

    Hi! you have to send me the NRF905.h library? I will be very grateful!


    5 years ago on Introduction

    Hi, I don't understand, according to the links an the datasheets, the nrf module is 3.3 V, and the Arduino is 5 V, how can this work a longer time ?

    5 replies

    Reply 4 years ago on Introduction

    http://blog.zakkemble.co.uk/nrf905-avrarduino-librarydriver/ this blog could help you guys with 3.3v logic


    Reply 5 years ago on Introduction

    Hi, friend, there is 3.3V pin on Arduino module, you need to connect the NRF module to this pin.


    Reply 5 years ago on Introduction

    Hi, thank for the code and the bigger schematics.

    But I don't understand the stuff with the 3.3v, yes the power supply for the NRF module is 3.3v but what is about the signal level, if the arduino runs with 5V, the signal level is 5v too.

    According to the datasheet from the NRF Chip, the signal level from the SPI have to be 3.3v too.

    Because I don't want to experiment with level converters, I use two Arduino pro mini with 3.3V and evreything works fine :-)


    5 years ago on Introduction

    By the way,

    I only can download the code for the RX part, where can I found the TX Part ?

    And the schematics are hardly radable, could you provide some text to describe how the pins from arduino are connected to nRF, LCD and ultarsonic for both sides ?

    1 reply

    Reply 5 years ago on Introduction

    About the TX part, you can see through the link:


    And the schematics, you can see these two pictures which are more clearly.