Tag: rolety automatyczne

  • Smart Motor Driver

    Smart Motor Driver

    DC motors driver with encoder based on ESP32-S3

    Smart Motor Driver is a dual-channel DC motor controller with encoders, designed for precise motion control in applications such as home automation, robotics, mechatronics, and positioning systems. At its core is the ESP32-S3, a powerful microcontroller with Wi-Fi connectivity, offering extensive integration possibilities with control systems, including Home Assistant, thanks to full ESPHome compatibility.


    ๐Ÿ”ง Key technical features:

    • โš™๏ธ Supports two DC motors with quadrature encoders
    • โšก Supply voltage range: 8โ€“36 V
    • ๐Ÿ”Œ Up to 800 mA per channel โ€“ ideal for JGA25-370 type drives
    • ๐Ÿง  ESP32-S3 on board โ€“ full flexibility for firmware (ESPHome, Arduino, custom solutions)
    • ๐Ÿ“ Compact size: 56 ร— 50 mm

    Advanced motors control

    Each channel is equipped with a full H-bridge implemented using the DRV8801, which allows:

    • Smooth motor speed control via PWM
    • Direction selection
    • Active braking
    • Hardware protections: short-circuit, thermal, overvoltage, and overcurrent safeguards

    Limit switch support

    Each channel has two independent limit switch inputs, allowing protection of the driveโ€™s end positions (up/down, left/right, open/closed). The inputs can operate in two modes:

    • ๐Ÿ”˜ Digital (ON/OFF) โ€“ for classic mechanical or optical limit switches
    • ๐Ÿ“‰ Analog with adjustable threshold โ€“ e.g., for magnetic sensors with voltage output or phototransistors

    This solution enables precise and flexible adaptation of the limit system to different types of drives and operating environments.


    Advanced motion control โ€“ ready-to-use ESPHome firmware

    Smart Motor Driver comes with ESPHome firmware, enabling full integration with Home Assistant and providing smart servo functionality:

    • ๐Ÿ” Dual-loop PID controller:
      • Position loop (external) โ€“ precise positioning
      • Velocity loop (internal) โ€“ motion stabilization and smoothness
    • ๐Ÿงฎ Trajectory planner โ€“ dynamically generates ramps (acceleration, max speed, movement duration)
    • ๐Ÿ“ก Live encoder position reading โ€“ actual, non-estimated measurement
    • ๐Ÿ”— Channel motion synchronization โ€“ coordinated control of two motors (e.g., simultaneous raising of a dual awning)

    Firmware available on: https://github.com/IoTLabs-pl/Smart-Motor-Driver


    Applications

    The primary intended use of the Smart Motor Driver is controlling blinds, awnings, and curtains, where precise position control, motion synchronization, and remote integration with smart home systems are required.

    Thanks to real-time position feedback from quadrature encoders, it is possible to determine the exact drive position without relying on time-based estimation. This significantly improves accuracy, repeatability, and system safety.

    • ๐ŸชŸ Automatic blinds, shutters, awnings, curtains
    • ๐Ÿค– Mobile robots and manipulators
    • ๐Ÿ—๏ธ Rotating platforms, linear guides, XY systems
    • ๐Ÿ  Smart home systems (Home Assistant, ESPHome)
    • ๐ŸŽ“ Educational projects and prototyping in mechatronics and IoT