Hello, I am using nRF24l01 module to send signal. When I am using UNO, it is perfectly sending signal and when Nano, it is failing to send signal. Pin numbers are same for all board.
I am using "Getting Started" code with pin 9(CE) and 10 (CSN) with baud rate 9600 in Uno as well as Nano.
I am using PCB and is powered with 12V source. Schematic is uploaded.
A steady voltage of 3.45V is available at nRF terminals
You also have a 1n4007 diode in series with the 3.3v output of the regulator. This will reduce the effective voltage to about 2.6 volts. Schottky diodes are more usual for polarity protection.
I also connected with alternate power source of 12V . As per guidance from "6v6gt", I bypassed 1N4007 and grounded AM1117 regulator. Now along with power source (12V), voltage across +V and grnd of nRF is 3.3V.
@Robin2
I need your help. I am using below code to test. Tx is failing continuously. To test connection, I am using another code, given below
// SimpleTx - the master or the transmitter
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10
const byte slaveAddress[5] = {'R', 'x', 'A', 'A', 'A'};
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio
char dataToSend[10] = "'Hello 0'";
char txNum = '0';
unsigned long currentMillis;
unsigned long prevMillis;
unsigned long txIntervalMillis = 500; // send once per second
void setup() {
Serial.begin(9600);
Serial.println("SimpleTx Starting");
radio.begin();
radio.setDataRate(RF24_250KBPS);
radio.setPALevel(RF24_PA_MAX);
radio.setAutoAck(true);
radio.setRetries(3, 5); // delay, count
radio.openWritingPipe(slaveAddress);
}
//====================
void loop() {
currentMillis = millis();
if (currentMillis - prevMillis >= txIntervalMillis) {
send();
prevMillis = millis();
}
}
//====================
void send() {
bool rslt;
rslt = radio.write( &dataToSend, sizeof(dataToSend) );
// Always use sizeof() as it gives the size as the number of bytes.
// For example if dataToSend was an int sizeof() would correctly return 2
Serial.print("Data to be Sent ");
Serial.print(dataToSend);
if (rslt) {
Serial.println(" Acknowledge received");
updateMessage();
}
else {
Serial.println(" Tx failed");
}
}
//================
void updateMessage() {
// so you can see that new data is being sent
txNum += 1;
if (txNum > '9') {
txNum = '0';
}
dataToSend[8] = txNum;
}
```// 18 Mar 2018 - simple program to verify connection between Arduino
// and nRF24L01+
// This program does NOT attempt any communication with another nRF24
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <printf.h>
#define CE_PIN 9
#define CSN_PIN 10
const byte thisSlaveAddress[6] = {'R', 'x', 'A', 'A', 'A'};
RF24 radio(CE_PIN, CSN_PIN);
char dataReceived[10]; // this must match dataToSend in the TX
bool newData = false;
void setup() {
Serial.begin(9600);
printf_begin();
Serial.println("CheckConnection Starting");
Serial.println();
Serial.println("FIRST WITH THE DEFAULT ADDRESSES after power on");
Serial.println(" Note that RF24 does NOT reset when Arduino resets - only when power is removed");
Serial.println(" If the numbers are mostly 0x00 or 0xff it means that the Arduino is not");
Serial.println(" communicating with the nRF24");
Serial.println();
radio.begin();
radio.printDetails();
radio.printPrettyDetails();
Serial.println();
Serial.println();
Serial.println("AND NOW WITH ADDRESS AAAxR 0x41 41 41 78 52 ON P1");
Serial.println(" and 250KBPS data rate");
Serial.println();
radio.setCRCLength(RF24_CRC_16);
radio.setDataRate(RF24_250KBPS);
radio.setChannel(35);
radio.setPALevel(RF24_PA_MAX);
radio.openReadingPipe(1, thisSlaveAddress);
radio.powerUp();
radio.printDetails();
radio.printPrettyDetails();
Serial.println();
Serial.println();
}
void loop() {
}
type or paste code here
Hello Paul,
as per earlier guidance I corrected circuit and now I am receiving a study voltage of 3.30V at NRF. I hope this would have solved current issue.
I need your guidance in solving this puzzle.
@Paul_KD7HB@sterretje@groundFungus
Please help me. It works with one nano but doesn't work with another. Same code same sketch same power source even added upto 40uF capacitor across nRF supply.
I am using helloworld_tx to test.