KS0338 Keyestudio 24L01 Wireless Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[image:KS0338.jpg|thumb|500px|right|Keyestudio 24L01 Wireless Module]]


[[image:KS0338.jpg|thumb|500px|right|Keyestudio 24L01 Wireless Module 4PCS]]
<br>
==Description==
==Description==
This kit includes 4 pcs of NRF24L01 wireless module. <br>
This kit includes 4 pcs of NRF24L01 wireless module. <br>
Line 8: Line 10:
The current consumption in receiving mode (2000 kbps) is 12.3 mA.<br>
The current consumption in receiving mode (2000 kbps) is 12.3 mA.<br>
The sensitivity is -85 dBm when data transfer rate is at 1000 kbps in receiving mode.<br>
The sensitivity is -85 dBm when data transfer rate is at 1000 kbps in receiving mode.<br>
The current consumption is 900 nA in power-down mode. The transmission distance of module is 250m when no obstacles.<br>
The current consumption is 900 nA in power-down mode. <br>
The module comes with a curved antenna, set as 0 dBm, the communication distance can reach about 20-25m in an open field.<br>
The NRF24L01 wireless module is a transmission module. Each module is both a transmitter and a receiver. So in general, you need to use two NRF24L01 wireless modules and two Arduino control boards to make a test.
The NRF24L01 wireless module is a transmission module. Each module is both a transmitter and a receiver. So in general, you need to use two NRF24L01 wireless modules and two Arduino control boards to make a test.
<br>[[Image:KS0338-3.jpg|600px|frameless]]<br>
<br>[[Image:KS0338-3.jpg|700px|frameless]]<br>


<br>
==Technical Details==
==Technical Details==
* Supply voltage: DC 3.3V
* Supply voltage: DC 3.3V
Line 20: Line 24:
* The sensitivity is -85 dBm when data transfer rate is at 1000 kbps in receiving mode.
* The sensitivity is -85 dBm when data transfer rate is at 1000 kbps in receiving mode.
* The current consumption is 900 nA in power-down mode.
* The current consumption is 900 nA in power-down mode.
* The transmission distance is 250m when no obstacles.
* The module comes with a curved antenna, set as 0 dBm, the communication distance can reach about 20-25m in an open field.
* Dimensions: 29mm x 16mm x 13mm
* Dimensions: 29mm x 16mm x 13mm
<br>[[Image:KS0338-4.jpg|600px|frameless]]<br>
<br>[[Image:KS0338-4.jpg|700px|frameless]]<br>
 


<br>
==Pins Diagram==
==Pins Diagram==
<br>[[Image:KS0338 pins.jpg|500px|frameless]]<br>
<br>[[Image:KS0338 pins.jpg|500px|frameless]]<br>
<br>[[Image:KS0338-5.jpg|700px|frameless]]<br>
<br>[[Image:Ks0338-pins.png|700px|frameless]]<br>


<br>
==Hookup Guide==
==Hookup Guide==
'''NRF24L01 module is used as transmitter:'''
<br>[[Image:KS0338-1.jpg|600px|frameless]]<br>


'''NRF24L01 module is used as receiver:'''
* <big>'''NRF24L01 module is used as transmitter:'''</big><br>
<br>[[Image:KS0338-2.jpg|600px|frameless]]<br>
<br>[[Image:KS0338-1.jpg|700px|frameless]]<br>
 
<br>
* <big>'''NRF24L01 module is used as receiver:'''</big><br>
<br>[[Image:KS0338-2.jpg|700px|frameless]]<br>
 
<br>


==Sample Code==
==Sample Code==
Below is an example code, you can upload it to Arduino IDE.
Below is an example code, you can upload it to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE  Arduino IDE ].


'''Code for transmitter:'''
<br>
<big>'''Code for transmitter:'''</big><br>
<pre>
<pre>
#include <SPI.h>
#include <SPI.h>
Line 76: Line 86:
</pre>
</pre>


'''Code for receiver:'''
<br>
<big>'''Code for receiver:'''</big><br>
<pre>
<pre>
#include <SPI.h>
#include <SPI.h>
Line 168: Line 179:
</pre>
</pre>


<br>
You can download all the code from the link:<br>
You can download all the code from the link:<br>
https://drive.google.com/open?id=1rnofNbN79XF24-snzePHYu-iGkT4cQAt
https://drive.google.com/open?id=1rnofNbN79XF24-snzePHYu-iGkT4cQAt


Note: before compile and upload the code, do remember to add the libraries, just copy and paste all the libraries inside the libraries folder of Arduino IDE.<br>
<span style=color:red>'''Note:''' before compile and upload the code, do remember to add the libraries, just copy and paste all the libraries inside the libraries folder of Arduino IDE. </span><br>
You can download all the libraries from the link here:<br>
You can download all the libraries from the link here:<br>
https://drive.google.com/open?id=1E_jd9ETY-rJUJgP9UZjOzG2DRUXIA-sP
https://drive.google.com/open?id=1E_jd9ETY-rJUJgP9UZjOzG2DRUXIA-sP


<br>


==Example Result==
==Example Result==
In the experiment, connect the NRF24L01module used as transmitter to UNO R3 board, after powered on, send the message. And connect another NRF24L01module used as receiver to UNO R3 board, after powered on, receive and print the message on the I2C 2004 LCD display. Shown below.
In the experiment, connect the NRF24L01module used as transmitter to UNO R3 board, after powered on, send the message. And connect another NRF24L01module used as receiver to UNO R3 board, after powered on, receive and print the message on the I2C 2004 LCD display. Shown below. <br>
<br>[[Image:KS0338-7.png|600px|frameless]]<br>
<br>[[Image:KS0338-7.png|700px|frameless]]<br>


<br>
==Packaging Included==
==Packaging Included==
Keyestudio 24L01wireless module * 4PCS
Keyestudio 24L01wireless module * 4PCS
<br>[[Image:KS0338-6.jpg|600px|frameless]]<br>
<br>[[Image:KS0338-6.jpg|600px|frameless]]<br>
<br>
==Resources==
*[https://fs.keyestudio.com/KS0338  You can download code and libraries ]<br>
<br>
==Buy From==
*[https://www.keyestudio.com/4pcs-nrf24l01-24ghz-wireless-transceiver-rf-transceiver-module-with-keyestudio-packing-box-for-arduino-p0359-p0359.html  '''From official website''' ]
*[https://www.aliexpress.com/item/4PCS-NRF24L01-2-4GHz-Wireless-Transceiver-RF-Transceiver-Module-With-Keyestudio-Packing-Box-for-Arduino/32887463778.html?spm=2114.search0104.8.19.43941c32yH1fqD&priceBeautifyAB=0  '''From Aliexpress shop''' ]
*[https://www.amazon.com/dp/B07FGDY31M  '''From Amazon shop'''  ]
[[Category: Module]]

Latest revision as of 10:50, 8 January 2021

Keyestudio 24L01 Wireless Module 4PCS


Description

This kit includes 4 pcs of NRF24L01 wireless module.
The NRF24L01 chip used in the module is a single-chip wireless transceiver chip operating in the 2.4~2.5GHz world-wide ISM band. The output power, channel selection and protocol settings can be set via the SPI interface.
The supply voltage for this NRF24L01 wireless module is DC 3.3 V. The maximum transmit power is 0 dBm. The maximum data transfer rate is 2000 kbps.
The current consumption in transmitting mode (0 dBm) is 11.3 mA.
The current consumption in receiving mode (2000 kbps) is 12.3 mA.
The sensitivity is -85 dBm when data transfer rate is at 1000 kbps in receiving mode.
The current consumption is 900 nA in power-down mode.
The module comes with a curved antenna, set as 0 dBm, the communication distance can reach about 20-25m in an open field.
The NRF24L01 wireless module is a transmission module. Each module is both a transmitter and a receiver. So in general, you need to use two NRF24L01 wireless modules and two Arduino control boards to make a test.
KS0338-3.jpg


Technical Details

  • Supply voltage: DC 3.3V
  • Maximum transmit power: 0 dBm
  • Maximum data transfer rate: 2000kbps
  • Current consumption in transmit mode (0dBm): 11.3 mA
  • Current consumption in receive mode (2000kbps): 12.3 mA
  • The sensitivity is -85 dBm when data transfer rate is at 1000 kbps in receiving mode.
  • The current consumption is 900 nA in power-down mode.
  • The module comes with a curved antenna, set as 0 dBm, the communication distance can reach about 20-25m in an open field.
  • Dimensions: 29mm x 16mm x 13mm


KS0338-4.jpg


Pins Diagram


KS0338 pins.jpg

Ks0338-pins.png


Hookup Guide

  • NRF24L01 module is used as transmitter:


KS0338-1.jpg


  • NRF24L01 module is used as receiver:


KS0338-2.jpg


Sample Code

Below is an example code, you can upload it to Arduino IDE .


Code for transmitter:

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
/* Ports ---------------------------------------------------------------------*/
#define CE_PIN   9
#define CSN_PIN 10
/* nRF24l01 ------------------------------------------------------------------*/
// NOTE: the "LL" at the end of the constant is "LongLong" type
const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio
/* Joystick ------------------------------------------------------------------*/
int value[2]; // 1 element array holding value readings
/* ---------------------------------------------------------------------------*/
/*
 - setup function
 * ---------------------------------------------------------------------------*/
void setup()
{
  radio.begin();
  radio.setRetries(0, 15);
  radio.setPALevel(RF24_PA_HIGH);
  radio.openWritingPipe(pipe);
  value[0] = 1;
  value[1] = 1;
}
/*
 - loop function
 * ---------------------------------------------------------------------------*/
void loop()
{
  radio.write( value, sizeof(value) );
  delay(1);
}


Code for receiver:

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <Wire.h>  //call arduino built-in I2C libraries
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); 
/* Ports ---------------------------------------------------------------------*/
#define CE_PIN   9
#define CSN_PIN 10
/* nRF24l01 ------------------------------------------------------------------*/
// NOTE: the "LL" at the end of the constant is "LongLong" type
const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio
/* Value ------------------------------------------------------------------*/
int value[2]; // 1 element array holding Joystick readings
/* ---------------------------------------------------------------------------*/
/*
 - setup function
 * ---------------------------------------------------------------------------*/
void setup()
{
  Serial.begin(9600);
  Serial.println("nRF24l01 Receiver Starting");
  radio.begin();
  radio.setRetries(0, 15);
  radio.setPALevel(RF24_PA_HIGH);
  radio.openReadingPipe(1,pipe);
  radio.startListening();
  pinMode(2, OUTPUT);

  lcd.init();
  lcd.init();
  lcd.backlight();
   lcd.setCursor(3,0);
   lcd.print("NRF24L01 Test");
}
/*
 - loop function
 * ---------------------------------------------------------------------------*/
void loop()
{
  if ( radio.available() )
  {
    // Read the data payload until we've received everything
    bool done = false;
    while (!done)
    {
      // Fetch the data payload
      done = radio.read( value, sizeof(value) );
      Serial.print("Value 1 :");Serial.println(value[0]);
      Serial.print("Value 2 :");Serial.println(value[1]);
      lcd.setCursor(0,1);
      lcd.print("Value 1:");
      lcd.setCursor(8,1);
      lcd.print(value[0]);
      lcd.setCursor(0,2);
      lcd.print("Value 2:");
      lcd.setCursor(8,2);
      lcd.print(value[1]);
      delay(500);
      Clean2004();
      if (value[0] != 0)
      {
        digitalWrite(2, HIGH);
      }
      else{
        digitalWrite(2, LOW);
      }
    }
  }
  else
  {    
    Serial.println("No radio available");
    lcd.setCursor(0,3);
    lcd.print("No radio available");
    digitalWrite(2, LOW);
    Clean2004();
  }
}
void Clean2004()
{
    lcd.setCursor(0,1);
    lcd.print("");
    lcd.setCursor(0,2);
    lcd.print("");
    lcd.setCursor(0,3);
    lcd.print("");
}


You can download all the code from the link:
https://drive.google.com/open?id=1rnofNbN79XF24-snzePHYu-iGkT4cQAt

Note: before compile and upload the code, do remember to add the libraries, just copy and paste all the libraries inside the libraries folder of Arduino IDE.
You can download all the libraries from the link here:
https://drive.google.com/open?id=1E_jd9ETY-rJUJgP9UZjOzG2DRUXIA-sP


Example Result

In the experiment, connect the NRF24L01module used as transmitter to UNO R3 board, after powered on, send the message. And connect another NRF24L01module used as receiver to UNO R3 board, after powered on, receive and print the message on the I2C 2004 LCD display. Shown below.

KS0338-7.png


Packaging Included

Keyestudio 24L01wireless module * 4PCS
KS0338-6.jpg


Resources



Buy From