SimpleFOClibrary  2.1
BLDCDriver3PWM Class Reference

#include <BLDCDriver3PWM.h>

Inheritance diagram for BLDCDriver3PWM:
BLDCDriver

Public Member Functions

 BLDCDriver3PWM (int phA, int phB, int phC, int en1=NOT_SET, int en2=NOT_SET, int en3=NOT_SET)
 
int init () override
 
void disable () override
 
void enable () override
 
void setPwm (float Ua, float Ub, float Uc) override
 
virtual void setPhaseState (int sa, int sb, int sc) override
 

Public Attributes

int pwmA
 phase A pwm pin number More...
 
int pwmB
 phase B pwm pin number More...
 
int pwmC
 phase C pwm pin number More...
 
int enableA_pin
 enable pin number More...
 
int enableB_pin
 enable pin number More...
 
int enableC_pin
 enable pin number More...
 
- Public Attributes inherited from BLDCDriver
long pwm_frequency
 pwm frequency value in hertz More...
 
float voltage_power_supply
 power supply voltage More...
 
float voltage_limit
 limiting voltage set to the motor More...
 
float dc_a
 currently set duty cycle on phaseA More...
 
float dc_b
 currently set duty cycle on phaseB More...
 
float dc_c
 currently set duty cycle on phaseC More...
 

Detailed Description

3 pwm bldc driver class

Definition at line 13 of file BLDCDriver3PWM.h.

Constructor & Destructor Documentation

◆ BLDCDriver3PWM()

BLDCDriver3PWM::BLDCDriver3PWM ( int  phA,
int  phB,
int  phC,
int  en1 = NOT_SET,
int  en2 = NOT_SET,
int  en3 = NOT_SET 
)

BLDCDriver class constructor

Parameters
phAA phase pwm pin
phBB phase pwm pin
phCC phase pwm pin
en1enable pin (optional input)
en2enable pin (optional input)
en3enable pin (optional input)

Definition at line 3 of file BLDCDriver3PWM.cpp.

Member Function Documentation

◆ disable()

void BLDCDriver3PWM::disable ( )
overridevirtual

Motor disable function

Implements BLDCDriver.

Definition at line 31 of file BLDCDriver3PWM.cpp.

◆ enable()

void BLDCDriver3PWM::enable ( )
overridevirtual

Motor enable function

Implements BLDCDriver.

Definition at line 21 of file BLDCDriver3PWM.cpp.

◆ init()

int BLDCDriver3PWM::init ( )
overridevirtual

Motor hardware init function

Implements BLDCDriver.

Definition at line 43 of file BLDCDriver3PWM.cpp.

◆ setPhaseState()

void BLDCDriver3PWM::setPhaseState ( int  sa,
int  sb,
int  sc 
)
overridevirtual

Set phase voltages to the harware

Parameters
sc- phase A state : active / disabled ( high impedance )
sb- phase B state : active / disabled ( high impedance )
sa- phase C state : active / disabled ( high impedance )

Implements BLDCDriver.

Definition at line 68 of file BLDCDriver3PWM.cpp.

◆ setPwm()

void BLDCDriver3PWM::setPwm ( float  Ua,
float  Ub,
float  Uc 
)
overridevirtual

Set phase voltages to the harware

Parameters
Ua- phase A voltage
Ub- phase B voltage
Uc- phase C voltage

Implements BLDCDriver.

Definition at line 78 of file BLDCDriver3PWM.cpp.

Member Data Documentation

◆ enableA_pin

int BLDCDriver3PWM::enableA_pin

enable pin number

Definition at line 38 of file BLDCDriver3PWM.h.

◆ enableB_pin

int BLDCDriver3PWM::enableB_pin

enable pin number

Definition at line 39 of file BLDCDriver3PWM.h.

◆ enableC_pin

int BLDCDriver3PWM::enableC_pin

enable pin number

Definition at line 40 of file BLDCDriver3PWM.h.

◆ pwmA

int BLDCDriver3PWM::pwmA

phase A pwm pin number

Definition at line 35 of file BLDCDriver3PWM.h.

◆ pwmB

int BLDCDriver3PWM::pwmB

phase B pwm pin number

Definition at line 36 of file BLDCDriver3PWM.h.

◆ pwmC

int BLDCDriver3PWM::pwmC

phase C pwm pin number

Definition at line 37 of file BLDCDriver3PWM.h.


The documentation for this class was generated from the following files: