This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28035 based Solar Explorer Kit Analog Input Scaling in the CCS code



Hi,

I have 2 burning questions about a recently bought solar explorer kit and hope you will patiently read my problem description and answer my questions. 

I bought the solar explorer kit (TMDSSOLARPEXPKIT) with F28035 control card recently and was using the sample code provided with the kit. I made  another power electronic board which is very similar to the power electronic board which came with the kit, but this has a H-bridge and a boost side IGBT with higher ratings. In addition it has same kind of sensors with different scaling. I'm hoping to use the F28035 control card to control the new board, using the same sample code which came with the Solar Explorer kit. I was able to successfully use the sample code which came with the kit and to use a F28035 card to control the board. The sensors I have on the new board are slightly different and I have a slight problem because of this.  I'm trying to find the exact way of changing sensor scaling in the code without affecting it's functionality, since it was not successful with some analog inputs which are related with the boost side of the board. (Vpv read, Ipvread, Vboost and Iboostsw) But I was able to figure out how to change inverter side sensor scaling i.e Iac-FB, Vac-FB etc

For an example, in the Solar explorer kit the relationship between actual input DC voltage to the boost converter and the measured voltage feedback (which goes to the control card ) is Vpv(feedback) = 0.099*Vin. (The voltage divider in the board is in agreement with this) The excel sheet 'Boost-DCDC-SinglePh-MPPT-LV_SenseCalculation.xls' confirms this. In my new board , this relationship is... for an example ... Vpv(feedback)l= 0.0068*Vin - 0.5

Therefore in the solar explorer kit it's a Y=mX kind of a relationship between DC Input Voltage and the feedback and in the new board it's Y=mX +C type of a relationship. In I understand the fact that F28035 read the value with 12bit ADC and convert it to normalized values.  In addition in the code I could figure out that ADC macro read the voltage value using 'ADCDRV_1ch_Rlt7=&VpvRead;' or the value is written to the address of VpvRead. Then this value is moved to MATH_EMAGV:2 block and to CNTL_2P2Z:2: blocks. Output of the MATH_EMAGV:2 block is in Q_24 format. 

1. My first question is, where exactly should I do the necessary changes to compensate for the sensor scaling difference of my new voltage sensor? (should i change MPPT PnO/ INCC block and coefficients of CNTL_2P2Z:2 block ?) or is there an easy way to do this?

The other problem is related to GUI values. I could see how this variable get read using following statements,

 ***********************************************************

 #define Vpv_FB   AdcResult.ADCRESULT7 

ChSel[7] = 1;       // A1 - Vpv_FB, Panel input Voltage 

Hist_Vpv[HistPtr]    =  Vpv_FB; 

temp_Scratch=0;
for(i=0; i<8; i++) temp_Scratch = temp_Scratch + Hist_Vpv[i];
Gui_Vpv = ( (long) temp_Scratch * (long) K_Vpv ) >> 15;

******************************************************************

AlsoI noticed that appropriate K_Vpv could be calculated using 'Boost-DCDC-SinglePh-MPPT-LV_SenseCalculation.xls' macro calculation sheet

2. My second question is How can I calculate K_Vpv for Y=mX+C type of a relationship using the above excel sheet?

I would highly appreciate if some one could kindly explain this to me. 

Many Thanks

Pas

  • Pas,

    I will recommend making changes to the ADCDRV block, you can modify the assembly code to subtract the offset (0.5) in your case in the Q24 format, if you do not want to make the changes to the DRV block itself you can add the assembly code after the call to the assembly block, 

    Please make sure after to subtract the offset you saturate the reading to zero so it does not have negative value.

    For the GUI values you can just subtract what 0.5 stands for in the real voltage terms from the reading, hence just use

    Gui_Vpv = (( (long) temp_Scratch * (long) K_Vpv ) >> 15)-_IQ9(10.0);

    where 0.5 reading pu corresponded to 10V

    Regards

    Manish Bhardwaj

  • Hi manish,

    Great, thank you very much for the prompt reply and advice. Highly appreciate your support. I will try this and let you know what happens.

    Thanks

    Pas

  • Hi Again Manish,

    Do you by any chance have a matlab model available, which represent the solar explorer kit? 

    many Thanks

    Pas

  • Pas,

    We do not have a matlab model for the solar explorer kit,

    regards

    Manish Bhardwaj