Arduino Mega with BlueTooth module powered with Li-pol battery

Hello everyone,

I have a problem with my project, in a nutshell it is a mobile robot which uses steper motors and drivers pololu drv8825. I use original Arduino Mega Rev3 and XM-15B module. My aim is to send a char from bluetooth terminal on my phone in order to change robot's motors direction back/forward. When robot receives 'k' it should change its direction, nothing happens in all other cases.

When arduino and BT module are powered with USB everything work properly ( motors are turn off). Diode on BT module shines continuously indicating connection with phone and also I receive a feedback from program.

When robot is powered with Li-pol battery, diode on BT module shines continuously, indicating connection with phone no feedback from program. Steper motors work properly, robot moves forward, only in one direction. I have no feedback from program, and nothing happens when I press direction change button.

My li-pol battery supplies voltage about 11,7V for Arduino Mega Vin pin, and using pig 3,3V on Arduino Mega I supply BT module with 3,3V.
I will be very grateful for any sugestions or help.
Thanks in andvance.

My code below:

#define L_DIR 2 
#define R_DIR 3
#define L_STEP 9
#define R_STEP 8      //   left/right STEP and DIR pin declaration 


void setup()
{ 
  Serial2.begin(9600);
  pinMode(L_STEP, OUTPUT);  
  pinMode(R_STEP, OUTPUT);
  for(int i=0;i<6;i++)
  {
    pinMode(22+i,OUTPUT);       // PINS M0,M1,M2 are set as OUTPUT for left and right motor 
  }
    for(int i=0;i<6;i++)
  {
    digitalWrite(22+i,HIGH);  // LOGIC '1' on all M0,M1,M2 pins
  }
  digitalWrite(L_STEP,LOW);
  digitalWrite(R_STEP,LOW);
  digitalWrite(L_DIR,LOW);
  digitalWrite(R_DIR,HIGH);
  delay(2000);
} 


void dir()
{
  if (Serial2.available()>0)      
  {
    char data=(char)Serial2.read();
    if(data=='k')
    {
     delay(1);
      Serial2.println("CHANGE DIRECTION!");
      digitalWrite(L_DIR,HIGH);
     digitalWrite(R_DIR,LOW);
    }
    else
    {
      delay(1);
      Serial2.println("NOTHING IS HAPPEN");
    }
  }
}
  
void loop() 
{ 
  dir();
  delayMicroseconds(50);
  digitalWrite(L_STEP,LOW);     // GIVING LOGIC '1', 1 time per 50uS 
  digitalWrite(R_STEP,LOW);
  delayMicroseconds(50);
  digitalWrite(L_STEP,HIGH);
    digitalWrite(R_STEP,HIGH);
}