Talkback for article: 379, June2005

A digital DC power supply

Back to:

From: Michael Rubitschka <rubitschka(at)> [ date: 2005-07-06 ]
Thanks Guido for this great idea and circuit.
I am going to build this on the weekend.
I hope it will work since I really could use a second powersupply.
I am verry interested about the i2c port and what future plans Guido
will unveil.

From: Andreas [ date: 2005-07-15 ]
This looks great! I'm not sure yet if I'm going to build it because I already built the older Digital Power Supply and it works great. Will it be possible to use this one with the FT323 chip you suggested for USB connection? Also I wonder if it might be possible to use it as a function generator (I guess you would have to remove C4?).
From: Guido Socher [ date: 2005-07-15 ]
Hi Andreas,
yes you could use usb communication to the pc if you keep the
tx/rx pins of the uart free instead of the i2c pins. It will probably
You can not use this circuit as high frequency function generator
because of the power transistor. You could remove C4 but you definitly
need C6 for stable operation. Still the circuit will be fast enough
(a few KHz) even if you keep the capacitors as they are.

This is also one of my ideas (which I have not tested yet). Generate
DC + some pulses/spikes. This can be used to verify that a
given circuit is resistant against noise and disturbances from the
power supply unit.
From: Stefan <stef.wagner(at)> [ date: 2005-08-06 ]
Hello Guido!

unfortunatley I can`t read the circuit-files with eagle. Because I`ve invested some time this year in order to learn how to work with eagle I was a bit disappointed.
Do you know a way so that I could read the circuit-files with eagle?
What advantage has gschem?
The last days I`ve spent a lot of time installing gcc for avr and today I tried geda according an internet-page ( . And in both cases I was not really successful,
although I followed exactly given instructions.
Today the installation of geda broke because xinstall could not start my x-server. Now I wonder if I should try another linux-distribution. At the moment I am using suse 9.1 and I don`t know if fedora or debian would be better. What linux-distribution do you use?

From: Guido Socher [ date: 2005-08-06 ]
Hi Stefan,
I can't use eagle if I sell also the boards. A single license of
eagle would be more than we actually earn by selling all those boards.
Apart from that geda is much more suitable for those small circuits.
I really like geda (a problem is that geda uses pcb for the board
layout and pcb is a bit difficult to use but geda on its own is very good).

geda is also included on the "avr programmin CD" from tuxgraphics (which
you have already).
So just tar /usr/local/geda together and unpack it under your suse
linux. After adjusting /etc/ and running ldconfig you should
have it up and running on your suse linux.

From: Freddy <freddy.tester(at)> [ date: 2005-09-02 ]
I searched for some 'Ringkerntrafos' with 2 A an 24 V on the secondary side. But I only found 12, 18 oder 30 V. It's possible to connect the secondary side parallel? What happens when I 24 V and 3 A? It is possible to get on the DC power supply 30 V with 2.5 A??

From: Guido Socher [ date: 2005-09-02 ]
Hello Freddy,
well first of all you can take 3A transformer and still build the
30V/2A version. You can also make it a 30V/2.5A power supply but
then you should use a second bd245. Just one bd245 does not leave any
savety margin. It will work but it is a risk especially when
the cooling is not perfect.

From: Erwin [ date: 2005-09-04 ]
@Freddy: Ich glaube Du kannst nen Ringkerntrafo nehmen und Einach die Sekundärseite parallel schalten. Ich denke mal der RKT 5012 mit 2x12V, 2x2.08 A von Reichelt tuts. Wenn Du nicht sicher bist ob die Dinger auch wirklich 2.08 A machen, würde ich den RKT8012 mit 2x3,33 A nehmen. Ist nur nen Euro teurer.
Allgemein ist 0-22 V eine schlechte Wahl. Mit 0-24 V bei 2.5 fährt man immer besser. Selbst wenn da mal ne Niederspannungsbohrmaschine oder nen Loetkolben anschliessen willst.

@Guido: Als Ergänunzg zu Deiner Schaltung würde ich noch einen Standby Knopf einbauen, der mal eben schnell die Ausgänge abschaltet. Z.B. um mal eben schnell die Schaltung umzustecken.
Was auch ne nette Spielerei wäre wenn man mehrere Einheiten aufbaut und diese mit I2C verbindet, so daß man über einen PC beide steuern kann. Wobei ehrlich gesagt als Hobby Elektroniker reichen meist zwei Netzteile aus. Daher wäre es vielleicht besser ein Gerät mit zwei Ausgängen zu bauen.
Ist das noch mit einem Mikrokontroller zu steuern? Oder einfach zweimal die Platine mit zwei Mikrokontrollern aufbauen und dann via I2C Bus den zweiten steuern?

Für schicke Gehäuse kann ich eigentlich folgende Stangenprofile empfehlen:
Habe selber damit mal Gehäuse aufgebaut und die Dinger sind genial. Sieht recht professionell aus! Allerdings sollten die Bleche gerade geschnitten sein. Links, rechts und unten würde ich mit Profil K befestigen (dort werden die Schnittkanten ein wenig verdeckt) und oben würde ich eine rausnehmebare Platte mit Profil K einsetzen. Die Front und Rückplatte können direkt davor bzw. dahinter gesetzt werden und werden auch in die Profile eingeschraubt!
Super geile Sache.
Gibt es irgendeine Quelle, wo man Frontblenden (mit Gravur), und Seitenbleche günstig gekommen kann (Schaeffer ist sehr teuer)?
Wer haette Interesse an einer Massenbestellung?


From: Martin <martinr112(a)> [ date: 2005-09-30 ]
Great project. I got this thing working.
But I suggest one idea:
Replace pushbuttons with Rotary Encoder, like on this site:
There are rotary encoders with pushbutton, it can change between amps and voltage and an arrow is shown on LCD witch is activated.

From: Vladimir <sonycman(at)> [ date: 2005-11-07 ]
Hi Guido. Thank you for the circuit! It`s really good and useful for me.
But I want to do some modifications. I`am novice in MCU`s so I need some advices... Can you help me with some things?
I will use a PIC microcontroller instead of Atmel.
1. My power supply unit will have two channels(each on his own winding): 0-20V,3A and 0-36V, 1A.
Because of that I cannot use the DAC from your circuit. A pair of them will require too many MCU ports. So it`s better to use PWM instead. But I don`t know how to construct the right filter for it.
2. It will be nice to add compensation for voltage drop under maximum current (if there is any). Can I handle it by the software (by continuously measuring and correcting output voltage) or by adding some circuit for that?
From: Sasa <salenbn(at)> [ date: 2005-11-25 ]
Hello Guido!
The last few moons I`ve spent much time seeking the some project of digital controlled PS, and yesterday I was very happy when I find your project. This is beautifull design, just like I wanted. Unfortunately, I have good experience in electronic but I am beginer with uPC-s. Because of that, I need some help. For first, which prgramm can open .pcb files (I use Tango, Eagle and Protel),can you take PCB-s in jpg or pdf becouse of universality? For else, I was make order the AvrUsb500 kit from Tuxgraphics Shop and I was read your programming manual before, but it is not clear for me. Can you explain for me and other AT uPC beginers how to "charge" ATMega8 for Digital PS, from start to end, step by step. I will be very thankfull to you.
From: Guido Socher [ date: 2005-11-25 ]
Hi Sasa,
this DC power supply is also available as a kit from the tuxgraphics shop.
If you know how to use a soldering iron and you have some basic
C programming knowledge then you should be able to build this using the
documentation that comes with the kit.

From: jimmy [ date: 2005-12-05 ]
Can I substitute both BD137 and BD245 with a power npn darlington like BDW83D?
From: Bogdan Marinescu <bogdan.marinescu(at)> [ date: 2006-02-09 ]
Hi all,

Excellent project. I really love the simplicity. I'm about to build it, but before I do, I'm curios about one thing: what's the regulation performance? Which is, how much does the output change at different currents?
Thank you,

Bogdan Marinescu, Romania

From: Guido Socher [ date: 2006-02-12 ]
Hi Bogdan,
this thing does not behave like a battery.
This is a real electronically regulated power supply.
It has a equivalent inner resistor of zero ohm if the current
is less than the defined current limit and afterwards it becomes

That is as long as the internal amplifier has enough amplification
it will supply the voltage you want independent of the load.

The only voltage drop you get comes from the external cables.

From: Bogdan Marinescu <bogdan.marinescu(at)> [ date: 2006-03-13 ]
Hi Guido,

Thank you for your explanation. I know this isn't a battery, but I also know that one of the parameters of the regulators I've seen is the maximum voltage dropout. There is even a class of regulators called LDO (Low Drop Out) which is especially designed to minimize this output voltage dropout. This is what I wanted to know.
All the best,


From: Andreas <basique(at)> [ date: 2006-04-04 ]
Hello Guido!

I'm building your excellent power supply. Everything is soldered so far. But I'm stuck calculating the heatsink for the BD245. I know I could guess, but I want to learn something :) I think the maximum rating is 70 W (2A * 30V + some safety). The datasheet says the maximum allowed temperature of the junction is 150°C and the thermal resistance (junction-case) is 1.56 K/W. I assume there is no th. resistance between case and heatsink (just as a test). Delta T is guessed about 90°C. For the th. resistance of the heatsink I get 1.3 K/W - 1.56 K/W = -0.26 K/W. It's negative! Well, I suppose there are no heatsinks with negative thermal resistance ;) I can't find my mistake. Maybe the 70 W are far too high?

Let me know what you think.

From: Torfinn Ingolfsen <tingox(at)> [ date: 2006-04-04 ]
Hello Guido!

I am looking at this (very nice, BTW) project. One question: would it be possible to use a 20x2 or even 40x2 LCD display (as long as it is HD44780 compatible) instead of the 16x2 one?
The 20x2 displays are easier to find here in Norway. The 40x2 is a special offer (= low price), that's the only reason I'm thinking about it.
Would a 20x2 (or 40x2) display work without changing anything?

Allt the best,
Torfinn, Norway
From: Guido Socher [ date: 2006-04-06 ]
Hello Torfinn,
yes you can use displays with other sizes.
From: Mike <car803(at)> [ date: 2006-05-21 ]
Hello Guido
i've just complete your schematic with a temperatur controlled fan driver and an additional contrasts poti for the lcd. but now i stuck in changing your circuit for more output power. i've got an transformer with 24V/10A ...
can you give me a short advice what i have to change the i can control
this amperage?

From: Anonymous User [ date: 2006-05-22 ]
Hello Mike!
By adding a second BD245 with additional resistors in the emitter line
to ensure that the current distributes equally over both BD245
you can probably go up to 4A.
If you want to go even higher then you will also have to change the BD137
to handle higher current amplification.

I have not tried that.

Maybe you can post your solution here once you have a working design.

From: Ruud [ date: 2006-07-28 ]
Hi Guido,
I have designed my own computer controlled supply a few years ago, if I had seen your supply page of 2002 I could have saved the trouble of doing so.. GREAT WORK!! I even like the design better than the 2005 one (I'm oldfashioned analog freak). Here are some suggestions borrowed from my own design and perhaps usefull to you.

Since I use my PC for messuring and regulating things I used an optocoupler for communicating with the PC via RS232, this prevents nasty current loops and is atleast as cheap as using a MAX chip.

I use a bootloader via RS232 to be able to upload new firmware

As for cooling the power transistors I used a cheap (small) cooling set for a pentium case 478. The controller monitors the sink temperature and controls the fan on the cooling set to prevent large temperatures.

Please don't see the suggestions as critisism, I love the detailed description and design of both your power projects


From: soroor <soroor_bahari(at)> [ date: 2006-09-24 ]
I need a circuit dc power suplly 0 _ 50 v and 0_5 A with digital input avr

23 talkbacks

Due to the increased amount of web spam we have deciced to removed the talkback posting possibility. You can read old talkbacks but you can no longer post new ones.

Back to

Please contact webmaster(at) if you have any questions with regards to this talkback

lftalkback version 3.10