Learn electronics, one idea at a time
Short, plain-English guides to the ideas every electronics course is built on. Each one has a live experiment to play with, and leads into a free lesson where you build it yourself in the simulator.
Electronics
- What is electricity?Charge on the move: conductors, insulators and why a circuit has to go all the way round.
- What is voltage?The push that makes charge flow: what a volt is, and why stacked cells add up.
- What is electric current?How much charge flows past a point each second, in amps, and why it's the same all round a loop.
- What is resistance?The squeeze on the flow, in ohms: how resistors set the current and protect an LED.
- Ohm's law explainedV = I × R: set any two of voltage, current and resistance and the third follows.
- Electrical power explained: P = V × IP = V × I: how fast energy turns into heat, and why a resistor has a power rating.
- Build an LED flashlight circuitThree cells, a switch, a resistor and a white LED: a whole flashlight, worked out on paper first.
- How to wire LEDs in seriesOne path, one current: subtract every LED's drop, then size a single resistor for the string.
- Current divider rule explainedHow a current shares itself between parallel branches, and why the smaller resistor takes the bigger share.
- Series vs parallel circuitsOne path or many: what stays the same, what adds up, and how to combine resistors.
- How to use a multimeterVolts across, amps in the loop: where the probes go, and the one mistake that blows the fuse.
- Kirchhoff's laws explained: KCL and KVLWhat flows into a junction flows out, and the drops round a loop add up to the rise.
- Kirchhoff's voltage law (KVL) examplesRound any loop the drops add up to the rise: four worked examples, from LEDs to chargers.
- How to calculate equivalent resistanceShrink any series-parallel network to one resistor, one step at a time, and spot what's really in parallel.
- Thevenin's theorem explainedAny network of sources and resistors, seen from two terminals, is one battery behind one resistor.
- Voltage divider explainedTwo resistors that split a voltage: the formula, potentiometers, and why a load drags the output down.
- How to measure a 12 V battery with a voltage dividerScale 12 V down to 4 V for a meter or a microcontroller, without draining the battery.
- How does a capacitor work?Two plates and a gap: how a capacitor stores charge and energy, and why it blocks steady DC.
- RC time constant explainedτ = R × C: how long a capacitor takes to charge through a resistor, and the 63% rule.
- Capacitor discharge explainedFast at first, then slower: the 37% rule, the formula, and how long a capacitor takes to empty.
- How does an inductor work?A coil that fights changes in its current, the high-voltage spike it makes, and how to tame it.
- RL circuit time constant explainedHow fast a coil's current builds: τ = L ÷ R, and why more resistance speeds it up.
- Build a capacitor timer that keeps an LED litHold a button, let go, and a capacitor keeps an LED glowing for about 15 seconds. No transistor needed.
- AC voltage and RMS explainedPeak, period, frequency and RMS: the numbers that describe an AC sine wave.
- Capacitive and inductive reactance explainedWhy a capacitor passes treble and a coil passes bass: X_C, X_L and Ohm's law for AC.
- What is impedance?Resistance and reactance combined: why 3 kΩ and 4 kΩ make 5 kΩ, and what phase means.
- High-pass filter explainedA capacitor in series that blocks DC and the bass, passes the treble, and couples audio between stages.
- Low-pass filter explainedA resistor and a capacitor that pass the bass and fade the treble, and where the cutoff sits.
- How to read a Bode plotGain in decibels against frequency on a log scale: corners, −3 dB and 20 dB per decade.
- LC resonant frequency explainedA coil and a capacitor swapping energy at one frequency: f₀ = 1 ÷ (2π√(LC)), tanks and tuning.
- How to design a 2-way speaker crossoverA coil sends the bass to the woofer, a capacitor sends the treble to the tweeter: sized for 2 kHz.
- How does a diode work?A one-way valve for current: anode, cathode, the 0.7 V forward drop and Schottky diodes.
- Half-wave vs full-wave bridge rectifiersFour diodes that turn AC into DC, a capacitor that fills the dips, and how to size it for your ripple.
- How does a Zener diode work?A diode built to conduct backwards at a set voltage, then hold it: the simplest regulator.
- How to wire an LDR (photoresistor)A light-dependent resistor makes no voltage by itself: a divider turns its resistance into one you can read.
- Transistor as a switch, explainedA trickle into the base switches a big current: cutoff, saturation and the base resistor.
- MOSFET as a switch, explainedA gate voltage, not a current, opens the channel: threshold, R_DS(on) and the flyback diode.
- Build an automatic night light with an LDR and a MOSFETA light sensor, one resistor and a MOSFET: a light that turns itself on at dusk and sips under 1 mA by day.
- Op-amp comparator explainedTwo inputs, one decision: the output slams high or low the moment one input passes the other.
- Comparator hysteresis and the Schmitt triggerTwo thresholds instead of one: how a feedback resistor stops a comparator chattering on a noisy signal.
- Voltage follower explainedAn op-amp whose output copies its input, so a weak source can drive a heavy load without sagging.
- Non-inverting amplifier explainedAn op-amp, two resistors and gain G = 1 + R_f ÷ R_g: bigger, in step, and clipped at the rails.
- Op-amp inverting amplifier explainedSignal into the − input through a resistor: a bigger copy, upside down, with gain −R_f ÷ R_in.
- Op-amp summing amplifier explainedSeveral inputs into one virtual ground: an op-amp that adds signals, each with its own gain.
- Op-amp slew rate explainedThe fastest an op-amp's output can move, in volts per microsecond, and why it bends big, fast waves.
- How to build a microphone preamp with an op-ampTurn a 20 mV microphone into a 2 V signal from one 9 V battery: bias, coupling and 40 dB of gain.
- Logic levels: what voltage is a 1, and what is a 0?Two wide bands of voltage, a gap between them, and why that makes digital signals shrug off noise.
- Boolean algebra rules, with worked examplesThe handful of laws that simplify any logic expression, and how to turn a truth table into gates.
- How to add binary numbersColumn by column, right to left, carrying when two 1s meet: the same sum every adder chip does.
- Combinational vs sequential logicGates that only look at now, and circuits that remember: where feedback, latches and clocks come in.
- Build a 2-bit adding machine from gates and flip-flopsFour gates and two flip-flops that add on every clock tick: wired, tested and explained.
- What is a microcontroller?A tiny computer on one chip that reads buttons and sensors and switches lights and motors.
- How much current can an Arduino pin supply?About 20 mA per pin: what that runs, what it doesn't, and how a transistor takes the load.
- Arduino analogWrite values: from percent to 0–255analogWrite counts to 255, not 100: turning a percentage into a value, and what the LED really gets.
- How to measure a voltage with an ArduinoFrom analogRead's count to volts you can trust: the sum, a divider for big voltages, and the reference.
- Arduino traffic light project with a crossing buttonGreen, yellow, red and a button that's remembered: a traffic light written as a state machine.
Embedded Systems
- How to debounce a button on ArduinoWhy one press counts as four, and the 50 ms fixes that make it count once.
- millis() vs delay() on ArduinoWhy delay() freezes your sketch, and how millis() runs several jobs at once.
- Arduino setup() and loop() explainedsetup() runs once, loop() runs forever: the two halves of every Arduino sketch.
- The Arduino Blink sketch, explained line by lineFour lines that blink an LED, the sum behind the blink rate, and what happens when it's too fast to see.
- What resistor does an LED need on an Arduino?220 Ω or 330 Ω? Work out the LED's current from a 5 V pin, colour by colour.
- What is a pull-up resistor?Why an input pin needs a pull-up, and why a pressed button reads LOW.
- How does PWM work?How a pin that's only on or off dims an LED: duty cycle and analogWrite's 0–255.
- How Arduino analogRead worksHow analogRead turns 0–5 V into 0–1023, and how to scale it for analogWrite.
- Build an Arduino night lamp with a button and a dimmerOne press on, one press off, and a knob for brightness: toggling, debouncing and analogWrite in one sketch.
- How to blink an LED without delay() on ArduinoBlink an LED with millis() so loop() stays free for every other job.
- How to do two things at once on an ArduinoNo threads, no waiting: a loop() that glances at every job thousands of times a second.
- How to count button presses on an ArduinoCount the change, not the hold, keep the count above setup(), and use % for every Nth press.
- How to make a stopwatch with Arduino and millis()Note the time, subtract later: a one-button stopwatch, and how to print the answer nicely.
- How to make an Arduino LED chaser with an arrayA list of pins and one for loop: chase lights, a back-and-forth scanner, and arrays that count from 0.
- How to cycle through modes with one button on ArduinoOne button, one number, one rule per mode: how torches, fans and bike lights step through settings.
- Build an Arduino metronome with millis()60,000 ÷ BPM, a start button and a 50 ms flash: a metronome that keeps time without delay().
- How to use a photoresistor (LDR) with ArduinoLight in, number out: an LDR, a divider and analogRead.
- What is hysteresis, and how does it stop flicker?On below one line, off above another: the gap that stops a noisy reading flickering.
- How to make an LED bar graph with ArduinoA reading in, a row of lights out: percent, whole-number division and one line in a for loop.
- How to measure temperature with a thermistor and ArduinoAn NTC thermistor, a divider and two ways to turn readings into degrees.
- How to switch a big load from an Arduino with a transistorThe pin turns the tap, the supply does the work: an NPN switch, its base resistor and the numbers.
- How the Arduino map() function worksRescale a reading from one range to another, and the traps that come with it.
- Build an Arduino greenhouse controller with hysteresisTwo sensors, two outputs, two gaps: a grow light and a heater that switch cleanly and report each change.
Robotics
- How a two-wheeled robot steers and sets its speedHow a two-wheeled robot turns with no steering wheel, and how PWM sets each motor's speed.
- How a line follower robot worksTwo eyes, a threshold and three rules, then smoother steering in proportion.
- How to make a robot bump and turn with a bumper switchA switch on the nose, LOW on a bump, and a four-step escape: stop, pause, pivot, go.
- How to soft start a motor with a PWM rampCount the speed up in small steps instead of jumping to full, and the robot glides away.
- How to write Arduino robot code without delay()Swap the waits for a glance at the clock, and the robot hears its bumper mid-leg.
- How to make an Arduino toggle button (a robot kill switch)One press stops, the next press goes: an edge, a bool, and a stop that always wins.
- Build an Arduino line follower: eyes, knob, kill switchTwo eyes on the floor, a knob for speed and a button that stops everything, in one loop.
- How to tune a line follower's proportional steeringSteer by how far off the line you are, not just which side, and the zigzag turns into a glide.
- How a wall following robot keeps its distanceOne sensor on the side, an error from the distance you want, and a lean in proportion.
- How a wheel encoder measures distanceCount the notches as the wheel turns, and you know how far the robot went.
- How a robot can tell it's stuck, with an encoderMotors on and no ticks coming means the wheels aren't turning: back off and try again.
- How to turn a robot 90 degrees with encoder ticksA turn timed with delay() changes with the floor. A turn counted in ticks doesn't.
- How to drive a robot route from a list of movesKeep the route in an array and the code that drives it never has to change.
- Build a delivery robot: follow, count, stop on a bumpFollow the line, count the ticks to the drop point, and stop dead if anything gets in the way.
- How to make a two-wheeled robot drive straightEqual speeds don't mean straight. Measure each wheel and correct the difference.
- How to turn a robot exactly 90° with a gyroA gyro gives degrees per second. Add up rate × time and you know how far you've turned.
- How a robot knows where it is with dead reckoningAdd up every step in the direction you face, and you know where you are, roughly.
- How a robot drives itself to a waypointGive the robot a point, not a route: it decides which way to go again on every pass.
- How an obstacle-avoiding robot worksLook ahead, slow down near walls, and turn away with a gap between the thresholds.
- How to program a robot as a state machineOne state at a time, each with its own job and its own ways out.
- Build a sumo robot: states, an edge rule and a gyro turnSpin to find the opponent, charge, and back off the instant an eye sees the white edge.
Computer Architecture
- Half adder vs full adderA half adder adds two bits; a full adder adds the carry too, so they chain.
- What is an ALU, and how does it work?Work out every answer at once, then let the opcode pick one: the heart of a CPU.
- How a binary decoder worksTurn a binary code into exactly one lit line: how a CPU decodes its instructions.
- How a register holds a value until it's told to loadA flip-flop with a picker in front: load when told, keep what you have the rest of the time.
- What is a T flip-flop, and how do you make one?A flip-flop that flips: feed it its own opposite and every tick takes the other value.
- How a digital equality comparator worksOne XNOR per bit asks whether it matches; an AND says yes only if every bit does.
- Build a 2-bit register: two flip-flops, one LOADTwo register bits, one LOAD, one clock: the storage that becomes a CPU's accumulator.
- How a shift register worksFlip-flops in a chain that pass bits along: serial in, parallel out.
- Synchronous vs asynchronous countersBits that wait for each other, or bits that change on the same tick.
- Synchronous vs asynchronous reset in digital logicClear every flip-flop to a known start: through the clock on the next tick, or at once on its own pin.
- What does the program counter do in a CPU?The register that says which instruction comes next, and how jumps make loops.
- What is an accumulator in a CPU?An adder in front of a register, fed back on itself: the running total at the heart of early CPUs.
- The fetch-decode-execute cycle explainedFetch an instruction, decode it, carry it out, repeat: how every CPU runs.
- How to build a program counter from flip-flops and gatesTwo flip-flops and eleven gates that count, jump on LOAD and clear on RESET.
- What are CPU flags? Zero, carry and the status registerOne-bit facts about the last answer, like zero or too big, that the next instruction uses to decide.
- How a countdown circuit counts down and stops at zeroLoad a number, take one away each tick, and let a zero flag stop the count by itself.
- How a CPU's register file worksSeveral registers on one data line, and a decoder that makes sure only the named one takes each write.
- How does ROM work? Read-only memory explainedA decoder picks one word line, and OR gates turn its connections into the stored number.
- How a conditional jump makes a loopJump back while the last answer wasn't zero, fall through when it is: every loop ends like this.
- How an output port works, from flip-flop to PORTBA register whose bit leaves the chip: written by one instruction, held until the next.
- Build a simple CPU from logic gates: a countdown computerFour flip-flops and a dozen gates that run LDI 3, DEC, JNZ 1, HALT and count down by themselves.
PCB Design
- PCB trace width for currentCount the squares: how a trace's width sets its ohms, its voltage drop and its heat, and how wide to draw it.
- Why a narrow neck in a PCB trace gets hotEvery amp goes through the narrow bit, so that's where the ohms are and where the heat goes.
- What is a decoupling capacitor?Why every chip has a capacitor beside its power pins, how big, and why it must be close.
- Star grounding explainedGive each load its own return to one point, so a big current never flows through a sensitive circuit's ground.
- What causes crosstalk between PCB traces?Two traces side by side are a capacitor you never placed. Fast signals go straight through it.
- How many vias do you need for a high current?One via is a pinhole. Several side by side share the current, and each one's heat falls with the square.
- Lay out a motor PCB: three copper fixesA wide neck, a capacitor where the current is needed, and a ground the motor can't lift.
- Daisy chain vs star power distributionWhy the last load on a shared power trace sags, and how a star layout stops loads browning each other out.
- Kelvin (4-wire) sensing explainedMeasure a shunt's voltage right at its own pads, so the copper either side can't add to the reading.
- How to protect an input pin with a zener clampA resistor and a zener at the connector: the chip sees −0.7 to 5.1 V whatever the cable brings.
- How a series termination resistor stops ringingOne resistor at the driver turns a ringing, overshooting clock edge into a clean one.
- How to filter noise on an ADC input with an RC filterOne resistor and one capacitor at the pin: the slow sensor signal through, the switching noise to ground.
- Schottky diode vs silicon diode: which should you use?Half the forward drop and half the heat, paid for in leakage and voltage rating.
- Build a sensor board: three copper decisions that matterA power rail, a current shunt and a noisy sensor line on one board, laid out so every reading is true.
- How to calculate junction temperatureHeat flows like current: watts through °C/W give a temperature rise, so size the copper before it cooks.
- What is a thermal relief on a PCB?Thin spokes instead of solid copper, so the iron can heat the pad faster than the plane drains it.
- What is a ground plane on a PCB?A whole layer of copper for ground: milliohms for steady current, about a nanohenry for fast current.
- How to choose a fuse so the right thing burnsCool at the working current, first to fail in a fault, and in front of everything it protects.
- How to terminate a trace at the receiving endA matched resistor at the pin soaks up each edge. Add a capacitor and it stops wasting current.
- Should you split a ground plane? AGND, DGND and one bridgeNoisy and quiet grounds, joined once: two bridges make a loop, and none leaves the sensor stranded.
- Design a USB LED desk lamp board: safe, quiet and coolThree checks before you order: a fuse that blows only in a short, one ground bridge, and vias for the heat.
Signals & Wireless (RF)
- How an LC band-pass filter picks one stationA coil and a capacitor in the signal's path cancel at one frequency, and fight every other.
- How to filter a transmitter's harmonics with an LC low-passA coil in the path and a capacitor to ground: the signal passes, its overtones don't.
- Decibels explaineddB as a ratio on a log scale: 10 log for power, 20 log for voltage, and why gains just add.
- Impedance matching explainedA load takes the most power when its resistance equals the source's: why radio is 50 Ω, and how to match.
- How to calculate antenna lengthWavelength is c ÷ f: a quarter of it makes a good antenna, and a loading coil tunes one that's too short.
- How an envelope detector works, and how to pick R and CA diode lets the peaks through, a capacitor joins them up, and the outline is the sound.
- Build a crystal radio: tank, diode and earpieceAn antenna, a tuned tank, a diode and an earpiece: a radio powered by the station itself.
- How an LC notch filter removes one frequencyA coil and a capacitor from the line to ground: a short for one frequency, nearly nothing for the rest.
- How an RC circuit shifts phase, and how to get 90°An RC leg makes its output trail the input: 45° at the corner, and never quite 90°.
- Op-amp gain-bandwidth product explainedGain times bandwidth stays fixed: ask an op-amp for more gain and its corner frequency falls.
- How an op-amp relaxation oscillator worksA comparator, two thresholds and a charging capacitor: a square wave from nothing but a supply.
- How to convert a square wave to a sine waveA square wave is a sine with odd harmonics on top. Filter them out and the sine is left.
- How a mixer makes a new frequency from twoTwo tones in, their difference out: the trick behind nearly every radio receiver since the 1920s.
- Build a receiver front end: trap, amplifier, band-passThree stages between the antenna and the radio: trap the interferer, amplify the station, pass only its band.
- Amplitude modulation (AM) explainedTurn a carrier's height up and down with a voice: modulation depth, sidebands, and why past 100% it tears.
- Q factor and bandwidth: how wide a tuned circuit passesL × C sets where the band sits; L against R sets how wide. Wide enough for the voice, no wider.
- How AM demodulation gets the voice backFollow the tops of the carrier, keep the swing, lose the steady level: that's the voice.
- What is frequency-shift keying (FSK)?A low note for 0, a high note for 1: read bits by pitch, so fading can't fool you.
- How a radio receiver turns a signal into clean bitsA comparator and a halfway threshold, read in the middle of every bit: rounded radio becomes clean 1s and 0s.
- How to calculate a radio link budgetAdd up every gain and loss in decibels. If what arrives beats what the receiver needs, the link works.
- Build a wireless doorbell: tune, amplify, detect, switchA one-bit radio link: tune out the neighbour, win back the path, and light the chime while the button's held.
Control Systems
- Open-loop vs closed-loop controlSet and hope, or measure and correct: the idea behind every controller.
- What is proportional control?Push hard when far away and gently when close: thrust = 9.8 + Kp × error on a live drone.
- Why too much proportional gain causes overshootTurn the gain up and it arrives sooner, until it flies past the target and swings.
- PID control explainedWhat the P, I and D terms each do, shown on a drone climbing to 10 m.
- What is steady-state error, and how does the I term fix it?A loaded drone hangs a quarter metre low on P alone. Add up the error and it climbs home.
- What is disturbance rejection in control?A gust knocks the drone down. The loop never saw it coming, and doesn't need to.
- Build a drone altitude hold with PID: climb, step, gustOne PID loop that climbs, moves on command and rides out a gust, with a parcel on board.
- Why time delay makes a control loop oscillateA controller steering on old news pushes too late, and late pushes feed the swing.
- How a PD controller damps oscillationA push against how fast the error is changing: the shock absorber that lets a loop arrive fast and stop.
- What is feedforward control?Put in what you already know the system needs, and let feedback fix the rest.
- What is integral windup, and how do you stop it?When the motors max out, the I term keeps counting, and pays it back as overshoot.
- How to filter the derivative term in a PID controllerThe D term turns half a metre of sensor noise into a hundred units of thrust. One line of code calms it.
- How fast should a control loop run?A controller that runs too rarely holds stale commands, and a D term with the wrong time step kicks too hard.
- Build an autopilot for a drone with a late, noisy sensorFour parts, each fixing one problem: feedforward, P, a filtered D and a clamped I.
- Bang-bang (on-off) control vs PIDFully on or fully off: the thermostat's controller, its band, and its limits.
- How to hold a motor's speed with an encoder and PICount ticks for rpm, add the drive you expect, and let P and I fix the rest, hill or no hill.
- What is cascade control?An outer loop orders a speed, an inner loop delivers it: two jobs, two loops.
- How a trapezoidal motion profile worksPlan the speed, not just the goal: a gentle start, a cruise, and braking just in time.
- How to tune a PID controller with Ziegler-NicholsFind the gain where it swings for ever, time the swing, and apply the recipe.
- How a self-balancing robot stays uprightBeat gravity's pull per degree, brake the swing, and a stick stands up.
- Build a self-balancing robot: balance, lean and rampBalance on a lean, lean to move, and ramp the command: three loops that carry a coffee a metre.
Digital Logic
- Logic gates explainedAND, OR, NOT, XOR and their bubbled twins: each one's rule is a truth table.
- How a binary counter divides a clock by 2, 4, 8 and 16Flip-flops that toggle, chained: each one halves the clock, together they count.
- Binary numbers explainedPlaces worth 1, 2, 4 and 8: add up the bits that are on, and four wires count to 15.
- AND and NOT gates explainedAND needs every input at 1; NOT flips its one input. Together they build safety interlocks and masks.
- How to make a truth tableEvery input combination and its output: the complete, unarguable description of a logic circuit.
- How to turn a logic expression into a gate circuitFrom 'key and either pedal' to two gates in a chain: build the brackets first, the outside last.
- What is an XOR gate?1 when the inputs differ, 0 when they match: the gate behind stair lights, adders and parity bits.
- How a D flip-flop worksCopy D to Q at the clock's rising edge, then hold it: one bit of memory.
- Build a digital combination lock with logic gatesFour switches, one NOT and three ANDs: a lock that opens for one setting out of sixteen.
- Why is NAND called a universal gate?NOT, AND, OR and XOR from one kind of gate, and why chips love it.
- De Morgan's laws explainedPush a NOT through a gate: every input flips and AND swaps with OR.
- How a 2-out-of-3 majority voter circuit worksThree inputs, and whatever two of them say wins: how systems keep working when one part lies.
- What is a parity bit?One extra bit that makes the count of 1s even, so a single flip shows up.
- What is Gray code, and why do encoders use it?A count where only one bit changes per step, and why encoders depend on it.
- How an SR latch remembers a bitTwo cross-coupled gates that hold a 1 or a 0, and the D latch built on them.
- Build a latching alarm with a voter and a NOR latchIgnore one false sensor, trip on two, stay tripped until someone presses RESET: seven gates.
- Why a flip-flop clock divider gives a 50% duty cycleHalve a clock with one flip-flop and the output is a perfect square wave, however lopsided the input.
- What is ones' complement? Flip the bits, get the max minus nFlip every bit and you get the biggest number minus the one you started with. A counter does it for free.
- How to make a binary counter stop at any numberSpot the number with a NAND, hold the first flip-flop with an XOR, and the whole counter stops.
- How to debounce a switch in hardware with flip-flopsLook at the button less often than it bounces, and twice in a row, and one press is one press.
- How a rising edge detector turns a press into one pulseNow AND NOT a tick ago: one pulse per press, however long the button is held.
- How a Johnson counter worksA shift register with a twist: it fills with 1s, empties again, and steps through 2n states.
- Build a traffic light circuit from flip-flops and gatesFour flip-flops and two gates run red, red and amber, green, amber, for ever, with no program at all.
Power & Energy
- Bulbs in series vs parallel: which shines brighter?Side by side, each lamp gets the full voltage. In a row they share it, and get a quarter of the watts.
- Batteries in series vs parallelChain cells for more volts, put them side by side for more hours, and never mix a tired one with a fresh one.
- Different-voltage batteries in parallel: what happens?Side by side, matched batteries share the load. Mismatched, one pours current into the other.
- How to calculate voltage drop in a wireA wire is a resistor: how many volts a cable steals, the heat it makes, and why the grid runs at high voltage.
- Energy stored in a capacitorE = ½ × C × V²: how many joules a capacitor holds, why voltage counts double, and how much you can use.
- Why does my zener regulator's voltage drop?A zener can only burn off what's left over. Starve it and the voltage follows the battery down.
- Build a battery LED camp lamp with a fade-outFour cells, two white LEDs, a resistor each and a big capacitor, so the light fades instead of snapping off.
- How does a linear voltage regulator work?A zener sets the voltage and a pass transistor carries the current: the circuit inside every 7805 and LDO.
- Linear regulator vs buck converterBrakes or gears: a linear regulator burns the spare volts, a buck trades them for amps. When each wins.
- How does a buck converter work?Switch, coil, diode and capacitor: the step-down converter that halves a voltage with almost no heat.
- How to choose a buck converter's inductor and capacitorPick the coil first so its current never runs dry, then the capacitor for the ripple you can accept.
- How does a boost converter work?A coil fills from the battery, then kicks into the output: how a switch makes more volts than it started with.
- How does a charge pump work?Two capacitors and two diodes that lift a square wave into a higher voltage, or flip it below ground.
- Build a clean 5 V rail: a buck, then a linear regulatorThe buck does the heavy lifting efficiently; the regulator after it irons out what's left.
- How to calculate battery life from mAhRuntime = capacity ÷ current: mAh, watt-hours, C-rate, and why real batteries give a little less.
- How to charge a lithium-ion batteryConstant current, then constant voltage at 4.2 V: the two-stage curve every lithium charger follows.
- Reverse polarity protection explainedStop a backwards battery wrecking a circuit: the simple diode, and the MOSFET trick that costs almost nothing.
- How a low-voltage cutoff protects a lithium cellA comparator watches the cell against a steady reference and switches the load off at 3.0 V.
- Where does a solar panel give its most power?Shorted it gives amps, open it gives volts, and only the knee in between gives watts.
- How to calculate efficiency and find a circuit's lossesEvery watt that doesn't arrive becomes heat in some part. Find the biggest loss and fix it first.
- Build a solar power bank: charge, hold, run and cut offCharge from the sun without overcharging, run a lamp after dark, and stop before the cell is harmed.
Sensors & Signal Processing
- How a moving average filter smooths a noisy sensorAverage 16 readings for a quarter of the noise, and know what it costs.
- How an exponential moving average filter worksNudge a running value a fraction of the way toward each reading.
- How to detect a sudden change in a sensor readingWatch how fast the reading moves, not where it is, and a knock stands out from a drift.
- How to make a peak hold meter in codeCatch the loudest moment, hold it long enough to see, then let it fall for the next one.
- How a median filter removes spikes from a sensorSort three readings and keep the middle one: a lone spike never gets a say.
- How to integrate a sensor reading into a running totalAdd the rate up every sample and you get the total: rain, energy, distance, flow.
- Build an Arduino shake alarm: catch the jolt, latch itAverage the noise away, catch the jolt, and keep the alarm on until someone presses reset.
- How to calibrate a sensor with two known pointsTwo known readings fix a straight line: where it starts and how steep it is.
- How to linearise a sensor with a lookup tableEleven measured points and a straight line between neighbours: a curved sensor that reads true.
- How oversampling adds resolution to an ADCAverage enough noisy readings and a 10-bit converter reads like a 14-bit one, for slow signals.
- How a complementary filter blends a gyro and accelerometerTrust the gyro for quick moves and the accelerometer for the long run.
- How to detect a failed sensor in codeA dead sensor still gives numbers. A few lines of checks stop your code believing them.
- Build a digital level: calibrate the gyro, then fuseOne still second to measure the gyro's error, then a complementary filter that reads tilt calmly and truly.
- What is aliasing, and what is the Nyquist rate?Sample too slowly and a fast wheel seems to crawl backwards.
- How to measure a signal's frequency with ArduinoCount the rising crossings in a second, or time one wave: just count edges, never levels.
- First-order vs second-order low-pass filters, in codeOne filter passes a tenth of a wave ten times past its cutoff. Two in a row pass a hundredth.
- How to remove a drifting baseline from a sensor signalSubtract a slow running average from the reading, and only the quick changes are left.
- How to measure loudness with an envelope followerThe average of a sound wave is zero. The average of its size is how loud it is.
- How to detect one sound and ignore louder onesFilter first, then measure: a band-pass keeps your sound's frequencies and shrinks the rest.
- Build an Arduino guitar tuner: smooth, gate, time 20 wavesSmooth away the overtones, ignore the hum, and time 20 waves to read the string to a fraction of a hertz.