SimpleFOClibrary 2.4.0
Loading...
Searching...
No Matches
BLDCDriver3PWM Class Reference

#include <BLDCDriver3PWM.h>

Inheritance diagram for BLDCDriver3PWM:
[legend]
Collaboration diagram for BLDCDriver3PWM:
[legend]

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 (PhaseState sa, PhaseState sb, PhaseState sc) override
 
- Public Member Functions inherited from BLDCDriver
virtual DriverType type () override
 

Public Attributes

int pwmA
 phase A pwm pin number
 
int pwmB
 phase B pwm pin number
 
int pwmC
 phase C pwm pin number
 
int enableA_pin
 enable pin number
 
int enableB_pin
 enable pin number
 
int enableC_pin
 enable pin number
 
- Public Attributes inherited from BLDCDriver
float dc_a
 currently set duty cycle on phaseA
 
float dc_b
 currently set duty cycle on phaseB
 
float dc_c
 currently set duty cycle on phaseC
 
- Public Attributes inherited from FOCDriver
long pwm_frequency
 pwm frequency value in hertz
 
float voltage_power_supply
 power supply voltage
 
float voltage_limit
 limiting voltage set to the motor
 
bool initialized = false
 true if driver was successfully initialized
 
void * params = 0
 pointer to hardware specific parameters of driver
 
bool enable_active_high = true
 enable pin should be set to high to enable the driver (default is HIGH)
 

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 FOCDriver.

Definition at line 32 of file BLDCDriver3PWM.cpp.

Here is the call graph for this function:

◆ enable()

void BLDCDriver3PWM::enable ( )
overridevirtual

Motor enable function

Implements FOCDriver.

Definition at line 22 of file BLDCDriver3PWM.cpp.

Here is the call graph for this function:

◆ init()

int BLDCDriver3PWM::init ( )
overridevirtual

Motor hardware init function

Implements FOCDriver.

Definition at line 44 of file BLDCDriver3PWM.cpp.

Here is the call graph for this function:

◆ setPhaseState()

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

Set phase voltages to the hardware

‍Only possible is the driver has separate enable pins for all phases!

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 67 of file BLDCDriver3PWM.cpp.

◆ setPwm()

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

Set phase voltages to the hardware

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

Implements BLDCDriver.

Definition at line 77 of file BLDCDriver3PWM.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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: