If both the inputs are either HIGH or LOW the Motor B will stop.ĮNB pins are used to control speed of Motor B. When one of them is HIGH and other is LOW, the Motor B will spin. IN3 & IN4 pins are used to control spinning direction of Motor B. If both the inputs are either HIGH or LOW the Motor A will stop. When one of them is HIGH and other is LOW, the Motor A will spin. IN1 & IN2 pins are used to control spinning direction of Motor A. Removing the jumper and connecting this pin to PWM input will let us control the speed of Motor A. Pulling this pin HIGH(Keeping the jumper in place) will make the Motor A spin, pulling it LOW will make the motor stop. If the 5V-EN jumper is removed, you need to connect it to the 5V pin on Arduino.ĮNA pins are used to control speed of Motor A. If the 5V-EN jumper is in place, this pin acts as an output and can be used to power up your Arduino. Remember, if the 5V-EN jumper is in place, you need to supply 2 extra volts than motor’s actual voltage requirement, in order to get maximum speed out of your motor.ĥV pin supplies power for the switching logic circuitry inside L298N IC. The higher the duty cycle, the greater the average voltage being applied to the dc motor(High Speed) and the lower the duty cycle, the less the average voltage being applied to the dc motor(Low Speed).īelow image illustrates PWM technique with various duty cycles andaverage voltages. The average voltage is proportional to the width of the pulses known as Duty Cycle.
PWM is a technique where average value of the input voltage is adjusted by sending a series of ON-OFF pulses. A common technique for doing this is to use PWM (Pulse Width Modulation) The speed of a DC motor can be controlled by varying its input voltage. H-Bridge – For controlling rotation direction.This can be achieved by combining these two techniques. In order to have a complete control over DC motor, we have to control its speed and rotation direction.
Connect Seeeduino to PC via a USB cable.One of the easiest and inexpensive way to control stepper motors is to interface L298N Motor Driver with Arduino. Connect Grove - I2C Motor Driver V1.3 to port I2C of Grove-Base Shield. The default address setup in the program is 0x0f. Then keep the address setup in the program the same as the address setup on the I2C motor driver.Set the address by dial switch is a new function added to the new I2C Motor Driver. Because the L298 has 2 H-bridges, you can make a robot turn around by spinning each wheel in different directions, and of course go forwards and backwards. Hooking up to a motor means you can have it spin in both directions and with PWM input, you can use your Arduino to make them spin at any speed. An h-bridge is basically a specific setup of transistors that allow you to switch direction of current. The L298 isn’t just a dual motor driver, it is a dual H-bridge. The I2C Motor Driver can control motor which is based on the chip L298. If this is the first time you work with Arduino, we firmly recommend you to see Getting Started with Arduino before the start.
Adjustable motor speed and rotation direction.
Modify the firmware to support off-line Stepper You do not need to control the steppers all the time anymore, simply send a command to I2C motor driver V1.3 to drive a stepper motor, and it will act as your command, which would save your Arduino resource and simplify your code.
All driver lines are protected by diodes from back-EMF.Ĭontrast to the Grove - I2C motor driver V1.2, the V1.3 enables users to control the stepper motor more easily. It requires a 6V to 15V power supply to power the motor and has an onboard 5V voltage regulator which can power the I2C bus and the Arduino(selectable by jumper). It can power two brushed DC motors or one 4-wire two-phase stepper motor. Both motors can be driven simultaneously while set to a different speed and direction. Its heart is a dual channel H-bridge driver chip(L298N)that can handle current up to 2A per channel, controlled by an Atmel ATmega8L which handles the I2C communication with platforms such as Arduino. The Grove - I2C Motor Driver V1.3 (latest version) can directly control Stepper Motor or DC Motor.