Product | Arduino Shields | Arduino L298N Motor Drive Shield V4.0
Arduino L298N Motor Drive Shield V4.0
Arduino L298N Motor Drive Shield V4.0
41803
 
US$19.98 Loading ...
 
Share/Save/Bookmark


Arduino
L298N Motor Drive Shield -V4.0
 


This item have been updated into Arduino Motor Drive Shield-L298N V5.0.

Add some switches for different applications compared with old version.

 

 

VLO (Voltage Logic Onboard)

When the motor drive chip L298N work , there are two voltage: logical voltage (5V) and motor voltage (such as 7.2 V, 9V or 12V). In order to convert the motor voltage of VEX terminal to 5V logic voltage, and this motor driven shield supply with a corresponding voltage transform circuit.
Because the voltage transform circuit's working voltage is restricted (less than 20V), so if motor is greater than 20V, then can not use this voltage transform circuit. The function of VLO switch is to choose the open status of logic transform circuit (switch to "ON") or the closed status of logic transform circuit(switch to "OFF").

VLC (Voltage Logic Connected)

Besides L298N motor driven shield supply with a corresponding voltage transform circuit, you can also directly connect with Arduino's 5V logical voltage terminal to get 5v Voltage.
The function of VLC switch is used for L298N motor driven shield to choose the connection status with Arduino's 5V logical voltage terminal (switch to "ON") or break status with Arduino's 5V logical voltage terminal(switch to "OFF").

VM (Voltage Motor)

The function of VM is used to choose motor voltage. When L298N motor driver Shield are connecting with Arduino . there are two ways to supply power to motor :

1、Through Vin pin of Arduino (switch to Vin)

2、Through VEX terminals of motor driven shield (switch to VEX).

Compatible with Arduino, L298N motor driver shield can bear higher voltages and currents, so we must pay special attention to circuit connection. Here are some typical circuit connection modes for references :

1、Motor voltage is from 6v to 12 v

Generally speaking, Arduino can get power through external 6V - 12V transformer(Vin pins of Arduino), if your motor voltage just in this range, that you can just use this external power supply to supply power simultaneously for Arduino and motor. Then VLO, VLC and VM are set as below :

* VLO : OFF
* VLC : ON
* VM : VIN

 



2、Motor voltage is less than 6V

You can only supply powor to motor through VEX terminals and GND terminals of motor driven shield ,because the 5V voltage transform circuit of motor driven shield can not work (VEX voltage is too low), so we can only connect with 5V terminals of Arduino to supply 5V logical voltage for our motor shield. Then VLO, VLC and VM are set as below :

* VLO : OFF
* VLC : ON
* VM : VEX
 


 

3、Motor voltage is from 12V to 20V

You can only supply powor to motor through VEX terminals and GND terminals of motor driven shield ,but the 5V voltage transform circuit of motor driven shield can work . Then VLO, VLC and VM are set as below :

* VLO : ON
* VLC : OFF
* VM : VEX

 


4、Motor voltage is from 20V to 46V

You can only supply powor to motor through VEX terminals and GND terminals of motor driven shield ,because the 5V voltage transform circuit of motor driven shield can not work (VEX voltage is too high), so we can only connect with 5V terminals of Arduino to supply 5V logical voltage for our motor shield. Then VLO, VLC and VM are set as below :

* VLO : OFF
* VLC : ON
* VM : VEX

 


 

Description :

This motor drive shield is based on L298N.It is more powerful than Arduino motor drive shield- L293D.L298N is a kind of high voltage、heavy current motor drive chip,maximum working voltage is 46V,constant working current is 2A,transient peak electric current is 3A。This chip contain high voltage heavy current bridge driver of two H-bridge,it can drive two DC motor directly.

This shield should firstly consider how to supply power to motor when linking to the circuit,if your Arduino adopt external power,and this power supply mode that can fit your motor driver,then link the motor to MA or MB:

 


Then link jumper wire of VM to VIN port.


Another way is supply less than 35V voltage to motor by itself,separately link to GND and VEX wire holder of motor shield,the motor link to MA or MB as the same:

 


But jump wire of VM  should link to VEX:


When talking about controlling principle,L298N are the same as L293D on function,they both control the direction of motor by two direction pin,and control the speed of motor by one enable pin。When to this shields,the motor MA direction pin is Arduino's 13 and 12 pin,speed pin is Arduino's 10 pin;while the motor MB direction pin is Arduino's 11 and 8 pin,speed pin is Arduino's 9 pin;

The test code show as below :

// motor A
int dir1PinA = 13;
int dir2PinA = 12;
int speedPinA = 10;

// motor B
// motor A
int dir1PinB = 11;
int dir2PinB = 8;
int speedPinB = 9;

unsigned long time;
int speed;
int dir;

void setup() {
  pinMode(dir1PinA, OUTPUT);
  pinMode(dir2PinA, OUTPUT);
  pinMode(speedPinA, OUTPUT);
  pinMode(dir1PinB, OUTPUT);
  pinMode(dir2PinB, OUTPUT);
  pinMode(speedPinB, OUTPUT);

  time = millis();
  speed = 0;
  dir = 1;
}

void loop() {
  analogWrite(speedPinA, speed);
  analogWrite(speedPinB, 255 - speed);
  // set direction
  if (1 == dir) {
    digitalWrite(dir1PinA, LOW);
    digitalWrite(dir2PinA, HIGH);
    digitalWrite(dir1PinB, HIGH);
    digitalWrite(dir2PinB, LOW);
  } else {
    digitalWrite(dir1PinA, HIGH);
    digitalWrite(dir2PinA, LOW);
    digitalWrite(dir1PinB, LOW);
    digitalWrite(dir2PinB, HIGH);
  }
  if (millis() - time > 5000)  {
    time = millis();
    speed += 20;
    if (speed > 255) {
      speed = 0;
    }
    if (1 == dir) {
      dir = 0;
    } else {
      dir =1;
    }
  }
}


4 LEDs standard for the motor direction of rotation,the illumination represent the motor speed:



moreover,there is a VL jumper wire on this shield ,it is used for choosing logic level for L298N,we will choose V5V usually,that's to say get logic voltage from Arduino。

 


If the VL jumper wire connect with VEX,it get the corresponding logic voltage through motor external power VEX after partial pressure and the voltage bleeder is LM3940, its highest voltage value is 35V, it also decide that the highest voltage of this shield is 35V on some procedure.


Click to download the schematic diagram of version 2.0

Click to download the schematic diagram V3.0

Click to download the L298 Datasheet



下载png文档资料.png

Write a review
*Review title
Please enter subject.
*Your review
Please enter review.
*Rating
(Click star icon to comment)
 
Display name
*Enter security code

CAPTCHA

Please enter code
Loading ...
Best Sellers
Newsletter

Join our newsletter today, to get latest product information and promotion code.

Join
Loading ...