First version of program for measuring current of three phase BLDC motor.

Dependencies:   AutomationElements CurrentRegulation_ mbed

CurrentMeasurement.h

Committer:
dfraj
Date:
2015-07-18
Revision:
0:c499ebd23db0

File content as of revision 0:c499ebd23db0:

#ifndef CURRENTMEASUREMENT_H
#define CURRENTMEASUREMENT_H

#include "mbed.h"

class CurrentMeasurement{
    public:
        CurrentMeasurement(PinName I_A, PinName I_B, PinName I_C, PinName I_TOTAL);
        CurrentMeasurement(PinName I_A, PinName I_B, PinName I_C, PinName I_TOTAL, float R_sh, float R_1s, float R_1t, float R_fs, float R_ft, float V_ref);
        void setValues(float R_sh, float R_1s, float R_1t, float R_fs, float R_ft, float V_ref);
        float calculateCurrentA();
        float calculateCurrentB();
        float calculateCurrentC();
        float calculateCurrentTotal();
        
    private:
        AnalogIn I_A, I_B, I_C, I_TOTAL;
        float R_sh, R_1s, R_1t, R_fs, R_ft, V_ref, I_A_, I_B_, I_C_, I_TOTAL_; 
    };

#endif