Hw-044 Datasheet -

HW-044 Datasheet: The Complete Guide to Your Rotary Encoder Module If you are building a project that requires precise control—like adjusting the volume on a custom speaker, navigating a menu on an LCD screen, or controlling the brightness of an LED—you have likely come across the HW-044 . While it may look like a simple knob, the HW-044 is a rotary encoder module favored by Arduino and ESP32 enthusiasts for its reliability and ease of use. In this post, we will break down the "datasheet" specifications, explain how it works, pinout configurations, and provide a wiring guide to get you started.

What is the HW-044? The HW-044 is a Rotary Encoder Module . Unlike a standard potentiometer (which is an analog device that essentially acts as a variable resistor), a rotary encoder is a digital electro-mechanical device. It converts the angular position of a shaft into a digital output signal. Key Difference:

Potentiometer: Has a physical limit (e.g., 270 degrees of rotation). It measures absolute position . Rotary Encoder (HW-044): Can rotate 360 degrees continuously without end stops. It measures relative change (direction and speed).

HW-044 Datasheet & Technical Specifications While official "datasheets" for generic breakout boards can be scarce, the HW-044 is built around the standard EC11 series encoder mechanism. Below are the standard operating specifications you need to know for your microcontroller projects. | Parameter | Specification | | :--- | :--- | | Operating Voltage | 5V (Compatible with 3.3V logic) | | Encoder Type | Quadrature Encoder (Incremental) | | Output Digital Code | 2-bit Gray Code | | Pulses Per Revolution (PPR) | 20 (Standard) | | Mechanical Angle | 360° Continuous Rotation | | Max Rotational Speed | 100 rpm (Standard) | | Contact Resistance | ≤ 100mΩ | | Vibration Rating | 10 ~ 55 Hz, 1.5mm p-p | | Operating Temperature | -30°C to +70°C | | Dimensions | Approx. 32mm x 18mm | The Built-in Circuit One of the reasons the HW-044 is so popular is that it includes necessary peripheral components directly on the PCB. The module features: hw-044 datasheet

10kΩ Pull-up Resistors: Built onto the CLK and DT lines. This ensures a stable signal and reduces the number of external components you need on your breadboard. Filter Capacitors: Often included to help debounce the signal mechanically (though software debouncing is still recommended).

HW-044 Pinout Configuration The HW-044 module typically features 5 pins on one side (for the encoder signals and power) and 2 pins on the other side (for the push-button function). The Main 5-Pin Header:

GND: Ground connection. + (VCC): Power supply (typically 5V). SW (Switch): Output for the integrated push-button. Pressing the knob down activates this switch. It is active LOW (goes to 0V when pressed). DT (Data): Output A. Used to determine the rotation direction. CLK (Clock): Output B. The primary pulse output for tracking rotation steps. HW-044 Datasheet: The Complete Guide to Your Rotary

(Note: On some generic versions, DT and CLK might be labeled as "B" and "A". If your rotation direction is inverted in your code, simply swap these two pins in the wiring or software).

How Does the HW-044 Work? The HW-044 works on the principle of Quadrature Encoding . Inside the knob, a disk with contact patterns rotates past two contact sensors (A and B). When you turn the knob, the module outputs two square wave signals (CLK and DT) that are 90 degrees out of phase. By comparing the state of these two pins, the microcontroller can determine the direction of rotation.

Clockwise Rotation: The CLK signal leads the DT signal. Counter-Clockwise Rotation: The DT signal leads the CLK signal. What is the HW-044

By counting the pulses, you can track exactly how many "steps" the knob has turned.

Interfacing HW-044 with Arduino Here is a standard wiring diagram and code example to get your HW-044 running with an Arduino Uno. Wiring Diagram | HW-044 Pin | Arduino Uno Pin | | :--- | :--- | | GND | GND | | + (VCC) | 5V | | SW | Pin 4 | | DT | Pin 3 | | CLK | Pin 2 | The Code This code uses a simple polling method to detect rotation and button presses. It prints the direction and button status to the Serial Monitor. // HW-044 Rotary Encoder Example Code #define CLK_PIN 2 #define DT_PIN 3 #define SW_PIN 4 int counter = 0; int currentStateCLK; int lastStateCLK; String currentDir =""; unsigned long lastButtonPress = 0; void setup() { // Set encoder pins as inputs pinMode(CLK_PIN, INPUT); pinMode(DT_PIN, INPUT); pinMode(SW_PIN, INPUT_PULLUP); // Setup Serial Monitor Serial.begin(9600); // Read the initial state of CLK lastStateCLK = digitalRead(CLK_PIN); } void loop() { // Read the current state of CLK currentStateCLK = digitalRead(CLK_PIN); // If last and current state of CLK are different, then pulse occurred // React to only 1 state change to avoid double count if (currentStateCLK != lastStateCLK && currentStateCLK == 1){ // If the