Power Supply Design Assistance - Page 1
Forum section: electronics / projects

author: starhawk
author_rank: Regular Contributor
timestamp: November 10, 2019, 06:36:09 am
content: Hello!I'm trying to make a small gift for a friend, who's going through a rough time in life right now, and could use a little bit of a lift. This gift will need to be powered by a 12v 3a supply. Unfortunately, my budget this month does not permit me to purchase even the absolute cheapest eBay offering ($6.49 + free shipping) and although I do have exactly one suitable supply, I would prefer, since I *only* have one, not to let it go out the door.Two quick but important points, first...One, I really would very, very strongly prefer that this not become an economic discussion. My financial situation is controlled, it's just unusually constrained by various factors, and I really would prefer not to have to explain my whole life (which would be somewhat necessary in that context) to deal with the question of "why the heck can't you afford a power brick that's the cost of two lattes and tax at Starbucks?". I have done this in the past, and most people either are unwilling to accept that my circumstances are what they are, or insist that there is something I can and should do to change them (which is not really possible at this time, or I would already be doing it), or they just troll or shame me for what must be my fault because they simply have no room in their minds for the possibility that civilization is not fairly organized, economically or otherwise, and that people can be born into -- or incidentally fall into, in the course of their lives -- circumstances not of their choosing, and my situation is a combination, really, of all three of those. Because this topic is, at best, secondary to the issue at hand, and because it has a remarkable propensity to devolve quite rapidly into a flame war, I will ask that we not go there.That said, if you absolutely must ask, you may PM me for that -- but you will receive a rather formidable wall of text, and I will get very frustrated, very quickly, very openly, if it becomes apparent that you have not read it in full before responding, because that's who I am.Further, if you wish to Paypal me the money to buy that brick I mentioned -- sure, PM me for my Paypal address.Two, mathematics and I have had a very troubled relationship for a very long time. In grade school, I was diagnosed with a "math fluency disorder" -- I was never, to my recollection, given anything more specific than that by way of label. The essential effect, though, is that although I understand math /concepts/ at a very advanced level (I got the idea of squares and square roots in 2nd grade), I struggle to actually execute mathematical problems and formulae to any real degree. Simple addition is something I can handle... multiplication or subtraction involving more than two two-digit numbers, and division essentially in its entirety, are essentially impossible without a calculator. In college, I managed to get through a remedial algebra course, a statistics course, and (somehow) a trig course -- although the latter very nearly ended in rather epic disaster halfway through, and I only survived because, at my tiny liberal arts school, the professor was willing to find enough time in his schedule to one-on-one tutor me for a few hours a week. It was his opinion that, if I wanted to take calculus, I could probably manage, but doing so would "consume my life for a semester". I was pretty sure he was being overly optimistic, and declined... and, sadly, I've lost a lot of what I learned in those courses I *did* take. In my defense, I graduated from the place a bit over ten years ago...!OK, onto the main part of the show here...After Googling around a bit, I found a simple DC-to-DC power supply design, consisting of a 7812 and PNP BJT with three passives (two capacitors and a resistor) that I think I'm qualified to build. (The schematic is attached to the end of the post.) I know my limits -- a circuit that I design entirely, or even mostly, myself is probably going to fail to function, especially if it's even slightly more complicated than say a Joule Thief. But this...? Even tacking on a transformer and a diode bridge, which I'm pretty sure is all I need to add... I can't see myself messing this one up. I really can't.I have some parts from eBay and some parts that I've been able to scavenge up from other places. I have a transformer. I have a TO-3 7812 that I'm about 90% sure does indeed work, extracted from a board someone gave me, that was the controller board of a Commodore 1541 disk drive until the mechanicals were no longer capable of being realigned into functional equipment. I have a KBU1004 bridge out of probably an ATX power supply that had capacitor problems, and two beefy transistors, a B817 and a 2SA1061, both of similar origin, and either of which is at least approximately suitable for this circuit, at least in my estimation. I also have a 0.33uF/330nF polypropylene film "box" capacitor, part # KNB1560, and a whole pile of little yellow eBay-issue 0.1uF/100nF MLCC capacitors... and bags upon bags upon bags of both quarter-watt and half-watt resistors of various values. Most of my resistors are carbon film, but I do have a few old carbon composition ones in there.I plan to build the circuit deadbug, not because it's easy for me to do it that way (it isn't) but because I have a great whacking spool of either 20awg or 22awg (I forget) solid copper wire with red insulation, that's far better at handling the sort of current loads I'm dealing with, here, than ordinary perfboard would be, which is what I'd use otherwise.Ultimately, I have three questions that I need answered here.One. The transformer I have is untraceable, as most transformers are, and it was a gift from another friend who doesn't recall how *he* got it... all he could tell me was "I think it's a power transformer but I don't remember what it's from." I have attached pictures with the transformer in the presence of a ruler, to the end of this post. I have no datasheet. I have no way of obtaining a datasheet. I have no history on this component, and no history is obtainable. In addition to the information present in the photos, I can say that the primary (across the two black wires) is approximately 23 ohms, and that from each secondary to the center tap (from either red wire to the white wire) is about an ohm, and that across the entire secondary (from one red wire to another, with the white wire floating) it's about two ohms. I have not hooked it up to wall power yet -- or /any/ power, for that matter -- so I don't know its voltage characteristics yet... if it becomes readily apparent that that info is needed, however, I can provide it. I can roughly estimate that the power it needs to handle, in this role, is somewhere in the neighborhood of 40-50VA -- the output overall is 36w @ 12vDC, which translates (as I understand it) to 36VA before the rectifier part, but the 7812, being a linear part, is never going to be particularly efficient, so there's going to be a bit of extra load in there to deal with that.Ultimately... is the transformer I have, based on what little information I can provide, likely to be able to handle the current draw that this supply needs to be able to deal with? or is that utterly impossible to determine without either destroying the transformer, or without going off and building the whole thing and hoping that when I plug it in it won't catch fire and die?Two. Which is a more suitable transistor for this application, of the two I have? (Again, that's a B817 and a 2SA1061.) or is it somehow a case of, it absolutely doesn't matter in any conceivable way (i.e., there is absolutely no difference to be had between them, operationally or otherwise), or of, neither will work at all, forget it...? Er, in the latter case, I think I have a few TIP122s, one of which I could throw at this if I needed to and it would be suitable. But, IIRC, that's a Darlington, and those are special amplifying transistors and this isn't really the place for that, I'd think.Three. The schematic gives an example value of three ohms for the resistor. It also gives a pair of (to me) inscrutable formulae that must be used in combination to determine the more correct value of that resistor for a given application. I do not have the requisite electronic or mathematical knowledge to derive /any/ of the values that those formulas require -- can someone run the numbers for me, and work out both the necessary resistance and necessary wattage of that component...? Because I quite literally can't. (Thankfully, the use of a Hakko 926 iron and a spool of 60/40 solder doesn't require all that much in the way of math!)Thanks everyone in advance

author: mariush
author_rank: Super Contributor
timestamp: November 10, 2019, 07:44:10 am
content: The transformer is too small for your needs, and also its voltage is not suitable for what you want to do.Based on the size and the numbers, I'd suspect it's at best a 20VA or 25VA transformer.If you're measuring 32v AC on the secondary winding (as 32v CT which means center tap would indicate), most likely the actual AC voltage is 30v AC or 28v AC ... under load, the AC voltage of the transformer will go down a bit.But let's go with 30v AC and 20 VA maximum current...That means AC Voltage = 30v , and AC Current = 20 VA / 30V = 0.66 ANo matter what, you need to rectify this to DC voltage... and you have two options for that... either use a bridge rectifier which will give you higher voltage but lower current, or you can take advantage of the center tap to reduce the voltage but increase the current.See this pdf for ways of rectifying output of a transformer:http://www.hammondmfg.com/pdf/5c007.pdfIf you go with FULLWAVE Capacitor Input Load method on the bottom left corner, two diodes and a capacitor will be enough to rectify the output to DC, and you'll getVdc peak = 0.71 x Vac = 0.71 x 30v = 21vVdc avg = 0.46 x Vac = 0.45 x 30v = 13.5vIdc = 1 x Iac = 0.66 ANo matter what, you'll lose the power dissipated in the two diodes.. if the voltage drop on the diodes is around 1v, you'll waste around 1-1.5 watts out of the 20VA on the diodes.So with a big enough capacitor after the diodes (let's say 3300uF for each 1 A of current), you'll get a voltage close to 21v DC and a current of around 0.66A ... that's 21 x 0.66 = 14 W .... let's just round it up to 15wIf you use 7812 linear regulator and pass transistors, you're basically throwing the excess as heat. So if you give the circuit 21v and 0.66 A , you get 12v and 0.66A on the output and the difference is wasted as heat.You want to either use a switching regulator instead of a linear regulator, or you would want to rewire that transformer to output a smaller voltage.... but you'll still only have that 20-25 VA the transformer is capable of, to work with. It's not a big enough transformer.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 10, 2019, 08:15:51 am
content: Hunt around for junked LCD monitors, find one that has an inline power cord. Or a laptop charger cord perhaps. Or LED power supplies for strip lighting. Any of these should have 12V, or something near it.What are you powering? Does it need to be 12 +/- 0.05V? Can it be adapted to say 18V (in the realm of common laptop chargers)?Tim

author: starhawk
author_rank: Regular Contributor
timestamp: November 10, 2019, 04:38:08 pm
content: @mariush -- well, I was sort of expecting that, but it's still quite disappointing. As an aside... I did say I had not yet measured it for voltage output, and that I had a specific diode bridge to use...@T3sl4co1l -- your handle is amusing but hard to typeRe scavenging other supplies... if that was a possibility, I'd've gone that route as well. I'm no stranger to thatalmost all laptops nowadays take a 19vDC or 19.5vDC input. I have three or four power bricks in that range, including a couple venerable Dell bricks that are rated for 20v. I also have a couple of dual rail (5v/12v) LaCoe style bricks, but none of those can deliver sufficient current on the 12v rail... these are meant for external hard drives and optical media (CD/DVD) drives, and even a full desktop DVD "Super Multi" drive won't cross 2a during even a particularly intense write cycle, so those bricks almost always top out at... 2a on both rails. Finally, yes, *technically* I have another 12v brick, but it's rated either 8a or 10a because it's intended to power a small Dell All-In-One PC, and the connector on it is an eight-pin complicated mess that looks a lot like a short, stubby motherboard connector.The project is a "terminal", as my friend (slightly inaccurately) calls it. He owns a PC repair shop, and he often does "onsite" work, where he will, for an extra fee, come to your home or business and at least diagnose the problem /in situ/... of course not all problems can be solved without a trip back to home base, but... well, you get the point. He and I are extremely close friends, and he has confided in me any number of times that a simple setup of keyboard, mouse, and screen, all in one portable package, would be an extremely handy thing to have.I recently bought a relatively nice USB keyboard with integrated touchpad, a Cherry G60-11900, that I wound up unable to use in the project I'd bought it for, because the keycaps are odd sizes in a number of places and I'd intended to swap them for custom... which I can't do because they're odd sizes. Oops! I also have a scrap-together "homemade laptop" that I'm not using, and that I need to tear down because I want to integrate some of the parts into a new system, and that involves a Dell E6400 LCD panel in its proper lid, along with a Chinese driver kit from eBay. So I'm putting those two things -- the keyboard that I can't use, and the Dell screen that I'm *not* using, complete with driver kit, in as professional-looking a setup as I can manage -- and since the driver board explicitly requires 12v 3a, per original listing, that's what I want to feed it.Now for the tricky part. The driver kit consists of two PCBs, an inverter driver and the main LVDS board that actually runs the panel. I've Googled most of the chips on both boards... there is no vreg on the inverter board, but the chip that *is* there (a PWM driver, which has been paired with a beefy MOSFET and some passives) takes a roughly 5-8vDC input. The LVDS board... is surprisingly complicated. I cannot find a datasheet for the primary chip on that board. It's a Novatek part, but that's all I know. It /appears/ to me that what I think is the LVDS-logic vreg, paired with two other vregs, also drives the LCD logic, if it needs to. A three-pin jumper determines the voltage drive for the LCD... shorting one pin to the center pin outputs 3.3v; the other pin to center, 5v; and removing the jumper entirely outputs 12v. If I can squint as well as I think I canall three of those vregs are A1117 examples, although I'm not quite sure about the two secondary ones because they're in D2PAK form and I've never seen an A1117 in anything other than that stupid dinky SOT-223 package (which is what they used for the first one). That vreg of course has a voltage range from half-dead-AA-battery-territory (seriously, 1.1v is the dropout voltage) and a maximum input of 15vDC. There is a fourth vreg, marked "54329L" which I'm pretty sure is a TPS54329, and that I *think* drives the inverter board... recommended supply parameters there are 4.5-18vDC, and maximum ratings extend that to a range of "almost ground" (0.3v) on up to 20vDC.

author: starhawk
author_rank: Regular Contributor
timestamp: November 10, 2019, 07:42:04 pm
content: A bit more info, a discovery, and a decision.The LVDS board is the (somewhat) common M.NT68676.2. I have verified, by way of a spare LVDS board (the first kit I got, had a large, errant blob of solder in a part of the inverter board where it should not have been... powered it on anyways... smokeoh well, got a replacement for free), that the information I posted earlier identifying the vregs is indeed correct. For posterity, the other chips on the board are a Novatek NT68676UFG, for which a datasheet does not exist, a Winbond 25X40CLN1G 512k x8 SPI flash ROM, and a TDA7496LG audio driver, because this board is capable of handling sound as well as video. While the underside of the board is extraordinarily well-labeled (silkscreen both sides!) with essentially every header (even the ones where it's an unpopulated footprint) receiving full pinout information, there are no components underneath. Other than a few tiny SMT/SMD transistors scattered about the board, plus one MELF diode, the rest of the componentry is passives and connectors.I decided to take this as an opportunity to straighten out my wall-warts bin, which has become an impenetrable rat's nest. I was secretly hoping that a 12v 3a wart that I somehow was unaware of would magically appear... of course it didn't. Oh, and that ginormous Dell brick I mentioned...? I had it rather underpowered. It's a Dell DA-2 series, 12v 18a holy /crap/. It apparently powered several now-legacy Optiplex "USFF" ("Ultra Small Form Factor"... dear Dell, that's not a thing, please stop inventing random marketing crap to puff yourself up) systems. I inventoried my power bricks as well... nothing suitable. Finally, since I'm a packrat and a bunch of my stuff is in various boxes in various closets, I decided to go closet spelunking...Oh hey, 12v 5a power brick... without its housing. I am suddenly and distinctly reminded of the scene in "My Cousin Vinny" where Vinny walks into the courtroom in a red velvet suit, because the judge had insisted he /wear/ a suit in the first place, and because the local tailor had sold all his other suits -- this being a tiny, tiny, tiny Southern town, where nothing anywhere near this exciting had happened in a very long time... so suddenly the entire town needed fancy clothes so that they could come watch the show.In particular, I'm reminded of the judge's reaction... "Are you mockin' me, with that outfit...?"When I build something for me... it can look like crap and that's not a problem. I'm not a professional. My "professions", for the most part, are being bored, annoying friends and family with stupid jokes and wise*** commentary, and stuffing my face with junk food. I'm very good at all three, but they don't pay well. However, this particular construction is not for me -- as stated, it's for a friend of mine who runs a local tech shop, a PC repair business. That means that this particular build /must/ look professional, at least to the untrained eye. Exposed circuitry is, uhm, not professional. Especially exposed /power/ circuitry.What I think I'm going to do here, because it's the absolute easiest cheapest solution I can come up with, is to enclose the 12v 5a power supply in with the LVDS board. There's a separate six-switch "key board" PCB that does the on-screen settings menu thing, and I'm going to figure out how to incorporate that in with the rest so that it at least doesn't look completely awful. (I have a few ideas for that.)

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 10, 2019, 07:53:13 pm
content: Nice!FYI, if you can remember what the housing looked like, try to recreate whatever metal shields and heatsinks were on it. You might not be overly concerned about generating interference, but it shouldn't be too hard to keep it at least close to original spec. Best case, if everything's going in a metal box, heck you can even put a filtered IEC jack on and wire that to the supply (which has / should have a filter already) for extra protection. Filtering won't mean much without shielding though. (Best case, if you remember the original didn't have any metal shields inside, it should be fine already!)If you can afford some air space around the board, that'll help with convection cooling. Those things get terribly hot to begin with, and I've seen some where the housing is packed with thermal goop just because they couldn't figure out anything better. I wouldn't think you'd need to add heatsinks (or bolt heatsinks onto the metal bits it has), but you can put it into a much tighter enclosure if you do.Tim

author: mariush
author_rank: Super Contributor
timestamp: November 10, 2019, 08:00:14 pm
content: fyi .... the inverter chip needs a minimum of 8v or something like that to function, and on most of those boards it's powered directly from the DC input. So, you'll probably fine with running that board with as little as 9v DC.You may get some slight buzzing or more noise from the high frequency transformers for the backlight, if they were really "tuned" for 12v...lower input voltage means more current...Also, you don't really need 3A ... depending on brightness of the panel you can probably do with as little as 10-15 watts. Don't get so caught up in that 3A number.

author: starhawk
author_rank: Regular Contributor
timestamp: November 10, 2019, 09:18:46 pm
content: @T3sl4co1l -- it was a plastic box slightly bigger than the electronics, lined with what amounted to stiff mylar. This was not an expensive supply... I can't afford expensive. I probably will stick a small fan on this thing though, it very likely needs it.Also, if it's filling the entire enclosure... that's uhm not thermal goop. That's potting compound, because they've counterfeited so many chips (or skimped enough on the quality elsewhere) that it's more cost effective just to bury their myriad sins in epoxy than to grind the part numbers off of everything. Unless it's an old Commodore brick, in which case they did it because they thought that it would prevent people from knowing what was in there, in the name of industrial secrecy. (Hint: it didn't work.)@mariush -- I was kinda thinking that myself, re the voltage range. As for current... if I could measure it accurately (no clamp meter and no money for one) I'd be comfortable dropping the supply size. But I don't want to burn stuff up...at this point it doesn't matter much anyways.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 11, 2019, 06:18:04 am
content: No, not theentireentire enclosure, the one at least I saw was thermal goop around the heatsinks and shields, between them and the plastic enclosure. It was not a potting resin, it was as goopy as the day it was installed.Tim