fasadgirl.blogg.se

L298n motor driver arduino tutorial
L298n motor driver arduino tutorial




l298n motor driver arduino tutorial

#L298N MOTOR DRIVER ARDUINO TUTORIAL HOW TO#

Now that you’re familiar with the L298N Motor Driver, let’s see how to use it to control your DC motors. You need to remove those jumper caps to control the speed of your motors. There are jumper caps on the enable pins by default. The input pins are used to control the direction of your DC motors, and the enable pins are used to control the speed of each motor. If you supply more than 12V, you should remove the jumperĪt the bottom right you have four input pins and two enable terminals. Jumper removed: you need to provide 5V to the +5V terminal.

l298n motor driver arduino tutorial

  • Jumper: jumper in place – uses the motors power supply to power up the chip.
  • Acts as a 5V output if jumper is in place
  • +12V: The +12V terminal is where you should connect your power supply.
  • For example, you can use a bench power supply to test this tutorial. In this tutorial will be using 4 AA 1.5V batteries that combined output approximately 6V, but you can use any other suitable power supply. It’s important to note that despite the +12V terminal name, with the setup we’ll use here (with the jumper in place) you can supply any voltage between 6V and 12V. Note: if you supply more than 12V, you need to remove the jumper and supply 5V to the +5V terminal. However, if the jumper is in place, the chip is powered using the motor’s power supply and you don’t need to supply 5V through the +5V terminal. The +5V terminal is used to power up the L298N chip. The +12V terminal block is used to power up the motors. OUT1 and OUT2 at the left and OUT3 and OUT4 at the right.Īt the bottom you have a three terminal block with +12V, GND, and +5V.

    l298n motor driver arduino tutorial

    Motor B is same as Motor A.The motor driver has a two terminal block in each side for each motor.

  • IN1/2/3/4: IN1/2/3/4 is the pin for the motor control.
  • EA/EB: EA/EB is the enable pin for the two motor A/B, the motor speed also can be controlled by the PWM of this pin.
  • Putting on the jumper enable the pull up resistor for the microcontroller, putting off it disable it. The power of logic circuit of the board is supplied by the 5V port when this jumper put off. When the jumper is put on, The 78M05 supplies the 5V power for logic circuit on the board from the VMS port(7V < VMS < 18V).
  • 5V: Power input for the logic circuit on the board.
  • VMS: VMS is the 5V-35V power source for motor.
  • CSB: The current test pin for motor B, this pin can be wired a resistor for current testing or tied a jumper to disable it.
  • CSA: The current test pin for motor A, this pin can be wired a resistor for current testing or tied a jumper to disable it.
  • Other extensions: current probe, controlling direction indicator, pull-up resistoer switch, logic part power supply.
  • Enable signal level: Low -0.3V~1.5V, high: 2.3V~Vss.
  • Controlling level: Low -0.3V~1.5V, high: 2.3V~Vss.
  • Logic power output Vss: +5~+7V (internal supply +5V).
  • An additional supply input is provided so that the logic works at a lower voltage.

    l298n motor driver arduino tutorial

    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. Two enable inputs are provided to enable or disable the device independently of the input signals. 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. Double H driver module uses ST L298N dual full-bridge driver, an integrated monolithic circuit in a 15- lead Multiwatt and PowerSO20 packages.






    L298n motor driver arduino tutorial