更改为接口板,adc检测部分的大小
This commit is contained in:
parent
228f632d95
commit
b85fbca8e0
|
@ -26,11 +26,13 @@
|
||||||
/* 光伏充电输出电流比例,放大倍数*电阻 */
|
/* 光伏充电输出电流比例,放大倍数*电阻 */
|
||||||
const float P_CHG_CURR = (1.0 / (50 * 0.005));
|
const float P_CHG_CURR = (1.0 / (50 * 0.005));
|
||||||
/* 光伏充电输出电压比例,分压系数(放电时采集不准) */
|
/* 光伏充电输出电压比例,分压系数(放电时采集不准) */
|
||||||
const float P_PV_VOLT_OUT = (47.0 + 10.0) / 10.0;
|
//const float P_PV_VOLT_OUT = (47.0 + 10.0) / 10.0;
|
||||||
|
const float P_PV_VOLT_OUT = (47.0 + 4.7) / 4.7;
|
||||||
/* 放电电流采集电流倍数 */
|
/* 放电电流采集电流倍数 */
|
||||||
const float P_DSG_CURR = (1.0 / (50 * 0.005));
|
const float P_DSG_CURR = (1.0 / (50 * 0.005));
|
||||||
///* 光伏1开路输出电压比例 */
|
///* 光伏1开路输出电压比例 */
|
||||||
const float P_PV1_VOLT_IN = (100 + 4.7) / 4.7;
|
//const float P_PV1_VOLT_IN = (100 + 4.7) / 4.7;
|
||||||
|
const float P_PV1_VOLT_IN = (47.0 + 4.7) / 4.7;
|
||||||
/* 光伏1开路输出电压比例 */
|
/* 光伏1开路输出电压比例 */
|
||||||
//const float P_PV1_VOLT_IN = (47 + 4.7) / 4.7;
|
//const float P_PV1_VOLT_IN = (47 + 4.7) / 4.7;
|
||||||
/* 系统电源电压比例 */
|
/* 系统电源电压比例 */
|
||||||
|
@ -119,7 +121,8 @@ float get_CHG_CURR(void)
|
||||||
I_ADC = Get_ConversionVal(get_adc(CHG_CURR));
|
I_ADC = Get_ConversionVal(get_adc(CHG_CURR));
|
||||||
// I_ADC = get_adc(CHG_CURR);
|
// I_ADC = get_adc(CHG_CURR);
|
||||||
|
|
||||||
I = (float)(I_ADC) / 4095 * 3.3 * P_CHG_CURR * 2;
|
// I = (float)(I_ADC) / 4095 * 3.3 * P_CHG_CURR * 2;
|
||||||
|
I = (float)(I_ADC) / 4095 * 3.3 * P_CHG_CURR;
|
||||||
|
|
||||||
// printf(" CHG_CURR I : %d /10000 \n", (int)(I * 10000));
|
// printf(" CHG_CURR I : %d /10000 \n", (int)(I * 10000));
|
||||||
#ifdef enable_Printf_VI
|
#ifdef enable_Printf_VI
|
||||||
|
@ -166,7 +169,8 @@ float get_DSG_CURR(void)
|
||||||
I_ADC = Get_ConversionVal(get_adc(DSG_CURR));
|
I_ADC = Get_ConversionVal(get_adc(DSG_CURR));
|
||||||
// I_ADC = get_adc(DSG_CURR);
|
// I_ADC = get_adc(DSG_CURR);
|
||||||
|
|
||||||
I = (float)(I_ADC) / 4095 * 3.3 * P_DSG_CURR * 2;
|
// I = (float)(I_ADC) / 4095 * 3.3 * P_DSG_CURR * 2;
|
||||||
|
I = (float)(I_ADC) / 4095 * 3.3 * P_DSG_CURR;
|
||||||
|
|
||||||
#ifdef enable_Printf_VI
|
#ifdef enable_Printf_VI
|
||||||
printf("\n DSG_CURR ADC : %d \n", I_ADC);
|
printf("\n DSG_CURR ADC : %d \n", I_ADC);
|
||||||
|
|
|
@ -469,14 +469,14 @@ void task_Init(void)
|
||||||
|
|
||||||
TimeSliceOffset_Register(&m_wdi, Task_wdi, wdi_reloadVal, wdi_offset);
|
TimeSliceOffset_Register(&m_wdi, Task_wdi, wdi_reloadVal, wdi_offset);
|
||||||
|
|
||||||
// TimeSliceOffset_Register(&m_impedanceCalculation, Task_impedanceCalculation
|
//// TimeSliceOffset_Register(&m_impedanceCalculation, Task_impedanceCalculation
|
||||||
// , impedanceCalculation_reloadVal, impedanceCalculation_reloadVal);
|
//// , impedanceCalculation_reloadVal, impedanceCalculation_reloadVal);
|
||||||
|
//
|
||||||
TimeSliceOffset_Register(&m_refreshRegister, Task_refreshRegister
|
// TimeSliceOffset_Register(&m_refreshRegister, Task_refreshRegister
|
||||||
, refreshRegister_reloadVal, refreshRegister_reloadVal);
|
// , refreshRegister_reloadVal, refreshRegister_reloadVal);
|
||||||
|
//
|
||||||
TimeSliceOffset_Register(&m_startMpptControl, Task_startMpptControl
|
// TimeSliceOffset_Register(&m_startMpptControl, Task_startMpptControl
|
||||||
, startMpptControl_reloadVal, startMpptControl_offset);
|
// , startMpptControl_reloadVal, startMpptControl_offset);
|
||||||
|
|
||||||
TimeSliceOffset_Start(); /* 启动时间片轮询 */
|
TimeSliceOffset_Start(); /* 启动时间片轮询 */
|
||||||
}
|
}
|
||||||
|
@ -497,9 +497,11 @@ void hardware_Init(void)
|
||||||
WDI_INPUT_Init();
|
WDI_INPUT_Init();
|
||||||
SPI_Flash_Init();
|
SPI_Flash_Init();
|
||||||
POW_OUT_CON_Init();
|
POW_OUT_CON_Init();
|
||||||
DSG_PROT_Init();
|
// DSG_PROT_Init();
|
||||||
EnPowerSupply_Init();
|
// EnPowerSupply_Init();
|
||||||
|
|
||||||
TIM3_Init(1);
|
Set_duty_ratio(&g_duty_ratio);
|
||||||
|
|
||||||
|
// TIM3_Init(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
19673
obj/mppt_Nos_V0.4.lst
19673
obj/mppt_Nos_V0.4.lst
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue