KS0338 Keyestudio 24L01 Wireless Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
(Created page with "thumb|600px|right|Keyestudio UNO R3 Board ==Description== This kit includes 4 pcs of NRF24L01 wireless module. The NRF24L01 chip used in the module is a...")
 
No edit summary
Line 1: Line 1:
[[image:KS0338.png|thumb|600px|right|Keyestudio UNO R3 Board]]
[[image:KS0338.jpg|thumb|500px|right|Keyestudio 24L01 Wireless Module]]


==Description==
==Description==
This kit includes 4 pcs of NRF24L01 wireless module.  
This kit includes 4 pcs of NRF24L01 wireless module. <br>
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 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.<br>
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 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. <br>
The current consumption in transmitting mode (0 dBm) is 11.3 mA.  
The current consumption in transmitting mode (0 dBm) is 11.3 mA. <br>
The current consumption in receiving mode (2000 kbps) is 12.3 mA.
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.
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.
The current consumption is 900 nA in power-down mode. The transmission distance of module is 250m when no obstacles.<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.png|600px|frameless]]<br>
<br>[[Image:KS0338-3.jpg|600px|frameless]]<br>


==Technical Details==
==Technical Details==
Line 22: Line 22:
* The transmission distance is 250m when no obstacles.
* The transmission distance is 250m when no obstacles.
* Dimensions: 29mm x 16mm x 13mm
* Dimensions: 29mm x 16mm x 13mm
<br>[[Image:KS0338-4.png|600px|frameless]]<br>
<br>[[Image:KS0338-4.jpg|600px|frameless]]<br>




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




Line 42: Line 42:


'''Code for transmitter:'''
'''Code for transmitter:'''
<pre>
#include <SPI.h>
#include <SPI.h>
#include <nRF24L01.h>
#include <nRF24L01.h>
Line 75: Line 76:
   delay(1);
   delay(1);
}
}
 
</pre>


'''Code for receiver:'''
'''Code for receiver:'''
<pre>
#include <SPI.h>
#include <SPI.h>
#include <nRF24L01.h>
#include <nRF24L01.h>
Line 166: Line 168:
     lcd.print("");
     lcd.print("");
}
}
</pre>


 
You can download all the code from the link:<br>
You can download all the code from the link:
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.
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>
You can download all the libraries from the link here:
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


Line 178: Line 180:
==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>[[Image:KS0313-5.png|600px|frameless]]<br>


==Packaging Included==
==Packaging Included==
Keyestudio 24L01wireless module * 4PCS
Keyestudio 24L01wireless module * 4PCS
<br>[[Image:KS0313-7.jpg|600px|frameless]]<br>

Revision as of 15:14, 20 August 2018

Keyestudio 24L01 Wireless Module

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 transmission distance of module is 250m when no obstacles.
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 transmission distance is 250m when no obstacles.
  • Dimensions: 29mm x 16mm x 13mm


KS0338-4.jpg


Pins Diagram


KS0338 pins.jpg

File:KS0313-5.jpg


Hookup Guide

NRF24L01 module is used as transmitter:
File:KS0313-1.jpg

NRF24L01 module is used as receiver:
File:KS0313-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.
KS0313-5.png

Packaging Included

Keyestudio 24L01wireless module * 4PCS
File:KS0313-7.jpg