Build own Digital Power supply start with Hiland 0-28V 0.01-2A Digital Supply - Page 1
Forum section: electronics / projects

author: Uksa007
author_rank: Contributor
timestamp: July 01, 2017, 02:24:31 am
content: Hi,I'm looking to build my own DC Digital power supply.It's a shame that Dave's µSupply project has stalled, it would have been a good starting point, as it stands his Rev C design has some issues and is not tried and tested.I found the "Hiland 0-28V 0.01-2A Adjustable DC Regulated Power Supply DIY Kit Short Circuit Current Limiting Protection" design, details below which seems like a good starting point.My design requirements are:1-24V0.01-2A Constant current/LimitingAccuracy 10mVStable with low noise.Low power consumption/low heatI would like to use Arduino (it's what I'm familiar with and have them already)Eventually Dual Output (Maybe start with one output)I would like a bit more accuracy and stability so will probably need to use a dedicated(12bit?) ADC, DAC and voltage reference.Does anyone have comments or suggestion on better designs to start with?Banggood linkhttps://www.banggood.com/0-28V-0_01-2A-Adjustable-DC-Regulated-Power-Supply-DIY-Kit-Short-Circuit-Current-Limiting-Protection-p-1060253.htmlCircuit Diagramhttps://drive.google.com/file/d/1LsE5Idn7bPsl-ISgwLZEXHeMxZSIPFTfThanks

author: schmitt trigger
author_rank: Super Contributor
timestamp: July 01, 2017, 03:10:05 am
content: Quote from: Uksa007 on July 01, 2017, 02:24:31 amI am only going to comment on the two points above.First; a linear supply has many good attributes, but neither low power consumption nor low heat generation are one of those.Second; for the best stability and accuracy, please use a proper voltage reference.

author: Uksa007
author_rank: Contributor
timestamp: July 01, 2017, 03:36:31 am
content: Quote from: schmitt trigger on July 01, 2017, 03:10:05 amHi,Thanks for the reply,Yep, realise these are usually mutually exclusive.I think I might tackle this is two parts.Get the Supply working, with good stability and accuracy, and then work on something similar to Dave's design, with a pre tracking switch mode regulator, which should deal with the heat and power consumptionDo you have any suggestions for a good voltage reference?Regards

author: Kleinstein
author_rank: Super Contributor
timestamp: July 01, 2017, 09:15:25 am
content: This supply looks like a very old circuit. Regulation is by the transistors only and not even using differential pairs. So it is not good starting point to get a precision supply. The reference is not even with worst part here. There are better kit's a round - like one advertised for 30 V and 4 A, that does not permit that power, but at least works to something like 24 V and 2 A.A good reference suitable for an supply would be something like the LM329. However at 7 V it is not that suitable for many DACs or if a PWM circuit is used. Even an TL431 might be good enough. It depends a lot on the DAC(s) used what voltage is needed, but chances are one would need something like a 5 V reference with many DACs. Choosing a good reference is one of the least problems in designing / building a lab supply - this is more like a last step: look at what the circuit is capable and than choose a reference that is not contributing too much to noise and drift.

author: Uksa007
author_rank: Contributor
timestamp: July 01, 2017, 09:45:58 am
content: Quote from: Kleinstein on July 01, 2017, 09:15:25 amHi,Thanks for the feedback.I have had a look around I haven't found anything drastically different.There is a 30V 3A supply, but it doesn't look much different, still a single transistor design, and seems to have many issues.https://www.eevblog.com/forum/beginners/bangood-psu-enhancements/Are you able to supply a link to a circuit diagram of the supply you are referring to?Thanks.

author: Kleinstein
author_rank: Super Contributor
timestamp: July 01, 2017, 09:59:58 am
content: That is the type of circuit I was referring too. In principle the circuit is ok, but not for the voltage and power advertised. So with a lower transformer voltage and reducing the current limit the circuit can work.The main issue is about the voltage ratings of the OPs. There are a few different versions, some can show a overshoot on turn on. It is not the best circuit, but at least a point where one can start from, without going back to a white paper.

author: Uksa007
author_rank: Contributor
timestamp: July 01, 2017, 10:25:24 am
content: Quote from: Kleinstein on July 01, 2017, 09:59:58 amSo the two circuits are not that different.The one you refer to uses Op amps to compare then drive a single output BJT.My circuit uses a Micro(ADC/PWM) to compare and drive a drive a single output BJT.They are really not that different?So my plan is to build a better version of the above circuit I posted, use dedicated:Voltage referenceADCCurrent sensePWM or DAC.In a digital world, do I really need to use OP amps?Regards

author: Kleinstein
author_rank: Super Contributor
timestamp: July 01, 2017, 12:41:57 pm
content: Compared to the µC with ADC and DAC for feedback using analog feedback via OP is much higher performance:Even a rather simple OP like the LM358 has a bandwidth of some 500 kHz - compare that to a maybe 50 kHz sampling (and thus 25 kHz BW) for the µC internal ADC. Resolution of the ADC / DAC is limited, the µC internal ones at something like 10 or 12 bits. The corresponding parameter for an OP is the noise. For the LM358 this is some 20 nV/Sqrt(Hz). So for the 25 kHz BW the ADC would offer this would correspond to a resolution of about 3 µV, and thus roughly equivalent to a 20 Bit ADC. So to get roughly as good a 10 cent OPs one would need something like a high end 16 bit 1 MHz ADC and 20 bit DAC and fast DSP / FPGA - possible today, but rather expensive and it still needs an input buffer for the ADC.The shown circuit has some basic analog feedback, but the limited resolution and speed would still lead to very poor performance. Current limit is likely so slow that it would not even protect the circuit. Using PWM instead of an DAC would cause considerable ripple. It is possible to use PWM and a suitable slow filter instead of a DAC to provide the set-point for an analog control loop. However an PWM DAC is not suitable in a fast loop.For slow precesses like temperature, a digital control is very feasible and a good idea, but voltage regulation is usually a rather fast and high resolution process.

author: alm
author_rank: Super Contributor
timestamp: July 01, 2017, 12:57:01 pm
content: The bandwidth might be much worse than that. If it is based onthis old design, then the ADC samples at 9.6 kS/s and the control algorithm is a naiveCode:if (measured < set) dac++;else if (measured > set) dac--;So at most the output could change 1 LSB (of a 10-bit DAC) every ADC cycle. So the large signal bandwidth would be way worse than 9.6 kHz, more like 7 Hz.Obviously I have no way of knowing whether the firmware is similar, but it is suspicious that both use an ATmega8 and a 10-bit R2R DAC. Even with a proper PID controller I imagine it might be quite tricky to get decent stability with this low sampling rate.

author: Uksa007
author_rank: Contributor
timestamp: July 02, 2017, 02:54:03 pm
content: Quote from: Kleinstein on July 01, 2017, 12:41:57 pmSo I have configured up my Adrunio 328p running on 3.3V at 8Mhz, normally at 5V it would run at 16Mhz.It is reading the ADC A0, making some calculations on it (comparing it with the reference voltage to calculate Vcc and the A0 voltage)It then outputs a PWM which drives the base of a BC 548 Transistor, the collector(via resistor) modifies the voltage on the ADC A0 pin.Think of this setup like the circuit diagram i posted, ADC reads voltage and current, and via PWM controlls the transistor to change the output.Program writes output the serial port, seen below.The program is timing how long it takes to run which is 4400µ Seconds.I suspect a lot of this time is writing the below output to the serial port.So ~2200µ Seconds using a 16Mhz clock, I suspect quicker without the serial writing.Question is 2200µ Seconds too slow of a response?Not sure how that compares with an OP amp?Vcc:3.3 A0: 0.159 A1:1.011 PWM: 239 Time: 4368Vcc:3.3 A0: 0.163 A1:1.002 PWM: 237 Time: 4328Vcc:3.3 A0: 0.201 A1:1.002 PWM: 237 Time: 4328Vcc:3.3 A0: 0.606 A1:1.003 PWM: 238 Time: 4360Vcc:3.3 A0: 0.160 A1:1.002 PWM: 237 Time: 4336