RaspberryPi L298n motor driver Board(English)

From 52Pi Wiki
Jump to navigation Jump to search

RaspberryPi L298n motor driver Board

Description

This module is designed specifically for the Raspberry Pi Motor Driver Function board. 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

L298n 01.jpg

Technical Details

Type Value
Name RaspberryPi L298n motor driver Board
Motor Voltage Supply 12V to 5V
Number of Channel signal 2
Driver L298N Dual H Bridge DC Motor Driver IC
peak current 2A per bridge
logical supply voltage 4.5~7V
logical operating current 0 ~ 36mA
Control signal input voltage range 4.5~5.5V (high) / 0V (low)
 Maximum power consumption 20W

Overview

product Specification


L298n 03.png

schematic


L298n 02.png

Learn

1A connected to motor 1A, 1B connected to motor 1B, 2A connected to motor 2A, 2B connected to motor 2B, then you can adjust PWM to adjust speed , if you want to know your motor PWM pulse width, frequency information, Please read about motor reference maunal. It is note that the higher of the PWM frequency, the higher the system load with your pi.

Example and test code

#include <wiringPi.h>

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

int main (void)
{
  int ch ;

  if (wiringPiSetup () == -1)
    exit (1) ;

  pinMode (1, PWM_OUTPUT) ;

  for (;;)
  {
    for (ch = 0 ; ch < 1024 ; ++ch)
    {
      pwmWrite (1, ch) ;
      delay (1) ;
    }

    for (ch = 1023 ; ch >= 0 ; --ch)
    {
      pwmWrite (1, ch) ;
      delay (1) ;
    }
  }

  return 0 ;
}

(Tip:Compile Command:
cc -o myprog myprog.c -lwiringPi -lpthread )



Shop

附件


1306-0.91-CODE.zip
SSD1306-Revision 1.0.pdf Category:名称
如对此页的规则或教程有意见者,可到此网页或是在管理员Powup333的讨论页留言。