Emakefun RF-NANO Operating Instructions Manual Download Page 10

                                                                                                                       

Copy right © 2018 Shenzhen Emakefun Technology co., Ltd.

 

10 

 

 

Figure 1-3-1 ArduinoIDE download interface 

After the downloading, we will get a compressed package as shown in Figure1-3-2. The compressed 

package will be decompressed. After decompression, the files in Figure 2.1.3 are extracted. The “drivers” is 
the driver software. When the “Arduino.exe” is installed, it will be Install the driver automatically. Because 

the installation of "arduino.exe" is very simple, it will not be explained here. It is recommended to exit the 

anti-virus software during the installation process, otherwise it may affect the installation of the IDE. After 

the installation is complete, click "arduino.exe" again to enter the IDE programming interface. 

 

Figure 1-3-2    ArduinoIDE installation package 

Summary of Contents for RF-NANO

Page 1: ...Copy right 2018 Shenzhen Emakefun Technology co Ltd 1 RF NANO Operating Instruction V 1 0 ...

Page 2: ...Copy right 2018 Shenzhen Emakefun Technology co Ltd 2 Revision history Date Version Description Author 2019 7 25 V 1 0 Create a document Abbott Chen ...

Page 3: ...rinciple introduction of rf nano 16 2 2 Config word 17 2 3 RF NANO work module 18 Chapter3 realizes the communication between rf nano 19 3 1 Implement two rf nano point to point communication 19 3 1 1 connect method 19 3 1 2 Principle of application 20 3 1 3 Program code 21 3 2 Implement multiple send to a receive communication 24 3 2 1 Experimental principle block diagram 24 3 2 2 program code 25...

Page 4: ...ated into NRF24L01 chip making it have unlimited transceiver function which is equivalent to combining an ordinary NANO board and an NRF24L01 module into one as shown in figure 1 1 1 It is more convenient to use and the small size rf nano is exactly the same as the common pin of NANO board convenient for transplantation Figure 1 1 1 ...

Page 5: ...Copy right 2018 Shenzhen Emakefun Technology co Ltd 5 Figure 1 1 2 ...

Page 6: ...hannels can be used as PWM output 8 channels of analog input a 16MHz crystal oscillator a usb micro port an ICSP header and a reset button The processor ATmega328 Working voltage 5v Input voltage recommended 7 12v Input voltage range 6 20v Digital IO pin 14 6 of which can be used as PWM output Analog input pin 6 IO pin DC 40 mA Flash Memory 16 or 32 KB in which 2 KB for bootloader SRAM 1KB or 2KB ...

Page 7: ...ernal Interrupt No 2 and No 3 Trigger interrupt pin which can be set to rising edge falling edge or simultaneous trigger Pulse Width Modulation PWM 3 5 6 9 10 11 Provides 6 channel 8 bit PWM outputs SPI 10 SS 11 MOSI 12 MISO 13 SCK SPI Communication Interface LED No 13 Arduino is specially used to test the reserved interface of the LED When the output is high the LED is lit When the output is low ...

Page 8: ...Tmega328 and NRF24L01 are SPI communication and the schematic diagram is shown in figure 1 2 1 Figure 1 2 1 ATmega328 and NRF24L01 chip pin connection ATmega328 NRF24L01 3 3V VCC GND GND D9 CSN D10 CE D11 MOSI D12 MISO D13 SCK Note ATmega328 already occupied pins D9 D10 D11 D12 and D13 cannot be reused ...

Page 9: ...grated development environment that runs on a computer It can write and transfer programs to the board The major feature of the IDE is cross platform compatibility for Windows MaxOSX and Linux Only a simple code base is needed and the creators can create personalized home internet solutions through the platform such as remote home monitoring and constant temperature control and so on In this tutor...

Page 10: ...ted The drivers is the driver software When the Arduino exe is installed it will be Install the driver automatically Because the installation of arduino exe is very simple it will not be explained here It is recommended to exit the anti virus software during the installation process otherwise it may affect the installation of the IDE After the installation is complete click arduino exe again to en...

Page 11: ...n my computer properties device manager look at the ports COM and LTP as shown in figure 1 3 4 Figure 1 3 4 Then we open the IDE select the corresponding development board model and port in the toolbar and it will work normally If it appears as shown in figure 1 3 5 it shows that the computer does not recognize the development board and needs to install the driver itself ...

Page 12: ...1 3 5 1 3 2 Driver installation Windows7 System driver installation steps 1 Right click my computer open device manager look at ports COM and LPT At this point you will see a USB serial port right click USB serial port and select the update driver software option ...

Page 13: ... the browse my computer for driver software options Figure 1 3 7 3 Finally select the driver file named CH341SER_for_64bit_win7 which is located in the Arduino_Nano board driver folder Please select the corresponding driver version according to your computer system model Figure1 3 8 ...

Page 14: ...lowing screen will appear to inform you that the driver is successful Figure 1 3 10 At this point we can go back to the device manager interface and see that the computer has successfully recognized Arduino As shown in figure 1 3 11 below open the Arduino compilation environment and start the Arduino journey ...

Page 15: ...ind the USB Serial port may be you install the wrong or the system is not compatible Windows8 System driver installation steps If your computer is Windows8 before installing the driver you should save the files you are editing because there will be several shutdowns during operation 1 press the Windows key R 2 type shutdown 00 exe f t R o 3 click ok button 4 the system will restart to choose an op...

Page 16: ...d If the number of times of retransmission ARC reaches the upper limit MAX_RT will be set to a higher level and the data in TX FIFO will be retained for subsequent retransmission When MAX_RT or TX_DS are set high the IRQ becomes low and interrupts notifies MCU When the launch is successful if the CE is low NRF24L01 enters idle mode 1 If there is data in the send stack and CE is high it will enter ...

Page 17: ...to send high to send low SPI related instructions with a total of eight when using the control instruction by NRF24L01 MOSI input from MISO output corresponding status and data information to the MCU nRF24L0l are defined by the configuration register all the configuration of the word the configuration register can be accessed through the SPI mouth NRF24L01 Of the 25 configuration registers the mos...

Page 18: ...US Status register used to determine the working s tatus 0A 0F RX_ADDR_P0 P5 Set the receive channel address 10 TX_ADDR Set the receive channel address 11 16 RX_PW_P0 P5 Sets the valid data width of the receive channel 2 3 RF NANO work module NRF24L01 there is a state machine inside the chip which controls the conversion between different working modes of the chip NRF24L01 can be configured as Shu...

Page 19: ... the communication between rf nano 3 1 Implement two rf nano point to point communication 3 1 1 connect method Prepare two rf nano or an rf nano and NRF24L01 module and an Arduino UNO R3 Arduino NANO V3 0 as shown in figure 3 1 1 Transmitting device RF NANO Receiving device RF NANO 2 4G ...

Page 20: ...24L01 3 3V VCC GND GND 7 CSN 4 CE 11pin MOSI 12pin MISO 13pin SCK 3 1 2 Principle of application Launch process 1 Firstly configure the nRF24L01 to transmit mode 2 Then write the address TX_ADDR of the receiving end and the data TX_PLD to be sent into the nRF24L01 buffer area by the SPI port in time sequence ...

Page 21: ...igh the next transmission is started if there is no data in the transmission stack and CE is high the nRF24L01 will enter standby mode 2 Receive data process 1 When the nRF24L01 receives data please configure the nRF24L01 to receive mode firstly 2 Then delay 130μs into the receiving state to wait for the arrival of data When the receiver detects a valid address and CRC it stores the data packet in...

Page 22: ...eof value Mirf channel 90 Set the channel used Mirf config void loop vas asc Mirf setTADDR byte FGHIJ Set the receiver address value 32765 random 255 0 255 random number Mirf send byte A Send instructions send random number value Serial print Wait for sending while Mirf isSending delay 1 Until you send successfully exit the loop Serial print Send success Serial println value delay 1000 ...

Page 23: ... NANO Demo Program Peer to peer Communication Receive Receive ino Source code Receiver program include SPI h include Mirf h include nRF24L01 h include MirfHardwareSpiDriver h Nrf24l Mirf Nrf24l 10 9 int value String void setup Serial begin 9600 Mirf spi MirfHardwareSpi Mirf init Mirf setRADDR byte FGHIJ Set your own address receiver address using ...

Page 24: ...istening Start listening to received data void loop if Mirf dataReady When the program is received the received data is output from the serial port Mirf getData byte value Serial print Got data Serial println value Data received by a receiving device Figure 3 1 2 3 2 Implement multiple send to a receive communication 3 2 1 Experimental principle block diagram ...

Page 25: ... code include SPI h include Mirf h include nRF24L01 h include MirfHardwareSpiDriver h Nrf24l Mirf Nrf24l 10 9 int value void setup Serial begin 9600 Mirf spi MirfHardwareSpi Mirf init Set your own address sender address using 5 characters Mirf setRADDR byte ABCDE Mirf payload sizeof value Mirf channel 10 Set the channel used Transmitting device 1 RF NANO Receiving device RF NANO Transmitting devic...

Page 26: ...send random number value Serial print Wait for sending while Mirf isSending delay 1 Until you send successfully exit the loop Serial print Send success Serial println value delay 1000 Data sent by transmitter 1 Figure 3 2 1 Launch data program 2 code Code path RF NANO Demo Program Multiple send to one receive communication Emitter2 Emitter2 ino Source code Transmitter program ...

Page 27: ...ress sender address using 5 characters Mirf setRADDR byte ABCDE Mirf payload sizeof value Mirf channel 20 Set the channel used Mirf config void loop Mirf setTADDR byte FGHIJ Set the receiver address value 200 0 255 random number Mirf send byte value Send instructions send random number value Serial print Wait for sending while Mirf isSending delay 1 Until you send successfully exit the loop Serial...

Page 28: ...gy co Ltd 28 Data sent by transmitter 2 Figure 3 2 2 Receiving data program code Code path RF NANO Demo Program Multiple send to one receive communication All_Receive All_Receive ino Source code Data received by a receiving device Figure 3 2 3 ...

Page 29: ...to multiple receive communication All_Emitter All_Emitter ino Source code Transmitter program include SPI h include Mirf h include nRF24L01 h include MirfHardwareSpiDriver h Nrf24l Mirf Nrf24l 10 9 int value1 value2 void setup Serial begin 9600 Mirf spi MirfHardwareSpi Mirf init Set your own address sender address using 5 characters Mirf setRADDR byte ABCDE Receiving device1 RF NANO Transmitting d...

Page 30: ...ile Mirf isSending delay 1 Until you send successfully exit the loop Serial print value1 Send success Serial println value1 delay 500 Mirf payload sizeof value2 Mirf channel 20 Set the channel used Mirf config if Mirf channel 20 Mirf setTADDR byte KLMNO Set the receiver address value2 200 Mirf send byte value2 Send instructions send random number value Serial print Wait for sending while Mirf isSe...

Page 31: ...multiple receive communication Receive1 Receive1 ino Source code Receiver program include SPI h include Mirf h include nRF24L01 h include MirfHardwareSpiDriver h Nrf24l Mirf Nrf24l 10 9 int value void setup Serial begin 9600 Mirf spi MirfHardwareSpi Mirf init Mirf setRADDR byte FGHIJ Set your own address receiver address using 5 characters Mirf payload sizeof value ...

Page 32: ...istening to received data void loop Mirf ceLow Mirf configRegister RF_CH 10 switch channel 10 Mirf ceHi if Mirf dataReady When the program is received the received data is output from the serial port Mirf getData byte value Serial print Receive1 got data is Serial println value delay 800 Data received by receiving device 1 Figure 3 3 2 ...

Page 33: ...vels 18dBm 12dBm 6dBm and 0dBm The greater the transmitting power the farther the transmission distance The transmitted power can be set in the software Open the rf nano experimental routine program In mirf CPP there is a function to set the transmitted power SetOutputRF_PWR uint8_t val which can set different transmitted power void Nrf24l SetOutputRF_PWR uint8_t val Set tx power 0 18dBm 1 12dBm 2...

Page 34: ... 2 Set RF NANO data transfer rate RF NANO data transmission rate has three levels namely 1Mbps 2Mbps 250Kbps Data transmission rate can be set in the software Open the rf nano experimental routine program In mirf CPP there is a function to set the data transmission rate SetSpeedDataRates uint8_t val void Nrf24l SetSpeedDataRates uint8_t val Select between the high speed data rates 0 1Mbps 1 2Mbps ...

Reviews: