Xbee+Brushless Freezing

Hello all, I have made a project where I use 2 Xbee S2C to communicate between 2 Atmega328p(one is the remote and 1 is controlling some motors after receiving):
1)In total there are 2 brushless motors(with ESCs) and 1 servo.
2)The remote is made out of 2 analog joystick and 1 pot. 1 analog joystick controls one brushless motor(I have done it so that it simply sends 1 or 0, and then the motor goes to full speed or is stopped), one analog stick send L or R, and then the servo itself moves to 2 different positions for left and right, alternatively if there's no L or R it stays in center(a third position) and a pot with which I control the last brushless motor with full range control(0-180).
3)The baud rate is 19200 for both the atmega and xbee.
4)Both circuits for the remote and the receiving board are custom and have 7805s with capacitors on input and output and heatsinks.
5)The receiving board is powered by a 3 cell lipo, 5000mAh, 50C, while the remote with a 7.4v, 3000mAh, 2 cell li-ion.
6)The Xbees are on Xbee Explorer Regulated Shields and then connected to the Atmega thorugh that.
7)The brushless motors are not the same, one is 2700kv and one is 6700kv.
8)There is around 15cm between the 2 brushless motors and 10cm between the second brushless motor and the PCB. Also the higher KV motor is in a mounting bracket that fully covers it(think about it as a metal box, it should help with the noise).

So here comes the problem, everything works perfectly fine when not using a propeller on the 6700kv(but using a propeller on the 2700kv), I can use any commands by themselves, together, everything is fine, no problem, for as long as I want. As soon as I add a propeller to the second brushless motor (6700KV), after a few second of use the xbee freezes and doesn't receive any commands anymore, sometimes it just freezes with the second motor spinning, sometimes the second motor stops spinning and the first one randomly starts spinning. This only happens with a proppeler installed, which I find strange, the only thing I can think of, is that the motor draws more power with the propeller and creates noise which influences and freezes the Xbee.
I was also thinking of maybe changing the baud rate to 4800 or 9600, maybe that can help? Let me know if you have any ideas or solutions.

Please post your complete code (both TX and RX sketches) as well as a neatly drawn schematic of your wiring.

How are the ESCs wired in terms of the batteries?

Remote:

#include <LiquidCrystal.h>

const int RS = 13, EN = 12, D4 = 11, D5 = 10, D6 = 9, D7 = 8;
LiquidCrystal lcd(RS, EN, D4, D5, D6, D7);

const int LeftStick = A1;

const int RightStick = A2;

const int LiftOff = A0;
int ValLiftOff;
int sensorValue;

const int Switch1 = 2;
const int Switch2 = 3;

int Buzzer = 7;

void setup() {

  lcd.begin(16, 2);
  pinMode(LeftStick, INPUT);
  pinMode(RightStick, INPUT);
  pinMode(LiftOff, INPUT);
  pinMode(Switch1, INPUT);
  pinMode(Switch2, INPUT);
  Serial.begin(19200);
}

void loop() {
  // Setup Switches
  digitalWrite(2, HIGH);
  digitalWrite(3, HIGH);
  delay(5);

  // Lift-Off Control
  if (digitalRead(Switch2) == LOW)
  {

    ValLiftOff = analogRead(LiftOff);
    ValLiftOff = map(ValLiftOff, 0, 1023, 180, 80);

    lcd.setCursor(0, 0);
    lcd.print("Lift:");
    lcd.print(ValLiftOff - 80);
    lcd.print("%   ");
    Serial.print('<');
    Serial.print(ValLiftOff);
    Serial.println('>');
    delay(5);

    // Right Stick for Servo
    if (analogRead(RightStick) < 400)
    {
      Serial.print('L');
      delay(5);

    }
    else if (analogRead(RightStick) > 600)
    {
      Serial.print('R');
      delay(5);
    }
    else if (analogRead(RightStick) > 400 && analogRead(RightStick) < 600)
    {
      Serial.print('C');
      delay(5);
    }

    // Left Stick for Main Motor


    if (analogRead(LeftStick) > 600)
    {
      Serial.println('F');
      delay(5);
    }
    else if (analogRead(LeftStick) <= 600)
    {
      Serial.println('S');
      delay(5);
    }


    // Battery Level
    sensorValue = analogRead(A4);                     //read the A0 pin value
    float voltage = sensorValue * (5.00 / 1023.00) * 2;   //convert the value to a true voltage
    lcd.setCursor(0, 2);
    lcd.print("Battery: ");
    lcd.print(voltage); //print the voltage to LCD
    lcd.print("V  ");


    if (digitalRead(Switch1) == LOW)
    {
      lcd.setCursor(10, 0);
      lcd.print("B: ON ");
      if (voltage < 7.6)
      {
        digitalWrite(Buzzer, HIGH);
        delay(2000);
        digitalWrite(Buzzer, LOW);
        delay(2000);
      }
      else
      {
        digitalWrite(Buzzer, LOW);
      }
    }
    else if (digitalRead(Switch1) == HIGH)
    {
      lcd.setCursor(10, 0);
      lcd.print("B: OFF");
    }
  }
  else if (digitalRead(Switch2) == HIGH)
  {
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Controls Offline");
    delay(1000);
  }

}

Main Board:

#include <Servo.h>
Servo myservo;
Servo motor_1;
Servo motor_2;


// Lift-Off Motor
bool started = false;         //True: Message is strated
bool ended   = false;         //True: Message is finished
char Byte = ' ';              //Variable to store the incoming byte
char msg[3];                  //Message - array
byte index;                   //Index of array


void setup()
{
  Serial.begin(19200);
  myservo.attach(10);
  motor_1.attach(9);
  motor_2.attach(8, 1000, 2000);
}

void loop()
{

  while (Serial.available()) {
    Byte = Serial.read();

    if (Byte == 'R')
    {
      myservo.write(5);
      delay(10);
    }
    else if (Byte == 'L')
    {
      myservo.write(60);
      delay(10);
    }
    else if (Byte == 'C')
    {
      myservo.write(36);
      delay(10);
    }

    if (Byte == 'F')
    {
      motor_2.write(180);
      delay(10);
    }
    else if (Byte == 'S')
    {
      motor_2.write(90);
      delay(10);
    }

    if (Byte == '<')
    {
      started = true;
      index = 0;
      msg[index] = '\0';
    }
    //End the message when the '>' symbol is received
    else if (Byte == '>')
    {
      ended = true;
      break;
    }
    //Read the message!
    else
    {
      if (index < 4)
      {
        msg[index] = Byte;
        index++;
        msg[index] = '\0';
      }
    }
  }
  //Write the value to the motor
  if (started && ended)
  {
    int value = atoi(msg);
    motor_1.write(value);
    index = 0;
    msg[index] = '\0';
    started = false;
    ended = false;
  }
}

It seems that all the wiring is correct, which leads me to believe the extra load of adding a second propeller is not causing the failure. You need to do more testing to figure out what exactly is causing the problem. Tbh, if you could make a small youtube video of it "working" and "not working" and post the link here, that would help.

As a side note, the way you're parsing the XBee commands is rather strange and might have a bug or two in it. I'd suggest using SerialTransfer.h to automatically packetize and parse your data. The library is installable through the Arduino IDE and includes many examples.

Example TX Arduino Sketch:

#include "SerialTransfer.h"


SerialTransfer myTransfer;

struct STRUCT {
  char z;
  float y;
} testStruct;


void setup()
{
  Serial.begin(115200);
  Serial1.begin(115200);
  myTransfer.begin(Serial1);

  testStruct.z = '|';
  testStruct.y = 4.5;
}


void loop()
{
  myTransfer.txObj(testStruct, sizeof(testStruct));
  myTransfer.sendData(sendSize);
  delay(100);
}

Example RX Arduino Sketch:

#include "SerialTransfer.h"


SerialTransfer myTransfer;

struct STRUCT {
  char z;
  float y;
} testStruct;


void setup()
{
  Serial.begin(115200);
  Serial1.begin(115200);
  myTransfer.begin(Serial1);
}


void loop()
{
  if(myTransfer.available())
  {
    myTransfer.rxObj(testStruct, sizeof(testStruct));
    Serial.print(testStruct.z);
    Serial.print(' ');
    Serial.println(testStruct.y);
    Serial.println();
  }
  else if(myTransfer.status < 0)
  {
    Serial.print("ERROR: ");
    Serial.println(myTransfer.status);
  }
}

For more information, check out Serial Input Basics and Serial Input Advanced.