Motor driver not able to drive motor in reverse direction In my recent project, I'm using DC motor driver 24V 20A[RKI-1340].

Motor Driver

After reading the manual of this I figure out information for this motor driver.
Basically, this motor driver has 5 pins. Each has own functionality.


  (1) 5V : Regulated 5V output from motor driver board (maximum 50mA
  supply)
  
  (2) BRK : Breaking input to halt the motor in operations when 5V
  (logic high)
  
  (3) PWM : Pulse Widht Modulation input to control speed of motor
  (recommended freq 20Hz to 400Hz)
  
  (4) DIR : Pulled down to GND Forward by default and Backward when 5V
  (logic high)
  
  (5) GND : Connect to GND on controlling board


Now, I connect this motor driver to my Arduino. My connection is like below:


  Motor Driver : Arduino
  
  5V - No connection with Arduino
  
  DIR ---> Pin 4
  
  PWM ---> Pin 5
  
  BRK ---> Pin 6
  
  GND - No connection with Arduino


And my code is like below:

const int kPinDIR = 4;
const int kPinPWM = 5;
const int kPinBRK = 6;

void setup()
{
  pinMode(kPinDIR, OUTPUT);
  pinMode(kPinBRK, OUTPUT);
  pinMode(kPinPWM, OUTPUT);
}

void loop()
{
  digitalWrite(kPinDIR, HIGH);   // Case 1
  digitalWrite(kPinBRK, LOW);

//  digitalWrite(kPinDIR, LOW);  // Case 2
//  digitalWrite(kPinBRK, HIGH);
//
//  digitalWrite(kPinDIR, LOW);  // Case 3
//  digitalWrite(kPinBRK, LOW);
//
//  digitalWrite(kPinDIR, HIGH); // Case 4
//  digitalWrite(kPinBRK, HIGH);

  analogWrite(kPinPWM, 255); 
}


As you can see that, I tried out 4 different case to run motor. But motor run only for first two case(case 1 &amp; 2) and direction of rotation is same. And in other two case(case 3 &amp; 4) motor is not rotating.

I don't understand that thing why case 1 and case 2 give same output. If I tried out logic according manual description means according manual DIR pin change the direction of motor's rotation. According that If I provide LOW logic(GND) to DIR pin then motor rotating in one direction and but If I provide HIGH logic(5V) to DIR pin then motor is not rotating. I tried every case(already written in my code) but motor is still rotating in same direction.

And here I provide supply to motor driver by regulated power supply. And for Arduino, it take supply through it's cable(cable is connected to LAPTOP).

Actually, I am trying to run Peltier module using this motor driver. I want to change Peltier's polarity using this. So, first I tried out with motor then If I succeed then I tried this one to Peltier. I think I have to connect GND of Motor Driver to Arduino's GND but I think it will my Arduino. I'm not sure about this GND connection between Motor Driver and Arduino. Please suggest me.

EDIT 1: My wiring is look like this.







simulate this circuit &ndash; Schematic created using CircuitLab
The motor driver's GND does need to be connected to the Arduino's GND so that the signal loop is complete. This won't break the Arduino.