Skip to main content

An IMotor implementation for a BLDC motor attached to the EssyBus

Total Downloads
1.2K
1,222
Published
Oct 14, 2025
1y ago

Get Started

dotnet add package EssyBusBLDCMotorController --version 1.2.0
ProductVersions
.NET
net8.0net9.0
.NET Standard
netstandard2.0
Other
.NETFramework4.8

README

EssyBusBLDCMotorController NuGet Package

NuGet Version

Description

EssyBusBLDCMotorController is a .NET library for controlling brushless DC (BLDC) motors via the EssyBus protocol. It exposes a high‑level C# API for movement, stops, interrupts, and configuration of motor parameters such as PID gains, acceleration, speed, and safety features like over‑temperature and over‑current shutdown.

Features

  • Initialize and power motors on/off
  • Move clockwise/counter‑clockwise with configurable acceleration, speed, and deceleration
  • Move to absolute positions (blocking and non‑blocking)
  • Temporary overrides: early arrival delta, stop channels
  • Built‑in interrupt handling and stall protection
  • PID tuning (P, I, D, Jerk) with smart caching to minimize bus traffic
  • Read motor temperature and configure safety shutdown thresholds
  • Events for motor stalled and movement completion

Installation

Install via the .NET CLI:

dotnet add package EssyBusBLDCMotorController

Or via the Package Manager Console:

Install-Package EssyBusBLDCMotorController

Quick Start

using System;
using Essy.EssyBusBLDCMotorController;

class Program
{
    static void Main()
    {
        // Create and power on controller
        var controller = new EssyBusBLDCMotorController();
        controller.Powered = true;

        // Configure PID gains
        controller.P = 500;
        controller.I = 10;
        controller.D = 50;
        controller.Jerk = 1.5f;

        // Move to position 1000 steps at speed 800 steps/sec
        controller.MoveToPosition(1000, acceleration: 200, speed: 800, deceleration: 200);

        // Read final position and power off
        Console.WriteLine($"Stopped at: {controller.Position}");
        controller.Powered = false;
    }
}

API Reference

EssyBusBLDCMotorController

  • Properties

    • bool Powered { set; } – Enable/disable H‑bridge.
    • int Position { get; set; } – Read or set current motor position.
    • float Jerk { get; set; } – Jerk parameter (with smart caching).
    • int P, PIdle, I, D { set; } – PID gains (cached updates).
    • float MotorTemperature { get; } – Read current motor temperature (°C).
    • bool EnableOverTemperatureShutdown { set; }
    • bool EnableOverCurrentShutdown { set; }
    • byte OverTemperatureTripPoint { set; }
  • Methods

    • MoveClockWise(int acceleration, ushort speed)
    • MoveCounterClockWise(int acceleration, ushort speed)
    • MoveToPosition(int position, int acceleration, ushort speed, int deceleration)
    • MoveToPositionWithCapture(...) – capture actual stop position
    • MoveClockWiseUntilStopChannel(...), MoveCounterClockWiseUntilStopChannel(...)
    • Stop(int deceleration)
    • ResetDevice(), ApplySettings()
  • Events

    • event EventHandler MotorStalledAndStopped – Raised when stall protection stops the motor.

Enums

  • InterruptReason – none, DestinationReached, StopChannel1Happened, … Stall.
  • StopChannelPullupState – NoPullUps, ChannelOnePullUp, ChannelTwoPullUp, BothChannelsPullUp.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 4 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.