Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP32-Controlled Automated Transport System with OLED Display and Stepper Motor

View and Edit Project In Cirkit DesignerImage of ESP32-Controlled Automated Transport System with OLED Display and Stepper Motor

Circuit Documentation

Summary

This circuit is designed to control a variety of components including an ESP32 microcontroller, OLED display, stepper motor with ULN2003A driver, IO expander, RGB LED, micro switches, joystick, single LEDs, a buzzer, toggle switches, and a WS2812 RGB LED matrix. The ESP32 is the central processing unit that interfaces with an OLED display for user feedback, controls a stepper motor for mechanical movements, reads inputs from a joystick and micro switches, drives LEDs for visual indicators, and sounds a buzzer for audio alerts. The circuit is powered by a 9V battery and uses I2C communication for the OLED display and IO expander.

Component List

Wiring Details

ESP32 (30 pin)

ULN2003A breakout board

PCF8575 IO Expander Module I2C 16 PIN

LED RGB

Micro Switches

PS2 Joystick

Single LEDs (red and green)

WS2812 RGB LED matrix 1x8

Buzzer

Toggle Switches spst

Resistor

28BYJ-48 Stepper Motor

9V Battery

Documented Code

ESP32 Microcontroller Code

// Libraries
#include <Arduino.h>
#include <U8g2lib.h>
#include <Adafruit_SSD1306.h>
#include <Wire.h>
#include <EEPROM.h>
#include <FastLED.h>

// ... (Code omitted for brevity)

void setup() {
  init();
  // FastLED setup for WS2812 RGB LED matrix
  FastLED.addLeds<WS2812, DATA_PIN_VOOR, GRB>(ledsVoor, NUM_LEDSVoor);
}

void loop() {
  // Main loop code
}

// Initialization function
void init() {
  // Serial and I2C initialization
  // Pin mode configuration
  // Interrupt setup
  // PCF8574 initialization
  // Motor pin setup
}

// ... (Additional functions omitted for brevity)

// EEPROM initialization and handling
void eeprominit() {
  // EEPROM read and write operations
}

// ... (Additional functions omitted for brevity)

The provided code for the ESP32 microcontroller includes initialization of various peripherals such as the OLED display, stepper motor, and FastLED library for the WS2812 RGB LED matrix. It also includes functions for handling interrupts, motor control, display updates, LED control, buzzer alarms, and EEPROM read/write operations. The code is structured with setup and loop functions, as well as numerous helper functions for specific tasks.

(Note: The code above is a summarized version of the provided code. It includes comments and structure to give an overview of the functionality. The full code includes detailed logic for motor control, display handling, LED operations, and more.)

Additional Microcontroller Code

The additional microcontroller code provided is minimal and does not include any functional code. It consists of empty setup and loop functions, which are placeholders for potential future code.

void setup() {
  // Setup code
}

void loop() {
  // Main loop code
}

The documentation above provides an overview of the circuit, detailed component descriptions, wiring information, and a summary of the embedded code. This should serve as a comprehensive guide for understanding and working with the circuit.