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

Arduino Mega 2560-Based Battery-Powered Robotic Car with Ultrasonic and IR Sensors

View and Edit Project In Cirkit DesignerImage of Arduino Mega 2560-Based Battery-Powered Robotic Car with Ultrasonic and IR Sensors

Circuit Documentation

Summary

This circuit involves an Arduino Mega 2560 microcontroller, an L298N DC motor driver, four hobby motors, a 9V battery, an HC-SR04 ultrasonic sensor, an IR receiver, and an 8x8 LED matrix. The Arduino Mega 2560 serves as the central controller, interfacing with the motor driver to control the motors, reading data from the ultrasonic sensor and IR receiver, and driving the LED matrix.

Component List

  1. Arduino Mega 2560

    • Description: A microcontroller board based on the ATmega2560.
    • Pins: IOREF, RESET, 3V3, 5V, GND, VIN, A0-A15, D0-D53, AREF, SDA, SCL, 6swdw
  2. L298N DC Motor Driver

    • Description: A dual H-Bridge motor driver module.
    • 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
  3. Motor amarillo motorreductor hobby

    • Description: A small DC motor with a gearbox.
    • Pins: vcc, GND
  4. 9V Battery

    • Description: A standard 9V battery.
    • Pins: -, +
  5. HC-SR04 Ultrasonic Sensor

    • Description: An ultrasonic distance sensor.
    • Pins: VCC, TRIG, ECHO, GND
  6. IR Receiver

    • Description: An infrared receiver module.
    • Pins: DATA, VCC, GND
  7. 8x8 LED Matrix

    • Description: An 8x8 LED matrix display.
    • Pins: vcc, DIN, clk, CS, Gnd, gnd, CLK

Wiring Details

Arduino Mega 2560

L298N DC Motor Driver

HC-SR04 Ultrasonic Sensor

IR Receiver

8x8 LED Matrix

Hobby Motors

9V Battery

Documented Code

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