RF24 transceiver interrupted when motors are turned on

I’m using the nano which has a RF24 transceiver and 6 IRZ44N MOSFET’s 4 of them control 4 [Motors](4 pcs 65 x 26mm Plastic Tire... https://www.amazon.com/dp/B07P9Z4T2K?ref=ppx_pop_mob_ap_share) that are connected to tires, one other controls two small [Motors](Gikfun 1.5V-6V Type 130 Miniature DC Motors for Arduino Hobby Projects DIY (Case Pack of 6) EK1450 https://a.co/d/2UJbJc7) and the last one is connected to a high torque micro [Motor](NW 5pcs 3V Micro Planetary... https://www.amazon.com/dp/B07N7PY71F?ref=ppx_pop_mob_ap_share). I want to make a remote control car that can shoot nerf gun billets. I used a 9V battery for the nano, a 3V battery for the micro motor and then the tire and small motors shared a 7.4 2A lipo battery. I made a battery and everything works, the transceiver connection and the motor outputs worked. When I controlled the nerf gun car with the remote control all the motors worked except for the 2 small motors. The really weird thing is when I used alligator clips to connect the lipo battery to the circuit everything worked , but when it was actually on the car and connected with threaded wire, it didn’t work, anyone have any idea why???

The short version of this is the tipo battery im using disrupt the RF24 transceivers when it is powering two small motors. But whenever it is physically off the RC car and connected via alligator clips it doesn’t.

What is powering the nRF24 devices? They need a lot of current during the time they transmit.

It’s the 3.3V from the nano

TRy with two AA cells in series. That always worked flawlessly for me.

Mosfets do not seem to be logic level (is there a letter lacking in the name?)

My bad, IRFZ44N

They may not be drawing enough current, try IRLZ44

Alright but how would that break up the RF24 connection? And it working when connected with alligator clips and not on the car?

Hard to know without code, pictures and schematic.

Alright, here's the code;

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(9, 10); // CE, CSN
const byte address[6] = "00001";
void setup(){
  Serial.begin(9600);
  radio.begin();
radio.openReadingPipe(0, address);   //Setting the address at which we will receive the data
radio.setPALevel(RF24_PA_MAX);       //You can set this as minimum or maximum depending on the distance between the transmitter and receiver.
radio.startListening();  
  pinMode(A2,OUTPUT);
  pinMode(A0,OUTPUT); 
  pinMode(A5,OUTPUT); 
  pinMode(A4,OUTPUT); 
  pinMode(5,OUTPUT); 
  pinMode(3,OUTPUT); 
}
void loop(){
if (radio.available())              //Looking for the data.
{
char text[32] = "";                 //Saving the incoming data
radio.read(&text, sizeof(text));    //Reading the data//radio.read(&button_state, sizeof(button_state));    //Reading the data
String A = String(text);
// A4 = top left wheel, A2 = top right, A0 = bottom left, 5 = bottom right (A4 and A5 go backwards)
if(A == "Forward"){
  digitalWrite(A2,HIGH);
  digitalWrite(A4,HIGH);
  Serial.println("Forward");
}
if(A == "Left"){
  digitalWrite(A2,HIGH);
  digitalWrite(A0,HIGH);
    Serial.println("Left");
}
if(A == "Right"){
  digitalWrite(A4,HIGH);
  digitalWrite(5,HIGH);
    Serial.println("Right");
}
if(A == "Backward"){
  digitalWrite(A0,HIGH);
  digitalWrite(5,HIGH);
    Serial.println("Backward");
}
if(A == "Up"){
  digitalWrite(A5,HIGH);
    Serial.println("Up");
}
if(A == "Down"){
  digitalWrite(3,HIGH);
    Serial.println("Down");
}
delay(100);
}
 else{
  digitalWrite(A0,LOW);
  digitalWrite(A2,LOW);
  digitalWrite(A4,LOW);
  digitalWrite(A5,LOW);
  digitalWrite(3,LOW);
  digitalWrite(5,LOW);
}
}


This is the schematic


This is the actual car


This is how the battery is connected with the alligator leads and it works
In case you don't know the 2 motors with the yellow rubber you can see from the photo on the other post are the ones that once I turn on with a remote the transceiver connection is lost.

It could be related to electromagnetic noise, see this post
https://forum.arduino.cc/t/fixing-rf-interference-from-brushed-motors/972776

Not gonna lie that sounds pretty cool, thanks, I’ll check if that’s the issue

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.