pdf-icon

Unit Encoder

SKU:U135

Description

Unit Encoder is a rotary encoder expansion unit with I2C interface, integrated with 30-bit pulse encoding knob (with button function) + 2 x SK6812 programmable RGB LEDs. The built-in STM32F030 flashed with the encoder pulse acquisition firmware, allowing users to obtain the encoded value directly via I2C. Suitable for scale value control/volume adjustment and other control scenarios.

Features

  • 30-bit pulse encoding knob (30 pulses per rotation)
  • 2x SK6812 programmable RGB LEDs
  • 1x Button input

Include

  • 1x Unit Encoder
  • 1x HY2.0-4P cable (20cm)

Applications

  • Human Machine Interaction (HMI)
  • Volume knob

Specifications

Specifications Parameters
Pulse encoder knob 30-bit pulse encoder knob (with key input)
Programmable RGB LED 2x SK6812
Working current Encoder working (DC-5V@17mA)
Net weight 7.4g
Gross weight 12.3g
Product size 32 * 24 * 22mm
Packing size 93 * 138mm

PinMap

  • Unit Encoder
M5Core(PORT A) GPIO22 GPIO21 5V GND
Unit Encoder SCL SDA 5V GND

Schematic

Protocol

  • Protocol type I2C
  • I2C Address: 0x40

ENCODER_REG 0x10

REG len description values R/W
0x10 2 Read encoder value [0] VALUE_L
[1] VALUE_H
R

BUTTON_REG 0x20

REG len description values R/W
0x20 2 Read Button status [0] BTN STATUS R

RGB_LED_REG 0x30

REG len description values R/W
0x30 4 Control RGB LED Color [0]LED Index(1/2)
[1] RED
[2] GREEN
[2] BLUE
W
Notice:
UnitEncoder firmware(stm32) must be rewritten to use the following features. UnitEncoder firmware

MODE_REG 0x00

REG len description values R/W
0x00 1 Change Mode [0] PULSE
[1] AB
W

ENCODER_REG 0x10

REG len description values R/W
0x10 2 Read encoder value [0] VALUE_L
[1] VALUE_H
R/W

MODE_REG 0x40

REG len description values R/W
0x40 1 Reset Counter [1>=]Reset W

Example

Arduino

UIFlow

How to use Unit encoder and related API instructions in the UIFlow1.0
How to use Unit encoder and related API instructions in the UIFlow2.0

Video

  • Read Encoder Value