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

Arduino UNO and L298N Motor Driver Controlled Battery-Powered Robotic System with Ultrasonic Sensor

View and Edit Project In Cirkit DesignerImage of Arduino UNO and L298N Motor Driver Controlled Battery-Powered Robotic System with Ultrasonic Sensor

Circuit Documentation

Summary

This circuit is designed to control two DC motors and a servo motor using an Arduino UNO. It also includes an ultrasonic sensor for distance measurement. The L298N Motor Driver is used to drive the DC motors, and a rocker switch is used to control the power supply from a 3xAA battery pack. The Adafruit Perma Proto board is used for prototyping and making connections easier.

Component List

  1. L298N Motor Driver Controller Board Module Stepper Motor

    • Pins: Output A, +12v Power, +5v Power, Ground, Output B, Input 4, Input 3, Input 2, Input 1
    • Description: Motor driver module used to control the DC motors.
  2. Arduino UNO

    • 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
    • Description: Microcontroller used to control the motors and read sensor data.
  3. DC Motor

    • Pins: pin 1, pin 2
    • Description: Motor used for driving the system.
  4. DC Motor

    • Pins: pin 1, pin 2
    • Description: Motor used for driving the system.
  5. Adafruit Perma Proto for Pi Full Size

    • Pins: 3.3V, 5.0V, SDA, 5.0V_2, SCL, GND1, GPIO4, TXD, GND, RXD, GPIO17, GPIO18, GPIO27, GND5, GPIO22, GPIO23, 3.3V_2, GPIO24, MOSI, GND4, MISO, GPIO25, SCLK, CE0, GND3, CE1, GNDSTRIP1, GNDSTRIP2, N$15, N$16, N$17, N$18, N$19, N$20, N$21, N$22, N$23, N$24, N$25, N$26, N$27, N$28, N$29, N$30, N$33, N$34, N$35, N$36, N$37, N$38, N$39, N$40, N$41, N$42, N$43, N$44, N$45, N$46, N$47, N$48, N$103, N$104, N$105, N$106, N$107, N$108, N$109, N$110, N$111, N$112, N$113, N$114, N$115, N$116, N$117, N$118, N$119, N$120, N$121, N$122, N$123, N$124, N$125, N$126, N$127, N$128, N$129, N$130, N$131, N$132, N$133, N$134, N$135, N$136, N$137, N$138, N$139, N$140, N$141, N$142, N$143, N$144, N$145, N$146, N$147, N$148, N$149, N$150, N$151, N$152, N$153, N$154, N$155, N$156, N$157, N$158, N$159, N$160, N$161, N$162, PWRSTRIP1, PWRSTRIP2
    • Description: Prototyping board used for making connections.
  6. Tower Pro SG90 servo

    • Pins: Signal, +5V, GND
    • Description: Servo motor used for precise control of angular position.
  7. Rocker Switch

    • Pins: output, input
    • Description: Switch used to control the power supply.
  8. 3xAA Battery

    • Pins: VCC, GND
    • Description: Power supply for the circuit.
  9. Ultrasonic Sensor

    • Pins: +VCC, Trigger, Echo, GND
    • Description: Sensor used for measuring distance.

Wiring Details

L298N Motor Driver Controller Board Module Stepper Motor

Arduino UNO

DC Motor (First)

DC Motor (Second)

Adafruit Perma Proto for Pi Full Size

Tower Pro SG90 servo

Rocker Switch

3xAA Battery

Ultrasonic Sensor

Code Documentation

Arduino UNO Code

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