EssyBusBLDCMotorController
An IMotor implementation for a BLDC motor attached to the EssyBus
Install
| Product | Versions |
|---|---|
| .NET | |
| .NET Standard | |
| Other |
README
EssyBusBLDCMotorController NuGet Package
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 positionMoveClockWiseUntilStopChannel(...),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.
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.