Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO and L298N Motor Driver Controlled 12V DC Motor System with Encoder Feedback

View and Edit Project In Cirkit DesignerImage of Arduino UNO and L298N Motor Driver Controlled 12V DC Motor System with Encoder Feedback

Circuit Documentation

Summary

This document provides a detailed overview of a circuit designed to control two 12V DC motors with encoders using an Arduino UNO. The circuit includes various components such as an L298N motor driver, resistors, switches, and LEDs. The Arduino UNO is programmed to control the motors and read encoder signals.

Component List

  1. L298N DC Motor Driver

    • Description: Motor driver module capable of controlling two DC motors.
    • Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
  2. 12V DC Motor Encoder

    • Description: DC motor with an integrated encoder for feedback.
    • Pins: M1, GND, A, 3.3V, B, M2
  3. Arduino UNO

    • Description: Microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  4. Resistor

    • Description: 10k Ohm resistor.
    • Pins: pin1, pin2
  5. ProtoSnap - Pro Mini - Protoboard

    • Description: Prototyping board with multiple connection points.
    • Pins: pin1, pin10, pin2, pin11, pin19, pin27, pin3, pin12, pin20, pin28, pin4, pin13, pin21, pin29, pin5, pin14, pin22, pin30, pin6, pin15, pin23, pin31, pin7, pin16, pin24, pin32, pin8, pin17, pin25, pin33, pin9, pin18, pin26, pin34
  6. 2Pin Push Switch

    • Description: Simple push-button switch.
    • Pins: Input +, Output +
  7. 12V Battery

    • Description: Power source for the circuit.
    • Pins: -, +
  8. LED: Two Pin (red)

    • Description: Red LED for visual indication.
    • Pins: cathode, anode
  9. Toggle Switch

    • Description: Switch to control power to the circuit.
    • Pins: L1, COM, L2
  10. Comment

    • Description: Placeholder for comments in the circuit.
    • Pins: None

Wiring Details

L298N DC Motor Driver

12V DC Motor Encoder

Arduino UNO

Resistor

ProtoSnap - Pro Mini - Protoboard

2Pin Push Switch

12V Battery

LED: Two Pin (red)

Toggle Switch

Documented Code

Arduino UNO Code (sketch.ino)

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

This code is a basic template for the Arduino UNO. The setup() function is where you initialize your components, and the loop() function is where you place the code that needs to run continuously.