Author Topic: Cheezeball DC Load: DL24P: Pump, or Dump ???  (Read 82754 times)

0 Members and 3 Guests are viewing this topic.

Offline deuteron

  • Contributor
  • Posts: 36
  • Country: de
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #300 on: July 05, 2023, 05:41:32 pm »
So, here comes a second post about another experiment just to avoid confusion.
For my personal application 20A are not needed, even 10A is very high for most of my discharging or power supply testing experiments. As already stated, the complete regulation interval is only 100mV. This can be easily seen from the schematics or just from the fact that the maximum shunt voltage is 100mV at 20A. Both shunt resistors in parallel are giving 0.005Ohms. The idea (and I did it today) is to remove one of the 0.01Ohms shunts. But why doing so ? When you set some voltage/current point, you see that the current is only stable down to about +/-2mA. This behaviour corresponds to instabilities in Vgs (see e.g. the first picture below). The amplitude of this pulsing can be as high as 10mV, which is a lot at some Fet working points. I suppose that it has to do with a limited resolution of the digital set point. I got the idea to increase the resolution just by increasing the shunt resistor by a factor of 2 (removing one resistor). For me the resulting 10A max is fine. Today I ask our engineer to unsolder the second shunt. I recalibrated the load corresponding to the new shunt value. In the meanwhile, it is clear to me, how the current calibration must be performed. If somebody is interested, how this works, please ask. After that I saw two things changing: Firstly, the current instabilities were reduced to about +/- 1mA. Secondly, there was no overshooting anymore, even at 2.5V/10A ! Picture No. 2 shows the step response at this setting. So, not the removal of C5, but the doubling of the shunt resistance and thus the increased current resolution cured the overshooting problem. If you look to the plateau of the steps in more detail, you also see that the step response changed to a flat and up to the setpoint slowly increasing voltage. It is more what is expected from a well working regulator. Picture No.3 shows the step response before the shunt resistance doubling. Tomorrow I'll repeat the step response measurements just to be completely sure that the overshooting is gone. But from what I had the time to see today, yes it's gone.
I'm even thinking about a further doubling of the shunt resistor (+ recalibration). Then max current will be 5A, but this would be still fine and it would correspond to the current guiding ability of the pcb (tracks, rev pol diode, DC plug and so on). I think, just by curiosity, I'll try that and post the results here.
« Last Edit: July 05, 2023, 05:48:05 pm by deuteron »
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #301 on: July 05, 2023, 08:11:57 pm »
So, here comes a second post about another experiment just to avoid confusion.
For my personal application 20A are not needed, even 10A is very high for most of my discharging or power supply testing experiments. As already stated, the complete regulation interval is only 100mV. This can be easily seen from the schematics or just from the fact that the maximum shunt voltage is 100mV at 20A. Both shunt resistors in parallel are giving 0.005Ohms. The idea (and I did it today) is to remove one of the 0.01Ohms shunts. But why doing so ? When you set some voltage/current point, you see that the current is only stable down to about +/-2mA. This behaviour corresponds to instabilities in Vgs (see e.g. the first picture below). The amplitude of this pulsing can be as high as 10mV, which is a lot at some Fet working points. I suppose that it has to do with a limited resolution of the digital set point. I got the idea to increase the resolution just by increasing the shunt resistor by a factor of 2 (removing one resistor). For me the resulting 10A max is fine. Today I ask our engineer to unsolder the second shunt. I recalibrated the load corresponding to the new shunt value. In the meanwhile, it is clear to me, how the current calibration must be performed. If somebody is interested, how this works, please ask. After that I saw two things changing: Firstly, the current instabilities were reduced to about +/- 1mA. Secondly, there was no overshooting anymore, even at 2.5V/10A ! Picture No. 2 shows the step response at this setting. So, not the removal of C5, but the doubling of the shunt resistance and thus the increased current resolution cured the overshooting problem. If you look to the plateau of the steps in more detail, you also see that the step response changed to a flat and up to the setpoint slowly increasing voltage. It is more what is expected from a well working regulator. Picture No.3 shows the step response before the shunt resistance doubling. Tomorrow I'll repeat the step response measurements just to be completely sure that the overshooting is gone. But from what I had the time to see today, yes it's gone.
I'm even thinking about a further doubling of the shunt resistor (+ recalibration). Then max current will be 5A, but this would be still fine and it would correspond to the current guiding ability of the pcb (tracks, rev pol diode, DC plug and so on). I think, just by curiosity, I'll try that and post the results here.
If you want to take advantage of this fix and still have 20A capability, here's what you would need to do:

1) Replace both shunt resistors with an 0.01 ohm resistor with a power rating of at least 4 watts.
2) Change R12 from 3.3K to 6.98K (closest standard value) so the current control goes from 0 to 0.2V instead of 0 to 0.1V.
 

Offline deuteron

  • Contributor
  • Posts: 36
  • Country: de
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #302 on: July 05, 2023, 10:16:22 pm »
If you want to take advantage of this fix and still have 20A capability, here's what you would need to do:

1) Replace both shunt resistors with an 0.01 ohm resistor with a power rating of at least 4 watts.
2) Change R12 from 3.3K to 6.98K (closest standard value) so the current control goes from 0 to 0.2V instead of 0 to 0.1V.
I see, thanks for the hint. Doubling R12 means doubling the voltage at that point. But why didn't they chose the value you propose ? Should be clear to the developer of the board that this combo would solve some problems ! As I thought about the layout today I suspected that the small operation range of 100mV is necessary with respect to something. I'm not too familiar with these kinds of electronics. The questions stays: Whay didn't they recognize that ?
In turn that means that one might achieve a fourfold better resolution, if one limits the circuit to 10A. Take your R12 values together with a shunt resistance of 20mOhm.
« Last Edit: July 05, 2023, 10:26:41 pm by deuteron »
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #303 on: July 05, 2023, 11:49:32 pm »
I see, thanks for the hint. Doubling R12 means doubling the voltage at that point. But why didn't they chose the value you propose ? Should be clear to the developer of the board that this combo would solve some problems ! As I thought about the layout today I suspected that the small operation range of 100mV is necessary with respect to something. I'm not too familiar with these kinds of electronics. The questions stays: Whay didn't they recognize that ?
In turn that means that one might achieve a fourfold better resolution, if one limits the circuit to 10A. Take your R12 values together with a shunt resistance of 20mOhm.
Basically because the higher the range the more power is dissipated in the shunt resistor. The default value of 100mV means the shunt resistor must dissipate 2W at the full current of 20A. Going to 200mV doubles the dissipation to 4W.


Of course, if you only need 5A then you can probably even use an 0.02 ohm shunt resistor and recalibrate.
 

Offline deuteron

  • Contributor
  • Posts: 36
  • Country: de
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #304 on: July 06, 2023, 04:45:17 pm »
I see, thanks for the hint. Doubling R12 means doubling the voltage at that point. But why didn't they chose the value you propose ? Should be clear to the developer of the board that this combo would solve some problems ! As I thought about the layout today I suspected that the small operation range of 100mV is necessary with respect to something. I'm not too familiar with these kinds of electronics. The questions stays: Whay didn't they recognize that ?
In turn that means that one might achieve a fourfold better resolution, if one limits the circuit to 10A. Take your R12 values together with a shunt resistance of 20mOhm.
Basically because the higher the range the more power is dissipated in the shunt resistor. The default value of 100mV means the shunt resistor must dissipate 2W at the full current of 20A. Going to 200mV doubles the dissipation to 4W.

Of course, if you only need 5A then you can probably even use an 0.02 ohm shunt resistor and recalibrate.
OK, I think there was a misunderstanding. What you wright about the power necessities of a shunt resistor is completeley clear to me. Furthermore, unfortunately I had the right feeling that the developers of the board chose a max regulation voltage of 100 mV intentionelly. Today I followed your suggestion and changed (let change ;-) R12 to 6.8K giving a voltage divider of 1:10 and thus 200mV max on the input of the integrator. I completely understood the idea behind that. Together with a 10mOhm shunt one would get both, higher reolution (thus stability) and the 20A max remaining at the same time. But it does not work. The max. current is around 12 A in this case, which means a voltage of about 120mV over the shunt (10mOhm). This voltage is the max value the microprocessor is able to read and thus to show on the display. I measured the real current flowing by means of an amperemeter at the same time. The current measured in this way is a good deal higher and floating. When I set the current to e.g. 15V, the current on display was something below 12A and the real current was higher and drifting slowly upwards. So there was no regulation anymore.

Ok, two observations, one clear, one unclear to me:
1) The clear one is that the microprocessor can read 120mV max. Depending on the shunt value

a) both resistors in parallel 0.005Ohm
b) one resistor alone 0.01Ohm
c) two in series 0.02Ohm

gives max current readings on the display of

a) 24A
b) 12A
c) 6A

2) The strange one is that, because the regulation itself is purely analog, I don't understand, why the REAL current is not following the setpoint. The gate voltage in the case of Vshunt > 120mV is at +Vcc (~ +11V), but why ? This is even true, when Vds is approaching the saturation region of the Mosfet, where currents in excess of 10A should be easily available from the Fet. The analog regulation loop between shunt and integrator is not working anymore !

Finally:
My current setup is the following: I reinstalled the 3.3K at the position of R12 (1:20). 1:10 makes no sense in my opinion. The shunt resistance I finally used is 20mOhms. This gives Imax = 6A and a very stable current (say +/- 0.5mA). For me that's perfectly fine and I think, I'll stick to these values. Lastly I observed a small offset of around 5mA at currents below say 100mA. At higher currents the offset is lower and finally more or less invisible. I've no explanation for that too, but I can live with it. Perhaps a bias of the PWM output, which is DC filtered before the regulator ? I don't know. It's simply no precision instrument and one should know about its shortcomings.

EDIT1: I just found some explanation for the low current offset, see: https://blog.mbedded.ninja/electronics/components/current-sources-and-sinks/ section 5. If that's true one would have to use some kind of bipolar power supply to get the very low currents right.

EDIT2: Could you please explain to me, what is meant with the comment 'Comps for PWM digital line not pulling to ground' in the circuit diagram ?  In my understanding the 3.3V over 150K produces a bias of 4.4mV at the inverting input of the integrator. Thanks !
« Last Edit: July 06, 2023, 06:33:57 pm by deuteron »
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #305 on: July 06, 2023, 06:39:14 pm »
OK, I think there was a misunderstanding. What you wright about the power necesseties of a shunt resistor is completeley clear to me. Furthermore, unfortunatly I had the right feeling that the developers of the board chose a max regulation voltage of 100 mV intentionelly. Today I followed your suggestion and changed (let change ;-) R12 to 6.8K giving a voltage divider of 1:10 and thus 200mV max on the input of the integrator. I completely understood the idea behind that. Together with a 10mOhm shunt one would get both, higher reolution (thus stability) and the 20A max remaining at the same time. But it does not work. The max. current is around 12 A in this case, which means a voltage of about 120mV over the shunt (10mOhm). This voltage is the max value the microprocessor is able to read and thus to show on the display. I measured the real current flowing by means of an amperemeter at the same time. The current measured in this way is a good deal higher and floating. When I set the current to e.g. 15V, the current on display was something below 12A and the real current was higher and drifting slowly upwards. So there was no regulation anymore.

Ok, two observations, one clear, one unclear to me:
1) The clear one is that the microprocessor can read 120mV max. Depending on the shunt value

a) both resistors in parallel 0.005Ohm
b) one resistor alone 0.01Ohm
c) two in series 0.02Ohm

gives max current readings on the display of

a) 24A
b) 12A
c) 6A

2) The strange one is that, because the regulation itself is purely analog, I don't understand, why the REAL current is not following the setpoint. The gate voltage in the case of Vshunt > 120mV is at +Vcc (~ +11V), but why ? This is even true, when Vds is approaching the saturation region of the Mosfet, where currents in excess of 10A should be easily available from the Fet. The analog regulation loop between shunt and integrator is not working anymore !
This makes perfect sense to me. If the voltage on the shunt resistor is about 120mV, the ADC converter apparently returns the highest reading to the microcontroller. I'm pretty sure the ADC used here (RN8209C) is 24 bits. However, that's 24 bits over the entire range from max negative to max positive. For positive values the ADC therefore returns 0 to 2²³ - 1 ( 0 to 8388607). Once the analog input from the shunt resistor is over 120 mV, the ADC simply returns 8388607, regardless of how high the voltage on the shunt resistor goes. The microcontroller thinks the actual current is less than the set current, and therefore maxes out Vgs in the analog loop. Of course, the maximum reading which shows on the display is only 6A, 12A, or 24A, depending upon calibration, regardless of actual current. The device is no longer regulating at this point.

Anyway, this is good to know. I was thinking of trying to go much higher than 20A after reinforcing the PC tracks and changing the MOSFET/protection diodes. It sounds like I can't without also changing the shunt resistor to a lower value. For example, using a value of 0.002 ohms would let me go all the way to about 60A. Unfortunately, that might come at the cost of resolution/stability at lower currents, so I'm not going to bother. I really don't need 60A capability anyway. Honestly, 5A or less is fine for almost everything I'll be doing.

EDIT: The regulation itself isn't 100% analog. The microcontroller uses the actual current reading from the ADC to adjust the PWM duty cycle. It doesn't simply set the control voltage based on the desired current. Doing this would result in large errors due to op-amp offset and other factors. So the regulation is a combination of digital and analog.

Quote
Finally:
My current setup is the following: I reinstalled the 3.3K at the position of R12 (1:20). 1:10 makes no sense in my opinion. The shunt resistance I finally used is 20mOhms. This gives Imax = 6A and a very stable current (say +/- 0.5mA). For me that's perfectly fine and I think, I'll stick to these values. Lastly I observed a small offset of around 5mA at currents below say 100mA. At higher currents the offset is lower and finally more or less invisible. I've no explanation for that too, but I can live with it. Perhaps a bias of the PWM output, which is DC filtered before the regulator ? I don't know. It's simply no precision instrument and one should know about its shortcomings.

EDIT: I just found some explanation for the low current offset, see: https://blog.mbedded.ninja/electronics/components/current-sources-and-sinks/ section 5. If that's true one would have to use some kind of bipolar power supply to get the very low currents right.
Yes, the explanation given is exactly correct. Most op-amps have issues when operating on a single supply when voltages get close to ground. To fix it you would need to power the negative power supply of the op-amp with a slight negative voltage. Even a few hundred millivolts below ground would probably fix it. I might make this modification on my device. There are any number of circuits to generate negative voltage. Not sure which one I would use yet.

Another option is to swap out the LM321 for a better rail-to-rail opamp.

« Last Edit: July 06, 2023, 11:03:32 pm by jtr1962 »
 

Offline deuteron

  • Contributor
  • Posts: 36
  • Country: de
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #306 on: July 06, 2023, 07:26:00 pm »

EDIT2: Could you please explain to me, what is meant with the comment 'Comps for PWM digital line not pulling to ground' in the circuit diagram ?  In my understanding the 3.3V over 150K produces a bias of 4.4mV at the inverting input of the integrator. Thanks !

Thank you for the detailed response ! For me the journey now seems to come to an end. Unfortunatly I have also other things to do than to solder around with Chinese goodies. I'm glad if I was of some help for you and other electronics enthusiast. Btw, did your copy of the DL24 arrive in the meanwhile ? Please let me know, if you could find some other interesting fixes to the remaining shortcomings. Particularly, I would very much appriciate to hear about your solution how to provide the slightly negative supply voltage for the op amp.
Stefan
« Last Edit: July 06, 2023, 07:50:46 pm by deuteron »
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #307 on: July 06, 2023, 07:51:30 pm »
Thank you for the detailed response ! For me the journey now seem to come to an end. Unfortunatly I have also other things to do than to solder around with chinese goodies. I'm glad if I was of some help for you and other electronics enthusiast. Btw, did your copy of the DL24 arrive in the meanwhile ? Please let me know, if you could find some other interesting fixes to the remaining shortcomings. Particularly, I would very much appriciate to hear about your solution how to provide the slightly negative supply voltage for the op amp.
Stefan
Thanks for doing all the tests, Stefan. They're a big help preventing me from trying some things which it turned out wouldn't work, like increasing the control voltage.

My DL24 is at US customs. It'll probably get here by early next week. I'll definitely be trying a bunch of things on it, probably including the negative supply. Now that I have a better idea of how it works, the fixes should be fairly easy to do.
 

Offline deuteron

  • Contributor
  • Posts: 36
  • Country: de
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #308 on: July 06, 2023, 08:08:10 pm »
I'm excited to hear about your progress !
« Last Edit: July 06, 2023, 08:10:50 pm by deuteron »
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #309 on: July 06, 2023, 11:41:09 pm »
EDIT2: Could you please explain to me, what is meant with the comment 'Comps for PWM digital line not pulling to ground' in the circuit diagram ?  In my understanding the 3.3V over 150K produces a bias of 4.4mV at the inverting input of the integrator. Thanks !
That's pretty much what it does. When the current is zero, there's 4.4 mV at the inverting integrator input. Without the bias there would be 0 mV. Because the PWM line apparently doesn't pull all the way to ground, the device wouldn't be able to regulate at low currents without the bias. I've used this same hack in some of my constant current circuits to avoid using a negative supply.

And this brings me to another conclusion. A negative power supply for the opamp probably isn't necessary because the inputs are staying slightly above ground even at low currents. There might be other causes of the lower stability at low currents. Perhaps the time constant of the integrator should be increased. I'll investigate.
 

Offline deuteron

  • Contributor
  • Posts: 36
  • Country: de
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #310 on: July 07, 2023, 04:40:52 pm »
Thank you for the explanation. I had the idea, that 'hack' has to do with the offset observed at low currents, but I wasn't sure. 4.4mV is not much as such, but related to the 20A current through the shunt it corresonds to as much as 0.88A (4.4% of 20A) ! This is a huge value and the correct current reading would depend very sensitively on that bias. Perhaps it has to be adjusted individually for a given copy of this device. I possess two of these boards and they in fact show some difference in the low level offset. One is 5mV as mentioned, the other one around 3mV. I'm really curious about your measurements.
« Last Edit: July 07, 2023, 05:12:36 pm by deuteron »
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #311 on: July 07, 2023, 04:55:24 pm »
Thank you for the explanation. I had the idea, that 'hack' has to do with the offset observed at low currents, but I wasn't sure. 4.4mV is not much as such, but related to the 20A current through the shunt it corresonds to as much as 0.88A (4.4% of 20A) ! This is a huge value and the correct current reading would depend very sensitively on that bias. Perhaps it has to be adjusted individually for a given copy of this device. I possess two of these boards and they in fact show some difference in the low level offset. One is 5mV as mentioned, the other one around 3mV. I'm really curious about your measurements.
That would be the case only if the device blindly set the control voltage. For example, if you set it for 5 A, then it would set the control voltage to 25mV. It doesn't do this because it would result in huge errors as you mentioned due to offsets. Instead, it measures the voltage at the shunt resistor, and uses that feedback to adjust the control voltage to get exactly the desired current. Due to op-amp offset voltage and other factors, this could mean the control voltage to get 5A is 22mV on one device but 28mV on another. In short, the firmware compensates for any offsets.

BTW, my DL24 arrived today.  :) I'll try to play with it over the weekend and see what I can learn.
 

Offline deuteron

  • Contributor
  • Posts: 36
  • Country: de
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #312 on: July 07, 2023, 05:10:33 pm »
That would be the case only if the device blindly set the control voltage. For example, if you set it for 5 A, then it would set the control voltage to 25mV. It doesn't do this because it would result in huge errors as you mentioned due to offsets. Instead, it measures the voltage at the shunt resistor, and uses that feedback to adjust the control voltage to get exactly the desired current. Due to op-amp offset voltage and other factors, this could mean the control voltage to get 5A is 22mV on one device but 28mV on another. In short, the firmware compensates for any offsets.

BTW, my DL24 arrived today.  :) I'll try to play with it over the weekend and see what I can learn.
Thank you once again for explaining. I was pretty sure that I didn't get it correctly. But you are certainly right, I have to think a little bit more about that. Nice to hear that your copy arrived. I'm eagerly awaiting your resutls !
Today I further tested the board, which still has the oginal IRFP264 installed. This is also the copy with the fourfold shunt resistance (20mOhm). I installed a 6V Zener, after I made a couple of step response measurements, even down to 2.5V Vds and up to 6A Ids. 6A is the maximum current regulated with the shunt of 20mOhm. Interestingly the Chinese IRFP264 is still alive. The measurements and tests during the last days were really challenging for the Mosfet and I was anticipating a quick death of the original Fet. But it wasn't the case. The board I'm talking about is the second one coming directly from China. I increased the shunt resistor from the very begining, first to 10 and later to 20mOhm. With both of these values the regulation was stable with no overshooting. So, Im really wondering, whether this overshooting in the original configuration (5mOhm) may be the real reason for the quickly dieing Mosfets and not so much the fact that the IRFP264 is not meant for DC operation. Anyway, I will keep the original one as long as it works, because it is nicely doing the job. Let's see, I'll let you know, when it went to the eternal hunting grounds.
« Last Edit: July 07, 2023, 05:27:05 pm by deuteron »
 

Offline deuteron

  • Contributor
  • Posts: 36
  • Country: de
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #313 on: July 07, 2023, 06:05:44 pm »
That would be the case only if the device blindly set the control voltage. For example, if you set it for 5 A, then it would set the control voltage to 25mV. It doesn't do this because it would result in huge errors as you mentioned due to offsets. Instead, it measures the voltage at the shunt resistor, and uses that feedback to adjust the control voltage to get exactly the desired current. Due to op-amp offset voltage and other factors, this could mean the control voltage to get 5A is 22mV on one device but 28mV on another. In short, the firmware compensates for any offsets.
Once again to the offset problem:
The device has no idea about currents. It only understands voltge, i.e. 0...100mV. When you set a current, the device has to translate it to some voltage. Let's keep your 5A. It looks at its calibration and chooses 25mV. So it takes the corresponding PWM signal and send it to the PWM filter. The filter generates the 25mV (plus 4.4mV offset) = 29.4mV from it. The integrator opens up more and more the Mosfet gate until the shunt voltage approaches 25mV. The voltage at the negative input of the integrator will be 29.4mV, mission accomplished ;-)
So, what happens if the actual PWM offset is e.g. only 4.0mV instead 4.4mV. The voltage at the positive input of the integrator would be 29.0mV. The gate is opened up more and more until the voltage over the shunt approaches 24.6mV. Together with the extra voltage at the minus input, the voltage to compare would be the desired 29.0mV being about 1.4% lower than in the first case. So the actual current would be not 5A but rather 4.93A. This is not compensated by the current calibration since during this procedure the PWM offset don't play any role. The regulator don't participate in the game.
I'm still pretty sure, you are right, but where is my mistake ?
« Last Edit: July 07, 2023, 06:12:07 pm by deuteron »
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #314 on: July 07, 2023, 06:55:26 pm »
Once again to the offset problem:
The device has no idea about currents. It only understands voltge, i.e. 0...100mV. When you set a current, the device has to translate it to some voltage. Let's keep your 5A. It looks at its calibration and chooses 25mV. So it takes the corresponding PWM signal and send it to the PWM filter. The filter generates the 25mV (plus 4.4mV offset) = 29.4mV from it. The integrator opens up more and more the Mosfet gate until the shunt voltage approaches 25mV. The voltage at the negative input of the integrator will be 29.4mV, mission accomplished ;-)
So, what happens if the actual PWM offset is e.g. only 4.0mV instead 4.4mV. The voltage at the positive input of the integrator would be 29.0mV. The gate is opened up more and more until the voltage over the shunt approaches 24.6mV. Together with the extra voltage at the minus input, the voltage to compare would be the desired 29.0mV being about 1.4% lower than in the first case. So the actual current would be not 5A but rather 4.93A. This is not compensated by the current calibration since during this procedure the PWM offset don't play any role. The regulator don't participate in the game.
I'm still pretty sure, you are right, but where is my mistake ?
The mistake is assuming the microcontroller tries to get the control voltage to a certain value. It doesn't. It reads the voltage directly from the shunt resistor, and then adjusts the control voltage up or down until the shunt resistor voltage matches what the calibration says it should for any given current. For example, suppose the calibration says the shunt resistor voltage should be 25.1mV at a current of 5A. The microcontroller will then adjust the control voltage up or down until it gets a reading of exactly 25.1mV for the shunt resistor voltage. The control voltage might end up at 29mV. However, it could also end up at 28.5, or 29.3, or some other value. The exact value the control voltage ends up at depends upon a lot of factors (the actual offset due to the 150K resistor, and offset voltages between the inverting and noninverting inputs of the integrator (this could be 2 or 3 mV for the LM321), plus any tolerance in the shunt resistor). Calibration accounts for tolerance in the shunt resistor, while the feedback circuit accounts for all of the offsets.

In layman's terms, the feedback loop is a combination of digital and analog. The circuit doesn't care what the actual control voltage is, only that it results in the set current matching the actual current.
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #315 on: July 10, 2023, 04:20:24 am »
Today I started analyzing the device to first observe how it functions, and then see if any improvements are possible. I looked at several things-the power supply, the current control, and the integrator.

Before trying any modifications I first tested the device discharging a few cells. My primary complaints are that the current bounces around the set point by several mA (with occasional excursions which are somewhat larger), and it apparently calculates the mAh by multiplying how long it's been running by the current setting. I came to the latter conclusion by noting that if I set it for 1.00 amps, it reached 1000 mAh exactly when the elapsed time reached 1:00:00, 2000 mAh at 2:00:00, etc. In short, it appears to assume the actual current averages out to the set current, instead of simply calculating mAh by measuring actual current, multiplying by the time since the last measurement, and adding that to the total. That said, it still seems reasonably accurate once calibrated. For example, I got 4607 mAh from a cell which had tested between 4609 and 4621 on several of my testers. I made two capacity testers a while back using the MCP3421 ADC and an OLED display. The firmware I wrote let me calibrate them to within 0.01%. I used 0.1% sense resistors and a Fluke 189 DMM to measure the sense resistor voltage. I also used a 32768 Hz crystal for the time base. Therefore, my testers should be accurate to 0.1% or better. Apparently with calibration it's possible to get the DL24/DL24P just as accurate. It all depends upon the accuracy of the equipment you're using to calibrate. 0.1% is good enough since testing the same cell often gives variations larger than that, even using the same tester.

Now on to my findings....

POWER SUPPLY

Some here have mentioned that the included power supply is junk. From my observations it seems to be adequate. I tried a few other, better 12
V supplies but still ended up with the current bouncing around the set point. I also tried putting filter caps on the board up to 3300 uF. They made no difference. The reason for looking at the power supply first is in my experience often when there are issues with a circuit the root cause can be a noisy power supply. I did measure ripple of around 15mV on the 3.3V line. I tried a 1000uF cap on the 3.3V line. It succeeded in reducing the ripple to about 3mV but the current fluctuations remained the same. Apparently then any issues aren't caused by the power supply.

CURRENT CONTROL

I first took measures of the current control voltage and Vgs of the MOSFET at various current settings. Here were the results:

Code: [Select]
Amps  Control Voltage  MOSFET Vgs
  1        7.50mV        3.82V
  2       12.26mV        3.97V
  3       17.03mV        4.08V
  4       21.77mV        4.16V
  5       26.52mV        4.23V
  6       31.28mV        4.30V
  7       36.03mV        4.36V
  8       40.79mV        4.41V
  9       45.55mV        4.46V
 10       50.32mV        4.51V
 15       74.14mV        4.73V
 20       97.96mV        4.97V

The control voltage readings nicely fit a linear plot with the value 4.76mV/A and an offset of 2.74mV. I noted that the control voltage sometimes fluctuated by 0.1mV or more. This accounts for the actual current bouncing around a bit.

Prior to using the device I installed back-to-back 5.1V Zener diodes between the MOSFET gate and source. This should clamp the voltage to 5.8 or 5.9 volts. Apparently that's high enough for the MOSFET to still pass the maximum current of 20 amps.

I also looked at the current control voltage with my scope. There are small oscillations roughly every 13.5 milliseconds.

I tried a few things to attempt to get a more stable control voltage. I paralleled caps up to 470uF with C4 (0.1uF). C4 is the last filter cap for the current control. While large caps reduce some of the oscillations, the current reading still fluctuates. I also tried putting a cap in parallel with the shunt resistor. I've seen voltage regulators which do this. I tried 100uF, and later 3300uF, but no improvements.

INTEGRATOR

I tried increasing the time constant of the integrator by putting caps as high as 100uF in parallel with the integrator capacitor C1 (0.1uF). Most values made things worse. I removed C5. It apparently makes no difference if C5 is there or not. I left it out because it creates a pole which could result in instability.

OTHER OBSERVATIONS

Nothing I did improved the current stability. The integrator circuit is almost identical to ones I've used, so I'm 100% sure it's not the root cause of the problem. The fact the current control voltage fluctuates point more to that as the source of problems.

EDIT: I just tried applying voltage to the current control input of the integrator with a resistor divider and stable power supply. The current reading was rock solid stable, basically confirming that there's nothing wrong with the integrator part of the circuit.

The solution of increasing the shunt resistor and recalibrating to get more stable currents might be viable if you don't need currents over 6A. So far I haven't found any other solution but I think the root cause of the problem is using the timer PWM to set the current control voltage. The fluctuations might be artifacts of the PWM changing duty cycle or frequency. A better design would have used a discrete 16-bit or better DAC to set the current control voltage. However, this would have added to the cost.

Also mentioned earlier was the fact the microcontroller can't read shunt voltages over about 120mV. Looking at the data sheet for the RN8209C ADC the maximum differential input for each of the 3 ADC channels is ±1000mV. However, there is a PGA in front of the ADC for the current channel which can be programmed to 1, 2, 8, or 16. It appears to be set to 8, which limits the inputs to ±125mV.

OTHER THOUGHTS

The device as is isn't horrible with a few minor improvements. I highly recommend installing back-to-back Zener diodes, and possibly enhancing the current paths so the device can reliably handle 20 amps. I also recommend calibrating it if you have access to very accurate voltage and current sources.

I suspect it might be possible to do something about the current fluctuations in the firmware but this is something only the manufacturer can do. Again, I think the problem is an artifact of using PWM for the control voltage.

I also don't think it's entirely necessary to upgrade the device for higher power, even if you need to test well in excess of 150W. Here's my reasoning. If your use case is mostly testing single cells, then at most you'll be dissipating ~80W even at 20A. If you're testing batteries, then you can insert an external resistance in between the load and the device to absorb most of the voltage. For example, it's possible to test a 50V, 20A power supply by putting a 2.25 ohm, 900W+ resistor in series with it. The resistor will absorb 45 of the 50 volts, leaving the tester to only dissipate 100 watts. You can even make your own resistors with resistance wire. They might get hot enough to glow red while testing, but no need to buy expensive resistors, or use giant heat sinks. This is likely what I'll do should I need to test well over 150W.

Some people here mentioned using MOSFETs designed for linear operation. Reading up on the subject a bit more if you derate the power by a factor of 3 or so, you can safely use standard MOSFETs. I've used standard MOSFETs for the electronic loads I've designed. Then again, I've never come anywhere near their rated power in operation. If you're aiming for 150 watts on the DL24 with a standard MOSFET, then buy one rated for at least 450 watts. The primary advantage of using standard MOSFETs is they're much less expensive. Since I had a parts order from Mouser for another project, I also bought a pair of IRFP90N20DPBF. Power rating is 580W. I can probably safely run these up to maybe 200W. A comparable linear MOSFET ( IXTH60N20L2 ) costs about 3 times as much, although I would be able to safely go to its full power rating of 540W.

I might buy a few of the DIY devices to test/modify. They're certainly cheap enough. The parts alone would cost me more than the ~$20 they sell for.
« Last Edit: July 10, 2023, 06:09:56 pm by jtr1962 »
 

Offline deuteron

  • Contributor
  • Posts: 36
  • Country: de
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #316 on: July 10, 2023, 07:15:19 pm »
Hi jtr1962,
many many thanks for your detailed and very sound investigations. You have done it on an even much higher level than I was able to do. Are you an electronics engineer ? It looks like. Nevertheless I'm pretty happy that your findings essentially agree more or less with what I was able to get out of the thing with means of a physicist. The problem with these guys is that they think they have a clou about everything ;-) So the bottom line for me is that I will use the load with the fourfold shunt value and thus with the 6A limitation. I think you are very right with your assessment concerning the Mosfets. Mine is still alive inspite of all the testing I did. I believe the sometimes overshooting Vgs is the problem here.
Greetings
Stefan
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #317 on: July 10, 2023, 07:26:47 pm »
Hi jtr1962,
many many thanks for your detailed and very sound investigations. You have done it on an even much higher level than I was able to do. Are you an electronics engineer ? It looks like. Nevertheless I'm pretty happy that your findings essentially agree more or less with what I was able to get out of the thing with means of a physicist. The problem with these guys is that they think they have a clou about everything ;-) So the bottom line for me is that I will use the load with the fourfold shunt value and thus with the 6A limitation. I think you are very right with your assessment concerning the Mosfets. Mine is still alive inspite of all the testing I did. I believe the sometimes overshooting Vgs is the problem here.
Greetings
Stefan
Yes, I'm an electronics engineer (semi-retired). However, you did a pretty good job investigating for a physicist.

I think two things were killing MOSFETs. One is overshooting Vgs as you mentioned. The Zener diodes fix that. The other is running at too high a power with non-linear MOSFETs. Most mosfets are actually a bunch of tiny MOSFETs running in parallel. This works fine if the MOSFETs are just switching. However, if you run them in linear mode part of the die might get hotter than the rest. This can cause thermal runaway of the MOSFETs in that region, leading to failure, even if you're well under the rated power. That's why I said only run at 1/3 the rated power or less, and you should be safe.

I ran the stock MOSFET past 60W when I was up to 20A. It seemed to handle that with no problems.

Only other thing I might try for now, as I just got some work in I have to do right away, is put bypass capacitors on the two op-amps. There seems to be some noise feeding into them from somewhere. Bypass caps might fix that, and increase stability. I'm surprised they didn't use bypass caps. I always do that on any opamp. The quieter the supply, the fewer problems you have.

BTW, here's a 10 amp current source I made a long time ago. I had to hand pick the resistors to get the currents exact but it works very well. You set the current with thumbwheel switches.

« Last Edit: July 10, 2023, 07:37:44 pm by jtr1962 »
 

Offline deuteron

  • Contributor
  • Posts: 36
  • Country: de
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #318 on: July 10, 2023, 07:55:50 pm »
Yes, I'm an electronics engineer (semi-retired). However, you did a pretty good job investigating for a physicist.

I think two things were killing MOSFETs. One is overshooting Vgs as you mentioned. The Zener diodes fix that. The other is running at too high a power with non-linear MOSFETs. Most mosfets are actually a bunch of tiny MOSFETs running in parallel. This works fine if the MOSFETs are just switching. However, if you run them in linear mode part of the die might get hotter than the rest. This can cause thermal runaway of the MOSFETs in that region, leading to failure, even if you're well under the rated power. That's why I said only run at 1/3 the rated power or less, and you should be safe.

I ran the stock MOSFET past 60W when I was up to 20A. It seemed to handle that with no problems.

Only other thing I might try for now, as I just got some work in I have to do right away, is put bypass capacitors on the two op-amps. There seems to be some noise feeding into them from somewhere. Bypass caps might fix that, and increase stability. I'm surprised they didn't use bypass caps. I always do that on any opamp. The quieter the supply, the fewer problems you have.

BTW, here's a 10 amp current source I made a long time ago. I had to hand pick the resistors to get the currents exact but it works very well. You set the current with thumbwheel switches.


Thanks for the flowers ;-) The term 'bypass cap' isn't directly clear to me. Are these caps between the supply voltage pins and the supply or ground, respectively ? I found two different layouts, one connecting the + and - pins (1 cap) and one connected at each pin (2 caps). Please tell me what came out ! And thanks for the schematics !
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #319 on: July 10, 2023, 08:49:10 pm »
Thanks for the flowers ;-) The term 'bypass cap' isn't directly clear to me. Are these caps between the supply voltage pins and the supply or ground, respectively ? I found two different layouts, one connecting the + and - pins (1 cap) and one connected at each pin (2 caps). Please tell me what came out ! And thanks for the schematics !
Yes, it's a cap between the power supply pins. Not sure about having a cap connected to each pin. Sometimes I've seen that on ADCs to clean up noise but not on opamps.

The bypass caps on the op-amps didn't seem to help. Also, I have no idea why but something got messed up. Now the current is about 100mA higher than the setting. I think I may have destroyed the integrator op-amp, although I can't figure out how. The power to the circuit was off when I did my soldering. I'll have to see if I have any replacements.

EDIT: The current issue isn't being caused by the integrator opamp. Apparently the ADC now has an offset in its reading. If the current is less than about 100mA, it reads as zero. No idea how this happened, but this means my DL24 is useless unless I can reflash the firmware (and/or get a replacement ADC). At this point I'm done experimenting.
« Last Edit: July 10, 2023, 10:39:15 pm by jtr1962 »
 

Offline Dave_g8

  • Contributor
  • Posts: 37
  • Country: gb
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #320 on: July 11, 2023, 07:05:35 pm »
Hi All, Great discussion on the control loop.

I have a DTL150 unit which appears to have the same or similar control loop circuit as the DL24. In CC mode the actual current matches the ISET current to within 10mA when the ISET current is >= 1A. Below this ISET current of 1A, there is a significant difference between the ISET and measured current (see CC_Mode image attached).

In CR mode and CP mode it is possible to achieve expected results down to low currents (sew CR_Mode image attached).

My assumption was that for CR and CP modes, the unit monitors the (V+ - V-) and the shunt current and adjusts the PWM control (in firmware) until the shunt current matches the target CR (I = V/R) or CP values (I = P/V)

Interestingly if I perform the current calibration at say 1.5A, an ISET value of 3A results in a measured current of 1.5A (i.e. ISET/2) and seems to maintain this relationship down to lower currents more accurately. This sort of implies that the control loop in CC mode does not take account of the measured firmware current.

For the DTL150 I am not sure if the firmware is correctly compensating for the offset voltage on the integrating op-amp when operating in CC mode.

Regards, Dave
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #321 on: July 12, 2023, 06:57:52 pm »
That's strange behavior. The control loop apparently can accurately control low currents as evidenced by the behavior in constant resistance mode. Not sure what's going on in constant current mode. My DL24 works fine at lower currents, although the readings bounce around a bit.

I just discovered another thing about these. The time base accuracy is way off. When my unit says the elapsed time is 1 hour, the real elapsed time is 1:00:12. It may not sound like much, but assuming you accurately calibrate the current, the time base inaccuracy introduces about 0.35% error. They're apparently using the internal RC oscillator to clock the microcontroller instead of a crystal. This would be OK if there was a setting to adjust the frequency. Most microcontrollers have settings which allow you to adjust the RC oscillator within a few percent range.

For now though my workaround is simply to do the 3A calibration about ~0.35% higher, or around 3.011A. The only problem is this results in the currents being 0.35% higher than the set current, but at least it gives a more accurate reading for battery capacity.

I still haven't found a way to keep the set current from bouncing around. Ideally, the reading should stay very close to the set current. We have 23 bits resolution for the current reading, and the maximum full scale is 125mV. The device should be able to read shunt resistor voltage to a resolution of 0.015uV, which corresponds to a resolution of 0.003mA with a 5 milliohm shunt resistor. The limiting factor is most likely the PWM resolution (16 bits?), but even that should allow keeping currents stable to within a few tenths of an mA. Like I said, the fix is most likely in firmware as I've tried all the hardware fixes I can think of. Sometimes the reading is stable for short time (i.e. it goes between 999 and 1000 mA when set for 1.00A), but it always eventually starts bouncing around, mostly within a plus or minus 5mA band.
 

Offline Dave_g8

  • Contributor
  • Posts: 37
  • Country: gb
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #322 on: July 12, 2023, 08:29:54 pm »
On the DTL150, in CC mode (at 1A or more), the actual current reading does appear stable. When set to 1A, it just sits between 999mA and 1000mA. In CR and CP mode, I would say the results are less stable, but in this case, it also depends on the stability of the source voltage. The problem with processing in firmware is that things do not happen concurrently, so there may be some strange behaviour.

I assume the DL24 is similar behaviour to DLT150, when the load is turned on, the load current slowly ramps up to the set value, perhaps this it to try and reduce overshoot. Also the low voltage detection feature turns off the load if the source voltage is disconnected and hence it is not possible to enable the load when the source is disconnected. I have not tried 4 wire mode, keeping the voltage sensing connected and then disconnecting/reconnecting one of the A+/A- ports to see if the load tries to sink maximum current when first reconnecting. Generally I always try to make sure the load is disabled before connecting or turning on the source.

Although theoretically the resolutions should be very accurate, a 1mA current change will result in a 5uV change at the ADC, so perhaps noise could also cause some variations.

I think for the cost of these units, they are actual pretty good, although it would be nice to have access to the firmware for experimental purposes.

Regards, Dave
 

Offline beanflying

  • Super Contributor
  • ***
  • Posts: 7370
  • Country: au
  • Toys so very many Toys.
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #323 on: July 13, 2023, 03:48:41 am »
I was running a quick test on a 4A DC-DC power supply module a few days ago with my OG load and while I know the voltage on it has always run low the shunts and current readings have always been bang on.

Don't abuse them or expect them to go anywhere near the maximum spec of any one component and they are great bang for your $.

BTW tried the Ryzen cooler on the DL24 and without major dremel work it is a no go so I have ordered a cheap 6 vertical cooler.



Coffee, Food, R/C and electronics nerd in no particular order. Also CNC wannabe, 3D printer and Laser Cutter Junkie and just don't mention my TEA addiction....
 

Offline jtr1962

  • Contributor
  • Posts: 18
  • Country: us
Re: Cheezeball DC Load: DL24P: Pump, or Dump ???
« Reply #324 on: July 13, 2023, 05:20:29 am »
On the DTL150, in CC mode (at 1A or more), the actual current reading does appear stable. When set to 1A, it just sits between 999mA and 1000mA. In CR and CP mode, I would say the results are less stable, but in this case, it also depends on the stability of the source voltage. The problem with processing in firmware is that things do not happen concurrently, so there may be some strange behaviour.

I assume the DL24 is similar behaviour to DLT150, when the load is turned on, the load current slowly ramps up to the set value, perhaps this it to try and reduce overshoot. Also the low voltage detection feature turns off the load if the source voltage is disconnected and hence it is not possible to enable the load when the source is disconnected. I have not tried 4 wire mode, keeping the voltage sensing connected and then disconnecting/reconnecting one of the A+/A- ports to see if the load tries to sink maximum current when first reconnecting. Generally I always try to make sure the load is disabled before connecting or turning on the source.

Although theoretically the resolutions should be very accurate, a 1mA current change will result in a 5uV change at the ADC, so perhaps noise could also cause some variations.

I think for the cost of these units, they are actual pretty good, although it would be nice to have access to the firmware for experimental purposes.

Regards, Dave
I think noise is the issue. The DTL150 doesn't have bluetooth. I wonder if the bluetooth module is creating the noise which is causing unstable readings. Too bad there's not a way to turn it off.  As I said, the reading is stable sometimes, so evidently the feedback loop can work as it should, at least when it wants to.

The current slowly ramping up on the DTL150 might help also. Maybe the DL24 responds too quickly to deviations in the current? That could cause some oscillations around the set point.

I agree for the price these units are pretty good. As I already mentioned, just buying the parts alone would cost me more, not to mention the time it would take to build/program something like this.

I'd love access to the firmware just to play around.
« Last Edit: July 13, 2023, 06:30:58 am by jtr1962 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf