Bar Logo 4kW dsPIC33C PSFB DC-DC DA (Part-No. )
 
Content
     
Loading...
Searching...
No Matches
hardware.h
1
2// This is a guard condition so that contents of this file are not included
3// more than once.
4#ifndef HARDWARE_H
5#define HARDWARE_H
6
7//------------------------------------------------------------------------------
8// hardware constants (voltage & current sense, gains and offsets)
9//------------------------------------------------------------------------------
10
14// VPRI_SNS_GAIN: VPRI_SNS = VPRI * VPRI_SNS_GAIN + VPRI_SNS_OFS
15#if defined (VPRI_OPTOCOUPLER_POLARITY) && (VPRI_OPTOCOUPLER_POLARITY == true)
16 #define VPRI_SNS_GAIN (float)(-3.600e-3) // V/V
17 #define VPRI_SNS_OFS (3.3183) // V
18#else
19 // primary PIC 16 adc ref = 4.096, k = 4,32mv
20 // secondary dspic adc ref = 3.3,
21 // 3.3/4.32 = 0,805, k´ = k * 0,805 => 3,8mv
22 #define VPRI_SNS_GAIN (float)(3.48e-3) // V/V
23 #define VPRI_SNS_OFS (0.165) // V
24#endif
25
26#define VPRI_VOLTAGE_GAIN (float)0.2229
27
28 // end of group primary-voltage-feedback ~~~~~~~~~~~~~~~~~~~~
29
30
34// VSEC_SNS = VSEC * VSEC_SNS_GAIN
35#define VSEC_SNS_GAIN (154e-3) // V/V
36 // end of group ~~~~~~~~~~~~~~~~~~~~
37
38// #define VSEC_VOLTAGE_GAIN (float)0.2534 ////< scaling for voltage vs ADC value
39
40
41
45// IPRI_CT_SNS = IPRI_CT * IPRI_CT_SNS_GAIN + IPRI_CT_SNS_OFS
46// note that the IPRI_CT_SNS is rectified via hardware
47#define IPRI_CT_SNS_GAIN (152.4e-3) // V/A
48#define IPRI_CT_SNS_OFS (0.5) // V
49 // end of group ~~~~~~~~~~~~~~~~~~~~
50
51
55// ISEC_CT_SNS = ISEC_CT * ISEC_CT_SNS_GAIN + ISEC_CT_SNS_OFS
56// note that the ISEC_CT_SNS is rectified on the power board
57// #define ISEC_CT_SNS_GAIN (66.0e-3) // V/A
58// #define ISEC_CT_SNS_OFS (0.5) // V
59
60// ISEC_AVG_SNS = ISEC_AVG * ISEC_AVG_SNS_GAIN + ISEC_AVG_SNS_OFS
61#define ISEC_AVG_SNS_GAIN (10.0e-3) // V/A
62#define ISEC_AVG_SNS_OFS (0.5) // V
63 // end of group ~~~~~~~~~~~~~~~~~~~~
64
65
69// VRAIL_5V_SNS = VRAIL_5V * VRAIL_5V_SNS_GAIN
70#define VRAIL_5V_SNS_GAIN (0.5) // V/V
71 // end of group ~~~~~~~~~~~~~~~~~~~~
72
73
77#define TEMPERATURE_GAIN (0.0196)
78#define TEMPERATURE_OFFSET (0.4)
79 // end of group ~~~~~~~~~~~~~~~~~~~~
80
81#endif /* HARDWARE_H */
82