Arduino Nano-Based Battery-Powered Smart Motor and Solenoid Controller with RGB LED and IR Receiver
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino Nano microcontroller, various resistors, an RGB LED, a 16x2 I2C LCD, a VS1838B IR Receiver, a DC Mini Metal Gear Motor, a Polymer Lithium Ion Battery, and other components. The circuit is designed to interface with these components to perform various functions as defined by the embedded code.
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
RGB LED (Wokwi compatible)
- Description: A common cathode RGB LED.
- Pins: R, COM, G, B
MT3608
- Description: A DC-DC step-up converter.
- Pins: VOUT+, VIN+, VOUT-, VIN-
LM2596
- Description: A DC-DC step-down converter.
- Pins: IN, OUT
nMOS Transistor (MOSFET)
- Description: A type of transistor used for switching and amplifying electronic signals.
- Pins: gate, drain, source
Resistor (220 Ohms)
- Description: A resistor with a resistance of 220 Ohms.
- Pins: pin1, pin2
Resistor (1000 Ohms)
- Description: A resistor with a resistance of 1000 Ohms.
- Pins: pin1, pin2
Resistor (10000 Ohms)
- Description: A resistor with a resistance of 10000 Ohms.
- Pins: pin1, pin2
VS1838B IR Receiver
- Description: An infrared receiver module.
- Pins: OUT, GND, VCC
16x2 I2C LCD
- Description: A 16x2 character LCD with I2C interface.
- Pins: GND, VCC, SDA, SCL
TP4056
- Description: A lithium battery charger module.
- Pins: OUT-, B-, B+, OUT+, IN-, IN+
DC Mini Metal Gear Motor
- Description: A small DC motor with metal gears.
- Pins: IN1, IN2
Polymer Lithium Ion Battery - Generic
- Description: A generic lithium-ion battery.
- Pins: GND, VCC
Pushbutton
- Description: A simple pushbutton switch.
- Pins: Pin 2, Pin 1, Pin 3, Pin 4
Rocker Switch (SPST)
- Description: A single-pole single-throw rocker switch.
- Pins: 1, 2
Diode
- Description: A semiconductor device that allows current to flow in one direction.
- Pins: cathode, anode
Wiring Details
Arduino Nano
- D13/SCK connected to nMOS Transistor (MOSFET) gate
- D12/MISO connected to Resistor (1000 Ohms) pin1
- D11/MOSI connected to Resistor (1000 Ohms) pin1
- D8 connected to Pushbutton Pin 1
- D7 connected to Resistor (220 Ohms) pin2
- D6 connected to Resistor (220 Ohms) pin2
- A4 connected to 16x2 I2C LCD SDA
- D5 connected to Resistor (220 Ohms) pin2
- A5 connected to 16x2 I2C LCD SCL
- D4 connected to Resistor (10000 Ohms) pin2
- GND connected to 16x2 I2C LCD GND, MT3608 VOUT-, VS1838B IR Receiver GND, nMOS Transistor (MOSFET) source, MT3608 VIN-, nMOS Transistor (MOSFET) source, nMOS Transistor (MOSFET) source, LM2596 IN, Pushbutton Pin 3, TP4056 OUT-, LM2596 OUT
- VIN connected to VS1838B IR Receiver VCC, RGB LED (Wokwi compatible) COM, 16x2 I2C LCD VCC, MT3608 VOUT+
RGB LED (Wokwi compatible)
- R connected to Resistor (220 Ohms) pin1
- G connected to Resistor (220 Ohms) pin1
- B connected to Resistor (220 Ohms) pin1
MT3608
- VOUT+ connected to Arduino Nano VIN
- VIN+ connected to Diode cathode, Solenoid pin2, Diode cathode, Solenoid pin2, Rocker Switch (SPST) 2, LM2596 IN, MT3608 VIN+
LM2596
- IN connected to MT3608 VIN+
- OUT connected to DC Mini Metal Gear Motor IN1
nMOS Transistor (MOSFET)
- gate connected to Arduino Nano D13/SCK, Resistor (1000 Ohms) pin2
- drain connected to DC Mini Metal Gear Motor IN2, Diode anode, Solenoid pin1
Resistor (220 Ohms)
- pin1 connected to RGB LED (Wokwi compatible) R, RGB LED (Wokwi compatible) G, RGB LED (Wokwi compatible) B
- pin2 connected to Arduino Nano D7, Arduino Nano D6, Arduino Nano D5
Resistor (1000 Ohms)
- pin1 connected to Arduino Nano D12/MISO, Arduino Nano D11/MOSI
- pin2 connected to nMOS Transistor (MOSFET) gate
Resistor (10000 Ohms)
- pin1 connected to VS1838B IR Receiver OUT
- pin2 connected to Arduino Nano D4
VS1838B IR Receiver
- OUT connected to Resistor (10000 Ohms) pin1
- GND connected to Arduino Nano GND
- VCC connected to Arduino Nano VIN
16x2 I2C LCD
- GND connected to Arduino Nano GND
- VCC connected to Arduino Nano VIN
- SDA connected to Arduino Nano A4
- SCL connected to Arduino Nano A5
TP4056
- OUT- connected to Arduino Nano GND
- OUT+ connected to Rocker Switch (SPST) 1
- B- connected to Polymer Lithium Ion Battery - Generic GND
- B+ connected to Polymer Lithium Ion Battery - Generic VCC
DC Mini Metal Gear Motor
- IN1 connected to LM2596 OUT
- IN2 connected to nMOS Transistor (MOSFET) drain
Polymer Lithium Ion Battery - Generic
- GND connected to TP4056 B-
- VCC connected to TP4056 B+
Pushbutton
- Pin 1 connected to Arduino Nano D8
- Pin 3 connected to Arduino Nano GND
Rocker Switch (SPST)
- 1 connected to TP4056 OUT+
- 2 connected to MT3608 VIN+
Diode
- cathode connected to MT3608 VIN+
- anode connected to nMOS Transistor (MOSFET) drain, Solenoid pin1
Documented Code
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 called once when the program starts and is used to initialize any variables, pin modes, start using