Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Based Rotary Encoder with Bi-Directional Logic Level Conversion

Image of ESP32-Based Rotary Encoder with Bi-Directional Logic Level Conversion

Circuit Documentation

Summary

This document provides a detailed overview of a circuit involving an ESP32 microcontroller, a HW-040 Rotary Encoder, and a Bi-Directional Logic Level Converter. The document includes a component list, wiring details, and the embedded code used in the microcontroller.

Component List

HW-040 Rotary Encoder

  • Description: A rotary encoder used for detecting rotational position.
  • Pins: GND, +, SW, DT, CLK

Bi-Directional Logic Level Converter

  • Description: A device used to safely step down or step up voltage levels between different components.
  • Pins: HV1, HV2, HV, GND, HV3, HV4, LV1, LV2, LV, LV3, LV4

Esp32 on Baseboard

  • Description: A powerful microcontroller with built-in Wi-Fi and Bluetooth capabilities.
  • Pins: GPIO23, GPIO22, GPIO1/TX, GPIO3/RX, GPIO21, GPIO19, GPIO18, GPIO5, GPIO17, GPIO16, GPIO4, GPIO0, GPIO2, GPIO15, SD1, SD0, CLK, V, G, GPIO36, GPIO39, GPIO34, GPIO35, GPIO32, GPIO33, GPIO25, GPIO26, GPIO27, GPIO14, GPIO12, GPIO13, SD2, SD3, GND, 5V, 3V, TX, RX, VCC, D22, D21

Wiring Details

HW-040 Rotary Encoder

  • GND is connected to GND of the Esp32 on Baseboard.
  • + is connected to 5V of the Esp32 on Baseboard.
  • DT is connected to HV3 of the Bi-Directional Logic Level Converter.
  • CLK is connected to HV4 of the Bi-Directional Logic Level Converter.

Bi-Directional Logic Level Converter

  • HV is connected to 5V of the Esp32 on Baseboard.
  • GND is connected to GND of the Esp32 on Baseboard.
  • LV is connected to V of the Esp32 on Baseboard.
  • GND is connected to G of the Esp32 on Baseboard.
  • LV3 is connected to GPIO33 of the Esp32 on Baseboard.
  • LV4 is connected to GPIO25 of the Esp32 on Baseboard.

Esp32 on Baseboard

  • GND is connected to GND of the HW-040 Rotary Encoder.
  • 5V is connected to + of the HW-040 Rotary Encoder.
  • 5V is connected to HV of the Bi-Directional Logic Level Converter.
  • GND is connected to GND of the Bi-Directional Logic Level Converter.
  • V is connected to LV of the Bi-Directional Logic Level Converter.
  • G is connected to GND of the Bi-Directional Logic Level Converter.
  • GPIO33 is connected to LV3 of the Bi-Directional Logic Level Converter.
  • GPIO25 is connected to LV4 of the Bi-Directional Logic Level Converter.

Code

sketch.ino

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

documentation.txt


This concludes the documentation for the circuit.