Using nRF24L01 and Pressure Transm. MC5541C with SPI on the same Arduino Na

Hi,

I'm trying to use nRF24L01 wireless data transmitter/receiver and MC5541C pressure transmitter on SPI bus of Arduino Nano. If I connect only nRFL24L01 or MC5541C wireless communication or pressure reading the system runs. If i connect MOSI wire of both devices on D12 pin of Arduino Nano nRF24L01 stops to transmit. Could be an incompatibility of hardware or what else?
Someone tried the same solution?

Many thanks for help.....

Rossano

rossboss:
Hi,

I'm trying to use nRF24L01 wireless data transmitter/receiver and MC5541C pressure transmitter on SPI bus of Arduino Nano. If I connect only nRFL24L01 or MC5541C wireless communication or pressure reading the system runs. If i connect MOSI wire of both devices on D12 pin of Arduino Nano nRF24L01 stops to transmit. Could be an incompatibility of hardware or what else?
Someone tried the same solution?

Many thanks for help.....

Rossano

post your code ( and a schematic if possible). hard to say is the problem is hardware or software with so little information!

Update:

the problem is double: hardware and software. For solve the hardware problem i put a 74HCT125D on the pin 12 of arduino: the three signals coming for pressure transmitters and nRF24L01 that was connected on pin 12 now are connected on 3 gates of 74HCT125D and the exits connected togheter on pin 12. If a use read pressure or send data the system run. If a read pressure and then I find to send some data with nRF24L01 the sketch stops. If I send data, then I can read pressure. When I use MC5541C library then I can't use nRF24L01 library. I think I will modify MC5541C library but I don't know where and how......

Someone have some experience yet?

Many thanks.

Then I will post my code.

Bye

Rossano

here my code… i modified MS55xx library to define the PIN MCLK in my code…

#include <MS55xx_Pin_MCLK.h>
#include <SPI.h>

/*********************************
* Please respect pin wiring:
* MOSI: pin 11 arduino or pin 7 on sensor
* MISO: pin 12 arduino or pin 8 on sensor
* SCK: pin 13 arduino or pin 1 on sensor
* MCLK: define pin with istruction xxxxxxxxxx.setPressureSensorType(Type,PIN) or pin 6 on sensor
*********************************/

// Radio ---------

//#include <SPI.h>
#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>

// -----------

// 16.10.2017 rbo - NRF24L01 
RF24 radio(7, 8); // CNS, CE
const byte addresses[][6] = {"00001", "00002"};
// ------------------------

long time_val ; // valore del tempo in ms
int pollo ;
int cycle ;

//creating the sensors
MS55xx_Pin_MCLK TyrePressSensor;

void setup() {
    
      Serial.begin(9600); 
      TyrePressSensor.setPressureSensorType(5535,10);
      //
      // 16.10.2017 rbo  NRF24L01 
      radio.begin();
      radio.openWritingPipe(addresses[0]); // 00002
      radio.openReadingPipe(1, addresses[1]); // 00001 - canale 2 tattatattatatatata
      radio.setPALevel(RF24_PA_MAX);
      // 
 
// .---------- test radio TX - RUN! ----------

  delay(500);
  pollo = 1234 ;
  radio.stopListening();
  radio.write(&pollo, sizeof(pollo));
  delay(50);
  radio.startListening();
  delay(50);


    
}

void loop() {


  time_val = millis();
  cycle = cycle + 1;
  
  //Before getting the values you need to update the sensor
  TyrePressSensor.update();
  
  //get pressure
  Serial.print("Tyre Pressure (mbar): ");
  Serial.println(TyrePressSensor.getPressureMBar());
  
  delay(100);

  if ( cycle >= 10 ) {   // <-------------------- after 10 pressure values reading i find to send some data: here don't run and the sketch stop.....

    pollo = pollo + 1;
    cycle = 0;
  
    delay(500);
    radio.stopListening();   
    radio.write(&pollo, sizeof(pollo));
    delay(500);
    radio.startListening();

  }

}

Hi

I dont know MC5541 but I know verywell NRF24L01…

You can mix it with other peipherals on SPI bus without pb if you respect the max speed 10MHz and have dedicated pins for CS and CE (MCU as master).

I was optimistic… I have a similar issue with W5100 ; logic analyzer shows the miso line stucked at high level when the shield is in place…

gl