Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino Nano microcontroller, an MX1508 DC Motor Driver, two hobby motors, and two 4xAA battery holders. The Arduino Nano is used to control the motor driver, which in turn controls the speed and direction of the two motors. The battery holders supply power to the circuit.
Component List
Arduino Nano
- Description: A compact microcontroller board based on the ATmega328P.
- Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK.
MX1508 DC Motor Driver
- Description: A dual motor driver module capable of driving two DC motors.
- Pins: OUT 4, OUT 3, OUT 2, OUT1, IN 1, IN 2, IN 3, IN 4, Negative (-), Positive (+).
Motor Amarillo Motorreductor Hobby (x2)
- Description: A yellow hobby gear motor for small projects.
- Pins: vcc, GND.
4xAA Battery Holder (x2)
- Description: A battery holder for four AA batteries.
- Pins: POS, NEG.
Wiring Details
Arduino Nano
- D7 connected to MX1508 DC Motor Driver IN 4
- D8 connected to MX1508 DC Motor Driver IN 3
- D9 connected to MX1508 DC Motor Driver IN 2
- D10 connected to MX1508 DC Motor Driver IN 1
- VIN connected to 4xAA Battery Holder POS
- GND connected to 4xAA Battery Holder NEG and MX1508 DC Motor Driver Negative (-)
MX1508 DC Motor Driver
- IN 1 to Arduino Nano D10
- IN 2 to Arduino Nano D9
- IN 3 to Arduino Nano D8
- IN 4 to Arduino Nano D7
- OUT 1 to Motor Amarillo Motorreductor Hobby vcc
- OUT 2 to Motor Amarillo Motorreductor Hobby GND
- OUT 3 to Motor Amarillo Motorreductor Hobby vcc
- OUT 4 to Motor Amarillo Motorreductor Hobby GND
- Negative (-) to 4xAA Battery Holder NEG
- Positive (+) to 4xAA Battery Holder POS
Motor Amarillo Motorreductor Hobby
- vcc connected to MX1508 DC Motor Driver OUT 1/OUT 3
- GND connected to MX1508 DC Motor Driver OUT 2/OUT 4
4xAA Battery Holder
- POS connected to Arduino Nano VIN and MX1508 DC Motor Driver Positive (+)
- NEG connected to Arduino Nano GND and MX1508 DC Motor Driver Negative (-)
Documented Code
Arduino Nano Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Additional Notes
- The provided code is a template and does not contain any functional code to control the motors or interact with the motor driver.
- The user should implement the setup and loop functions to initialize the motor driver pins as outputs and to control the motors using digital writes to the corresponding pins.
