Datasheet | Hw-044
Here is a standard wiring diagram and code example to get your HW-044 running with an Arduino Uno.
is a compact RS232 to TTL converter module primarily used to bridge communication between standard computer serial ports and microcontrollers like Arduino, STM32, or ESP32. It is based on the
+-----------------------------------+ | | (TX) [o]| [ TXD ] +----------+ | ########### (RX) [o]| [ RXD ] | MAX3232 | | # DB9 # (VCC)[o]| [ VCC ] +----------+ | # Female # (GND)[o]| [ GND ] | # Port # | | ########### +-----------------------------------+ 1. TTL Microcontroller Side (4-Pin Header)
This code creates a classic "tank drive" response: pushing forward moves both motors forward, pulling back reverses, and moving the X axis creates differential steering. hw-044 datasheet
The board includes a red "Touch" LED. While useful for debugging, note that This means:
Before we look at the board, let's look at the datasheet for the core IC.
The module typically features a 4-pin header for the TTL/Microcontroller side: Here is a standard wiring diagram and code
The HW-044 module features two distinct interfaces: a standard DB9 female port for the RS232 device and a 4-pin header for the microcontroller. TTL Interface (Microcontroller Side)
: While the IC supports up to 250kbps, long cables (over 15 meters) will require you to lower the baud rate to 9600 or 19200 to avoid data corruption.
The S2 and S3 pins dictate which internal channel or photodiode array is currently active and routing data to the OUT pin. Red filter / Channel 1 active S2 = L, S3 = H: Blue filter / Channel 2 active S2 = H, S3 = L: Clear (no filter) / Channel 3 active S2 = H, S3 = H: Green filter / Channel 4 active Application and Wiring Diagrams Connecting HW-044 to an Arduino Uno TTL Microcontroller Side (4-Pin Header) This code creates
Thus, the conversion works automatically .
Depending on your setup, you may still need a DB9-to-USB adapter if your modern computer lacks a native COM port.
To solidify your understanding, here is a complete project using the HW-044.
Alternative negative 5V DC input (Ground). Battery and Load Connections
By counting the pulses, you can track exactly how many "steps" the knob has turned.