Arduino Nano-Based Light-Sensitive Motor Control System with Battery Power
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino Nano microcontroller interfacing with multiple components including photocells (LDRs), resistors, LEDs, a rocker switch, a battery mount, and hobby gearmotors. The circuit is designed to read light levels from the photocells, control LEDs, and drive motors based on the input from the photocells.
Component List
Arduino Nano
- Description: A small, complete, and breadboard-friendly 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
Photocell (LDR)
- Description: A light-dependent resistor used to detect light levels.
- Pins: pin 0, pin 1
LED: Two Pin (white)
- Description: A white LED with two pins.
- Pins: cathode, anode
4 x AAA Battery Mount
- Description: A battery holder for four AAA batteries.
- Pins: -, +
Rocker Switch
- Description: A simple on/off switch.
- Pins: 1, 2
Hobby Gearmotor with 48:1 gearbox
- Description: A small DC motor with a 48:1 gearbox.
- Pins: pin 1, pin 2
Resistor (1000 Ohms)
- Description: A resistor with a resistance of 1000 Ohms.
- Pins: pin1, pin2
Resistor (10 Ohms)
- Description: A resistor with a resistance of 10 Ohms.
- Pins: pin1, pin2
Wiring Details
Arduino Nano
A0 is connected to:
- Resistor (1000 Ohms) pin1
- Photocell (LDR) pin 1
5V is connected to:
- Photocell (LDR) pin 0 (three instances)
A1 is connected to:
- Photocell (LDR) pin 1
- Resistor (10 Ohms) pin1
A2 is connected to:
- Photocell (LDR) pin 1
- Resistor (1000 Ohms) pin1
GND is connected to:
- Resistor (1000 Ohms) pin2
- Rocker Switch pin 1
- Resistor (10 Ohms) pin2
- Resistor (1000 Ohms) pin2
- LED: Two Pin (white) anode
VIN is connected to:
- 4 x AAA Battery Mount +
D3 is connected to:
- Hobby Gearmotor with 48:1 gearbox pin 1
D4 is connected to:
- Hobby Gearmotor with 48:1 gearbox pin 2
D5 is connected to:
- Hobby Gearmotor with 48:1 gearbox pin 1
D6 is connected to:
- Hobby Gearmotor with 48:1 gearbox pin 2
D7 is connected to:
- LED: Two Pin (white) cathode
Rocker Switch
- Pin 2 is connected to:
- 4 x AAA Battery Mount -
Code Documentation
Arduino Nano 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 Nano. The setup() function is where you initialize your components and settings, and the loop() function is where the main logic of your program runs repeatedly.
Additional Documentation
This section is reserved for any additional documentation or notes related to the code or circuit. Currently, it is empty.