Jens3382 / xy6020l

arduino lib to control xy6020l dcdc via UART
12 stars 1 forks source link

xy6020l undeactivated protection #2

Open ntfs1984 opened 2 months ago

ntfs1984 commented 2 months ago

Hello. Trying use part of your code (btw, great thanks to you) with input source of 32V.

The problem is: xy.setCV() is working properly, only up to some value (1200 - 12V).

But if I'm using bigger value - voltage just lowers down to 0 (zero).

I feel it's some protection, but I already set setProtect(0) - anyway voltage is lowering.

Also tried set all memory values of Nr(0) to 0 - anyway 12V is top value. If I'm setting xy.setOutput(1); in loop - voltage is jumping for few volts down, and then rising up again to my desired value.

May be there is a reason to add some minimal easy example just to set fixed voltage\current using setCC\setCV?

Thanks.

Jens3382 commented 2 months ago

Hello,

althrough you checked the protection flags already, did you tried out to set the OVP to >12 V? Actually, I used the DCDC with <23 V at input and <6V at output. Right now I have not the xy6020 in operation, so I can not re-construct your usecase.

Jens3382 commented 2 months ago

I just put 38 V on the input and got 12 V at the output. The LVP cuts the output to 0V when the input falls below the level (checked with 7V). I did not get the OVP active, as I set it to 15 V and drove the voltage above this level. This fits to the "manual" from tinkering4fun, where the OVP is triggered by a too high CV request. Do you have a different firmware version? M:6100 V:0074 (<- xy.getModel(), xy.getVersion() ) ?

ntfs1984 commented 2 months ago

I have M:24832 V:119 according to xy.getModel(), xy.getVersion() response.

The problem is - I'm still not sure how to correctly set parameters, other words - there are no minimal 100% working example to simple test.

For now even low-voltage setting not working.

void loop() {
 xy.task();
 if(xy.HRegUpdated())
 {
  xy.setProtect(0);
  xy.setCV(500);
  xy.setOutput(1);
  Serial.print("InV V: ");Serial.print(xy.getInV());
  Serial.print("; Out V: ");Serial.print(xy.getActV());
  Serial.print("; Protect: ");Serial.print(xy.getProtect());
  Serial.print("; Output: ");Serial.print(xy.getOutputOn());
  Serial.println();  
 }
}

This is example of code. Even if I'm forcing protection to 0 and output to 1 - anyway protection is turned on, and output is turning off. In V: 32V, Out V: 0.

Hardware DIP switches works fine, so it's not circuit problem.

Jens3382 commented 2 months ago

Do you have the display as well? If it is connected and one of the protection is triggered, the display flashs its content and the active protection is shown. In the example sketch xySetup.ino I program the protection registers. The set number 0 is active by default. Via pressing the displays key 'V/A' for >3 sec you can select and load the register set. This is a kind of pre-sets. I checked it with the setting from the programmed register set number 2: Mem.Nr = 2; Mem.VSet = 1200; Mem.ISet = 500; Mem.sLVP = 900; Mem.sOVP = 1500; Mem.sOCP = 620; Mem.sOPP = 1040; Mem.sOHPh= 0; Mem.sOHPm= 0; Mem.sOAH = 0; Mem.sOWH = 0; Mem.sOTP = 110; Mem.sINI = 0; xy.SetMemory(Mem); xy.PrintMemory(Mem);

Souti commented 1 month ago

I had the same issue. It was because of the gnd and 5v not connected correctly between xy6020l and my esp32.