DIY 2Q power supply - Page 1
Forum section: electronics / projects

author: bdori
author_rank: Newbie
timestamp: March 25, 2024, 06:08:23 pm
content: 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.

author: jbb
author_rank: Super Contributor
timestamp: March 25, 2024, 09:09:28 pm
content: 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...

author: bdori
author_rank: Newbie
timestamp: March 26, 2024, 01:43:31 pm
content: 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.

author: bdori
author_rank: Newbie
timestamp: March 26, 2024, 01:50:46 pm
content: 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.

author: bdori
author_rank: Newbie
timestamp: March 27, 2024, 05:04:23 pm
content: 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.

author: jbb
author_rank: Super Contributor
timestamp: March 27, 2024, 07:31:54 pm
content: Just an FYI: the link above was for David Erikson’s 2Q supply, not his (much more complicated) SMU

author: bdori
author_rank: Newbie
timestamp: September 30, 2024, 03:02:44 pm
content: 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: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?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 30, 2024, 05:18:14 pm
content: 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?

author: bdori
author_rank: Newbie
timestamp: September 30, 2024, 07:01:02 pm
content: 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.