Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Controlled Dual DC Motor Driver with ADXL335 Accelerometer Feedback

Image of Arduino UNO Controlled Dual DC Motor Driver with ADXL335 Accelerometer Feedback

Circuit Documentation

Summary

This circuit integrates an Arduino UNO microcontroller with an L298N DC motor driver to control two hobby motors. Additionally, an ADXXL335 accelerometer is connected to the Arduino to provide motion feedback. The system is powered by a 12V battery, which supplies power to the motor driver and, through a voltage regulator, to the Arduino. The Arduino controls the motor driver using digital output pins, and it reads the accelerometer data through analog input pins.

Component List

Arduino UNO

  • Microcontroller board based on the ATmega328P
  • Provides digital and analog I/O pins
  • Can be powered via USB or external power supply

L298N DC Motor Driver

  • Dual H-bridge motor driver
  • Capable of driving two DC motors or one stepper motor
  • Supports up to 2A per channel

Motor Amarillo Motorreductor Hobby (x2)

  • Yellow DC gear motors commonly used in hobby projects
  • Operates at nominal voltages around 6V to 12V

Battery 12V

  • Provides the power source for the motor driver and indirectly for the Arduino through voltage regulation

ADXXL335 Accelerometer

  • Measures acceleration in three axes: X, Y, and Z
  • Provides analog voltage output proportional to acceleration

Wiring Details

Arduino UNO

  • 5V connected to ADXXL335 VCC
  • GND connected to ADXXL335 GND and L298N GND
  • Vin connected to L298N 5V
  • A0 connected to ADXXL335 X-OUT
  • A1 connected to ADXXL335 Y-OUT
  • D2 connected to L298N IN1
  • D3 connected to L298N IN2
  • D4 connected to L298N IN3
  • D5 connected to L298N IN4

L298N DC Motor Driver

  • GND connected to Battery (-) and Arduino UNO GND
  • 5V connected to Arduino UNO Vin
  • 12V connected to Battery (+)
  • IN1 to IN4 controlled by Arduino UNO digital pins D2 to D5
  • OUT1 and OUT2 connected to one Motor Amarillo GND and vcc respectively
  • OUT3 and OUT4 connected to the other Motor Amarillo GND and vcc respectively

Motor Amarillo Motorreductor Hobby

  • One motor's vcc connected to L298N OUT2, GND to OUT1
  • The other motor's vcc connected to L298N OUT4, GND to OUT3

Battery 12V

  • (+) connected to L298N 12V
  • (-) connected to L298N GND

ADXXL335 Accelerometer

  • VCC connected to Arduino UNO 5V
  • GND connected to Arduino UNO GND
  • X-OUT connected to Arduino UNO A0
  • Y-OUT connected to Arduino UNO A1

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:

}

Note: The provided code is a template and does not include specific functionality. It should be populated with the setup and loop routines required to initialize the pins and manage the motor driver and accelerometer.

Additional Files

  • documentation.txt (Empty file, no code provided)

The code documentation is minimal as the provided code is only a template. Further implementation details should be added as the code is developed.