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

#include <BLDCDriver6PWM.h>

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

Public Member Functions

 BLDCDriver6PWM (int phA_h, int phA_l, int phB_h, int phB_l, int phC_h, int phC_l, int en=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_h
 
int pwmA_l
 phase A pwm pin number
 
int pwmB_h
 
int pwmB_l
 phase B pwm pin number
 
int pwmC_h
 
int pwmC_l
 phase C pwm pin number
 
int enable_pin
 enable pin number
 
float dead_zone
 a percentage of dead-time(zone) (both high and low side in low) for each pwm cycle [0,1]
 
PhaseState phase_state [3]
 phase state (active / disabled)
 
- 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

6 pwm bldc driver class

Definition at line 13 of file BLDCDriver6PWM.h.

Constructor & Destructor Documentation

◆ BLDCDriver6PWM()

BLDCDriver6PWM::BLDCDriver6PWM ( int  phA_h,
int  phA_l,
int  phB_h,
int  phB_l,
int  phC_h,
int  phC_l,
int  en = NOT_SET 
)

BLDCDriver class constructor

Parameters
phA_hA phase pwm pin
phA_lA phase pwm pin
phB_hB phase pwm pin
phB_lA phase pwm pin
phC_hC phase pwm pin
phC_lA phase pwm pin
enenable pin (optional input)

Definition at line 3 of file BLDCDriver6PWM.cpp.

Member Function Documentation

◆ disable()

void BLDCDriver6PWM::disable ( )
overridevirtual

Motor disable function

Implements FOCDriver.

Definition at line 36 of file BLDCDriver6PWM.cpp.

Here is the call graph for this function:

◆ enable()

void BLDCDriver6PWM::enable ( )
overridevirtual

Motor enable function

Implements FOCDriver.

Definition at line 26 of file BLDCDriver6PWM.cpp.

Here is the call graph for this function:

◆ init()

int BLDCDriver6PWM::init ( )
overridevirtual

Motor hardware init function

Implements FOCDriver.

Definition at line 48 of file BLDCDriver6PWM.cpp.

Here is the call graph for this function:

◆ setPhaseState()

void BLDCDriver6PWM::setPhaseState ( PhaseState  sa,
PhaseState  sb,
PhaseState  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 99 of file BLDCDriver6PWM.cpp.

Here is the caller graph for this function:

◆ setPwm()

void BLDCDriver6PWM::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 80 of file BLDCDriver6PWM.cpp.

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

Member Data Documentation

◆ dead_zone

float BLDCDriver6PWM::dead_zone

a percentage of dead-time(zone) (both high and low side in low) for each pwm cycle [0,1]

Definition at line 41 of file BLDCDriver6PWM.h.

◆ enable_pin

int BLDCDriver6PWM::enable_pin

enable pin number

Definition at line 39 of file BLDCDriver6PWM.h.

◆ phase_state

PhaseState BLDCDriver6PWM::phase_state[3]

phase state (active / disabled)

Definition at line 43 of file BLDCDriver6PWM.h.

◆ pwmA_h

int BLDCDriver6PWM::pwmA_h

Definition at line 36 of file BLDCDriver6PWM.h.

◆ pwmA_l

int BLDCDriver6PWM::pwmA_l

phase A pwm pin number

Definition at line 36 of file BLDCDriver6PWM.h.

◆ pwmB_h

int BLDCDriver6PWM::pwmB_h

Definition at line 37 of file BLDCDriver6PWM.h.

◆ pwmB_l

int BLDCDriver6PWM::pwmB_l

phase B pwm pin number

Definition at line 37 of file BLDCDriver6PWM.h.

◆ pwmC_h

int BLDCDriver6PWM::pwmC_h

Definition at line 38 of file BLDCDriver6PWM.h.

◆ pwmC_l

int BLDCDriver6PWM::pwmC_l

phase C pwm pin number

Definition at line 38 of file BLDCDriver6PWM.h.


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