How do I calculate the number of turns for both the primary and the secondary windings of a transformer?
Please log in to post an answer.
Transformer Calculations: www.electrical-design-tutor.com/transformercalculations.html
Transformer Winding: NOTE: There are many types of transformers and you didn't specify what it would be used for: RF-antenna/circuit impedance matching, AF impedance matching, AC Voltage Conversion
A good place to start: The Radio Amateur's Handbook, if you can get one.
Practical (power) Transformer Winding: http://ludens.cl/Electron/trafos/trafos.html
Get a copy of Coyne Television and Radio Handbook. Very good Practical transformer design, also wire and other charts. I see this book on the Internet book sellers.
Since you are asking about the primary turns, we assume that you need equation (2) shown in the Figure below, and you are experienced enough to already be familiar with equation (3), listed for reference. We also assume that you are interested in rewinding a power transformer (50/60 Hz) rather than an audio or radio frequency transformer. The main task is to get the minimum required number of primary turns without saturating the core, otherwise smoke. Everything else is just details.
An E-core transformer core is shown in the figure. It is constructed from a stack of alternating "E" and "I" shaped laminations of silicon steel. The "not shown" windings go around the center leg through the two windows. The key to the design is the cross-section area of the center leg through which the magnetic lines of flux pass. The Area (Ae) is the width of the center leg (w) times the height (h) of the stack. The Ae determines: 1) the power output capability (Wo); and 2) the number of primary turns (Np). It should be no surprise that a bigger core (Ae) supports more power (Wo). Bigger cores require fewer turns of larger wire than smaller cores.
Start out with either equation 1a or 1b. If you are starting with a known power output requirement (Wo), use 1a to determine the required center leg core area (Ae). Example: A 100 watt (Wo) transformer operated at 60 Hz requires Ae = sqrt(100)/5.58)*sqrt(60/60) = 1.77 sq in center leg core. You then need to select a stack of laminations for which w and h
multiply out to 1.79 sq in, or more.
More likely, you have a discarded transformer on hand that you want to rewind with custom windings. Equation (1b) tells us how much power (Wo) a center leg of a given area will support. Knowing the wattage allows us to select the proper wire sizes for both windings. Example: We have a 1.0 in stack of 1.0 in wide laminations = Ae = 1 sq in: Wo = (60/60)*(squared5.58 * 1.0) = (31 watts).
The minimum number of turns for the primary is given by equation 2 in terms of the primary voltage (Vp), frequency (f), center leg E-core area (Ae), and flux density of 80,000 lines per square inch. Example: Our 31 watt 1.0 square inch core is to be operated at 120 VAC, 60 Hz; Np = (120 * 10e8)/(4.44 * 60 * 1.0 * 80,000) = 563 turns.
If our 31W, 120V, 563 turn primary were to be accompanied by a 12V secondary, the voltage ratio is 1/10. The secondary turns Ns is proportional (equation 3). Ns = 56.3 turns. This is the open circuit voltage. Optionally, if we want the loaded voltage to be closer to 12V, add 5% more turns to the secondary (not shown in equation 3). Ns' = 1.05*Ns = 1.05*56.3 = 59 turns.
What size of wire should be used for our example 31W 120V : 12V transformer? Answer: Choose a wire gauge having approximately 1,000 circular mils of cross-section per ampere of current. See Reference  for a wire table. The 120V, 31W primary has I = P/V = 31/120 = 0.26 A current. Closest is AWG #26 wire with 254 cir mils cross-section for the primary. The secondary current is I = P/V = 31/12 = 2.58 A. Closest is AWG #16 with 2583 cir mils.
Note: The above formulas based on Reference  predict a full load temperature rise of 50 degrees C. If this is too hot for your application, decrease the flux density of 80,000 lines per square inch by 20%.
Practical considerations: In the olden days, it was possible to disassemble a transformer by removing the bolts compressing the lamination stack, then knocking out the laminations with a hammer and screwdriver. These days, disassembly may be impossible due to epoxy applied to the laminations. If possible, recover the insulating form on which the coil is wound from your scrapped transformer. This is a hard-to-make item. If you are modifying a not-burned-out transformer, only remove the secondary; re-using the primary.
Some small transformers — like the open frame RadioShack products — may have a large enough window space remaining to add windings atop the existing secondary. If you only need a few volts, or want to add a few volts to the existing secondary, the turns may be threaded through the windows without disassembly. Temporarily, tape sharp window edges to prevent scraping the wire while threading.
 Reference Data for Radio Engineers, 4th ed, “Design of Power Transformers for Rectifiers,” pp 25, 1964, ITT.
 Lessons In Electric Circuits, Vol 5, Ch 3, Copper wire gauge table, www.ibiblio.org/kuphaldt/electricCircuits/Ref/REF_3.html.
Here are three video tutorials on building a transformer from an old microwave. They go into the design and windings design pretty well (alternative: just go to youtube.com and search on "mot salvage tutorial"):
The question about transformers does not admit to a simple answer. The primary and secondary windings are applied such that the ratio of the number of primary and secondary turns is identical to the ratio of the primary and secondary voltages. However, the above statement presumes an ideal transformer. It also presumes that the designer has already considered the frequency and waveform of the voltage applied to the primary winding, heating, and safety considerations, etc. This knowledge is required in order to permit the designer to select the proper type and physical size of the transformer core material, the bobbin construction, and other matters.
If your interest is constrained to power-frequency transformers — principally 50 Hz in your part of the world — I found an interesting treatise at http://ludens.cl/Electron/trafos/trafos.html. His complementary article at http://ludens.cl/Electron/Magnet.html discusses the underlying physical properties relative to transformer design.