Iduino ST-1112 User guide

IDUINO for maker’s life
User Manual
For
L298N Motor Driver Board (ST1112)
www.openplatform.cc
IDUINO for maker’s life
Pin Name
Description
“MOTORA”
Motor1
“MOTOR”
Motor2
“VMS”
5V/DC - 35V /DC
“GND”
Ground
“5V”
Power input for the logic circuit on the board
“ENA”
is the enable pin for the motor 1
“IN1”
is the pin for the motor 1control
“IN2”
is the pin for the motor1 control
“IN3”
is the pin for the motor2 control
“IN4”
is the pin for the motor2 control
“ENB”
is the enable pin for the motor 2
“5V”
Output 5V
“GND”
Ground
“CSB”
The current test pin for motor 2, this pin can be wired a resistor for current testing or tied a jumper to disable it.
“CSA”
The current test pin for motor 1, this pin can be wired a resistor for current testing or tied a jumper to disable it.
1. Introduction
Double H driver module uses ST L298N dual full-bridge driver, an integrated monolithic circuit in a 15- lead Multiwatt and PowerSO20 packages. It is a high voltage, high current dual full-bridge driver designed to accept standard TTL logic levels and drive inductive loads such as relays, solenoids, DC and stepping motors. Two enable inputs are provided to enable or disable the device independently of the input signals. The emitters of the lower transistors of each bridge are connected together and the corresponding external terminal can be used for the con-nection of an external sensing resistor. An additional supply input is provided so that the logic works at a lower voltage. Specification:
Driver: L298N Driver power supply: +5V/DC to +35V/DC Driver Io: 2A Logic power output Vss: +5/DC to 7V/DC (internal supply +5V/DC) Logic current: 0 - 36mA Controlling level: Low -0.3V/DC to 1.5V/DC, high: 2.3V/DC to Vss Enable signal level: Low -0.3V/DC to 1.5V/DC, high: 2.3V/DC - Vss Max power: 25W (Temperature 75 cesus) Working temperature: -25 to +130
2. Pin Instruction
www.openplatform.cc
IDUINO for maker’s life
“UR1”
Pull up resistor
“UR2”
Pull up resistor
“UR3”
Pull up resistor
“UR4”
Pull up resistor
“5V_EN”
5V source jumper. When the jumper is put on, The 78M05 supplies the 5V power for the logic circuit on the board from the VMS port(7V < VMS < 18V). The power of logic circuit of the board is supplied by the 5V port when this jumper put off.
3. Example
This module can drive 2 channel DC motor or 2 phase stepper motor.
For 2 channel DC motor, connection and code as below:
Connection: IN1==========13; IN2==========12; IN3==========11; IN4==========10;
********Code begin********
int in1=13; int in2=12; int in3=11; int in4=10;
int speedPinA=6; int speedPinB=5;
void setup() { pinMode(in1,OUTPUT); pinMode(in2,OUTPUT); pinMode(in3,OUTPUT); pinMode(in4,OUTPUT);
digitalWrite(in1,HIGH); digitalWrite(in2,HIGH); digitalWrite(in3,HIGH); digitalWrite(in4,HIGH); } void loop() {
www.openplatform.cc
IDUINO for maker’s life
_mRight(in1,in2); _mRight(in3,in4);
int n=analogRead(A0)/4; _mSetSpeed(speedPinA,n); _mSetSpeed(speedPinB,n); } void _mRight(int pin1,int pin2) { digitalWrite(pin1,HIGH); digitalWrite(pin2,LOW); } void _mLeft(int pin1,int pin2) { digitalWrite(pin1,LOW); digitalWrite(pin2,HIGH); } void _mStop(int pin1,int pin2) { digitalWrite(pin1,HIGH); digitalWrite(pin2,HIGH); } void _mSetSpeed(int pinPWM,int SpeedValue { analogWrite(pinPWM,SpeedValue); }
********Code End********
For 2 stepper motor the connection and code as below:
Connection: IN1=======8; IN2=======9; IN3=======10; IN4=======11;
******Code begin******
#include <Stepper.h>
#define STEPS 100
Stepper stepper(STEPS, 8, 9, 10, 11);
int previous = 0;
www.openplatform.cc
IDUINO for maker’s life
void setup() { stepper.setSpeed(90); }
void loop() { int val = analogRead(0); stepper.step(val - previous); previous = val; }
******Code End******
www.openplatform.cc
Loading...