Una guida pratica per progettare e costruire un alimentatore: dal trasformatore al condensatore di livellamento, dai regolatori 7805, 7812, 7905 e LM317 fino ai 5 A con transistor di potenza, LM338 o moduli switching. Poi il recupero di un alimentatore ATX, le tensioni negative −5 V e −12 V e il collegamento a una scheda arcade JAMMA. Ogni sezione ha il suo calcolatore: inserisci i tuoi valori e ottieni condensatori, potenza dissipata, temperatura, dissipatore e caduta sui cavi.
A practical guide to designing and building a power supply: from the transformer to the smoothing capacitor, from the 7805, 7812, 7905 and LM317 regulators up to 5 A with a pass transistor, an LM338 or a switching module. Then reusing an ATX power supply, the negative −5 V and −12 V rails and wiring a JAMMA arcade board. Every section has its own calculator: enter your values and get capacitors, dissipated power, temperature, heatsink and cable voltage drop.
La tensione di rete a 230 V uccide. Il primario del trasformatore, il fusibile, l'interruttore e l'interno di un alimentatore switching sono a tensione di rete. Usa un contenitore chiuso, il fusibile sul primario, il filo di terra collegato alle parti metalliche e guaine termorestringenti su ogni saldatura. Se non hai esperienza con la rete, parti da un alimentatore già fatto (ATX o alimentatore da banco) e lavora solo sulla parte in bassa tensione.
230 V mains can kill. The transformer primary, the fuse, the switch and the inside of a switching supply are all at mains voltage. Use a closed enclosure, a fuse on the primary, earth bonded to any metal part and heat-shrink sleeving on every joint. If you have no mains experience, start from a ready-made supply (ATX or bench supply) and work only on the low-voltage side.
Un alimentatore lineare classico ha quattro blocchi: trasformatore (abbassa e isola la rete), ponte raddrizzatore (porta tutte le semionde dalla stessa parte), condensatore di livellamento (riempie i buchi tra un picco e l'altro) e regolatore (toglie il ripple e fissa la tensione).
C ≈ I / (2 · f · ΔV).A classic linear supply has four blocks: the transformer (steps the mains down and isolates it), the bridge rectifier (flips every half-wave to the same polarity), the smoothing capacitor (fills the gaps between peaks) and the regulator (removes the ripple and fixes the voltage).
C ≈ I / (2 · f · ΔV).Elettrolitico da 105 °C, a bassa ESR se la corrente è alta. Meglio due in parallelo che uno enorme: la corrente di ripple si divide e scaldano meno. Tensione di lavoro almeno il 25–50% sopra la massima a vuoto.
Use a 105 °C electrolytic, low-ESR if the current is high. Two in parallel are better than one huge part: the ripple current is shared and they run cooler. Voltage rating at least 25–50% above the no-load maximum.
Sul primario un fusibile ritardato (T): all'accensione il trasformatore e i condensatori scarichi assorbono un picco. Il trasformatore va scelto in VA: con il ponte e il condensatore la corrente efficace del secondario è circa 1,6–1,8 volte la corrente continua.
Put a slow-blow (T) fuse on the primary: at switch-on the transformer and the empty capacitors draw a surge. Size the transformer in VA: with a bridge and capacitor the secondary RMS current is about 1.6–1.8 times the DC current.
Il ponte conduce solo vicino ai picchi, con impulsi di corrente molto più alti della media: scegli un ponte da almeno 2–3 volte la corrente del carico e 100 V o più. Oltre 2–3 A serve un ponte con foro (KBPC, GBU) fissato al dissipatore.
The bridge conducts only near the peaks, in current pulses much higher than the average: choose a bridge rated at least 2–3 times the load current and 100 V or more. Above 2–3 A use a bridge with a mounting hole (KBPC, GBU) bolted to the heatsink.
I 78xx danno una tensione positiva fissa (7805 = +5 V, 7809 = +9 V, 7812 = +12 V…), i 79xx la tensione negativa corrispondente (7905 = −5 V, 7912 = −12 V). L'LM317 è regolabile da 1,25 a 37 V con due resistori, l'LM337 è la sua versione negativa. Funzionano tutti allo stesso modo: tengono l'uscita fissa e bruciano in calore la differenza tra ingresso e uscita.
P = (Vin − Vout) × I, più la piccola corrente di riposo (3–5 mA nei 78xx). Un 7805 con 12 V in ingresso e 1 A in uscita scalda 7 W: senza dissipatore va in protezione termica in pochi secondi.The 78xx give a fixed positive voltage (7805 = +5 V, 7809 = +9 V, 7812 = +12 V…), the 79xx the matching negative voltage (7905 = −5 V, 7912 = −12 V). The LM317 is adjustable from 1.25 to 37 V with two resistors, the LM337 is its negative version. They all work the same way: they hold the output steady and burn the input-output difference as heat.
P = (Vin − Vout) × I, plus the small quiescent current (3–5 mA in the 78xx). A 7805 fed with 12 V delivering 1 A dissipates 7 W: without a heatsink it goes into thermal shutdown within seconds.| RegolatoreRegulator | Piedini TO-220 (frontale, da sinistra)TO-220 pins (front, left to right) | La linguetta è collegata aTab connected to | Condensatori del datasheetDatasheet capacitors |
|---|---|---|---|
| 78xx | 1 IN · 2 GND · 3 OUT | GND | 0,33 µF in ingresso, 0,1 µF in uscita (onsemi MC7800, ST L78; TI LM340: 0,22 µF in ingresso)0.33 µF input, 0.1 µF output (onsemi MC7800, ST L78; TI LM340: 0.22 µF input) |
| 79xx | 1 GND · 2 IN · 3 OUT | IN (tensione negativa!)(negative voltage!) | 0,33 µF in ingresso, 1 µF in uscita (onsemi MC7900); TI LM79: 2,2 µF e 1 µF al tantalio o ceramici, oppure 25 µF elettrolitico in uscita0.33 µF input, 1 µF output (onsemi MC7900); TI LM79: 2.2 µF and 1 µF tantalum or ceramic, or 25 µF electrolytic on the output |
| LM317 · LM338 · LM350 | 1 ADJ · 2 OUT · 3 IN | OUT | 0,1 µF in ingresso, 1 µF in uscita, 10 µF su ADJ (con i diodi di protezione)0.1 µF input, 1 µF output, 10 µF on ADJ (with protection diodes) |
| LM337 | 1 ADJ · 2 IN · 3 OUT | IN | come l'LM317, con le polarità invertiteas the LM317, with reversed polarities |
Solo nei 78xx la linguetta è a massa. Su 79xx, LM317 e LM337 la linguetta è ingresso o uscita: se il dissipatore tocca il telaio o un altro regolatore, serve l'isolamento (foglietto di mica o silicone e rondella isolante per la vite). Controlla sempre col tester che tra linguetta e dissipatore non ci sia continuità .
Only on the 78xx is the tab grounded. On the 79xx, LM317 and LM337 the tab is the input or output: if the heatsink touches the chassis or another regulator, you need insulation (mica or silicone pad and an insulating bush for the screw). Always check with a meter that there is no continuity between tab and heatsink.
L'LM317 tiene 1,25 V tra OUT e ADJ: in R1 passa quindi una corrente fissa, che attraversa anche R2. Dal piedino ADJ esce in più una corrente di circa 50 µA, che sposta un po' l'uscita (il calcolo ne tiene conto). Con R1 = 240 Ω (lo schema del datasheet) passano 5,2 mA: bastano per il carico minimo tipico di 3,5 mA, ma il datasheet garantisce la regolazione solo da 10 mA. Con 120 Ω passano 10,4 mA e l'uscita resta regolata anche senza carico. Per un'uscita variabile usa per R2 un potenziometro della taglia indicata sotto, con un piccolo resistore in serie se vuoi limitare la tensione minima.
The LM317 keeps 1.25 V between OUT and ADJ, so a fixed current flows through R1 and on through R2. About 50 µA also leaves the ADJ pin and shifts the output slightly (the calculation includes it). With R1 = 240 Ω (the datasheet circuit) the current is 5.2 mA: enough for the typical 3.5 mA minimum load, but the datasheet only guarantees regulation from 10 mA. With 120 Ω the current is 10.4 mA and the output stays regulated even with no load. For a variable output use a potentiometer of the size shown below for R2, with a small series resistor if you want to limit the minimum voltage.
Il calore va dalla giunzione del chip all'aria attraverso una catena di resistenze termiche, in °C/W: ogni watt dissipato alza la temperatura di tanti gradi quanti sono i °C/W della catena.
Tj = Ta + P × Rth(j-a). Un TO-220 ha circa 50–65 °C/W: già con 1 W la giunzione sta 50–65 °C sopra l'ambiente.Tj = Ta + P × (Rth(j-c) + Rth(c-s) + Rth(s-a)). Rth(j-c) è nel datasheet (78xx in TO-220: 4–5 °C/W), Rth(c-s) dipende dal montaggio (pasta termica, mica), Rth(s-a) è il dato del dissipatore.Heat flows from the chip junction to the air through a chain of thermal resistances, in °C/W: every watt dissipated raises the temperature by as many degrees as the °C/W of the chain.
Tj = Ta + P × Rth(j-a). A TO-220 has about 50–65 °C/W: even 1 W puts the junction 50–65 °C above ambient.Tj = Ta + P × (Rth(j-c) + Rth(c-s) + Rth(s-a)). Rth(j-c) is in the datasheet (78xx in TO-220: 4–5 °C/W), Rth(c-s) depends on the mounting (thermal paste, mica), Rth(s-a) is the heatsink rating.| Rth dissipatoreHeatsink Rth | Che cosa usare (valori indicativi, controlla il dato del produttore)What to use (indicative values, check the maker's rating) |
|---|---|
| oltreover 20 °C/W | aletta a clip o piccolo dissipatore a U per TO-220 (20–30 °C/W)clip-on fin or small U-shaped TO-220 heatsink (20–30 °C/W) |
| 10–20 °C/W | dissipatore alettato per TO-220 alto 25–40 mmfinned TO-220 heatsink 25–40 mm tall |
| 5–10 °C/W | profilato alettato lungo 50–75 mmfinned extrusion 50–75 mm long |
| 2–5 °C/W | profilato grande (100 mm e oltre) o il pannello posteriore in alluminio del contenitorelarge extrusion (100 mm and up) or the enclosure's aluminium back panel |
| sottobelow 2 °C/W | dissipatore grande con ventola, oppure riduci la potenza: tensione d'ingresso più bassa, più regolatori o un regolatore switchinglarge heatsink with a fan, or cut the power: lower input voltage, several regulators or a switching regulator |
Un 78xx o un LM317 arrivano a 1–1,5 A. Per un computer con molta logica TTL o per una scheda arcade servono 3–5 A e oltre: ci sono tre strade.
A 78xx or an LM317 delivers 1–1.5 A. A computer full of TTL logic or an arcade board needs 3–5 A or more: there are three ways to get there.
Sono "LM317 grandi": stessi piedini, stessa formula (tensione di riferimento 1,24–1,25 V), stessi resistori. L'LM338 garantisce 5 A (limite di corrente 8 A tipico) in TO-220 o TO-3. Serve un ingresso di almeno 3 V sopra l'uscita: a 5 A e 3 V di caduta sono già 15 W, quindi dissipatore grande.
They are "big LM317s": same pins, same formula (1.24–1.25 V reference), same resistors. The LM338 is rated for 5 A (8 A typical current limit) in TO-220 or TO-3. The input must be at least 3 V above the output: at 5 A and 3 V of drop that is already 15 W, so a large heatsink.
Lo schema "high current" dei datasheet: un PNP di potenza (MJ2955, TIP2955) in parallelo al regolatore. Finché la corrente è bassa lavora solo il regolatore; quando la caduta su R1 arriva a circa 0,7 V il transistor si accende e porta quasi tutta la corrente. L'uscita resta regolata dal 78xx o dall'LM317. Il calcolatore del regolatore lo dimensiona (casella "transistor di potenza").
The "high current" circuit from the datasheets: a power PNP (MJ2955, TIP2955) in parallel with the regulator. At low current only the regulator works; when the drop across R1 reaches about 0.7 V the transistor turns on and carries most of the current. The output is still regulated by the 78xx or LM317. The regulator calculator sizes it (tick "pass transistor").
Un LM2596 (3 A, ingresso fino a 40 V, 150 kHz) o un modulo buck già montato non brucia la differenza di tensione: la trasforma. Da 12 V a 5 V a 3 A il datasheet dà circa l'80% di rendimento, cioè 3–4 W di perdite invece dei 21 W di un lineare.
An LM2596 (3 A, input up to 40 V, 150 kHz) or a ready-made buck module does not burn the voltage difference: it converts it. From 12 V to 5 V at 3 A the datasheet gives about 80% efficiency, i.e. 3–4 W of losses instead of the 21 W of a linear regulator.
Il transistor di bypass non ha protezione dal cortocircuito. Il regolatore si protegge, ma il PNP continua a condurre finché non si brucia (lui o le piste). Le soluzioni: un fusibile rapido in uscita, oppure lo schema completo del datasheet Fairchild con un secondo PNP (TIP42) e una resistenza di misura Rsc = VBE / Icc in serie all'emettitore del transistor di potenza, che gli toglie la base quando la corrente supera Icc. Il transistor va sul dissipatore: dissipa quasi tutto, (Vin − Vout) × I. Con il TO-3 il case è il collettore, cioè l'uscita: isolalo.
The pass transistor has no short-circuit protection. The regulator protects itself, but the PNP keeps conducting until it (or the traces) burns. The fixes: a fast fuse on the output, or the full Fairchild datasheet circuit with a second PNP (TIP42) and a sense resistor Rsc = VBE / Isc in series with the power transistor emitter, which pulls its base drive when the current exceeds Isc. The transistor goes on the heatsink: it dissipates almost everything, (Vin − Vout) × I. On a TO-3 the case is the collector, i.e. the output: insulate it.
| Lineare (78xx, LM317, LM338)Linear (78xx, LM317, LM338) | Switching (LM2596, moduli buck)Switching (LM2596, buck modules) | |
|---|---|---|
| RendimentoEfficiency | Vout / Vin: 5 V da 12 V = 42%Vout / Vin: 5 V from 12 V = 42% | 75–90%75–90% |
| RumoreNoise | praticamente nullo: ideale per audio (SID, amplificatori) e video analogicopractically none: ideal for audio (SID, amplifiers) and analogue video | ripple a 150 kHz e picchi di commutazione: servono filtro LC e un buon layout150 kHz ripple and switching spikes: needs an LC filter and a good layout |
| CaloreHeat | alto, dissipatore grande sopra 1–2 Ahigh, large heatsink above 1–2 A | basso, spesso basta il circuito stampatolow, often the PCB is enough |
| GuastiFailures | se muore va quasi sempre in protezione o in apertowhen it dies it usually shuts down or goes open | se il MOSFET va in corto l'ingresso finisce sull'uscita: metti un crowbar o un fusibile davanti a chip rariif the switch shorts the input lands on the output: add a crowbar or a fuse ahead of rare chips |
| Moduli economiciCheap modules | — | la corrente dichiarata è spesso il picco: usali al 60–70%; il trimmer va bloccato con una goccia di collathe stated current is often the peak: run them at 60–70%; lock the trimmer with a drop of glue |
Con un trasformatore e un lineare, a 5 A anche il livellamento diventa enorme: per 2 V di ripple servono 25 000 µF, il ponte va sul dissipatore e il trasformatore deve essere da 100 VA e più. Per i 5 V di una scheda con tanta logica spesso conviene un switching o un ATX, e tenere il lineare per le tensioni piccole e "pulite" (audio, −5 V, 12 V di un SID).
With a transformer and a linear regulator at 5 A even the smoothing gets huge: 2 V of ripple needs 25,000 µF, the bridge must be heatsinked and the transformer must be 100 VA or more. For the 5 V of a board full of logic a switching supply or an ATX is often the better choice, keeping linear regulators for the small "clean" rails (audio, −5 V, a SID's 12 V).
Un alimentatore da PC dà +5 V e +12 V con decine di ampere, protetti da cortocircuito e sovratensione, a costo quasi zero. È una buona base per un banco di prova o per una supergun, con alcune avvertenze.
A PC power supply gives +5 V and +12 V at tens of amps, protected against shorts and overvoltage, for next to nothing. It is a good base for a test bench or a supergun, with a few caveats.
Gli alimentatori vecchi, a regolazione di gruppo (un solo controllo per 5 V e 12 V), vogliono un carico sul +5 V per regolare bene, e se carichi solo il 5 V il 12 V sale (o viceversa). Una resistenza da 10 Ω 10 W sul +5 V (0,5 A, 2,5 W, va montata in aria o su metallo) di solito basta. Gli alimentatori moderni a conversione DC-DC ne hanno meno bisogno, ma danno quasi tutta la potenza sul 12 V: guarda in etichetta quanti ampere ha il +5 V e la potenza combinata 3,3 + 5 V.
Older supplies with group regulation (one control loop for 5 V and 12 V) want a load on +5 V to regulate properly, and if you load only the 5 V the 12 V drifts up (or vice versa). A 10 Ω 10 W resistor on +5 V (0.5 A, 2.5 W, mounted in free air or on metal) is usually enough. Modern DC-DC supplies need it less, but put almost all their power on 12 V: check the label for how many amps the +5 V has and the combined 3.3 + 5 V power.
Molte macchine degli anni '70 e '80 usano tensioni negative: le DRAM 4116 vogliono +12, +5 e −5 V, le porte RS-232 ±12 V, gli amplificatori operazionali audio di molte schede arcade −5 V. Il −5 V è sparito dagli ATX, quindi va ricavato.
Many 1970s and 1980s machines use negative rails: 4116 DRAMs need +12, +5 and −5 V, RS-232 ports ±12 V, the audio op-amps of many arcade boards −5 V. ATX supplies dropped the −5 V, so you have to make it.
| LineaRail | Chi la usaWho uses it | Correnti tipicheTypical currents |
|---|---|---|
| −5 V JAMMA | amplificatori operazionali audio, DRAM 4116 e logica di alcune schede vecchie; molte schede (per esempio Neo Geo MVS) non lo usano affattoaudio op-amps, 4116 DRAMs and logic on some older boards; many boards (e.g. Neo Geo MVS) don't use it at all | da poche decine a qualche centinaio di mA; gli alimentatori arcade lo danno fino a 1 Afrom a few tens to a few hundred mA; arcade supplies offer up to 1 A |
| −12 V | RS-232, op-amp, alcuni monitor e perifericheRS-232, op-amps, some monitors and peripherals | decine di mA; l'ATX ne garantisce 0,3 Atens of mA; ATX guarantees 0.3 A |
Il connettore JAMMA ha 56 contatti: 28 sul lato componenti (numeri 1–28) e 28 sul lato saldature (lettere A–f, senza G, I, O e Q). I pin di alimentazione sono uguali sui due lati, uno di fronte all'altro, e vanno collegati tutti: ogni contatto regge pochi ampere e la scheda ne assorbe tanti sul +5 V.
The JAMMA connector has 56 contacts: 28 on the component side (numbers 1–28) and 28 on the solder side (letters A–f, skipping G, I, O and Q). The power pins are the same on both sides, facing each other, and all of them must be wired: each contact carries only a few amps and the board draws a lot on +5 V.
| Lato componentiComponent side | Lato saldatureSolder side | FunzioneFunction |
|---|---|---|
| 1, 2 | A, B | GND |
| 3, 4 | C, D | +5 V |
| 5 | E | −5 V |
| 6 | F | +12 V |
| 7 | H | chiave (polarizzazione, nessun contatto)key (polarising slot, no contact) |
| 10 | L | altoparlante + / −speaker + / − |
| 14 | — | massa videovideo ground |
| 27, 28 | e, f | GND |
Una scheda arcade può assorbire da 2–3 A (schede recenti) a 8 A e oltre (schede anni '80 piene di TTL) sul +5 V. Con un filo sottile e lungo si perdono facilmente 0,2–0,3 V tra alimentatore e scheda, e la caduta c'è sia sul +5 V sia sulla massa. Usa almeno filo da 1 mm² (AWG 18), tutti i pin +5 V e tutti i GND, e tieni il cablaggio corto.
An arcade board can draw from 2–3 A (later boards) to 8 A or more (1980s boards full of TTL) on +5 V. With a long thin wire you easily lose 0.2–0.3 V between supply and board, and the drop happens on both the +5 V and the ground. Use at least 1 mm² (AWG 18) wire, all +5 V pins and all GND pins, and keep the harness short.
Gli alimentatori arcade hanno un trimmer sul +5 V (gli altri rami lo seguono). Regolalo misurando con il tester sul connettore JAMMA della scheda, tra un +5 V e un GND, con la scheda accesa: 5,00–5,10 V. Misurare sui morsetti dell'alimentatore non tiene conto dei cavi. Sotto 4,75 V molte schede si resettano o danno grafica sporca; sopra 5,25 V i chip soffrono.
Arcade supplies have a trimmer on +5 V (the other rails follow it). Adjust it measuring with a meter at the board's JAMMA connector, between a +5 V and a GND, with the board running: 5.00–5.10 V. Measuring at the supply terminals ignores the wiring. Below 4.75 V many boards reset or show garbled graphics; above 5.25 V the chips suffer.
Prima di inserire la scheda misura col tester sul connettore del cablaggio: +5 V tra 3 e 1, +12 V tra 6 e 1, −5 V tra 5 e 1, e lo stesso sul lato saldature. Gli errori che distruggono una scheda sono due: polarità invertita (rosso e nero scambiati o connettore montato al contrario) e +12 V sul pin sbagliato, per esempio sul 5/E (−5 V) o sul +5 V, che brucia in un attimo CPU, RAM e chip custom. Il connettore deve avere la chiave tra i pin 6 e 8 (7/H), perché la scheda non entri girata. Le schede non JAMMA (molte schede Konami, Sega e Data East degli anni '80) hanno piedinature diverse: servono l'adattatore giusto e il manuale della scheda.
Before plugging the board in measure at the harness connector with a meter: +5 V between 3 and 1, +12 V between 6 and 1, −5 V between 5 and 1, and the same on the solder side. Two mistakes kill a board: reversed polarity (red and black swapped or the connector fitted backwards) and +12 V on the wrong pin, e.g. on 5/E (−5 V) or on +5 V, which instantly burns CPU, RAM and custom chips. The connector must have the key between pins 6 and 8 (7/H) so the board can't go in reversed. Non-JAMMA boards (many 1980s Konami, Sega, Data East boards) have different pinouts: you need the right adapter and the board's manual.
Dati verificati sui datasheet onsemi MC7800/MC7900, TI LM340, LM79, LM317, LM338, LM2596, Renesas ICL7660, sulla Intel ATX12V Power Supply Design Guide 2.2 e sulle piedinature JAMMA dell'Arcade Museum e del Neo Geo Development Wiki. I calcoli sono stime da progetto: verifica sempre con il datasheet del componente che usi e con il tester. Vedi anche Connettori video e Pinout chip.
Data checked against the onsemi MC7800/MC7900, TI LM340, LM79, LM317, LM338, LM2596 and Renesas ICL7660 datasheets, the Intel ATX12V Power Supply Design Guide 2.2 and the JAMMA pinouts from the Arcade Museum and the Neo Geo Development Wiki. The results are design estimates: always check the datasheet of the part you use and measure with a meter. See also Video connectors and Chip pinouts.