NRF24 And DallasTemperature Wont work together

I am trying to send Temperature (DS18B20) data VIA the NRF24 . the Radio and the Sensor work independent of each other, but as soon as the Sensor data is called the Transmitter stops. I Can run the code, See the data from the Probe on the receiver just for about 1 second and then it stops. Im wondering if its something on the Second time around on the loop. Like Address scan is changing the PinMode or maybe a interupt stop communication with the Radio and it cant recover. Ive used a few different librarys and sketchs , 1 that didnt even require the DallasTemperature.h , so im douting the problem is in there for me . I used Extrenal power for the 5v and 3.3 making sure it wasnt a power issue . Changed Pins just to make sure, No Change. No Error code eather. I cant find anyone else having this same kinda conflict so im guessing its something im over looking.
How about maybe like use the Serial Monitor to debug the pins , Or would that be pointless/useless ?
Anyway :slight_smile: Any Ideas :slight_smile: ?
Update :
Ive tried changing Boards from A Micro to a UNO , tried Different NRFs, and different Sensors Set the sensors Address so its not searching for it , But still just after it calls the Temperature it stops sending I think im running out of ideas

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
 
DallasTemperature sensors(&oneWire);




#define CE_PIN   9
#define CSN_PIN 10
#define DATA_X A0
#define DATA_Y A1
#define DATA_Z A2

// 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
float DATA[3]; 

void setup()   
{
  Serial.begin(9600);
  radio.begin();
  radio.openWritingPipe(pipe);
   sensors.begin(); 
    Serial.println("Dallas Temperature IC Control Library Demo");

  
  
}

void loop()   
{
  
    Serial.print("Requesting temperatures...");
  sensors.requestTemperatures(); // Send the command to get temperatures
  Serial.println("DONE");
  
  Serial.print("Temperature for the device 1 (index 0) is: ");
  Serial.println(sensors.getTempCByIndex(0)); 
  
  
  
  DATA[0] = analogRead(DATA_X);
  DATA[1] = sensors.getTempCByIndex(0);
  DATA[2] = analogRead(DATA_Z);
  
  radio.write( DATA, sizeof(DATA) );
Serial.print(DATA[1]);
}

Was hoping some one had at least one idea :slight_smile:

How are you powering the radio?

At first was VIA the micro controller , but i wasnt sure if it was a power issue so i used a external power supply and those 8Pin Socket Adapter Board Plate for NRF24L01+ Wireless Transceiver​ Module just to make sure.
When new code is sent to the transmitting unit it will show just for a few seconds the Data, but then the transmitter stop sending data :frowning:

woody_unreal:
At first was VIA the micro controller , but i wasnt sure if it was a power issue so i used a external power supply and those 8Pin Socket Adapter Board Plate for NRF24L01+ Wireless Transceiver​ Module just to make sure.
When new code is sent to the transmitting unit it will show just for a few seconds the Data, but then the transmitter stop sending data :frowning:

Did you add a de-coupling capacitor across the power feed to the radio?

I didnt have to there is plenty of juice for the radios with External power supply Feed into those riser cards Socket Adapter plate Board for 8Pin NRF24L01+ Wireless Transceive​ module 51 | eBay they also have several Caps for that reason :slight_smile:
I can also use the sketch with out the Call to the probe and it continues to work :slight_smile: without interruption :slight_smile:
Its almost like the is a request in the onewire library that messes it up.. im just guess with process of elimination

woody_unreal:
I didnt have to there is plenty of juice for the radios with External power supply Feed into those riser cards Socket Adapter plate Board for 8Pin NRF24L01+ Wireless Transceive​ module 51 | eBay they also have several Caps for that reason :slight_smile:
I can also use the sketch with out the Call to the probe and it continues to work :slight_smile: without interruption :slight_smile:
Its almost like the is a request in the onewire library that messes it up.. im just guess with process of elimination

I'd still add the cap.

You can plug the NRF24L01 into the national grid, it still will not work without a power decoupling capacitor. I have tried it.

For preference use a low ESR one.

I made the mistake of getting PCBs made up with a cap around 1.5cm away from the headers the nrf24l01 was being plugged into and that still wasn't adequate.
Solder a cap directly onto the pins of the module, or you can and probably will run into issues because of it. It may not actually be the cause of the problem in this case, but I'd strongly recommend doing it.

I Did put a additional cap as ask :slight_smile: without change. If i pull the CE wire off the Radio it at least will transmit, of course its not sending actual data , So i thought maybe something is changing thats pin State , so i moved it , and changed code as well.. still no luck. Reading a rock solid 3.303v on a 4000count multimeter right at the radios pins. Maybe its just not possible to have DS18B20 on NRF24s
they will work apart . just not together

what do others use for temp sensors, and then transmit that data ?

woody_unreal:
what do others use for temp sensors, and then transmit that data ?

You could try putting the temperature reads into a millis() timer and read just once every 30seconds or less often...

Your voltage at the pins is important, but not as important as the available power. Spend a few cents on a couple caps and rule that out. I wouldn't hound you if it didn't mean a lot on that particular device...

I have a 20 node RF network and they all needed it.

I posted earlier ,, already soldered one on it , without change

woody_unreal:
I posted earlier ,, already soldered one on it , without change

Missed that, sorry. Make sure you do both transceivers.

Try reading the sensor less yet?

DANG Finally Looks like that did it

 unsigned long currentMillis = millis();

  if(currentMillis - previousMillis > interval) {
    
    previousMillis = currentMillis;   
    sensors.requestTemperatures();
    Serial.println(sensors.getTempCByIndex(0)); 
}

now i just need to pass the data across the radio ugg :slight_smile:

Can you share the final cede?