• TB6612FNG 모터드라이버 L298N기반

CODBOT

TB6612FNG 모터드라이버 L298N기반

7,800 7,800
제조사
CODBOT
원산지
중국
배송정보
3,000원 (조건부배송) 지역별 추가배송 주문시결제(선결제)
택배 / 화물배송 / 방문수령 / 퀵배송

두개의 DC모터를 제어할 수 있는 모터 드라이버입니다.

최대 15V 3.2A의 출력을 냅니다.

 

별도로 납땜이 필요합니다.

 

Description: 

The TB6612FNG motor driver can control up to two DC motors at a constant current of 1.2A (3.2A peak). Two input signals (IN1 and IN2) can be used to control the motor in one of four function modes – CW, CCW, short-brake, and stop. The two motor outputs (A and B) can be separately controlled, the speed of each motor is controlled via a PWM input signal with a frequency up to 100kHz. The STBY pin should be pulled high to take the motor out of standby mode.CJMCU.

Logic supply voltage (VCC) can be in the range of 2.7-5.5VDC, while the motor supply (VM) is limited to a maximum voltage of 15VDC. The output current is rated up to 1.2A per channel (or up to 3.2A for a short, single pulse).

Board comes with all components installed as shown. Decoupling capacitors are included on both supply lines. All pins of the TB6612FNG are broken out to two 0.1″ pitch headers; the pins are arranged such that input pins are on one side and output pins are on the other.

Features:
  • Power supply voltage: VM=15V max, VCC=2.7-5.5V
  • Output current: Iout=1.2A(average) / 3.2A (peak) 
  • Standby control to save power
  • CW/CCW/short brake/stop motor control modes
  • Built-in thermal shutdown circuit and low voltage detecting circuit
  • All pins of the TB6612FNG broken out to 0.1″ spaced pins
  • Filtering capacitors on both supply lines

 

 

예제 코드

 20220917_102609_102730.jpg 

 

 

//motor A connected between A01 and A02
//motor B connected between B01 and B02
 
int STBY = 10; //standby
 
//Motor A
int PWMA = 3; //Speed control 
int AIN1 = 9; //Direction
int AIN2 = 8; //Direction
 
//Motor B
int PWMB = 5; //Speed control
int BIN1 = 11; //Direction
int BIN2 = 12; //Direction
 
void setup(){
  pinMode(STBY, OUTPUT);
 
  pinMode(PWMA, OUTPUT);
  pinMode(AIN1, OUTPUT);
  pinMode(AIN2, OUTPUT);
 
  pinMode(PWMB, OUTPUT);
  pinMode(BIN1, OUTPUT);
  pinMode(BIN2, OUTPUT);
}
 
void loop(){
  move(1, 255, 1); //motor 1, full speed, left
  move(2, 255, 1); //motor 2, full speed, left
 
  delay(1000); //go for 1 second
  stop(); //stop
  delay(250); //hold for 250ms until move again
 
  move(1, 128, 0); //motor 1, half speed, right
  move(2, 128, 0); //motor 2, half speed, right
 
  delay(1000);
  stop();
  delay(250);
}
 
 
void move(int motor, int speed, int direction){
//Move specific motor at speed and direction
//motor: 0 for B 1 for A
//speed: 0 is off, and 255 is full speed
//direction: 0 clockwise, 1 counter-clockwise
 
  digitalWrite(STBY, HIGH); //disable standby
 
  boolean inPin1 = LOW;
  boolean inPin2 = HIGH;
 
  if(direction == 1){
    inPin1 = HIGH;
    inPin2 = LOW;
  }
 
  if(motor == 1){
    digitalWrite(AIN1, inPin1);
    digitalWrite(AIN2, inPin2);
    analogWrite(PWMA, speed);
  }else{
    digitalWrite(BIN1, inPin1);
    digitalWrite(BIN2, inPin2);
    analogWrite(PWMB, speed);
  }
}
 
void stop(){
//enable standby  
  digitalWrite(STBY, LOW); 

비밀번호 인증

비밀번호를 입력해 주세요.

확인