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

ESP32 and Arduino UNO Controlled CAN Bus Motor Driver with Limit Switch

View and Edit Project In Cirkit DesignerImage of ESP32 and Arduino UNO Controlled CAN Bus Motor Driver with Limit Switch

Circuit Documentation

Summary

This document provides a detailed overview of a circuit that integrates various components including an ESP32 microcontroller, MCP2515 CAN controllers, a TB6600 stepper motor driver, a Nema 17 stepper motor, a 7805 voltage regulator, a potentiometer, a limit switch, a diode, a resistor, and a 12V battery. The circuit is designed to control a stepper motor and interface with a CAN bus network.

Component List

  1. MCP2515

    • Description: CAN controller
    • Pins: INT, SCK, SI, SO, CS, GND, VCC, H, L
  2. ESP32 38 PINS

    • Description: Microcontroller
    • Pins: GND, G23, G22, TXD, RXD, G21, G19, G18, G5, G17, G16, G4, G0, G2, G15, SDI, SD0, CLK, 3V3, EN, SP, SN, G34, G35, G32, 33, G25, G26, G27, G14, G12, G13, SD2, SD3, 5V
  3. TB6600 Micro Stepping Motor Driver

    • Description: Stepper motor driver
    • Pins: ENA-, ENA+, DIR-, DIR+, PUL-, PUL+, B-, B+, A-, A+, GND, VCC
  4. 7805

    • Description: Voltage regulator
    • Pins: Vin, Gnd, Vout
  5. Arduino UNO

    • Description: Microcontroller
    • 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
  6. Potentiometer

    • Description: Variable resistor
    • Pins: GND, Output, VCC
  7. 12V Battery

    • Description: Power source
    • Pins: VCC, GND
  8. Diode

    • Description: Diode
    • Pins: cathode, anode
  9. Resistor

    • Description: Resistor
    • Pins: pin1, pin2
    • Properties: Resistance: 10000 Ohms
  10. Nema 17 42-STH48

    • Description: Stepper motor
    • Pins: A2 (black), A1 Green, B2 Red, B1 Blue
  11. Limit switch

    • Description: Switch
    • Pins: C, NO, NC

Wiring Details

MCP2515

ESP32 38 PINS

TB6600 Micro Stepping Motor Driver

7805

Arduino UNO

Potentiometer

Diode

Resistor

Nema 17 42-STH48

Limit switch

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 document provides a comprehensive overview of the circuit, including the components used, their connections, and the code for the microcontroller.