Arduino UNO-Based Battery-Powered IR-Controlled Motor System with OLED Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino UNO microcontroller interfacing with various components including an IR transmitter, an OLED display, a motor driver, motors, LEDs, an IR sensor, and a rocker switch. The circuit is powered by two 18650 Li-ion batteries. The Arduino UNO controls the components and processes input from the IR sensor and remote control.
Component List
Arduino UNO
- Description: Microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
IR Transmitter
- Description: Infrared transmitter module.
- Pins: DAT, VCC, GND
HX1838 Infrared IR Wireless Remote Control
- Description: Infrared remote control for wireless communication.
- Pins: FFA25D (1), FF629D (2), FFE21D (3), FF22DD (4), FF02FD (5), FFC23D (6), FFE01F (7), FFA857 (8), FF906F (9), FF9867 (0), FFB04F (#), FF6897 (*), FF18E7 (↑), FF5AA5 (→), FF10EF (←), FF4AB5 (↓), FF38C7 (OK)
Motor with Reducer
- Description: DC motor with a gear reducer.
- Pins: 3 - 6 VCC, GND
L293D Motor Driver
- Description: Motor driver IC for controlling motors.
- Pins: pin 1, pin 2, pin 10, pin 9, pin 12, pin 11, pin 5, pin 6, pin 7, pin 8, pin 3, pin 4
18650 Li-ion Battery x 2
- Description: Rechargeable lithium-ion batteries.
- Pins: +, -
0.96" OLED
- Description: Small OLED display for visual output.
- Pins: GND, VDD, SCK, SDA
LED: Two Pin (red)
- Description: Red LED with two pins.
- Pins: cathode, anode
5 Channel IR Sensor
- Description: Infrared sensor module with 5 channels.
- Pins: VCC, GND, S1, S2, S3, S4, S5, CLP, Near
Rocker Switch
- Description: On/Off rocker switch.
- Pins: 1, 2
Wiring Details
Arduino UNO
- 3.3V: Connected to VCC of IR Transmitter
- 5V: Connected to VDD of OLED and VCC of 5 Channel IR Sensor
- GND: Connected to GND of IR Transmitter, OLED, 5 Channel IR Sensor, L293D Motor Driver, and both LEDs
- Vin: Connected to pin 3 of L293D Motor Driver and pin 2 of Rocker Switch
- A0: Connected to pin 5 of L293D Motor Driver
- A1: Connected to pin 6 of L293D Motor Driver
- A2: Connected to pin 7 of L293D Motor Driver
- A3: Connected to pin 8 of L293D Motor Driver
- SCL: Connected to SCK of OLED
- SDA: Connected to SDA of OLED
- D9: Connected to cathode of one LED
- D8: Connected to cathode of the other LED
- D7: Connected to S5 of 5 Channel IR Sensor
- D6: Connected to S4 of 5 Channel IR Sensor
- D5: Connected to S3 of 5 Channel IR Sensor
- D4: Connected to S2 of 5 Channel IR Sensor
- D3: Connected to S1 of 5 Channel IR Sensor
- D2: Connected to DAT of IR Transmitter
IR Transmitter
- VCC: Connected to 3.3V of Arduino UNO
- GND: Connected to GND of Arduino UNO
- DAT: Connected to D2 of Arduino UNO
HX1838 Infrared IR Wireless Remote Control
- No direct connections in the provided net list.
Motor with Reducer (First Motor)
- 3 - 6 VCC: Connected to pin 10 of L293D Motor Driver
- GND: Connected to pin 9 of L293D Motor Driver
Motor with Reducer (Second Motor)
- 3 - 6 VCC: Connected to pin 12 of L293D Motor Driver
- GND: Connected to pin 11 of L293D Motor Driver
L293D Motor Driver
- pin 3: Connected to Vin of Arduino UNO and pin 2 of Rocker Switch
- pin 4: Connected to GND of Arduino UNO and - of 18650 Li-ion Battery
- pin 5: Connected to A0 of Arduino UNO
- pin 6: Connected to A1 of Arduino UNO
- pin 7: Connected to A2 of Arduino UNO
- pin 8: Connected to A3 of Arduino UNO
- pin 9: Connected to GND of first Motor with Reducer
- pin 10: Connected to 3 - 6 VCC of first Motor with Reducer
- pin 11: Connected to GND of second Motor with Reducer
- pin 12: Connected to 3 - 6 VCC of second Motor with Reducer
18650 Li-ion Battery x 2
- +: Connected to pin 1 of Rocker Switch
- -: Connected to GND of L293D Motor Driver
0.96" OLED
- VDD: Connected to 5V of Arduino UNO
- GND: Connected to GND of Arduino UNO
- SCK: Connected to SCL of Arduino UNO
- SDA: Connected to SDA of Arduino UNO
LED: Two Pin (red) (First LED)
- anode: Connected to GND of IR Transmitter
- cathode: Connected to D8 of Arduino UNO
LED: Two Pin (red) (Second LED)
- anode: Connected to GND of IR Transmitter
- cathode: Connected to D9 of Arduino UNO
5 Channel IR Sensor
- VCC: Connected to 5V of Arduino UNO
- GND: Connected to GND of Arduino UNO
- S1: Connected to D3 of Arduino UNO
- S2: Connected to D4 of Arduino UNO
- S3: Connected to D5 of Arduino UNO
- S4: Connected to D6 of Arduino UNO
- S5: Connected to D7 of Arduino UNO
Rocker Switch
- 1: Connected to + of 18650 Li-ion Battery
- 2: Connected to Vin of Arduino UNO and pin 3 of L293D Motor Driver
Documented Code
Arduino UNO Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code initializes the Arduino UNO and contains empty setup and loop functions. The setup function runs once when the Arduino is powered on or reset, and the loop function runs continuously. You can add your specific code to these functions to control the components connected to the Arduino.