9V battery | DC motor | Arduino Uno |
L298N motor controller | USB programming cable | breadboard cables |
12V jumper – remove this if using a supply voltage greater than 12V DC. This enables power to the onboard 5V regulator
Connect your motor supply voltage here, maximum of 35V DC. Remove 12V jumper if >12V DC
GND
5V output if 12V jumper in place, ideal for powering your Arduino (etc)
DC motor 1 enable jumper. Leave this in place when using a stepper motor. Connect to PWM output for DC motor speed control.
IN1
IN2
IN3
IN4
DC motor 2 enable jumper. Leave this in place when using a stepper motor. Connect to PWM output for DC motor speed control
DC motor 2 “+” or stepper motor B+
DC motor 2 “-” or stepper motor B-
1 x L298 bridge IC
1 x DC motor
1 x Arduino Mega2560
1 x breadboard
10 x jumper wires
IN1 | IN2 | MOTOR |
BRAKE | ||
1 | FORWARD | |
1 | BACKWARD | |
1 | 1 | BRAKE |
Connect 5V and ground of the IC to 5V and ground of Arduino.
Connect the motor to pins 2 and 3 of the IC.
Connect IN1 of the IC to pin 8 of Arduino.
Connect IN2 of the IC to pin 9 of Arduino.
Connect EN1 of IC to pin 2 of Arduino.
Connect SENS A pin of IC to the ground.
Connect the Arduino using Arduino USB cable and upload the program to the Arduino using Arduino IDE software.
Provide power to the Arduino board using power supply, battery or USB cable.