TLE5206 5A Motordriver (Final Status)

The TLE5206 motordriver circuit:

A sketch für the motordriver without speed control:

void setup()
{
  pinMode(5, OUTPUT);  // Motordriver IN1)
  pinMode(6, OUTPUT);  // Motordriver IN2)
  digitalWrite(5, LOW);
  digitalWrite(6, LOW);
}

void loop()
{
  digitalWrite(5, LOW);  // Forward
  digitalWrite(6, HIGH);
  delay(10000);
  digitalWrite(5, LOW);  // Stop
  digitalWrite(6, LOW);
  delay(2000);
  digitalWrite(5, HIGH); // Backward
  digitalWrite(6, LOW);
  delay(10000);
  digitalWrite(5, LOW);  // Stop
  digitalWrite(6, LOW);
  delay(2000);
}

You need no pins with pwm capability for this !

A sketch for the motordriver with speed control:

// 255 = Stop, 1 = Highest speed

#define Motortreiber1_IN1_Pin 5  // PWM
#define Motortreiber1_IN2_Pin 6  // PWM

byte Speed;

void setup()
{
  pinMode(Motortreiber1_IN1_Pin, OUTPUT);  // Motordriver IN1)
  pinMode(Motortreiber1_IN2_Pin, OUTPUT);  // Motordriver IN2)
  digitalWrite(Motortreiber1_IN1_Pin, LOW);
  digitalWrite(Motortreiber1_IN2_Pin, LOW);
}

void loop()
{  
  for (Speed = 150; Speed >= 1; Speed--)
  {
    analogWrite(Motortreiber1_IN1_Pin, Speed);
    digitalWrite(Motortreiber1_IN2_Pin, HIGH);  // Foward
    delay(200);
  }
  delay(1000);
  analogWrite(Motortreiber1_IN1_Pin, 255);   // Stop
  digitalWrite(Motortreiber1_IN2_Pin, HIGH);
  delay(2000);
  
  for (Speed = 150; Speed >= 1; Speed--) 
  {
    digitalWrite(Motortreiber1_IN1_Pin, HIGH);
    analogWrite(Motortreiber1_IN2_Pin, Speed);  // Backward
    delay(200);
  }
  delay(1000);
  digitalWrite(Motortreiber1_IN1_Pin, HIGH);
  analogWrite(Motortreiber1_IN2_Pin, 255);    // Stop
  delay(2000);
}

The two pins who are used for the motordriver control must have pwm !

Ah, that chip was looking to have a very handy set of specifications until I noticed the switching speed...

It will be OK at standard Arduino PWM rates of 1kHz or so, but its a shame about the 15us switching time (to me at least) - I've used the (expensive) LMD18200 before (100ns switching, rather than 15us...) for fast PWM and am still looking for a better cheaper alternative in the same package style (bolt on to heatsink).

TLE5206: Fairly cheap, straightforward to use and available in a sensible package though - presume it works nicely?

It works very nice for me !

Do you really need the LM338T? Or are you using it because your power source has a to high voltage for the motor?
I need a 3A dc motor controller for an old RC car and was thinking about using the TLE5206.

I use a 14.8V source and give the motor only 7.5V - 8V !