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.

MPPT with SM72442 and SM72295

Other Parts Discussed in Thread: SM72295, SM72442, SM72482, SM72445, SM72240

Hi,

I wish to make a MPPT module with the SM72442 SolarMagic IC and the driver SM72295.

For my tests, my PV solar panel gives a output voltage up to 22 V (P = 50 Wc and Isc = 3,2 A)

I want 15 V DC on the MPPT module output

I've already bought these components. I looked for the technical documentation and I found the application note AN-2124 for SM3320. and the application note AN-2122 for SM3320-RF-EV. I downloaded the technical documentation RD-190 for this SolarMagic Eval Board.

My fisrt question : They use an external amplifier for IOUT (around LMP7717MF).  Can I use the internal amplifier of the SM72295 by connecting Rsense with SIB and SOB pins instead of this solution ?

Second question : By program, it is possible to read IOUT with SM72442 (BOUT of SM72295 connected to AIOUT of SM72442) and then control the PM OUTPUT to obtain the Panel Mode (PM_OUT is connected to the driver SM72482).

Third question : Rsense for IOUT (Rsen_out) is connected to low side (between VOUT- and GND). It is possible to place this Rsense in high side position between the Drains of N-MOSFET (Q2) and the cathode of D1 placed on the output (I make reference to the SM3320-RF-EV schematic - sheet 1/3, page 1 of SM72295 datasheet and page 2 of SM72242 datasheet).

Thanks for your help. This project is very important for me.

Joel

  • Hi Joel,

    First Question: You can use the internal amplifier but you must ensure that the output current sense resistor is on the high side (OUT+ side rather than OUT-)  and that current flow through it at all time. The current sense amplifier cannot sense the output current if the voltage at the current sense resistor falls below 5V.

    That also meanse the when the output voltage is below 5V, the output current sense amplifier will not return a consistent value.               

    Second question: The value of the output current sensed by the SM72445 on AIOUT is available through I2C. Panel Mode can also be forced either through I2C (reg3, bit 3 and 4) or through the PM pin (pin 28)

    Third Question: Yes, see answer to first question

    Florent

  • Hi Florent,

    Thanks for your answers.

    What do you mean when you said "That current flow througt it at all time" ?

    Joel

  • Hi Joel,

    I mean to make sure that output current flows through the resistor when the H-bridge is running OR when the panel mode switch is activated if you use the dedicated panel mode switch configuration.

    If you use the panel mode implemented using the H-bridge option then of course, that requirement does not exist.

    Florent

  • Hi florent,

    I began my schematic for my MPPT module and I wish to make the pcb quickly.

    Can you look at my shematic ( file in pdf attached with this post) ?

    I quickly analysed the SM3320-RF-EV technical documentation and I made some modifications:

     

    The current sensing for IOUT is built around RS101 in HIGH SIDE configuration. You note that I use the Panel mode with Q1 and Q2 connected between VIN and VOUT of my board. The PM_OUT (pin 11 of SM72442) control the SM72482. I don’t use the external current sensing amplifier U10 of SM3320-RF-EV board (you have already answered this question)

    The OUTPUT voltage is sensing by a resistor divider (R126 and R125) connected to pin 15 of SM72442.

    I don’t use the comparator U11B of the SM3320-RF-EV board. I think that the SM72442 can control the PM_OUT by reading directly the VOUT voltage after internal AD conversion (internal register of SM72442) ?

    My microcontroller (powered by 3,3V) generate MR (MASTER RESET) for SM72240 and I externally reset the SM72442 in case of problems. Good idea or not ?

    For the power, my regulator output is 9V (not 10 V as indicated on the schematic). I think it’s right for SM72295 

    There are no capacitor between BOUT (of SM72295) and GND and BIN and GND (cleared on SM3320-RF-EV schematic) ?

    I wait for you remarks and advices for this schematic. I wish that my test board works quickly with my schematic. After your answers, I’ll make the pcb with PCAD2002.

    Thanks.

    MPPT_joel_17052012.pdf
  • Hi Florent,

    Have you already read my last post about my proposal of schematic diagram for my MPPT module board ?

    I wait for your help to know if I didn’t make errors for my board. My MPPT module built around the SM72442 IC and others SolarMagic IC must work quickly. I’ve already bought these new components.

    I look forward to your reply.

    Kind regards.

    Joel

    MPPT_joel_17052012.pdf
  • Hi Joel,

    Question regarding the schottky diodes on the output: Why did you add the schottky diode D2? Are you worried of current backfeeding into the system? What are you planning on using as a load?

    If you want the option of forcing the PM mode through the PM pin, you might want to a route this pin to a connector.

    A0-A6 are analog input that are sensed and sampled by the SM72442. Make sure that the voltage is stable enough on this pins. You might want to add some capacitance on them near the SM72442.

    What do you use for Q100-Q103? Recomended Gate charge (Qg) is 100nC typ or less.

    Florent

  • Hi Florent,

    The Schottky diode D2 is used in accordance with page 1 of the application note AN-2124 (literature number : SNOSB84B) – Power Circuit design for SolarMagic SM3320. I plan to make two MPPT modules which will be connected in parallel to increase the OUTPUT power for my load.My load is a charger.

    After reading of the application note AN-2124, I need  blocking diode for each of my MPPT module. The Bypass Diode D1 is not useful in this case ? (My MPPT module isn't in series).

    The Diode D2 is necessary but not D1 ! Are you agree with me ?

    I am going to take your idea to force the Panel Mode by connecting the PM pin of SM72442 to my MCU (pin A0 of J100 connector is free).

    For the four N-MOSFET Q100 – Q103, I’ve already bought IRF3205ZPBF (the same is used for the SM3320-EV-RF board). 100 nC at 10V, RDSON = 6.5 mOhm at 66 A, 10V. I thing that it’s your choice.

    For A0, A2, A4 and A6 analog inputs of SM72442, I can increase the capacitance of C129, C130, C131, C132 up to 1 uF. The voltages must be well filtered with these capacitance. The U105 output ( 5V regulator) must also be stable with C155 (10 uF, Tantalum).

    You don't answer to a question in the last post : I'm going to remove C142 and C143 (AIIN and AIOUT pins) as made on the SM33206RF6EV board. Good or Bad idea ?

    After these modifications, all seems to be right on the schematic ? Can I begin my PCB.

    Thanks a lot for your support. I look forward to your reply.

    Kind regards.

    Joel

    snosb84b.pdf
  • Hi Florent,

    Did you studied my answers and my news questions posted last Friday (about the MPPT module) ?

    I've already joined the schematic diagram suggested. is it ok  ?

    I look forward to your reply.

    Kind regards

    joel

  • Hi Joel,


    Sorry, I missed part of the A0 to A6 connection and I thought you connected them directly to your MCU. That's OK, you won't need more capacitance there, no need to switch to tantalum.

    I agree, you should not need D1

    I suggest you keep the pads for the capacitors but do not stuff the components and see if you have noise issues. You might also want to to put 0ohms resistors between BIN and AIIN and BOUT and AIOUT. This gives you the option to add filtering shall you need it. In later revisions, you can get rid of both resistors pads and capacitor pads if you find you don't need them.

    Best Regards,

    Florent

  • Hi Florent,

    I realized my pcb for my MPPT Module with SM72442 and SM72295. For the moment, I used through hole components (SM72442 on a TSSOP28 – DIP28 adapter and SM72295 on a SOIC28 – DIP28 adapter). The input will be connect to a 50 Wp PV panel.

    I want to read and write the SM72442 internal registers. My master microcontroller initiate the I2C communication with my SM72442 device address : $02 with I2C0 = 1, I2C1 = 0 and I2C2 = 0.

    After sending this address (Frame 1), the acknowledge is OK (ACK =0). Now, I want to read or write data to monitor the MPPT with SM72442.

    I need information about Frame 2 (command register byte). What is the value for this register ?

    Could you help me ?

    0xE0 to read Reg0, 0xE1 to read Reg1, 0xE2 to write or read Reg2, 0xE3 to write or read Reg3, 0xE4 to write or read Reg4, 0xE5 to write or read Reg5 ?

    I’m not sure for these values.

    For information, my SM72442 is always in PANEL MODE (sqaure wave on PM OUT).

    I look forward to your reply.

    Kind regards.

    Joel

  • Hi Florent,

    I need help for I2C communication between MCU and the SM72442. I tried the I2C read sequence and I have troubles.

    After sending the device address with W\ = 0, then ACK = 0 !

    After sending the Frame 2 (Value = 0xE0), ACK = 0.

    After sending device address with R = 1, then ACK = 0 !

    After reading the Frame 4 (0x07), ACK =1 ????

    And All Data Bytes are $FF (for example, Voltage on A2 isn’t equal 5V).

    Can you help to read and write correctly in SM72442 ?

    I look forward to your reply (for the two last post)

    Kinds regards

    Joel

  • Hi Joel,

    When you say ACK=0 Do you mean SDA=0 which indicates acknowledge?

    First initiate a transaction with a write to the address.

    Then pass the register to the SM72442 0xE0 for address 0, 0xE1 for address 1 etc...

    Then perform a restart and address the SM72442, this time with a read command

    Next comes the register 0x00 for address 0, 0x01 for address 1 etc...

    The SM72442 should acknowledge each of these bytes up to that point.

    The SM72442 should then send back the number of bytes in the register (should be 7) and the content of the registers byte by byte starting with the lower bytes.

    The MCU should acknowledge each of these bytes.

    If you read 0xFF I think the SM72442 is not returning any data and the SDA line is just hanging high.

    Regards,

    Florent 

  • Hi Joel,

    In my previous reply i mentioned you need to set register 0x00 for address 0, 0x01 for addres 1 etc...

    Scratch this line, just send the I2C addres with the read command attached to the byte and the SM72442 will already be configured for you to read from the register you selected with the 0xEn register command earlier.

    Sorry for the confusion,

    Florent

  • Hi Florent,

    I read your last posts and I made the same thing (SCL and SDA timing attached with this post).

    After sending the reading Address, the SM72442 returns 0x07 (number of register) and ACK=1 (SDA =1) No Acknowledge.

    The SM72445 send back several $FF byte with ACK=0 (ACKNOWLEDGE).

    Something is wrong !!!!!

    I don’t understand and my project is stopped.

    An idea to help me ???

    Kinds regards

    Joel

    i2c_sm72442.pdf
  • Hi Joel,

    If the SM72442 is returning 0x07 after issuing a read command, the MCU should acknowledge reception of the bit, not the SM72442

    If the SM72442 is acknowledging after every byte, it is probably in write mode and is listening to the MCU..

    After you issue a write command with 0xE0 as the register (for example), you need to issue a re-start to restart a new transaction with the SM72442. Once the SM72442 is in read mode, it wil acknowledge and send 0x07. The master (MCU) will have to acknowledge this bit and all the further bits until you stop the transaction. 

    It's a little hard to tell on the waveform capture who is acknowledging. but try to acknowledge after the SM72442 sends the byte containing 0x07 and see if this works

    Best Regards,

    Florent

     

  • Hello

    I also hava a problem regarding the i2c communication with the SM72442.

    I have already set up a connection between my MC and the SM72442. The first Data Byte I receive from SM72442 is alwasy 7 (length of Bytes). So this seems to be ok.

    But the Data Bytes from 1 to 6 are fluctuiting a lot. For example: 1.fetch: Byte1 = 171, 2.fetch: Byte1 = 255 3.fetch Byte1 = 79...and so on.

    Furthermore I get high values out of register1, although i havent applied a voltage to AVIN, AIIN, AVOUT and AIOUT pins...

    The 7th Databyte is alway 0. This seems logical to me because the last bits are not used and reserved.

    1. question is: Is it necessary to do first the startup or something else, that values , which are send over I2C, are correct?

    2. question: With the adress 0xE1I am asking for the values of register 1. Am I right?

    3. Is there something i haven't mentionend so far?

    Thanks for your Support!

    rgds Michael

  • I finally got it,

     For all those whoe are struggeling with a similar issue: Take care, that the last byte must not be acknowledged ;)

     

  • Hey Michael,

    I try to interface the I2c on the SM72442. The address of the slave is 0x4 (0x04??).  As you can see in the attachement, the SCL line 'walks' on a 100Khz frequency. 

    on the falling edge of the 8th clockpulse and the 9th clockpulse there's is high puls on the SDA --> no ack !!!

    Here some code from my project

    #define I2C_MPPT_ADDR 0x4 //device address
    #define I2C_READ_reg0 (0xE0)//offset base address SM72442
    #define I2C_WRITE (0x00)
    #define I2C_READ (0x01)

    void initI2C(long baudRate)
    {
    long templong;
    // READ_I2C = 1; //make SDL input pin
    // Clk_I2C =0; //make SCL output pin

    templong = ( ( ((unsigned long)GetPeripheralClock() ) / (baudRate) ) - ( ((unsigned long)GetPeripheralClock() )/10000000UL)) -1;
    I2C1BRG = templong;

    I2C1CONbits.DISSLW = 1; //Slew rate control disabled for Standard Speed mode (100 kHz);
    I2C1CONbits.SCLREL = 1; // 1 = Releases SCLx clock
    I2C1CONbits.A10M = 0; //7-bit
    I2C1CONbits.I2CEN = 1; //enable I2C module

    }

    char read_MPPT(unsigned int addr, unsigned char *return_data)//int
    {
    int i;

    // start
    I2C1CONbits.SEN = 1; //start condition
    while(I2C1CONbits.SEN);
    //for(a=0;a<10;a++);
    // write
    I2C1TRN = I2C_MPPT_ADDR+I2C_WRITE;

    i = 0;
    while(I2C1STATbits.TRSTAT)
    {
    i++;
    if(i>=100-0)//100
    {
    I2C1CONbits.PEN = 1;
    return(0);
    }
    }

    if(I2C1STATbits.ACKSTAT == 0) // 0 = ACK

    ... 

    after this, there's a stop condition generated because I don't receive any ACK.

    Hope you can see some strange code or something?!

    THANX in advance.

    Greetz,

    Michiel

  •  Hello Michiel,

    I can't say if your code is right because i dont now the Register of the used MCU and more details.

    But to read out a register you have to do following precedure:

    Send Start condition

    Send Address with Write enable (which is in your case 00001000 = 0x08 (With WriteEnable Bit) )

    Send the Register address you want to read (which is 0xE0 for Register 0)

    Send Stop condition

    Send a new start condition

    Send Address with Read enable (which is in your case 00001001 = 0x09 (With ReadEnable Bit))

    Read 8 Bytes (Length Byte + 7 Register Bytes) and acknowledge every byte but not the last one!

    Send a Stop condition

    So it works fine in my application. And i receive a acknowledge of the SM72442

    I hope this helps you

    Regards Michael

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  • Hi Joel,

     

    Did you finally made the MPPT charge Controller using SM72442? Did you succeed? How is it doing now and what is it's peak current capacity?

     

    Reagrds,

    Mandar