Close
0%
0%

NodeMCU Web UI for RS-485 curtain motors

Control Dooya curtain motors via RS-485 from the web UI hosted by NodeMCU

Similar projects worth following
A long time ago, I bought motors for automating curtains (Dooya DT82TV, with RS-485 interface), and created a circuit and web interface for them based on ESP8266-01 (and SP3485 for RS-485 interface). This web interface allowed to open/close curtains with buttons in the web interface. After 5 years of using it, I updated the project with the possibility of partially opening the curtains (using the slider), as well as reading the initial state of the curtains in the web interface.
At this point, I finally decided that this was worth sharing, and forced myself to create a public git repository for it and write some documentation on how to use it.

All information about the project can be found on github, but for convenience, here are some details.

Features

  • Single NodeMCU device can control many curtain motors (assuming all of them are wired with this NodeMCU device), and these motors can be added/configured via the web interface;
  • Ability to send raw commands to RS-485 (optionally appended with the generated CRC16) from the web interface (RS-485 tab);
  • The motor address may be assigned using web interface (RS-485 tab), so no other hardware/software is required to initialize the motors;

The following features are derived from the platform on which project is based:

  • Wi-Fi connection (such as setting up an access point, or using an existing Wi-Fi network) can be set up via the web interface;
  • NodeMCU device hosts HTTP server locally, no third-party services are used and no Internet access is required;
  • There is a built-in IDE for editing the software via the web interface (you can hack the software at runtime to add new features);
  • Responsive Web UI (usable from smartphones);
  • NodeMCU version agnostic (software can work on NodeMCU 1.5.4.1 - 3.0.0).

Web interface overview:

NodeMCU to RS-485 interface

This device allows NodeMCU hardware (implemented on any of the chips: ESP8266, ESP8285 and ESP32) to communicate with devices over RS-485 interface. The RS-485 interface is implemented using the SP3485 chip, as it can be powered by 3.3V (as required by ESP-01). Here is the schematic diagram (if using the simplest ESP-01 module and an existing 5V power supply):

  • 1 × ESP-01 ESP8266 ESP-01 module
  • 1 × SP3485 Interface and IO ICs / RS-232, RS-422, RS-423 and RS-485
  • 1 × LD1117S33C Power Management ICs / Linear Voltage Regulators and LDOs
  • 1 × 5V power supply
  • 1 × Dooya DT82TV Curtain motor with RS-485 interface (DT82TV, DT72E, DT52E, etc.)

  • Circuit bug fix

    dev-lab10/25/2022 at 17:04 0 comments

    After 6 years of use, the SP3485 chip finally died, probably disagreeing with mistakenly pulling-up B(-) and pulling-down A(+) outputs. I'm hoping the new chip will be more happy with the updated circuit where A is pulled-up (with R4), and B is pulled-down (with R6).

View project log

Enjoy this project?

Share

Discussions

Dmitry Marinin wrote 12/28/2023 at 17:36 point

Hi there!
Cool project) Are you going to open the source code without JS obfuscation? I'm interested in transferring it to Arduino

  Are you sure? yes | no

dev-lab wrote 03/06/2024 at 08:51 point

Hi Dmitry, the code is indeed somewhat concise, but it's not obfuscated (there is no another version of the code with comments and verbose literals).

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates