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

Arduino UNO-Based Battery-Powered Robotic System with Ultrasonic Sensor and Motor Control

View and Edit Project In Cirkit DesignerImage of Arduino UNO-Based Battery-Powered Robotic System with Ultrasonic Sensor and Motor Control

Circuit Documentation

Summary

This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, an HC-SR04 Ultrasonic Sensor, a Servo motor, two DC motors, an L298N DC motor driver, and a 7.4V power supply. The circuit is designed to control the motors and read distance measurements from the ultrasonic sensor, with the Arduino UNO serving as the central control unit.

Component List

  1. Arduino UNO

    • Description: A 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
  2. HC-SR04 Ultrasonic Sensor

    • Description: A sensor used to measure distance by using ultrasonic waves.
    • Pins: VCC, TRIG, ECHO, GND
  3. Servo

    • Description: A motor that allows for precise control of angular position.
    • Pins: gnd, vcc, pulse
  4. DC Motor

    • Description: A motor that converts electrical energy into mechanical energy.
    • Pins: pin 1, pin 2
  5. L298N DC Motor Driver

    • Description: A dual H-Bridge motor driver that allows for control of 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
  6. 7.4V Power Supply

    • Description: A power source providing 7.4V.
    • Pins: +, -

Wiring Details

Arduino UNO

HC-SR04 Ultrasonic Sensor

Servo

DC Motor 1

DC Motor 2

L298N DC Motor Driver

7.4V Power Supply

Documented Code

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 for the Arduino UNO. The setup function is used to initialize any settings or configurations, and the loop function contains the main code that runs repeatedly.