1:sensea means sensor A,and senseb means sensorB
2:EAI2,I1,means the interface of DC motor A"s command signal,another means DC motor B" interface
3:VMS means Velocity-Measuring System
Here is the sketch for the L298N controlling the DC motor. And the DC motor connect to the" interface of DC motor A" of the board, the D8 pin of Arduino to I1 , D9 to I2 and D11 to EA. And use Arduino 5V and GND for logic supply, connect the outside power supply for the motor supply.
int pinI1=8;
int pinI2=9;
int speedpin=11;
void setup()
{
pinMode(pinI1,OUTPUT);
pinMode(pinI2,OUTPUT);
pinMode(speedpin,OUTPUT);
}
void loop()
{
analogWrite(speedpin,100);
delay(2000);
digitalWrite(pinI1,LOW);
digitalWrite(pinI2,HIGH);
analogWrite(speedpin,100);
delay(2000);
digitalWrite(pinI1,HIGH);
digitalWrite(pinI2,LOW);
analogWrite(speedpin,100);
delay(2000);
digitalWrite(pinI1,HIGH);
digitalWrite(pinI2,HIGH);
delay(2000);
}
And you can see the motor run clockwise a while and stop then run clockwise.
I want to buy this driver but it’s still unclear to me how to connect power to this driver.
As I understood, +5V and GND inputs are power inputs for driver logic and they should be connected to arduino +5V and GND. But where to connect external high-current power source? to VMS and the same GND input?
Is there a way to provide only the high-current power input without a power connection to arduino? If yes, then where to connect it and what is the correct ‘selective of logic’ jumper position??
what exactly affects ‘selective of logic’ jumper position? How the power can be connected to the driver if jumper is set/not set?
above vms on the driver board is probably voltage motor supply…
from the screw terminals on the driver board again the 5V line seems to be a regulated 5V output there is a regulator on the reverse side of the board.
no idea about the correct settings of the jumpers, no one will tell me, but if you have the default jumper settings use
vms to supply the voltage motor supply,
leave the 5v unconnected, it seems to be a supply
use the 2 channels of each 3 inputs from the mcu, which are enable and 2 direction lines for each motor channel.
Seems to be a good controller, just ensure it has the total power handling you need ie for both channels do not assume that the power rating is for each channel