Ultrasonic Distance Measurement NRF905 Wireless Transmission System Based on Arduino

24K3015

Intro: Ultrasonic Distance Measurement NRF905 Wireless Transmission System Based on Arduino

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.

Functions

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:

http://www.icstation.com/newsletter/eMarketing/nRF905_wireless_transmission.txt

TX part:

http://www.icstation.com/newsletter/eMarketing/nRF905_TX4_17.txt

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


15 Comments

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

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


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] = {

Rápido

Você pode me Dizer Por qué?

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

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 ?

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

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

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.

This is my problem too.

I study implementation of a Bi-directional Logic Level Converter

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

You can help with numbers of pins when you connecter nRF905 of Arduino MEGA?

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 ?

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

http://www.icstation.com/newsletter/eMarketing/nRF905_TX4_17.txt

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

Thank you for your big support!