From the wall socket to the motor
This week follows electrical energy along one chain. AC from the grid is turned into DC, a switch chops that DC to control it, the switch heats up and needs cooling, a converter changes the voltage, and a driver feeds the motor. Each chapter has a picture, the idea in plain English, the formula worked out from scratch, and a calculator loaded with the lecture's numbers.
Every symbol, in one place
The lectures use a lot of subscripts. Come back here whenever one isn't obvious.
| Symbol | Name | Plain meaning | Unit | Where from |
|---|---|---|---|---|
| AC and rectifiers | ||||
| VRMS | RMS voltage | The "equivalent DC" value of AC. The 230 V on the socket | V | Given |
| Vpk | Peak voltage | The very top of the AC wave | V | √2 × VRMS |
| Vavg | Average voltage | Mean height of one hump | V | 0.637 × Vpk |
| Fgrid | Grid frequency | AC cycles per second | Hz | 50 Hz (UK) |
| VF | Forward voltage | The fixed voltage a diode uses up while conducting, about 1 V | V | Datasheet |
| ID,RMS | Diode current (RMS) | Current through the bridge, as a meter reads it | A | Given |
| PD(FB) | Power dissipated, full bridge | Heat made by the four diodes | W | Calculated |
| IF(AV) | Rated average forward current | Most average current the diode or bridge may carry | A | Datasheet |
| VRRM | Repetitive peak reverse voltage | Most reverse voltage a diode can block, cycle after cycle | V | Datasheet |
| C | Capacitance | Size of a capacitor: charge stored per volt (Q = CV) | F, µF | Given / chosen |
| ΔV | Ripple | How far a smoothed voltage dips and rises | V | Calculated |
| Switches and MOSFET losses | ||||
| G, D, S | Gate, drain, source | MOSFET legs. The gate controls; current flows drain → source | ||
| B, C, E | Base, collector, emitter | BJT legs. Base current controls collector current | ||
| VDD | Supply voltage | The DC rail the MOSFET switches (the battery) | V | Given |
| ID | Drain current | Current through the MOSFET when on | A | Given |
| VGS(th) | Gate threshold voltage | Gate voltage at which the MOSFET starts to turn on | V | Datasheet |
| VDSS | Max drain-source voltage | Most voltage the MOSFET can block when off | V | Datasheet |
| RDS(on) | On-resistance | The MOSFET's resistance when fully on | Ω | Datasheet (static) |
| td(on), tr | Turn-on delay, rise time | How long switching on takes, in two parts | ns | Datasheet (dynamic) |
| td(off), tf | Turn-off delay, fall time | How long switching off takes, in two parts | ns | Datasheet (dynamic) |
| FSW | Switching frequency | How many on/off cycles per second | Hz | Given |
| D | Duty cycle | Fraction of each cycle the switch is on (0 to 1) | ton / T | |
| EON, EOFF | Switching energies | Energy lost in one turn-on, one turn-off | J | Calculated |
| Pcond, PSW | Conduction, switching loss | Heat while on, heat while switching | W | Calculated |
| Heat | ||||
| TJ | Junction temperature | Temperature of the silicon inside. The one that must stay safe | °C | Calculated |
| TC, Ths, Tamb | Case, heatsink, ambient temperature | Temperatures along the path the heat takes | °C | Calculated / given |
| Rth | Thermal resistance | How many °C hotter one side gets per watt flowing through | °C/W | Datasheet / chosen |
| Rth1, Rth2, Rth3 | Junction→case, case→heatsink, heatsink→air | The three steps of the path | °C/W | Datasheet, datasheet, heatsink choice |
| RthJA | Junction→ambient (no heatsink) | The whole path when the part stands alone | °C/W | Datasheet |
| Converters and drives | ||||
| Vin, Vout | Input, output voltage | Converter's supply and result | V | |
| L | Inductance | Size of the inductor: resists changes in current | H, µH | Calculated |
| ΔIL | Inductor ripple current | How much the inductor current wobbles | A | Chosen, e.g. 10% of I |
| VL | Line voltage (3-phase) | Voltage between two motor phases | V | VDC / √2 (slide) |
| cos φ | Power factor | How much of the current does useful work (0.92–1) | Given | |
| η | Efficiency | Output power ÷ input power (90–95%) | Given | |
AC values: peak, RMS and average
Mains is a sine wave that pushes current one way then the other, 50 times a second. The "230 V" printed on everything is the RMS value: the DC voltage that would heat a kettle by the same amount. The wave itself reaches 325 V. Components have to survive the peak, not the RMS.
| Convert | Multiply by | Mains example |
|---|---|---|
| RMS → peak | 1.41 (√2) | 230 × 1.41 = 325 V |
| Peak → RMS | 0.707 (1/√2) | 325 × 0.707 = 230 V |
| Peak → average of a hump | 0.637 (2/π) | 325 × 0.637 = 207 V |
| RMS → average | 0.9 | 230 × 0.9 = 207 V |
| Peak → peak-to-peak | 2 | 650 V |
Derivation: why peak = 1.41 × RMS
- RMS means Root of the Mean of the Square: square the wave, average it, then square-root it. We square because heating power goes as V².
- The wave is V = Vpk sin θ, so V² = Vpk² sin² θ.
- Over a whole cycle, sin² θ averages to exactly ½. It spends as long above ½ as below it.
- So the mean of the square is ½ Vpk², and its square root is:
Derivation: why average = 0.637 × peak, and average = 0.9 × RMS
- Average height of one hump = its area ÷ its width.
- Area under one hump of sin θ, from 0 to π, is exactly 2 (∫ sin θ dθ = [−cos θ] = 1 + 1). Width is π.
- So the average is 2/π = 0.637 of the peak.
- RMS is 0.707 of the same peak. Divide one by the other and the peak cancels:
Meter tip from the slides: an ordinary multimeter only reads RMS correctly for a clean 50 Hz sine. For PWM or distorted waves use a true-RMS meter, or look at it on an oscilloscope.
Diodes and the full bridge rectifier
A diode is a one-way valve. Current flows the way the triangle points, and costs a fixed toll of VF ≈ 1 V. Backwards, it blocks (up to its limit VRRM). One diode alone (a half-wave rectifier) throws away the negative half. Four diodes in a diamond (a full bridge) flip the negative half upwards so none is wasted.
Anode (+) higher than cathode (−). Current flows, minus VF.
Cathode higher than anode. No current, as long as the voltage stays under VRRM.
| Diode | Allows | State | Why |
|---|
How the bridge works, in six steps
- Read each diode as a rule. D1 allows A → +. D2 allows B → +. D3 allows − → A. D4 allows − → B.
- Spot the pattern. Two arrows point into +, two point out of −. So current can only arrive at + and leave from −. It always goes through the load from + to −.
- Positive half: A pushes. A → + through D1, through the load, then − → B through D4. D1 and D4 on, D2 and D3 off.
- Negative half: B pushes. B → + through D2, through the load, then − → A through D3. D2 and D3 on, D1 and D4 off.
- Result: the load sees the same polarity every half-cycle. The output is a row of positive humps, 100 per second (2 per AC cycle).
- Cost: current always passes through exactly two diodes, so the output peak is Vpk − 2VF, and two diodes are always making heat.
| Type | Diodes | Output | Where you see it |
|---|---|---|---|
| Half-wave | 1 | One hump per cycle, gaps in between | Very cheap, low-power circuits |
| Full bridge, single-phase | 4 | Two humps per cycle | Phone and robot chargers |
| Full bridge, three-phase | 6 | Six overlapping humps per cycle, nearly flat | Industrial kit, the big 3D printer on the slide |
Choosing a bridge from its datasheet: IF(AV) must be above your current with margin (the slide uses about 50%), and VRRM must be above the peak, 325 V, with margin. An 800 V part is typical for 230 V mains.
Capacitor smoothing and bridge heat
The humps still drop to 0 V. A capacitor across the output acts like a water tank: it fills at each peak, and the load drains it a little until the next hump tops it up. The dip is the ripple, ΔV. Meanwhile the two conducting diodes turn some power into heat, PD(FB).
Derivation: ripple ΔV = I / (2 × Fgrid × C)
- Time between refills: 2 humps per cycle × 50 cycles = 100 a second, so the gap is Δt = 1 / (2 × 50) = 10 ms.
- Charge drained in that gap: current is charge per second, so ΔQ = I × Δt.
- Voltage drop: a capacitor obeys Q = CV, so ΔV = ΔQ / C.
In words: dip = drain rate ÷ (refills per second × tank size). Bigger C, smaller ripple.
Derivation: the capacitor's top voltage VC,max = Vpk − 2VF
- The capacitor charges to the top of each hump.
- The top of the AC is Vpk = 325.3 V, but the current had to pass through two diodes to get there, each taking VF.
Derivation: bridge heat PD(FB) = 1.8 × VF × ID,RMS
- Power = voltage × current. A conducting diode has a fixed VF across it, so its power is VF × i at every instant.
- Average over time: VF is constant, so P = VF × (average current). Diodes use the average current. Resistors and MOSFETs use I²R with RMS.
- Two diodes are always on, so P = 2 × VF × Iavg.
- Convert to the RMS you're given: Iavg = 0.9 × IRMS (chapter 01).
The SKB 25 datasheet only gives VF = 2.2 V at a 150 A surge, so here it uses its threshold model, 0.85 V + 12 mΩ × I ≈ 0.87 V. Check which value your lecturer expects.
Switches: relay, SSR, BJT, MOSFET, IGBT
To control a motor you need a switch that can turn the power on and off, often thousands of times a second. A relay is a mechanical switch. The rest are transistors: a small control signal on one leg lets a large current flow through the other two. They differ in what the control signal is (a current or a voltage) and in how fast and how high-voltage they can go.
A small base current IB lets a large collector current IC flow, roughly IC = β × IB. The control needs continuous current, which wastes drive power. Each value of IB gives its own curve on the IC–VCE graph. NPN and PNP are biased opposite ways round.
The gate is insulated by a thin layer of glass (SiO₂), so almost no gate current flows. Raise the gate-to-source voltage VGS above the threshold VGS(th) and current flows drain → source. Fully on, it behaves like a small resistor, RDS(on).
| Switch | Controlled by | Good at | Weak at | Use it for |
|---|---|---|---|---|
| Relay (electromechanical) | Coil current moves a contact | Cheap, takes surges, true isolation, little heat, several poles | Slow, wears out, sparks and clicks, hates vibration | Occasional on/off of mains loads |
| SSR (solid-state relay) | Small input signal | Long life, fast, silent, no arcing, vibration-proof, tiny control power | Gets hot, costs more, leaks a little current, sensitive to surges | Frequent switching, heaters |
| BJT | Base current | Simple, cheap | Needs continuous drive current, slower | Small signals, older designs |
| MOSFET | Gate voltage | Very fast, easy to drive, low loss at low voltage | RDS(on) rises at high voltage ratings | Robots and motor drives below ~700 V |
| IGBT | Gate voltage (like a MOSFET) | Handles high voltage and current with BJT-like conduction | Slower switching | Above ~1000 V: trains, grid, big inverters |
IGBT in one line: a MOSFET's insulated gate driving a BJT's output stage. Same structure as a MOSFET plus an extra P layer underneath. Selection rule from the slides: MOSFET below about 700 V, IGBT above about 1000 V. In between, pick whichever best fits the size, efficiency and amps per pound.
| Reading a MOSFET datasheet | Section | IRFP140 | IRFP250 |
|---|---|---|---|
| VDSS, max voltage when off | Absolute maximum | 100 V | 200 V |
| ID, max continuous current | Absolute maximum | 31 A (22 A at 100 °C) | 30 A (21 A at 100 °C) |
| RDS(on) | Static | 0.077 Ω | 0.075 Ω |
| td(on) / tr | Dynamic | 11 / 44 ns | 14 / 43 ns |
| td(off) / tf | Dynamic | 53 / 43 ns | 41 / 33 ns |
| RthJC / RthCS / RthJA | Thermal | 0.83 / 0.24 / 40 °C/W | 0.7 / 0.24 / 40 °C/W |
PWM: controlling power by switching fast
A MOSFET is either fully on or fully off. To give a motor half power, switch it on for half of each cycle, thousands of times a second. The motor is too slow to notice the flicker and responds to the average. That's pulse width modulation.
MOSFET power loss
A MOSFET wastes power in two separate ways. While it's fully on, current flows through its small resistance RDS(on): that's conduction loss. While it's switching, for a few nanoseconds there's a big voltage across it and a big current through it at the same time: that's switching loss. It happens twice per cycle, so it scales with frequency.
Off: full voltage, no current, no loss. On: full current but tiny voltage (I × RDS(on)), small loss. The red spikes are where both are big together.
Derivation: conduction loss Pcond = RDS(on) × ID²
- Fully on, the MOSFET is just a resistor of value RDS(on).
- Power in a resistor = I²R (or equivalently V × I with V = I × RDS(on)).
Because of the square, double the current gives four times the conduction loss. That's why high-power systems use higher voltages, and why MOSFETs are put in parallel to share current.
Derivation: switching energy E = (VDD × ID / 2) × time
- Look at the turn-on in the graph. First the current climbs from 0 to ID while the voltage is still at VDD. Then the voltage falls to almost 0 while the current stays at ID.
- In each part, power = V × I rises from 0 to VDD × ID or falls back. It's a triangle on the power graph.
- Energy = area under the power graph. A triangle's area is ½ × height × width, so across the whole switching time t:
- The datasheet gives the turn-on time in two parts, delay + rise; turn-off is delay + fall:
- This happens once on and once off every cycle, FSW times a second. Energy per second is power:
The full formula on the slide also has a Qrr × VDD term for the diode's recovery charge. It's ignored in these problems.
| Common slip | Fix |
|---|---|
| Squaring the wrong number in Pcond | Square the current only: 10 A → 100, not 100 → 10 000 |
| Forgetting nanoseconds | ns = × 10⁻⁹. Miss it and the answer is a billion times too big |
| Adding the wrong times | On = td(on) + tr. Off = td(off) + tf |
| kHz | 13 kHz = 13 000 Hz |
| Mixing numbers between questions | Sanity check: the loss can never be more than VDD × ID |
Heat, thermal resistance and heatsinks
Every watt of loss becomes heat inside the silicon junction. It has to flow out through the case, into a heatsink, then into the air. Each step resists the flow. Treat it exactly like Ohm's law: heat flow is current, temperature is voltage, thermal resistance is resistance.
| Electrical | Thermal |
|---|---|
| Current I (A) | Heat flow P (W) |
| Voltage difference V (V) | Temperature difference ΔT (°C) |
| Resistance R (Ω) | Thermal resistance Rth (°C/W) |
| V = I × R | ΔT = P × Rth |
| Resistors in series add | Rth1 + Rth2 + Rth3 |
Derivation: junction temperature, working outwards from the air
- The same heat P flows through every step, like current through series resistors.
- Each step adds ΔT = P × Rth. Start from the air, which you know, and climb:
- Limits: the absolute max TJ is 175 °C. Design for 100–120 °C and never above 120 °C.
- Safety margin compares TJ with 175 °C. The target is at least 30%:
Derivation: sizing a heatsink, Rth3
- Rearrange the line above for the one resistance you get to choose:
- Pick your target TJ (100 or 120 °C), put in P and the two datasheet values, and you get the largest Rth3 allowed. Choose a heatsink at or below it. A lower °C/W means a bigger heatsink.
- If the answer is negative: even a perfect heatsink (Rth3 = 0) can't keep it cool, because Rth1 + Rth2 alone already make it too hot. Fixes: a better thermal interface (grease, 0.24, instead of an insulating pad), less loss (lower FSW, a lower-RDS(on) part, MOSFETs in parallel), lower ambient, or forced air or liquid cooling.
DC/DC converters: buck, boost, buck-boost
A battery gives one voltage, but a robot needs several (motors, logic, sensors). A DC/DC converter chops the input with a MOSFET (PWM), then smooths it with an inductor (stores energy in current) and a capacitor (stores energy in voltage). The duty cycle D sets the output.
Derivation: why buck gives D × Vin and boost gives Vin / (1 − D)
- The key fact: in steady state, the inductor's average voltage over a cycle must be zero. If it weren't, its current would keep growing forever. So (voltage × time while on) + (voltage × time while off) = 0. This is called volt-second balance.
- Buck, switch on for D × T: the inductor sits between Vin and Vout, so VL = Vin − Vout.
Buck, switch off for (1 − D) × T: the diode connects it to ground, so VL = −Vout.
- Boost, switch on: the inductor is straight across the battery, VL = Vin.
Boost, switch off: it sits between Vin and Vout, VL = Vin − Vout (negative).
Derivation: sizing the buck's inductor and capacitor
- Inductor: V = L × (change in current ÷ time). While off, VL = Vout for a time (1 − D)/FSW, and the current changes by ΔIL. Rearrange for L:
- Capacitor: it absorbs the inductor's triangle-shaped ripple current. The charge in one half of that triangle sets the voltage ripple:
Slide check: for 24 V → 12 V at 10 A, 25 kHz, D = 0.5 and 10% ripple, the slide puts 24 V in the L formula and gets 480 µH. The formula says Vout = 12 V, which gives 240 µH. The calculator shows both. Ask which he wants.
| Transformer-less (buck, boost) | Transformer-based (isolated) | |
|---|---|---|
| How | Switch, inductor, capacitor | DC → high-frequency AC → transformer → rectify back to DC |
| Galvanic isolation | No: faults pass straight to the load | Yes: protects the user and load |
| Efficiency | 90–98% | 80–95% |
| Cost, size | Low, small, light | Higher, bulkier |
| Voltage ratio | Low to moderate | Extreme step-up or step-down |
| Outputs | One | One or several |
Buck-boost goes either way, which is useful when a battery sags below the output voltage as it drains. The 4-switch version is common. Synchronous designs replace the diode with a second MOSFET for less loss. To design one you need Vin,min, Vin,max, Vout, Iout,max and the controller IC.
Motor drives: brushed, brushless, stepper
The last link: switches arranged so the motor gets the right voltage, polarity and timing. PWM sets the speed. The arrangement of switches sets the direction (and for brushless motors, which coil is energised).
| Brushed DC drive | What it does |
|---|---|
| Single switch (class A chopper) | One MOSFET with PWM. Speed control, one direction only |
| H-bridge (full bridge) | Four switches. Diagonal pairs reverse the polarity, so both directions |
| Current limiting | The driver must carry the continuous armature current, and should limit it so a stalled motor doesn't overheat |
Three half-bridges, one per motor phase (U, V, W). Switching them in sequence makes a rotating magnetic field that drags the magnet rotor round. No brushes, so less wear and higher efficiency. These are the slide's formulas:
The last one has a √2 because each transistor only carries its phase's current half the time. RMS goes as the square root of the on-time, and √½ = 1/√2. That ID,RMS is what you'd put into the MOSFET loss calculation in chapter 06.
| Stepper motor | Coils | Driver needs |
|---|---|---|
| Bipolar | Two separate coils | Two H-bridges (4 half-bridges), to reverse current in each coil |
| Unipolar | Centre-tapped coils | Simple low-side switches that pull each half-coil to ground in turn |
| Both | PWM chopping: measure the coil current and switch off the instant it hits the rated limit |
Formula sheet and checklist
| Want | Formula | Chapter |
|---|---|---|
| Peak from RMS | Vpk = √2 × VRMS | 01 |
| Average from peak / RMS | Vavg = 0.637 Vpk = 0.9 VRMS | 01 |
| Bridge heat | PD(FB) = 1.8 × VF × ID,RMS | 03 |
| Capacitor top voltage | VC,max = Vpk − 2VF | 03 |
| Ripple | ΔV = I / (2 × Fgrid × C) | 03 |
| PWM average | Vavg = D × VDD, D = ton/T | 05 |
| Conduction loss | Pcond = RDS(on) × ID² | 06 |
| Switching energies | EON = (VDDID/2)(td(on) + tr) · EOFF = (VDDID/2)(td(off) + tf) | 06 |
| Switching loss, total | PSW = (EON + EOFF) × FSW · PMOSFET = Pcond + PSW | 06 |
| Junction temperature | TJ = Tamb + P(Rth1 + Rth2 + Rth3) | 07 |
| Heatsink needed | Rth3 = (TJ − Tamb)/P − (Rth1 + Rth2) | 07 |
| Safety margin | 100 − (TJ/175) × 100, aim ≥ 30% | 07 |
| Buck / boost | Vout = D Vin · Vout = Vin/(1 − D) | 08 |
| Buck L and C | L = Vout(1 − D)/(FSW ΔIL) · C ≥ ΔIL/(8 FSW ΔV) | 08 |
| 3-phase drive | Iphase = Pout/(√3 VL cos φ η) · ID,RMS = Iphase/√2 | 09 |
- convert between peak, RMS and average, and explain why the bridge must survive 325 V?
- trace the current through a bridge on each half-cycle and say which diodes are on?
- work out a bridge's heat, VC,max and ripple, and check its ratings from the datasheet?
- say what controls a BJT, a MOSFET and an IGBT, and when to pick each? Relay vs SSR?
- use the duty cycle to find a PWM average voltage?
- read RDS(on) and the four switching times from a datasheet and calculate PMOSFET?
- explain why low frequency means conduction loss dominates and high frequency means switching loss catches up?
- find TJ and the safety margin, size a heatsink, and explain a negative Rth3?
- derive and use the buck and boost equations, and size L and C?
- pick a drive for brushed (H-bridge), brushless (3-phase inverter) and stepper motors?