Author Topic: DIY 2Q power supply  (Read 1656 times)

0 Members and 1 Guest are viewing this topic.

Offline bdoriTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
DIY 2Q power supply
« on: March 25, 2024, 06:08:23 pm »
Hi all,

I'm playing with the idea to build a 2 quadrant power supply, a DIY version of the R&S NGM202. So far this is the main circuit that I came up with:



Simulation:


This is just a concept of the voltage control, current limiter and amplifier. I plan to add isolated control with STM32G4 + 16bit DAC + 24bit ADC, some protection, more current measurement options, and a nice front panel using STM32U5 + 4.3inch IPS LCD, just like the original R&S device. (No fast measurement option though with FPGA  :))

What do you think about the presented concept? Is there any idea how can I improve this design?

Disclaimer: Although I'm an EE I spent most of my time as a Software Developer, so this is only hobby for me.
« Last Edit: March 25, 2024, 06:09:57 pm by bdori »
 
The following users thanked this post: MathWizard

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1241
  • Country: nz
Re: DIY 2Q power supply
« Reply #1 on: March 25, 2024, 09:09:28 pm »
I recall that David Erikson did something a bit similar (http://www.djerickson.com/ps-load/) which might be nice for a comparison.

What sort of V out and I out range were you looking for? Because the higher these are the more heat your power transistors need to deal with...
 

Offline bdoriTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
Re: DIY 2Q power supply
« Reply #2 on: March 26, 2024, 01:43:31 pm »
Thanks, jbb. I have seen the awesome project from Erikson. He targeted an SMU, I just wanted to build a power supply, but just for the sake of fun I try to make it two quadrant. Honestly I don't really have the need for that  :).

My target is 20V/3A, just like the NGM202. I will double the output darlingtons and add forced air cooling, to be able to handle 60W continuously.
 

Offline bdoriTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
Re: DIY 2Q power supply
« Reply #3 on: March 26, 2024, 01:50:46 pm »
So far, I have changed the output current limiting circuit, to reference to ground to be able to limit sink also.



But, I'm struggling here a bit. If you look at the imeas it does not go below 2.5 (vref) in sink, but it should according to AD8410A. It can measure current bidirectional, but somehow it does not work. Is it something with the simulation or I do oversee something? No clue, please help me to spot the issue.



Other than that I'm happy with the result. The step response looks ok.



I'll definitely breadboard the circuit to see it in action.
« Last Edit: March 26, 2024, 01:53:10 pm by bdori »
 

Offline bdoriTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
Re: DIY 2Q power supply
« Reply #4 on: March 27, 2024, 05:04:23 pm »
Of course it is nothing wrong with the simulation, simply I missed the fact that the AD8410A can only go to -2V on the low side. I have changed the current sensing to a difference amplifier (AD8276) and that works very well.



 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1241
  • Country: nz
Re: DIY 2Q power supply
« Reply #5 on: March 27, 2024, 07:31:54 pm »
Just an FYI: the link above was for David Erikson’s 2Q supply, not his (much more complicated) SMU
 

Offline bdoriTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
Re: DIY 2Q power supply
« Reply #6 on: September 30, 2024, 03:02:44 pm »
I was playing a little bit more with the idea and I came up with a solution which looked very similar to the aforementioned design from Erikson. My problem though was that it is all analog and I'm more of a digital guy, so I was wondering if it is possible to build a decent smu with digital control, meaning that clamping is done in software. I build a small demo version on a breadboard, and to my surprise it actually works. I used an STM32G474 (nucleo board) with built in ADC and DAC. Unfortunately, I could only do 40kHz control loop for the clamping, but even than works quite well. It is also limited in resolution because the ADC and DAC is only 12 bits, but nowadays we can buy decent 24bit/400ksps ADC and 16bit/1msps DAC for 10 euro or so.

The control loop is very simple:

Code: [Select]
uint16_t setOutputWithClamping(void) {
const float kLimit = 0.25f;

float outputMeasured = voltageMeasured;
float limitMeasured = currentMeasured;

float outputLimited = outputMeasured + (limit - limitMeasured) * kLimit;

return (force < outputLimited) ? force : outputLimited;
}


kLimit parameter adjusts the clamping and empirically set to 0.25. Currently I only tested when voltage is forced and current limited, but can be easily switched in the software.



To me it seems that R&S NGM202 is also digitally controlled (I guess that's why they use FPGA and high speed ADCs). Is there anyone who can verify that? What do you think if I would use faster control loop and better ADC, DAC can I get a decent smu, which is digitally controlled?
« Last Edit: September 30, 2024, 03:13:24 pm by bdori »
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3901
  • Country: nl
Re: DIY 2Q power supply
« Reply #7 on: September 30, 2024, 05:18:14 pm »
This is not a two quadrant design, but a 4 quadrant design.
Where does "ampout" go? Do you take feedback from this output to compensate for losses in the output stage?
It also looks a lot like an audio power amplifier. Both Douglass Self and Bob Cordell have written excellent books on audio amplifier design. It's got lots of details, from design tips to PCB layout.
R20 and R21 are usually current sources (In audio amplifiers), so they can still deliver a base current when output voltage is near the rails, and don't generate a big base current  when the output voltage is near the opposite rails.

My mind is not set to looking deep into this. How much thought have you given to thermal stability?
 

Offline bdoriTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
Re: DIY 2Q power supply
« Reply #8 on: September 30, 2024, 07:01:02 pm »
Yes, you are right this is a 4Q design, I think the NGM202 is also like that, they just limited some functionality, like the negative rail is only -6V and I guess they limited the output in software to be 2Q.

Ampout is used to measure the current via the difference amplifier U1. Later, this will be the ground when I will use a separate floating supply for the output amplifier and in that way I can even go for higher voltage output.

The output amlifer is not so interesting after U5, it is a voltage and current booster, based on LT’s AN-18. I think you are right it is like an audio power amp. The magic happens in U5 which follows the voltage set to the non-inverting input, which is than amplified by the power stage. This is where force is going into, limit is implemented in software and adjusts the force not to exceed the limits. The inverting input gets the feedback either from voltage or current measurement.

On top on this simple analog part I’ll add an ADC to measure voltage and current and a DAC to set force voltage. The rest happens in software or maybe in an FPGA. Currently, the software is also pretty simple, but can be more complex, like adding filters (FIR for ADC, control the slope, etc.).

No, I did not consider thermal stability yet.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf