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

Arduino Mega 2560-Based Light-Sensing Motor Control System with Battery Power

View and Edit Project In Cirkit DesignerImage of Arduino Mega 2560-Based Light-Sensing Motor Control System with Battery Power

Circuit Documentation

Summary

This circuit involves an Arduino Mega 2560 microcontroller, multiple photocells (LDRs), resistors, potentiometers, a motor driver (L298N), and two hobby motors. The circuit is designed to read analog signals from the photocells and potentiometers, control the motors via the motor driver, and is powered by a 9V battery.

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. Motor amarillo motorreductor hobby

    • Description: A small DC motor with a gearbox.
    • Pins: vcc, GND
  3. L298N DC motor driver

    • Description: A dual H-Bridge motor driver.
    • 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
  4. Photocell (LDR)

    • Description: A light-dependent resistor.
    • Pins: pin 0, pin 1
  5. Resistor

    • Description: A 200 Ohm resistor.
    • Pins: pin1, pin2
  6. Potentiometer

    • Description: A variable resistor.
    • Pins: GND, Output, VCC
  7. My battery case

    • Description: A battery holder for a 9V battery.
    • Pins: +, -
  8. 9V Battery

    • Description: A 9V battery.
    • Pins: +, -

Wiring Details

Arduino Mega 2560

Motor amarillo motorreductor hobby

L298N DC motor driver

Photocell (LDR)

Resistor

Potentiometer

My battery case

9V Battery

Code Documentation

Arduino Mega 2560 Code

File Name: sketch.ino

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

}

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

}

File Name: documentation.txt

This documentation provides a comprehensive overview of the circuit, including a detailed component list, wiring details, and the code used in the Arduino Mega 2560 microcontroller.