L293D
Диапазон напряжения: 4,5 В до 36 В
Отдельный вход-Logic Supply
Внутренняя защита ESD
Термовыключение
Высокоскоростной помехоустойчивые Входы
Функционально заменимые SGS L293 и SGS L293D
Выходной ток 1 А на канал (600 мА для L293D)
Пиковый выходной ток 2 А на канал (1,2 А L293D)
![]() |
|
![]() |
![]() |
На следующей схеме показано, как подключить L293 к вашему двигателю и Arduino. Каждый двигатель имеет 3 Arduino контакта. Если вы используете только один двигатель, оставить L293 штифты 9, 10, 11, 12, 13, 14, и 15 неподключенные.
![]() |
Схема подключения L293D к Arduino |
Предположим у вас есть только один двигатель, соединенный с позволяют привязаны к Arduino Pin 3 и двух контрольных направлении, привязанных к Arduino Pin 4 и 5. Ниже приведена таблица, описывающая функции выводов управления.
ENABLE
|
DIRA
|
DIRB
|
Function
|
H
|
H
|
L
|
Turn right
|
H
|
L
|
H
|
Turn left
|
H
|
L/H
|
L/H
|
Fast stop
|
L
|
either
|
either
|
Slow stop
|
Описание работы L293D и приграмирования Создаем робота
Пример программы
Sketch code
/*Exercise the motor using the L293 chip*/ #define ENABLE 3 #define DIRB 4 #define DIRA 5 void setup() { int i; //---set pin direction pinMode(ENABLE,OUTPUT); pinMode(DIRA,OUTPUT); pinMode(DIRB,OUTPUT); //---back and forth example digitalWrite(ENABLE,HIGH); // enable on for (i=0;i<5;i++) { digitalWrite(DIRA,HIGH); //one way digitalWrite(DIRB,LOW); delay(500); digitalWrite(DIRA,LOW); //reverse digitalWrite(DIRB,HIGH); delay(500); } digitalWrite(ENABLE,LOW); // disable delay(4000); //---fast/slow stop example digitalWrite(ENABLE,HIGH); //enable on digitalWrite(DIRA,HIGH); //one way digitalWrite(DIRB,LOW); delay(1000); digitalWrite(ENABLE,LOW); //slow stop delay(3000); digitalWrite(ENABLE,HIGH); //enable on digitalWrite(DIRA,HIGH); //one way digitalWrite(DIRB,LOW); delay(1000); digitalWrite(DIRA,LOW); //fast stop delay(3000); //---PWM example, full speed then slow digitalWrite(ENABLE,HIGH); //enable on digitalWrite(DIRA,HIGH); //one way digitalWrite(DIRB,LOW); delay(2000); analogWrite(ENABLE,128); //half speed delay(2000); digitalWrite(ENABLE,LOW); //all done } void loop() { }