BB-VNH3SP30 – Мощный драйвер двигателя 30А

BB-VNH3SP30-1

– Нагрузка до 30А;
– Напряжение питания 5.5-36В;
– LED индикатор состояния ШИМ;
– LED индикатор состояния направления;

Купить.

 

    |---------------------------------------------------------------------------|
    |            The hardware connections are as follows:                       |
    |--------------------------------|------------------------------------------|
    |  Connector at Olimexino-328    |      Connector at BB-VNH3SP30            |
    |--------------------------------|------------------------------------------|
    |    Not connected!              |          CTRL<1>,  VIN                   |
    |    Power<3>, 5V                |          CTRL<2>,  +5V                   |
    |    Power<4>, GND               |          CTRL<3>,  GND                   |
    |    Digital<9>                  |          CTRL<4>,  INA                   |
    |    Digital<13>                 |          CTRL<5>,  INB                   |
    |    Digital<11>                 |          CTRL<6>,  PWM                   |
    |    Digital<10>                 |          CTRL<7>,  ENA/DIAGA             |
    |    Digital<12>                 |          CTRL<8>,  ENB/DIAGB             |
    |--------------------------------|------------------------------------------|

L298 + ATMega168P = Motor Driver for Rover Z-1.0

IMG_1262
MCU ATMega168P

IMG_1263
L298 Модуль – вместе

 


// ATmega 168P (Arduino) L298 и 74hc00

struct MOTOR   
{
  int in;       // INVERTOR INPUT
  int enable;   // ENABLE
};

MOTOR MOTOR1 = { 7, 5 };  // D5-PWM, D7-Direction
MOTOR MOTOR2 = { 8, 6 };  // D6-PWM, D8-Direction

int FORWARD = HIGH;
int BACK = LOW;

void setup()
{
  pinMode(MOTOR1.in, OUTPUT); 
  pinMode(MOTOR2.in, OUTPUT);
}

void loop()
{
  motor1(FORWARD, 50);   
  motor2(FORWARD, 50);
  delay(3000);
  motor1(BACK, 100);     
  motor2(BACK, 100); 
  delay(5000);
}

void motor1(int dir, int pwm) 
{
  digitalWrite(MOTOR1.in, dir);
  analogWrite(MOTOR1.enable, pwm);
}

void motor2(int dir, int pwm)
{
  digitalWrite(MOTOR2.in, dir);
  analogWrite(MOTOR2.enable, pwm);
}