NRF24L01 2.4Ghz Wireless Module (NRF24L01) [S275]






https://www.youtube.com/watch?v=CVfX8fmW6Bk


GitHub : https://github.com/rdiot/rdiot-s275.git


* Specs

nRF24L01 is a single chip radio transceiver for the world wide 2.4 - 2.5 GHz ISM band. 

The transceiver consists of a fully integrated frequency synthesizer, a power amplifier, a crystal oscillator, a demodulator, modulator and Enhanced ShockBurst? protocol engine. 

Output power, frequency channels, and protocol setup are easily. 

programmable through a SPI interface. 

Current consumption is very low, only 9.0mA at an output power of -6dBm and 12.3mA in RX mode. 

Built-in Power Down and Standby modes makes power saving easily realizable. 

Maximum operating speeds up to 2Mbps, GFSK modulation efficiency, Anti-interference ability, Particularly suitable for industrial control applications. 

125 Communications channels, Multi-point communication and frequency hopping to meet the communication needs. 

Built-in hardware CRC error detection, Multipoint communication address control. 

Low-power 1.9 ~ 3.6V, only 1uA on Power down mode. 

Built-in 2.4Ghz antenna. 

Available software to set the address, only received local Address when output data(Provide interrupt instruction), can be directly connected to a variety of microcontrollers, Software programming is very convenient. 

Support 6 Data channels of data reception. 

Standard DIP Pitch Interface for embedded applications. 


* Contents

- Connect 


VCC - 3.3V

CSN - D8

MOSI - D11

IRQ - NONE

GND - GND

CE - D7

SCK - D13

MISO - D12


- parts

Rotary Encoder Module (KY-040) [S120]


- Library : https://github.com/nRF24/RF24

- Tested Library Download : RF24-master.zip



- Key Code

- RF24_TX : https://github.com/rdiot/rdiot-s275/blob/master/RF24_TX.ino

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <SPI.h>

#include <nRF24L01.h>

#include <RF24.h>


LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x20 for a 16 chars and 2 line display


RF24 radio(7, 8); // SPI Bus CE, CSN 

const byte address[6] = "00001"; // RX = TX same address

int pin = A0; // Rotary Encoder Module (KY-040) [S120] : http://rdiot.tistory.com/126 [RDIoT Demo]


void setup() {

  pinMode(pin, INPUT);

  

  Serial.begin(9600);

  

  radio.begin();

  radio.openWritingPipe(address);

  radio.setPALevel(RF24_PA_MIN); // Power Level : accoding to distance : RF24_PA_MIN / RF24_PA_LOW / RF24_PA_HIGH / RF24_PA_MAX


  radio.stopListening();  // TX 


  lcd.init(); // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD1602");

  delay(1000);

  lcd.clear();

    

}


void loop() {

  lcd.setCursor(0,0);

  lcd.print("S275:RF24L01 TX");

  

  int readVal = analogRead(pin);

  readVal = map(readVal, 0, 1023, 0, 179);

  Serial.println(readVal);


  lcd.setCursor(0, 1);

  lcd.print("msg=>" + String(readVal) + "  ");

   

  char buf[4];

  itoa(readVal, buf, 10);

    

  radio.write(&buf, sizeof(buf)); //send messages to RX 

  delay(10);

  

}


- RX24_RX : https://github.com/rdiot/rdiot-s275/blob/master/RF24_RX.ino

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <SPI.h> 

#include <nRF24L01.h>

#include <RF24.h>

#include <Servo.h> 


LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x20 for a 16 chars and 2 line display


RF24 radio(7, 8); // SPI Bus CE, CSN 

const byte address[6] = "00001"; // TX = RX same address


Servo myservo; 

int servoPin = 4; 


void setup() {


  Serial.begin(9600);

  

  radio.begin();

  radio.openReadingPipe(0, address);

  radio.setPALevel(RF24_PA_MIN); // Power Level : accoding to distance : RF24_PA_MIN / RF24_PA_LOW / RF24_PA_HIGH / RF24_PA_MAX


  radio.startListening(); // RX


  myservo.attach(servoPin); 


  lcd.init(); // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD1602");

  delay(1000);

  lcd.clear();

 

}


void loop() {

  lcd.setCursor(0,0);

  lcd.print("S275:RF24L01 RX");


  lcd.setCursor(0, 1);

  if (radio.available()) {    

    char text[4] = "";

    

    radio.read(&text, sizeof(text));

    Serial.println(text);

    

    lcd.print("rcv=>" + String(text) + "     ");


    int value = atoi(text);

     myservo.write(180-value);

  }


  delay(10);

  

}


- how to debug radio details 

#include <printf.h>


  printf_begin();

  radio.printDetails();





Posted by RDIoT
|

3DR Radio 915Mhz Telemetry Kit [S211]




https://www.youtube.com/watch?v=8zU309jKdtc


* Specs

3DR Telemetry Kit Specifications

Very small size

Light weight (under 4 grams without antenna)

915MHz

Receiver sensitivity to -121 dBm

Transmit power up to 20dBm (100mW)

Transparent serial link

Air data rates up to 250kbps

MAVLink protocol framing and status reporting

Frequency hopping spread spectrum (FHSS)

Adaptive time division multiplexing (TDM)

Support for LBT and AFA

Configurable duty cycle

Built in error correcting code (can correct up to 25% data bit errors)

Demonstrated range of several kilometers with a small omni antenna

Can be used with a bi-directional amplifier for even more range

Open source firmware

AT commands for radio configuration

RT commands for remote radio configuration

Adaptive flow control when used with APM

Based on HM-TRP radio modules, with Si1000 8051 micro-controller and Si4432 radio module


* Contents

- Connect

5V ----- 5V

TXD ----- RX

RXD ----- TX

CTS

RTS 

GND ----- GND


- Key Code

void setup() {

  Serial.begin(57600);

}

void loop() {

  if (Serial.available()) {

    Serial.print((char) Serial.read());

    delay(10);

  }

}

Posted by RDIoT
|

433Mhz Super-regenerative module (FS1000A,MX-JS-05V) [S081]



https://www.youtube.com/watch?v=_h1i9cnf-ic


* Specs

Emission head (2SC3357 transistor):

The actual working distance 50-100m

Operating voltage 3-12V

Operating current :10-15mA

Ways of working: AM

Transfer rate: 4KB / S

Transmit power: 10mW

External antenna: 28cm ordinary multi-core or single core line

Pinout from left ? right: (DATA, VCC, GND)

Size: 1.9CM * 1.9CM * 0.9CM


Receiver Module Technical Data:

Model: MX-05V

Working voltage: DC5V

Quiescent Current: 4MA

Receiving frequency: 433.92MHZ

Receiver sensitivity:-105DB

Size: 30 * 14 * 7mm

External antenna: 32CM single wire, wound into a spiral


* Contents

- Connect

Emission 

ATA0 ----- D4

VCC ----- 5V

GND ----- GND


Receiver

VCC ----- 5V

DATA ----- D2 (data)

X

GD ----- GND


LED ----- D2


- Data Format Define

 : 1=1, 1=2



- Key Code

FS1000A

#include <Wire.h> 

#include <VirtualWire.h>       

#include <Bounce2.h>           

#include <LiquidCrystal_I2C.h>

 

LiquidCrystal_I2C lcd(0x27,16,2); 

 

int buttonPin = 2;  

int sendPin = 4;   

boolean oneTimeFlag = false;        

Bounce bouncer = Bounce();    

 

void setup() {

  lcd.init();                      // initialize the lcd 

 

  lcd.backlight();

  lcd.print("S081-FS1000A Snd");

  

   pinMode(buttonPin, INPUT);

   digitalWrite(buttonPin, HIGH);

   bouncer.attach( buttonPin );

   bouncer.interval(5);

    

   vw_setup(2000);        

   vw_set_tx_pin(sendPin);

   Serial.begin(9600);

}

 

void loop() {

 if ( bouncer.update() && bouncer.read() == LOW) {     

    if( oneTimeFlag == false) {                        

      lcd.setCursor(0, 1);

      lcd.print("ON = Send(1) ");

      Serial.println("on");

      sendMessage("1=1");  

      oneTimeFlag = true;

 

    } else {

      lcd.setCursor(0, 1);

      lcd.print("OFF = Send(2)");

      Serial.println("off");                 

      sendMessage("1=2");    

     oneTimeFlag = false;

 

     }         

  }

}

 

void sendMessage(char *data) {

  if (strlen(data) > 0) {     

   int msgSize = (strlen(data) + 1); 

   char packetData[msgSize];         

 

   vw_send((uint8_t *)data, msgSize);  

   vw_wait_tx();                       

 

  }  

}


MX-JS-05V

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <VirtualWire.h>

#include <string.h>

 

LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004

 

byte message[VW_MAX_MESSAGE_LEN];                    

byte messageLength = VW_MAX_MESSAGE_LEN; 

int rcvPin = 2; 

int ledPin = 8; // LED

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  delay(1000);

 

  lcd.clear();

  

  pinMode(ledPin, OUTPUT);

  digitalWrite(ledPin, HIGH);

  delay(1000);

  digitalWrite(ledPin, LOW);

 

  vw_setup(2000);

  vw_set_rx_pin(rcvPin);       

  vw_rx_start();               

 

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S081:MX-JS-05V Rev");

 

  if (vw_get_message(message, &messageLength)) {       

      

 

    int command = processResponse((char*)message, 1); 

 

 

    if (command) {

      switch (command) {

       case 1:                        

         lcd.setCursor(0,2);

         lcd.print("Receive Value= 1 ");

         digitalWrite(ledPin, HIGH);

         break;

       case 2:                         

         lcd.setCursor(0,2);

         lcd.print("Receive Value= 2 ");

         digitalWrite(ledPin, LOW);

         break;

      }

    }  

  }

 

}

 

int processResponse(char* message, int pinCode) {

  char *p = message;

  char *buf;

  int o = 0;

  int pin;

  int command;

 

      lcd.setCursor(0,1);

      lcd.print("RF msg:"+String(message));

 

  while ((buf = strtok_r(p, "=", &p)) != NULL)  {  

   if (o == 0) {                                 

     pin = atoi(buf);                            

   } else {

     command = atoi(buf);                        

   }

    o++;

  }

 

  if (pinCode == pin && command > 0) {                   

    return command;

  } else {

    return 0; 

  }

}

Posted by RDIoT
|

315Mhz 4Channel Remote Control Kit (PT2262/PT2272) [S054]



https://www.youtube.com/watch?v=DGVYL7ykCdI


* Specs

1.Operating voltage: DC12V (27A/12V battery x1)

2.Operating Current: 10mA @ 12V 

3.Radiated power: 10mw @ 12V

4.Modulation mode: ASK (Amplitude Modulation) 

5.Transmitting frequency: 315MHZ 

6.Transmission distance :50-100M (Open field, the receiver sensitivity of -100dbm) 

7.Encoder types: fixed code


* Contents

- Connect

VT ------ D6

D3 ----- D5

D2 ----- D4

D1 ----- D3

D0 ------ D2

5V ----- 5V

GND ----- GND


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004


int pinD0 = 2;

int pinD1 = 3;

int pinD2 = 4;

int pinD3 = 5;

int pinVT = 6;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pinD0,INPUT);

  pinMode(pinD1,INPUT);

  pinMode(pinD2,INPUT);

  pinMode(pinD3,INPUT);

  pinMode(pinVT,INPUT);


  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S054:RF 315Mhz T/R");


  int valD0 = digitalRead(pinD0);

  int valD1 = digitalRead(pinD1);

  int valD2 = digitalRead(pinD2);

  int valD3 = digitalRead(pinD3);

  int valVT = digitalRead(pinVT);


  lcd.setCursor(0,1);

  lcd.print("D0=" + (String)valD0 + "(D) D1="+ (String)valD1 + "(C)");

  lcd.setCursor(0,2);

  lcd.print("D2=" + (String)valD2 + "(B) D3="+ (String)valD3 + "(A)");

  lcd.setCursor(0,3);

  lcd.print("VT=" + (String)valVT + "  " );


}

Posted by RDIoT
|