problem with arduino and NRF24L01+ ( I AM NEW TO ELECTRONICS )

Hi,
They are the units with the power amplifier, how are you powering it?
Note from

http://arduino-info.wikispaces.com/Nrf24L01-2.4Ghz-HowTo

Connect a 3.3 uF to 10 uF (MicroFarad) capacitor directly on the module from +3.3V to Gnd (Watch + and - !) [Some users say 10 uF in parallel with 0.1uF is best] This is especially important if you are connecting the module with jumper wires. Or you are using the regular Arduino UNO which provides only 50 mA at 3.3V

Also RF from the unit can get back into the UNO if the antenna is too close.
Also the antenna and how it performs is dependent on how the antenna is positioned, instead of laying it down, stand it up, keep it away from close objects.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Tom..... :slight_smile:

Also say if you powering the unit from the 3.3v or 5v supply on the Arduino (it is not 100% clear from your picture but it does look like 3.3 volt. If you have any documentation, say which supply is recommended for that 'Regulator' board into which the nRF24L01 is plugged ?

now i deleted my own library , and installed this one as you suggested robin(https://github.com/TMRh20/RF24/archive/master.zip).

I have read the documentation , i came to know that newer library doesn't return the read function.
so can you suggest me , what changes should i make in my code .

reciever:

#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
int msg[1];
RF24 radio(9, 10);
const uint64_t pipe = 0xE8E8F0F0E1LL;
int LED1 = 1;

void setup(void) {
  Serial.begin(9600);
  radio.begin();
  radio.openReadingPipe(1, pipe);
  radio.startListening();
  pinMode(LED1, OUTPUT);
}

void loop(void) {
  if (radio.available()) {
    bool done = false;
    while (!done) {
      done = radio.read(msg, sizeof(msg));
      Serial.println(msg[0]);
      if (msg[0] == 111) {
        delay(10);
        digitalWrite(LED1, HIGH);
      }
      else {
        digitalWrite(LED1, LOW);
      }
      delay(10);
    }
  }
  else {
    Serial.println("No radio available");
    digitalWrite(LED1, LOW);
  }
}

transmitter:

#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
int msg[1];
RF24 radio(9,10);
const uint64_t pipe = 0xE8E8F0F0E1LL;
int SW1 = 7;

void setup(void){
 Serial.begin(9600);
 radio.begin();
 radio.openWritingPipe(pipe);}

void loop(void){
if(digitalRead(SW1) == HIGH){
 msg[0] = 111;
 radio.write(msg, sizeof(msg));}}

and also it gives error like i have attached jpeg below.

what are this errors?

@6v6gt I have purchased this ones([u]http://www.ebay.com/itm/Socket-Adapter-plate-Board-for-8Pin-NRF24L01-Wireless-Transceive-module-51-/200960749614[/u]).

I am connecting this to to tranceiver modules. and i am connecting it to 3.3v. I think here [u]http://arduino-info.wikispaces.com/Nrf24L01-2.4Ghz-HowTo[/u] they have used same base module as i
have used and connected to 3.3 v in their figure . I am connecting this base module to tranceiver module , so should i connect a capacitor across power and ground inspite of having regulator or no need of that ?

Tom , i don't know how to draw circuit in CAD , i tried to draw on paper but it gets very complex.
so simply i am describing here:
CE to pin 9
CSN to pin 10
SCK to pin 13
MO to pin 11
MI to pin 12
vcc to 3.3V
gnd to gnd

same connection for both transmitter and receiver side.

note that this is connection for older ManiacBug version library.

And i tried every possible physical way, i tried to take both signals in the air and also taking them far .

I can't figure out the problem!
111 poping out constantly on serial monitor as i start the experiment , if i try to move them physically connectivity losses . moving them again regains my connectivity and again 111 pops out on screen.

In the receiver try changing this

    bool done = false;
    while (!done) {
      done = radio.read(msg, sizeof(msg));
      Serial.println(msg[0]);
      if (msg[0] == 111) {
        delay(10);
        digitalWrite(LED1, HIGH);
      }
      else {
        digitalWrite(LED1, LOW);
      }
      delay(10);
    }

to this

      radio.read(msg, sizeof(msg));
      Serial.println(msg[0]);
      if (msg[0] == 111) {
        delay(10);
        digitalWrite(LED1, HIGH);
      }
      else {
        digitalWrite(LED1, LOW);
      }
      delay(10);

...R

You seem to have been presented with a choice of RF24 libraries, ManiacBug and TMRh20, one of which allows you to compile your code and one of which does not.
I'm sure Robin2 will help to resolve the compiler errors/warnings that you get with TMRh20.

As for the hardware, you are using this 'base module' (which contains a voltage regulator) for your nRF24L01 transceiver http://yourduino.com/sunshop2/index.php?l=product_detail&p=467
The decription says "This module makes it easy to use Nrf24L01 type transceivers on 5 volt systems like Arduino. It regulates the 5 volts to 3.3V and provides bypass capacitors for reliable operation. 5V DC is required to power this module". In other words, you should be powering it from 5 volts and not 3.3. volts.

I've now looked back in the comments in my own sketch which uses an nRF24L01 (high power) module, and during trouble shooting I had to add an explicit radio.powerUp() statement to help get it to work. Here is the comment on
https://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo which helped me:

"Finally, I threw in a radio.powerUp() immediately before the radio.write. It fixed 99.9% of my problems. Adding a 3 millisecond delay between the powerUp and write fixed the other 0.1%."

6v6gt:
"Finally, I threw in a radio.powerUp() immediately before the radio.write. It fixed 99.9% of my problems. Adding a 3 millisecond delay between the powerUp and write fixed the other 0.1%."

Which of the RF24 libraries were you using?

Before I switched to the TMRh20 library I had discovered I needed to edit the ManiacBug library to remove a PowerDown() call (may not have the exact syntax).

...R

Robin2:
Which of the RF24 libraries were you using?

Before I switched to the TMRh20 library I had discovered I needed to edit the ManiacBug library to remove a PowerDown() call (may not have the exact syntax).

...R

Exactly. I was/am using the ManiacBug library. This problem showed up only with the "high power" nFR24L01 module http://www.seeedstudio.com/depot/24G-wireless-module-NRF24L01PALNA-PAIPX-p-2384.html. In the meantime, I have also added explicit powerDown() calls because it is a battery application and I need to preserve power.
Although I see that the TMRh20 library may be better, I won't be looking at that unless I have to make a major change to my application. Very odd that the author of TMRh20 didn't attempt to preserve compatibility with older libraries, but I guess he had his reasons.

6v6gt:
Very odd that the author of TMRh20 didn't attempt to preserve compatibility with older libraries, but I guess he had his reasons.

What I find most irritating is that he gave his library the exact same name as ManiacBug's library so it is very easy to confuse them. I have given my version its own name.

...R

I did everything , I used new library , adjusted code , regulator to 5V . but still same problem exists.

Slight movements causes loss in connectivity and some further movements causes gain in connectivity.
111 shows on my serial monitor continuously but if I move transceivers physically, 0 shows up on my serial monitor . and it keep showing . after that if i disconnect transmitter still 0 shows up constantly on screen along with that LED on pin1 of receiver side.

then If disconnect both transceivers only arduino connected with laptop still it constantly shows 0 on screen and LED kept glowing on pin1 of receiver side ?

Is this the problem of arduino ?
should I upload the video?

Hi,
Have you tried powering the RF units separately, not using the arduino 5V or 3,3V?

Tom.... :slight_smile:

The slightest movement question has been lost in all the discussion of which library was being used.

Before turning to that problem can we be absolutely certain that you can now reliably transmit and receive messages wirelessly? (Assuming there is no movement of the parts).

If my understanding of "slightest movement" is the same as yours the most likely cause of that problem is a bad connection. How is your nRF24 connected to your Arduino?

If you can't find (and correct) a bad connection please describe exactly what you mean by "slightest movement"

...R

Robin2:
How is your nRF24 connected to your Arduino?

Reply #18. I would try replacing all of the jumper wires with different ones, to start.

yes 111 is transmitting perfectly in the beginning of the connection . Here problem starts whenever I take one of the transceiver in hand , it losses connectivity ,then again 111 is printed. sometimes , If I shake these modules it prints out 0 instead of 111 , then only 0 keeps coming on screen . i think the problem is in connection of modules with arduino.

Karan02:
i think the problem is in connection of modules with arduino.

I presume you can fix that.

...R

but it still prints only 0 on screen.

After even disconnecting every system except the receiver side arduino ,wrong data is still printing on screen 0 or NO radio available .see this link:Arduinos-Transievers - problem - YouTube

Karan02:
but it still prints only 0 on screen.

I don't know how to help. If there is a poor connection somewhere it needs somebody working beside you to figure it out.

Have you a 3rd or 4th nRF24 that you could try in case one of the others is damaged?

You have two high-power RF24s. How far apart are they? I wonder might they overwhelm each other if they are too close. I have only used the low power versions with the PCB antenna.

One of my nRF24s is built with an Atmega 328 on a breadboard without any great attempt at careful connections and I have never had any problem holding it in my hand or handing to other people to try controlling my model train with it.

What is the little board with the red lights that your nRF24s seem to be connected to?

...R

Images from Reply #18 (so I can see them). See Image Guide

...R

You know what , if I disconnect the whole transmitting section from power(alog with arduino) and remove completely the receiver side NRF module but not receiver side arduino , amazing thing is that the LED at pin 1 still keep glowing and serial monitor still shows receiving data , that '0'.

whats your experience says?
is this the problem with arduino or code or rf modules ?
should go for Xbee then , for better transmission.