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
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