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

How to Use T encoder Pro: Examples, Pinouts, and Specs

Image of T encoder ProDesign with T encoder Pro in Cirkit Designer

Introduction

The T Encoder Pro by LillyGo is a high-precision rotary encoder designed to measure the position or speed of a rotating object. It converts the angular position of a shaft or axle into an analog or digital signal, making it an essential component in various applications such as robotics, industrial automation, and motor control systems.

Explore Projects Built with T encoder Pro

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Teensy 4.1 Controlled Precision Stepper Motor System with OLED Display and Logic Level Conversion: A project utilizing T encoder Pro in a practical application
Teensy 4.1 Controlled Precision Stepper Motor System with OLED Display and Logic Level Conversion

This circuit features a Teensy 4.1 microcontroller interfaced with a keypad for user input, an OLED display for visual feedback, and an optical rotary encoder for position sensing. It controls a closed-loop stepper motor via a Stepperonline CL57T driver, with a bi-directional logic level converter to ensure compatible voltage levels between the microcontroller and the stepper driver. The circuit is likely designed for precise motion control applications, such as CNC machines or robotic systems, where user input is used to adjust parameters like pitch or position.

Open Project in Cirkit Designer
Image of ESP32-CAM and T-Display-S3 Based Obstacle-Avoiding Robot: A project utilizing T encoder Pro in a practical application
ESP32-CAM and T-Display-S3 Based Obstacle-Avoiding Robot

This circuit features an ESP32-CAM module and a T-Display-S3 for user interface, connected to a motor driver controlling two hobby gearmotors. An infrared proximity sensor provides input to the system, likely for obstacle detection or distance measurement. The electrolytic capacitor is used for power supply stabilization, ensuring smooth operation of the motor driver and connected motors.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Parameter Value
Supply Voltage 3.3V - 5V
Operating Current 10mA
Output Type Quadrature (A and B channels)
Resolution 20 pulses per revolution
Operating Temperature -20°C to 85°C
Shaft Diameter 6mm
Mounting Hole Size 3mm

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 VCC Power supply (3.3V - 5V)
2 GND Ground
3 A Channel A output
4 B Channel B output
5 SW Switch output (optional)

Usage Instructions

How to Use the Component in a Circuit

  1. Power Supply: Connect the VCC pin to a 3.3V or 5V power supply and the GND pin to the ground.
  2. Output Channels: Connect the A and B output pins to the corresponding input pins on your microcontroller or other processing unit.
  3. Switch Output (Optional): If your application requires a switch, connect the SW pin to an input pin on your microcontroller.

Important Considerations and Best Practices

Example Code for Arduino UNO

// Include the Encoder library
#include <Encoder.h>

// Define the pins for the encoder
#define ENCODER_PIN_A 2
#define ENCODER_PIN_B 3

// Create an Encoder object
Encoder myEncoder(ENCODER_PIN_A, ENCODER_PIN_B);

long oldPosition  = -999;

void setup() {
  // Initialize serial communication
  Serial.begin(9600);
  Serial.println("Basic Encoder Test:");
}

void loop() {
  // Read the current position of the encoder
  long newPosition = myEncoder.read();
  
  // If the position has changed, print the new position
  if (newPosition != oldPosition) {
    oldPosition = newPosition;
    Serial.println(newPosition);
  }
}

Troubleshooting and FAQs

Common Issues Users Might Face

  1. No Output Signal:

    • Solution: Check the power supply connections and ensure the encoder is properly connected to the microcontroller.
  2. Inaccurate Readings:

    • Solution: Implement debouncing in your code and use pull-up resistors on the output pins.
  3. Mechanical Noise:

    • Solution: Securely mount the encoder to minimize vibrations and mechanical noise.

Solutions and Tips for Troubleshooting

By following this documentation, users can effectively integrate the T Encoder Pro into their projects, ensuring accurate and reliable measurements of rotational position and speed.