PickettTheory

Understanding the Building Blocks of Electronics

Electronics Theory — Learn Circuit Fundamentals

What is a Circuit?

A circuit is a complete path that allows electricity to flow from a power source, through components, and back to the source. Think of it like a water pipe system where electricity flows instead of water.

Every circuit needs three basic things: a power source (like a battery), a load (like an LED), and a complete path for electricity to flow.

πŸ”‹ Power Source

What it does: Provides the electrical energy needed to make the circuit work. Like a water pump in a pipe system.

πŸ‘† Click to learn more

➿ Wires (Conductors)

What it does: Provides the path for electricity to flow. Made of conductive materials like copper.

πŸ‘† Click to learn more

πŸ“ Resistor

What it does: Limits the flow of electric current. Like a narrow pipe that slows down water flow.

πŸ‘† Click to learn more

πŸ’‘ Load (LED Example)

What it does: Uses the electrical energy to do work - in this case, produce light. The "purpose" of the circuit.

πŸ‘† Click to learn more

🎚️ Switch

What it does: Controls whether the circuit is ON or OFF by making or breaking the connection.

πŸ‘† Click to learn more

⏚ Ground

What it does: Acts as the reference point (0V) that electricity returns to. Completes the circuit.

πŸ‘† Click to learn more

⚑

How Circuits Work

Current, voltage, and the complete loop

A circuit is a complete, closed path that allows electric current to flow. Think of electricity like water in a pipe β€” the battery is the pump, the wires are the pipes, and the components are devices powered by the flow.

πŸ”‹ Closed Circuit

A complete unbroken loop. Current flows, components work. The path goes from + terminal, through components, back to βˆ’ terminal.

βœ‚οΈ Open Circuit

A break anywhere in the loop stops all current flow. Like a gap in a pipe β€” nothing works. A switch creates a controlled open circuit.

⚑ Short Circuit

Current finds a low-resistance path bypassing components. Causes high current, heat, and potential damage. Fuses protect against this.

🌊 Conventional Current

By convention, current flows from + to βˆ’. In reality, electrons flow from βˆ’ to +. Both models are used in electronics.

⚑ Key Fact: Voltage is the "pressure" pushing current. Current is the "flow rate" of charge. Resistance is anything opposing that flow.
πŸ“

Ohm's Law

The fundamental relationship between V, I, and R

Ohm's Law states that the current through a conductor is directly proportional to the voltage across it and inversely proportional to the resistance. It is the single most used equation in electronics.

V = I Γ— R
Voltage (V) = Current (A) Γ— Resistance (Ξ©)

πŸ” Find Voltage

V = I Γ— R
Example: 0.02A through 470Ξ© = 9.4V

πŸ” Find Current

I = V Γ· R
Example: 9V Γ· 470Ξ© = 0.019A (19mA)

πŸ” Find Resistance

R = V Γ· I
Example: 9V Γ· 0.02A = 450Ξ©

⚑ Power Formula

P = V Γ— I
Also: P = IΒ²R and P = VΒ²/R. Measured in Watts (W).

πŸ’‘ LED Resistor Tip: To find the correct resistor for an LED: R = (Supply voltage βˆ’ LED forward voltage) Γ· LED current. E.g. (9V βˆ’ 2V) Γ· 0.02A = 350Ξ©. Use the next standard value up (360Ξ© or 390Ξ©).
πŸ”—

Series & Parallel Circuits

Two fundamental ways to connect components

Components in a circuit can be connected in series (one after another) or in parallel (side by side). Each arrangement behaves very differently.

⬛ Series Circuit

  • One path for current
  • Same current everywhere: Itotal = I₁ = Iβ‚‚
  • Voltage splits: Vtotal = V₁ + Vβ‚‚
  • Resistance adds: Rtotal = R₁ + Rβ‚‚
  • One break stops everything
  • Used in: Christmas lights (old), fuses

⬛ Parallel Circuit

  • Multiple paths for current
  • Same voltage across each: Vtotal = V₁ = Vβ‚‚
  • Current splits: Itotal = I₁ + Iβ‚‚
  • Resistance reduces: 1/Rtotal = 1/R₁ + 1/Rβ‚‚
  • One break doesn't stop others
  • Used in: Home wiring, LED strips
🏠 Real World: Your home is wired in parallel β€” each socket gets the full 230V and turning one appliance off doesn't affect others.
⚑

Capacitors

Storing and releasing electrical charge

A capacitor stores electrical charge between two conductive plates separated by an insulator. It charges up when connected to voltage and releases that charge when the voltage is removed β€” like a small rechargeable reservoir.

Q = C Γ— V
Charge (C) = Capacitance (F) Γ— Voltage (V)

πŸ”΅ Electrolytic

High capacitance (1Β΅F–10,000Β΅F). Polarised β€” must be connected + to + and βˆ’ to βˆ’. Used for power supply smoothing.

🟑 Ceramic

Small capacitance (1pF–100nF). Non-polarised. Used for decoupling and noise filtering in high-frequency circuits.

⏱️ RC Time Constant

Ο„ = R Γ— C. Time (seconds) for a capacitor to charge to ~63% of supply voltage. After 5Ο„ it's considered fully charged.

πŸ”Š AC vs DC

Capacitors block DC current but pass AC signals. This makes them useful for coupling audio signals and filtering power rails.

⚠️ Polarity Warning: Installing an electrolytic capacitor backwards can cause it to overheat and rupture. Always check the βˆ’ marking (white stripe) and the longer leg (+).
β–Ά

Diodes & LEDs

One-way valves for electrical current

A diode allows current to flow in only one direction β€” from anode (+) to cathode (βˆ’). In the reverse direction it blocks current completely (up to its breakdown voltage). This makes diodes essential for rectification, protection, and signal routing.

β–Ά Standard Diode

~0.7V forward voltage drop (silicon). Used in rectifier circuits to convert AC to DC. The cathode is marked with a silver band.

πŸ’‘ LED

Light Emitting Diode. Forward voltage ~1.8V–3.5V depending on colour. Always needs a current-limiting resistor to prevent burnout.

⚑ Zener Diode

Designed to operate in reverse breakdown at a precise voltage. Used as voltage regulators and references in power supplies.

πŸ”’ Schottky Diode

Very low forward voltage (~0.2–0.4V) and fast switching. Used in high-frequency circuits and preventing reverse current in battery systems.

πŸ’‘ LED Colours & Voltage: Red/Yellow β‰ˆ 2.0V Β· Green β‰ˆ 2.2V Β· Blue/White β‰ˆ 3.2V. Higher voltage LEDs need less resistance for the same current.
πŸ”Œ

Transistors

Amplifiers and electronic switches

A transistor is a three-terminal semiconductor device that can amplify signals or act as a switch. It is the fundamental building block of all modern electronics β€” billions are in every smartphone.

πŸ“¦ BJT β€” NPN

Terminals: Base, Collector, Emitter. A small base current controls a larger collector current. Common for switching loads like motors and LEDs.

πŸ“¦ BJT β€” PNP

Opposite polarity to NPN. Current flows from Emitter to Collector, controlled by pulling Base low. Used in high-side switching.

⚑ MOSFET

Voltage-controlled device (Gate, Drain, Source). Extremely low power consumption in logic state. Used in power switching and microcontroller output stages.

πŸ”’ Gain (hFE / Ξ²)

The current amplification factor. If Ξ² = 100 and base current = 1mA, then collector current = 100mA. Allows small signals to control large loads.

πŸ”Œ Switch Rule: For a transistor to be fully ON (saturated), the base current must be at least IC / Ξ². Always calculate β€” too little base current and the transistor won't fully switch.
🧠

Logic Gates

Boolean logic β€” the language of digital electronics

Logic gates process binary signals (HIGH = 1 = ~5V or 3.3V, LOW = 0 = 0V) according to Boolean rules. All digital systems β€” from calculators to computers β€” are built from combinations of these gates.

AND Gate

Output is HIGH only when ALL inputs are HIGH. Symbol: D-shape. Used in safety interlock systems.

ABOUT
000
010
100
111

OR Gate

Output is HIGH when ANY input is HIGH. Symbol: Curved shield. Used in alarm systems.

ABOUT
000
011
101
111

NOT Gate (Inverter)

Flips the input. HIGH becomes LOW, LOW becomes HIGH. One input only. The bubble symbol means inversion.

AOUT
01
10

NAND & NOR

NAND = AND + NOT (inverted output). NOR = OR + NOT. Both are "universal gates" β€” any logic circuit can be built using only NAND or only NOR gates.

XOR Gate

Exclusive OR β€” output HIGH only when inputs are DIFFERENT. Used in binary adders, error detection, and encryption circuits.

ABOUT
000
011
101
110

Boolean Laws

A AND 1 = A
A OR 0 = A
A AND 0 = 0
A OR 1 = 1
NOT NOT A = A
De Morgan's: NOT(A AND B) = NOT A OR NOT B

γ€œ

AC vs DC

Two types of electrical power

γ€œ Alternating Current (AC)

  • Direction reverses periodically
  • UK mains: 230V, 50Hz
  • US mains: 120V, 60Hz
  • Efficient for long-distance transmission
  • Used in homes, industrial power
  • Transformers change AC voltage easily
  • Dangerous β€” can cause fibrillation

βŽ“ Direct Current (DC)

  • Flows in one direction only
  • Batteries: 1.5V, 3.7V, 9V, 12V
  • All microcontrollers run on DC
  • USB: 5V DC
  • Produced by batteries, solar cells, rectifiers
  • Easier to store (batteries/capacitors)
  • Safer for electronics work
πŸ”Œ Rectification: AC is converted to DC using a bridge rectifier (4 diodes) followed by a smoothing capacitor. This is inside every phone charger and power adapter.
πŸ›‘οΈ

Electrical Safety

Essential rules for working with electronics

⚠️ Mains Voltage (230V/120V AC) is lethal. Never work on mains-connected equipment without proper training and isolation. Even capacitors in unplugged devices can hold dangerous charge.

βœ… Safe Voltages

Always work with low-voltage DC for learning: 3.3V, 5V, 9V, 12V. Use a bench power supply with current limiting, not mains directly.

πŸ”§ ESD Protection

Electrostatic discharge can destroy microcontrollers and ICs instantly. Use an anti-static wrist strap and mat when handling sensitive components.

πŸ”₯ Short Circuit

Always use a fuse or current-limited supply. A short circuit can overheat wires, melt insulation, and start fires within seconds.

πŸ”‹ Battery Safety

Never short-circuit batteries. LiPo cells can catch fire if overcharged, over-discharged, or punctured. Use a proper battery management system (BMS).

πŸ‘“ Eye Protection

Wear safety glasses when soldering. Solder flux can spit. Capacitors under stress can vent. Laser modules require appropriate laser safety eyewear.

πŸ’¨ Ventilation

Solder fumes contain rosin flux vapour β€” use a fume extractor or work in a well-ventilated area. Lead-free solder is safer but still produces fumes.

πŸ›‘οΈ Current Kills, Not Voltage: It takes as little as 10mA through the heart to cause fibrillation. However, high voltage is what forces dangerous current through the body's resistance. Stay safe β€” when in doubt, power off.
πŸ”Š

Operational Amplifiers (Op-Amps)

Versatile analog building blocks for amplification, filtering, and signal processing

An op-amp is a high-gain differential amplifier in an IC package. It amplifies the difference between two inputs (V+ and Vβˆ’). With just a few resistors, the same op-amp can be a voltage amplifier, comparator, oscillator, filter, or mathematical operator.

πŸ“Œ Pinout (8-pin DIP)

Pin 2: Inverting input (Vβˆ’) Β· Pin 3: Non-inverting input (V+) Β· Pin 6: Output Β· Pins 4 & 7: Negative and positive supply rails. Common ICs: LM741, LM358, TL071.

πŸ” Inverting Amplifier

Input connects to Vβˆ’ through Rin. Feedback resistor Rf connects output to Vβˆ’. Gain = βˆ’Rf / Rin. Output is inverted. Example: Rin=10kΞ©, Rf=100kΞ© β†’ Gain = βˆ’10.

βž• Non-Inverting Amplifier

Input connects to V+. Feedback divider to Vβˆ’. Gain = 1 + (Rf / Rin). Output is in phase with input. Always gain β‰₯ 1. Great for buffering high-impedance sensors.

βš–οΈ Voltage Comparator

No feedback β€” output swings to rail (HIGH or LOW) based on which input is greater. Used to detect threshold crossings: temperature alarms, zero-crossing detectors, light sensors.

πŸ”‹ Unity Gain Buffer

Output connected directly to Vβˆ’. Gain = 1. Acts as an impedance buffer β€” copies voltage but draws virtually no current from the source. Protects sensitive signal sources.

βž— Summing Amplifier

Multiple input resistors to Vβˆ’. Output = βˆ’(V1/R1 + V2/R2 + V3/R3) Γ— Rf. Mixes multiple signals. Used in audio mixers, DAC circuits, and weighted adders.

Inverting Gain = βˆ’Rf / Rin  |  Non-Inverting Gain = 1 + Rf / Rin
Resistor ratio sets the gain β€” op-amp itself has near-infinite open-loop gain (~100,000Γ—)

πŸ“ Virtual Ground

In a closed-loop inverting amp, the Vβˆ’ input is held at virtually 0V by feedback β€” it's called a "virtual ground". This simplifies circuit analysis enormously.

⚑ Slew Rate

Maximum rate the output can change (V/Β΅s). If the input changes faster than the slew rate, the output distorts. LM741: 0.5 V/Β΅s. TL071: 13 V/Β΅s. Choose IC for frequency.

πŸ”Š Integrator & Differentiator

Integrator: replace Rf with a capacitor β†’ output is the integral of the input (ramp from constant). Differentiator: replace Rin with capacitor β†’ outputs the rate of change.

πŸ›‘οΈ Rail-to-Rail Op-Amps

Standard op-amps can't reach their supply rails. Rail-to-rail types (e.g. MCP6001, LMV358) output near 0V and near Vcc. Essential for single-supply 3.3V/5V systems.

πŸ”Š Golden Rules of Op-Amps (closed loop): 1) No current flows into the input terminals. 2) The op-amp adjusts its output to make V+ = Vβˆ’. These two rules let you analyse almost any op-amp circuit by inspection.
⏱️

555 Timer IC

One of the most versatile and widely used ICs ever made

The NE555 timer (introduced 1972) generates precise time delays and oscillations using just a few resistors and a capacitor. It operates in three main modes: monostable (one-shot pulse), astable (free-running oscillator), and bistable (flip-flop). Runs from 5V–15V and can source/sink up to 200mA.

πŸ“Œ Pinout (8-pin DIP)

1: GND Β· 2: Trigger (starts timing, active LOW) Β· 3: Output Β· 4: Reset (active LOW) Β· 5: Control Voltage Β· 6: Threshold (stops timing) Β· 7: Discharge Β· 8: Vcc

⚑ Monostable Mode

Triggered by a LOW pulse on pin 2. Output goes HIGH for a precise time then returns LOW. One single pulse regardless of trigger length. Timer ends when capacitor reaches 2/3 Vcc.

γ€œ Astable Mode

No external trigger needed β€” continuously oscillates. Output is a square wave. Charge time (HIGH): 0.693Γ—(Ra+Rb)Γ—C. Discharge time (LOW): 0.693Γ—RbΓ—C. Frequency = 1.44 / ((Ra+2Rb)Γ—C).

πŸ”€ Bistable Mode

Pin 2 (trigger) sets output HIGH. Pin 4 (reset) sets output LOW. Behaves like an SR latch β€” holds its state until triggered. No capacitor needed. Used for debouncing switches.

Monostable: t = 1.1 Γ— R Γ— C  |  Astable: f = 1.44 / ((Ra + 2Rb) Γ— C)
t in seconds, R in ohms, C in farads, f in Hz

πŸ” Duty Cycle

In astable mode: Duty = (Ra + Rb) / (Ra + 2Rb) Γ— 100%. For 50% duty cycle, use a diode to bypass Ra on discharge path β€” or use the CMOS 555 variant (TLC555).

πŸŽ›οΈ Control Voltage (Pin 5)

Normally bypassed with 10nF cap to GND. Applying a voltage here shifts the internal threshold β€” allows voltage-controlled oscillation (VCO). Used in tone modulators.

πŸ”Š Tone Generator

Astable 555 directly driving a small speaker or buzzer produces an audible tone. Frequency = 1.44/((Ra+2Rb)Γ—C). Ra=1kΞ©, Rb=10kΞ©, C=10nF β†’ approx 1.3kHz.

πŸ’‘ LED Flasher

Classic beginner project: astable 555 with Ra=4.7kΞ©, Rb=47kΞ©, C=100Β΅F β†’ ~0.2Hz flash rate (5s cycle). Add second LED on opposite phase via inverter for alternating flash.

πŸ›‘οΈ CMOS 555 (TLC555)

Operates from 2V–15V, draws only 1Β΅A quiescent current vs 6mA for bipolar 555. Essential for battery-powered circuits. Same pinout, more stable frequency at low voltages.

⏳ Long Timers

For delays beyond a few minutes, use large RΓ—C values or chain two 555s. With R=10MΞ© and C=470Β΅F: t β‰ˆ 5166s (86 minutes). Leakage current limits accuracy at very long intervals.

⏱️ Internal Voltage Divider: The 555 has three equal 5kΞ© resistors inside forming a divider (hence the name β€” 5-5-5). The comparators trip at 1/3 Vcc (trigger) and 2/3 Vcc (threshold). These thresholds scale automatically with supply voltage.
πŸŽ›οΈ

PWM & Motor Control

Pulse Width Modulation β€” controlling power with digital signals

PWM (Pulse Width Modulation) varies the average power delivered to a load by rapidly switching between fully ON and fully OFF. The ratio of ON time to total period is the duty cycle. Since the switching happens faster than the load responds, it sees a steady average voltage. Used for motor speed control, LED dimming, servo positioning, and digital-to-analog conversion.

πŸ“Š Duty Cycle

Duty cycle = (ON time / Period) Γ— 100%. 0% = always OFF. 100% = always ON. 50% duty at 12V delivers average 6V to the load. Higher frequency = smoother result.

⚑ Average Voltage

Vavg = Vsupply Γ— (Duty / 100). A 5V PWM at 75% duty gives 3.75V average. Add an RC low-pass filter (see Filters section) to smooth PWM into a true DC analog voltage.

πŸ”Œ MOSFET Switch

A logic-level MOSFET (e.g. IRLZ44N) driven by a microcontroller PWM pin can switch amps of motor current. Add a flyback diode across the motor β€” never omit this.

πŸ” H-Bridge

Four switches (MOSFETs or BJTs) in an H-bridge arrangement allow bidirectional motor control β€” forward, reverse, brake, and coast. ICs: L298N (5A), L293D (1A), DRV8833 (1.5A).

πŸ€– Servo Motors

Servos use PWM at 50Hz (20ms period). Pulse width 1ms = 0Β°, 1.5ms = 90Β°, 2ms = 180Β°. Microcontrollers generate this easily. Servos have built-in position feedback and gearing.

πŸ’‘ LED Dimming

PWM dimming maintains constant LED colour temperature at all brightness levels (unlike resistor dimming which changes colour). Use 1kHz+ frequency to avoid visible flicker. Persistence of vision threshold ~100Hz.

Vavg = Vsupply Γ— Duty% / 100  |  Frequency = 1 / Period
Example: 12V at 60% duty = 7.2V average Β· 20ms period = 50Hz

πŸ”’ PWM Frequency Selection

Motors: 1–20kHz (audible whine at low freq). LEDs: >200Hz (flicker-free). Servos: 50Hz. Audio DAC: >40kHz (above hearing). Higher freq = more switching losses in MOSFETs.

πŸ›‘οΈ Dead Time & Shoot-Through

In H-bridges, both high and low side switches must never be ON simultaneously β€” this causes shoot-through (dead short). Gate drivers add dead-time to prevent this. Critical in power electronics.

πŸ”‹ Stepper Motors

Stepper motors move in discrete steps (e.g. 200 steps/revolution). Driven by sequences of pulses to coil pairs. Drivers: A4988, DRV8825. Steps can be microstepped for smoother motion.

πŸ“ Back-EMF & Current Sensing

Running motors generate a back-EMF opposing the supply. Back-EMF ∝ motor speed β€” used to measure RPM without sensors. A small series resistor (0.1Ξ©) measures current via voltage drop (I=V/R).

πŸŽ›οΈ Flyback Diode is Mandatory: When a motor's PWM switches OFF, the collapsing magnetic field generates a voltage spike that can be 10Γ— the supply. A Schottky diode (e.g. 1N5819) across the motor clamps this spike and protects your driver IC.
πŸ“‘

Filters & Frequency Response

Shaping signals by allowing or blocking specific frequencies

A filter selectively passes or blocks signals based on frequency. Passive filters use only resistors, capacitors, and inductors. Active filters add op-amps for amplification and sharper roll-off. Filters are essential in audio, power supplies, communication systems, and noise reduction.

πŸ”» Low-Pass Filter (LPF)

Passes low frequencies, blocks high. RC circuit: R in series, C to ground. At cutoff frequency, output = 70.7% of input (βˆ’3dB). Used to smooth PWM output and remove high-frequency noise.

πŸ”Ί High-Pass Filter (HPF)

Passes high frequencies, blocks low (and DC). C in series, R to ground. Same cutoff formula. Used to remove DC offset from audio signals and isolate AC components of a waveform.

〰️ Band-Pass Filter

Passes a range of frequencies between two cutoff points. HPF + LPF in series (or resonant LC). Used in radio tuners, audio equalisers, and communication receivers.

🚫 Band-Stop (Notch) Filter

Blocks a specific frequency band β€” the opposite of band-pass. Twin-T notch filter eliminates one frequency precisely. Classic use: removing 50/60Hz mains hum from audio signals.

Cutoff Frequency: fc = 1 / (2Ο€ Γ— R Γ— C)
At fc the output is βˆ’3dB (70.7% of input). Phase shift = βˆ’45Β°. Above fc (LPF) signal is attenuated at βˆ’20dB/decade.

πŸ“ Cutoff Frequency Examples

R=10kΞ©, C=1Β΅F β†’ fc = 15.9Hz (audio subsonic filter) Β· R=1kΞ©, C=100nF β†’ fc = 1.59kHz Β· R=100Ξ©, C=10nF β†’ fc = 159kHz (RF bypass)

⚑ LC Filters

Inductor (L) + capacitor (C) filters have steeper roll-off (βˆ’40dB/decade) than RC (βˆ’20dB/decade). Used in power supply output filters and RF circuits. Resonant frequency: f = 1/(2Ο€βˆš(LC)).

πŸ”Š Active Sallen-Key Filter

Op-amp based 2nd-order filter with βˆ’40dB/decade roll-off. Butterworth: maximally flat passband. Chebyshev: steeper roll-off with ripple. Bessel: best phase linearity for audio.

πŸ“» Decoupling Capacitors

Every IC power pin needs a 100nF ceramic capacitor to GND, placed as close as possible. Acts as a local charge reservoir and high-frequency low-pass filter, preventing noise from corrupting the supply rail.

πŸ“‰ Roll-Off & Order

1st order (single RC): βˆ’20dB/decade above fc. 2nd order (two RC stages): βˆ’40dB/decade. Each additional order adds βˆ’20dB/decade steepness. Higher order = sharper cutoff = more components.

🎚️ PWM Smoothing

To convert 1kHz PWM into smooth DC: choose fc at least 1/10th of PWM frequency. For 1kHz PWM: fc = 100Hz β†’ R=10kΞ©, C=160nF (use 150nF). Ripple β‰ˆ Vavg/(fΓ—RΓ—C).

πŸ“‘ Impedance Matching: For a filter to work as designed, the source impedance must be much lower than R, and the load impedance much higher than R. Violating this changes the cutoff frequency. Op-amp buffers on input and output eliminate these loading effects.
πŸ€–

Microcontrollers

Programmable digital brains β€” the core of modern embedded systems

A microcontroller (MCU) is a complete computer on a single chip: processor, RAM, flash memory, and I/O peripherals in one package. Unlike a microprocessor (which needs external memory and peripherals), an MCU is self-contained and designed to run embedded code that interacts directly with hardware.

πŸ“Œ GPIO β€” Digital I/O

General Purpose Input/Output pins. Configurable as input (read button/sensor) or output (drive LED/relay). Logic HIGH = Vcc (3.3V or 5V), LOW = 0V. Most MCU pins source 8–25mA maximum β€” use transistors for larger loads.

γ€œ ADC β€” Analog to Digital

Converts analog voltage to a digital number. 10-bit ADC: 0–1023 (Arduino Uno). 12-bit ADC: 0–4095 (STM32, RP2040). Resolution = Vref / 2^N. Used to read potentiometers, temperature sensors, microphones.

πŸŽ›οΈ PWM Output

Hardware PWM channels generate precise duty cycles without CPU overhead. Used for motor speed, LED dimming, servo control, and buzzer tones. Arduino: analogWrite(pin, 0–255) = 0–100% duty at ~490Hz.

πŸ“‘ UART β€” Serial Communication

Two-wire asynchronous serial: TX (transmit) and RX (receive). Common baud rates: 9600, 115200 bps. Used to communicate with PCs, GPS modules, Bluetooth/Wi-Fi modules. No clock line β€” both ends must agree on baud rate.

πŸ”— I2C β€” Two-Wire Bus

SDA (data) and SCL (clock). Multiple devices share one bus, each with a unique 7-bit address. Speeds: 100kHz (standard), 400kHz (fast). Needs pull-up resistors (4.7kΞ© typical). Used for sensors, displays, EEPROMs.

⚑ SPI β€” High-Speed Bus

4 wires: MOSI, MISO, SCK, CS. Full-duplex, faster than I2C (up to 50MHz+). Each device needs its own CS (chip select) line. Used for SD cards, display drivers, fast ADCs, and flash memory.

🟦 Arduino (ATmega328P)

5V, 16MHz, 32KB flash, 2KB RAM. 14 digital I/O, 6 PWM, 6 ADC pins. Huge library ecosystem. 5V logic β€” level-shift before connecting 3.3V peripherals. Best for beginners and prototyping.

🟒 Raspberry Pi Pico (RP2040)

3.3V, dual-core ARM Cortex-M0+ at 133MHz, 264KB RAM, 2MB flash. 26 GPIO, 2 UART, 2 SPI, 2 I2C, 16 PWM, 3 ADC. Programmable in MicroPython or C/C++. Excellent for real-time applications.

πŸ”΅ STM32

Professional 32-bit ARM Cortex-M series. 3.3V. Wide range from STM32F0 (48MHz, budget) to STM32H7 (480MHz, dual-core). Used in industrial, automotive, and medical devices. Steep learning curve, powerful peripherals.

🌐 ESP32

3.3V dual-core 240MHz, Wi-Fi + Bluetooth built in, 34 GPIO, 12-bit ADC, touch sensing, Hall sensor, 4MB flash. Programmable via Arduino IDE or ESP-IDF. The go-to choice for IoT and wireless projects.

ADC Value = (Vin / Vref) Γ— (2^N βˆ’ 1)  |  Vin = ADC_Reading Γ— Vref / (2^N βˆ’ 1)
N = bit depth. 10-bit at 5V: each ADC step = 4.88mV Β· 12-bit at 3.3V: each step = 0.806mV

πŸ”Ί Pull-Up & Pull-Down Resistors

Floating inputs pick up noise and read randomly. A pull-up (10kΞ© to Vcc) holds pin HIGH until pulled LOW by a switch. A pull-down (10kΞ© to GND) holds pin LOW. Most MCUs have built-in pull-ups β€” enable in software.

⚑ Level Shifting

5V and 3.3V devices must not be connected directly β€” 5V signals damage 3.3V MCU pins. Use a voltage divider (R1=1kΞ©, R2=2kΞ©) for one-way logic, or a dedicated level shifter (TXB0108, BSS138 FETs) for bidirectional I2C/SPI.

πŸ”‹ Power Considerations

Power the MCU from a regulated supply (LDO or SMPS). Decouple Vcc pin with 100nF + 10Β΅F capacitors to GND. USB power from a PC is limited to 500mA. Use external 5V/1A+ adapter for motor projects.

⏱️ Interrupts & Timers

Hardware interrupts respond to pin changes instantly without polling. Timers run independently of main code β€” used for PWM generation, measuring pulse width, scheduled tasks, and watchdog resets to recover from crashes.

πŸ€– Pin Current Budget: GPIO pins are not power outputs. An Arduino pin sources max ~40mA, with a 200mA total port limit. Use transistors (BJT or MOSFET) to drive LEDs in strips, relay coils, motors, or any load above 20mA. Never draw power from signal pins.
⚠️ 3.3V vs 5V Logic: Most modern MCUs (ESP32, RP2040, STM32) are 3.3V. Connecting a 5V sensor or module directly will permanently damage the MCU. Always check operating voltages and use level shifters. When in doubt, 3.3V is the safer choice.
🏭

PLC Basics β€” Industrial Control

Programmable Logic Controllers: the computers that run factories

A PLC (Programmable Logic Controller) is a ruggedised industrial computer that controls machinery β€” conveyors, presses, packaging lines, traffic lights, building systems. Where a hobby microcontroller runs one program on a breadboard, a PLC runs 24/7 in electrical cabinets, survives vibration, electrical noise, and temperature extremes, and is programmed in a language electricians can read: ladder logic.

πŸ”„ The Scan Cycle

A PLC runs an endless loop: 1) Read all inputs into memory, 2) Execute the logic top-to-bottom, 3) Write all outputs at once. One full loop is a "scan," typically 1–20 ms. This matters: an input that changes mid-scan isn't seen until the next scan, and outputs only update at the end β€” never mid-logic.

πŸͺœ Ladder Logic

Programs look like relay wiring diagrams: two vertical power rails with horizontal "rungs" between them. Each rung reads left to right: conditions (contacts) on the left, actions (coils) on the right. If the logical path across a rung is TRUE, the coil energises. It was designed so plant electricians could read programs like the relay panels they replaced.

⚑ Contacts: NO and NC

Normally Open β€”| |β€” passes power when its input is ON (like a push button making contact). Normally Closed β€”|/|β€” passes power when its input is OFF. Contacts don't switch real electricity β€” they test the state of an input, output, or internal bit in memory. Series contacts = AND logic; parallel branches = OR logic.

πŸ”” Coils & Outputs

A coil β€”( )β€” sets a bit ON when its rung is true, OFF when false. Output coils drive real hardware: motor contactors, valves, lamps. Internal coils (memory bits) store states like "machine running" for use in other rungs. Set (S) and Reset (R) coils latch a bit ON or OFF until the opposite instruction fires.

πŸ”’ The Seal-In Circuit

The most famous rung in industry β€” Start/Stop motor control: a Start button (NO) in parallel with the motor's own output contact, in series with a Stop button (NC). Press Start β†’ motor coil energises β†’ its contact closes and "seals in" around the Start button, so the motor stays running when you release it. Press Stop β†’ the rung breaks β†’ motor drops out. Every PLC programmer learns this first.

⏱️ Timers

TON (On-Delay): output turns ON after the input has been true for the preset time β€” e.g. "run the fan 5 s after the motor starts." TOF (Off-Delay): output stays ON for a time after the input goes false β€” e.g. "keep the cooling fan running 30 s after shutdown." RTO (Retentive): accumulates time across interruptions until reset β€” used for maintenance-hour counters.

πŸ”’ Counters

CTU (Count Up) increments on each rising edge of its input β€” count bottles past a sensor, boxes on a pallet. CTD (Count Down) decrements. When the accumulated count reaches the preset, the counter's done bit turns ON β€” "24 bottles counted β†’ index the crate." Counters keep their value between scans and need an explicit Reset.

πŸ”Œ Real I/O

Inputs: push buttons, limit switches, proximity sensors, photo-eyes β€” usually 24V DC signals. Outputs: relay outputs switch anything but are slow; transistor outputs switch fast DC for indicator lamps and solenoid valves. Sinking vs sourcing describes current direction β€” mixing them up is the most common wiring fault in new installations.

πŸ€– PLC vs Microcontroller

An Arduino costs Β£20; a PLC costs Β£200–£2000. The difference: certified reliability, screw-terminal I/O at 24V industrial levels, hot-swappable modules, online editing (change logic while the machine runs), and decades of guaranteed spare parts. Use a microcontroller for products and prototypes; use a PLC when downtime costs money and an electrician must maintain it.

Series contacts = AND  |  Parallel branches = OR  |  β€”|/|β€” = NOT  |  Scan: Read β†’ Execute β†’ Write
IEC 61131-3 defines 5 PLC languages: Ladder (LD), Function Block (FBD), Structured Text (ST), Instruction List (IL), Sequential Function Chart (SFC)
🏭 Practice it live: Everything on this page can be tried right now in PickettPLC β€” build the Start/Stop seal-in rung, add a TON timer, and watch the conveyor animation respond. Reading about ladder logic takes an hour; building one working rung teaches more.
⚠️ Safety is never in software: Emergency stops, guard interlocks, and light curtains must be hardwired through safety relays β€” never routed only through PLC logic. A PLC can crash, freeze mid-scan, or be edited incorrectly. Machine safety standards (ISO 13849) exist because people died learning this. The E-stop cuts power physically; the PLC just gets told about it.
πŸŒ€

Inductors & Transformers

Energy storage in magnetic fields β€” the partner to capacitors

An inductor is a coil of wire that stores energy in a magnetic field when current flows through it. It resists changes in current the same way a capacitor resists changes in voltage. Together, inductors and capacitors form the foundation of filtering, oscillators, and power conversion.

πŸŒ€ How Inductors Work

When current flows through a coil, it creates a magnetic field. If current changes, the field collapses and induces a voltage opposing the change (Lenz's Law). This is called back-EMF. The faster the current changes, the larger the opposing voltage.

πŸ“ Inductance (L)

Measured in Henries (H), millihenries (mH), microhenries (Β΅H). The larger the coil, the more inductance. Adding a ferromagnetic core (iron, ferrite) multiplies inductance dramatically. Typical values: 1Β΅H (RF) to 100mH (audio).

⚑ Inductive Reactance (XL)

XL = 2Ο€fL. At higher frequencies, inductors present higher resistance to AC signals (opposite to capacitors). At DC (f=0), an ideal inductor is a short circuit β€” just wire resistance. At high frequency, it blocks AC completely.

πŸ”‹ Energy Storage

E = Β½LIΒ². An inductor storing 1A through 1H holds 0.5 joules. Unlike capacitors, inductors store energy in a magnetic field, not an electric field. When power is cut, this energy must go somewhere β€” causing voltage spikes that can destroy transistors.

πŸ”’ Flyback Diode

When an inductor (relay coil, motor) is switched off, the collapsing field produces a reverse voltage spike that can reach hundreds of volts. A flyback diode (also called a freewheeling diode) placed across the inductor provides a safe path for this energy, protecting your transistor or MOSFET driver.

πŸ”„ Transformers

Two coils sharing a magnetic core. The turns ratio determines voltage step-up or step-down: Vs/Vp = Ns/Np. Power is conserved: if voltage doubles, current halves. Used in mains power supplies, audio isolation, and impedance matching. Transformers only work with AC β€” not DC.

XL = 2Ο€fL  |  E = Β½LIΒ²  |  Vs/Vp = Ns/Np  |  V = L Γ— (dI/dt)
L in Henries Β· f in Hz Β· I in Amps Β· V in Volts Β· Turns ratio determines transformer step-up/down

πŸ“¦ Common Inductor Types

Air core: Low inductance, used at RF. Ferrite core: High inductance, used in switch-mode power supplies (SMPS). Toroid: Self-shielding ring core, low EMI, used in power supplies. Choke: Blocks high-frequency noise in power lines.

πŸ” LC Oscillators

An inductor and capacitor in a tank circuit oscillate at f = 1/(2Ο€βˆšLC). Energy sloshes back and forth between magnetic field (L) and electric field (C). This principle underlies radio transmitters, receivers, and analog oscillators.

πŸŒ€ Inductor Rule: Current through an inductor cannot change instantaneously. If you try to switch it off instantly, it will generate whatever voltage spike is needed to keep current flowing β€” potentially thousands of volts. Always include a flyback diode when switching inductive loads.
⚠️ Mains Transformers: Transformers operating from 230V/120V mains carry lethal voltages on the primary side. Never work on a transformer connected to mains power. Even with power off, capacitors in the power supply may hold dangerous charge. Always discharge safely.
πŸ“‘

Signal Theory

Understanding waveforms, frequency, and how signals carry information

Every electrical measurement in electronics is a signal β€” a voltage or current that varies with time to carry information. Understanding how signals are characterised, measured, and manipulated is fundamental to all electronics work beyond simple DC circuits.

πŸ“Š Signal Parameters

Amplitude: Peak voltage from zero (or peak-to-peak). Frequency (f): Cycles per second in Hz. Period (T): Time for one cycle, T = 1/f. Phase: Time offset between two signals of same frequency, measured in degrees (0–360Β°) or radians.

🌊 RMS Voltage

Root Mean Square β€” the DC-equivalent heating value of an AC signal. For a sine wave: Vrms = Vpeak Γ— 0.707. Mains voltage is quoted in RMS (230Vrms = 325V peak). Multimeters measure AC in RMS. Use RMS for power calculations: P = VrmsΒ²/R.

πŸ”² Duty Cycle

For square/PWM waves: Duty Cycle = (t_on / Period) Γ— 100%. 50% duty = equal on/off time. PWM at 25% duty, 5V peak β†’ 1.25V average. Average voltage = Vpeak Γ— duty cycle. Used to control motor speed, LED brightness, and servo position.

🎯 Bandwidth

The range of frequencies a circuit can handle. An audio amplifier might have 20Hz–20kHz bandwidth. An oscilloscope probe must have bandwidth higher than the signal being measured. The -3dB frequency is where amplitude drops to 70.7% of its value β€” the conventional bandwidth limit.

🎸 Harmonics

A square wave is actually a sum of sine waves: fundamental frequency + all odd harmonics (3rd, 5th, 7th…). This is Fourier decomposition. A 1kHz square wave contains 1kHz, 3kHz, 5kHz, 7kHz... components. This is why filters and bandwidth matter for square wave circuits.

πŸ“‰ Decibels (dB)

Logarithmic ratio used to express gains and losses. Voltage: dB = 20 Γ— log10(Vout/Vin). Power: dB = 10 Γ— log10(Pout/Pin). Key values: +6dB β‰ˆ voltage doubled Β· -3dB = voltage Γ· √2 (half power) Β· 0dB = no change Β· -20dB = Γ·10 in voltage.

Vrms = Vpeak / √2  |  f = 1/T  |  Vavg = Vpeak Γ— Duty  |  dB = 20Β·log₁₀(Vout/Vin)
For sine waves only. Vrms of other waveforms differs β€” square wave Vrms = Vpeak, triangle = Vpeak/√3

πŸ“‘ Analog vs Digital Signals

Analog: continuous voltage β€” can be any value within a range (audio, sensor outputs). Digital: only two voltage levels (HIGH/LOW). Digital signals are more immune to noise but require ADC conversion to represent real-world values. Most real-world signals are analog; most processors are digital.

πŸ”Š Signal-to-Noise Ratio (SNR)

SNR = 20Β·log10(Vsignal/Vnoise) in dB. Higher SNR = cleaner signal. CD audio: 96dB SNR. A noisy sensor might have 40dB. Improve SNR by shielding cables, decoupling power supply, using differential signalling (like RS-485), and averaging multiple ADC readings.

πŸ“‘ Nyquist Theorem: To digitally capture a signal accurately, you must sample at least twice its highest frequency component. Sampling a 10kHz signal requires 20kHz+ sample rate. Below this limit causes aliasing β€” false lower-frequency signals appear in the data.
⚑

Power Electronics

Voltage regulators, MOSFETs, and controlling power efficiently

Power electronics deals with converting, controlling, and conditioning electrical power. From the humble voltage regulator to switch-mode power supplies and motor drives, these circuits handle energy rather than just signals.

πŸ“‰ Linear Regulators (LDO)

The simplest voltage regulator β€” drops excess voltage as heat. 7805: 5V out, needs at least 7V in. LM317: adjustable 1.25–37V. Low Dropout (LDO) types like LD1117 work with just 1.1–1.3V headroom. Efficiency = Vout/Vin. At 5V out from 12V in: only 41% efficient β€” the rest is wasted as heat.

πŸ”„ Switch-Mode Power Supplies (SMPS)

Switch transistors on/off at 20–500kHz to transfer energy efficiently through an inductor. Buck converter: steps voltage down. Boost converter: steps voltage up. Buck-boost: either. Typical efficiency 85–95% vs 40–60% for linear regulators. More complex but essential for battery-powered devices.

πŸ”Œ MOSFETs as Switches

N-channel MOSFET (IRFZ44N, 2N7000): Gate voltage above threshold (~2–4V) fully turns it ON β€” low resistance (RDS_on). Used for high-side and low-side switching. Gate is voltage-controlled (no gate current needed). P-channel MOSFETs switch the high side more simply but have higher RDS_on. Logic-level MOSFETs (threshold 2–3V) can be driven directly by MCU pins.

πŸ”‹ Battery Technologies

Li-Po / Li-Ion: 3.7V nominal, 4.2V full, 3.0V cutoff. High energy density. Never discharge below 3V or overcharge above 4.2V β€” use a BMS. NiMH: 1.2V/cell, safe, rechargeable. LiFePO4: 3.2V, safer chemistry, longer cycle life, used in EVs and solar storage. Always use the correct charger.

🌑️ Thermal Management

Power = heat. P_dissipated = (Vin – Vout) Γ— Iout for linear regulators. Thermal resistance (Β°C/W): junction-to-case + case-to-ambient. TO-220 package on heatsink: 5–10Β°C/W. Without heatsink: 50Β°C/W. Junction temperature must stay below 125–150Β°C. Add heatsinks whenever dissipating more than 0.5W in a small package.

πŸ” H-Bridge Motor Driver

Four switches arranged in an H-shape allow current to flow through a motor in either direction (forward/reverse). Common ICs: L298N (2A), TB6612FNG (1.2A), DRV8833 (1.5A). Enable pin controls speed via PWM. Always include flyback diodes across motor terminals to suppress back-EMF spikes.

Ξ· = Pout/Pin Γ— 100%  |  P_heat = (Vinβˆ’Vout) Γ— I  |  Vout_buck = Vin Γ— D  |  Vout_boost = Vin/(1βˆ’D)
D = duty cycle (0–1). Buck: steps down. Boost: steps up. Both controlled by switching duty cycle.
⚑ Decoupling is Critical: Every power supply has parasitic inductance in its wiring. Fast-switching loads (MCUs, motor drivers) demand instantaneous current spikes the supply can't deliver instantly. Place 100nF ceramic capacitors right at every IC's power pin to supply this burst locally.
⚠️ Short Circuit Protection: Unlike batteries, bench power supplies and SMPS can source huge currents. A dead short can instantly destroy traces, components, and cause fires. Always start with current limiting on your bench supply set conservatively. Fuse your projects appropriately for the expected load.
🌑️

Sensors & Transducers

How the physical world connects to electronic circuits

A sensor converts a physical quantity (temperature, light, pressure, motion) into an electrical signal. A transducer converts energy from one form to another in either direction (a speaker and microphone are both transducers for sound/electrical energy). Understanding how to interface sensors correctly is essential for any embedded system project.

🌑️ Temperature Sensors

NTC Thermistor: Resistance decreases with temperature. Use voltage divider with fixed resistor, read with ADC. Cheap but nonlinear β€” use Steinhart-Hart equation. LM35: Analog, 10mV/Β°C, 0–150Β°C, direct ADC. DS18B20: Digital, 1-Wire protocol, Β±0.5Β°C accuracy, multiple on one wire. DHT22: Temperature + humidity, digital, 2-wire.

πŸ’‘ Light Sensors

LDR (Photoresistor): Resistance decreases in light. Use voltage divider, read with ADC. Slow response, adequate for ambient light. Photodiode: Fast, linear β€” used in optical links, receivers. Phototransistor: Amplified photodiode, used in IR receivers. BH1750: I2C digital lux sensor with calibrated output.

πŸ“ Distance & Proximity

HC-SR04 Ultrasonic: Sends 40kHz burst, measures echo time. Range 2cm–4m. Distance = (time Γ— 343m/s) / 2. Good for robotics. IR Proximity (TCRT5000): Detects nearby objects at ~1cm. VL53L0X: Time-of-Flight laser, I2C, 0–2m, Β±3% accuracy. PIR (HC-SR501): Detects motion via infrared β€” used in alarm systems.

🧲 IMU β€” Motion Sensing

MPU-6050: 3-axis accelerometer + gyroscope on one I2C chip. Accelerometer measures linear acceleration (including gravity). Gyroscope measures rotation rate in Β°/s. Combine with complementary or Kalman filter to get stable angle estimation. Used in drones, robots, gesture detection.

🎡 Sound & Pressure

Electret Microphone: Requires 3.3–10V bias through 10kΞ© resistor, outputs AC audio signal. Add op-amp preamp (Γ—100 gain) before ADC. INMP441: I2S digital MEMS microphone, direct to ESP32. BMP280/BME280: Barometric pressure + altitude + temperature, I2C/SPI. Altitude from pressure: every 100m rise β‰ˆ 12 hPa drop.

βš™οΈ Encoder & Position

Rotary encoder: Two quadrature signals (A/B) give both position and direction. Count rising edges on A; check B to determine direction. Hall Effect sensor (SS49E): Analog output proportional to magnetic field β€” used for non-contact current sensing, gear tooth detection. Potentiometer: Simplest position sensor β€” resistive divider, read with ADC.

Distance_ultrasonic = (t_echo Γ— 343) / 2  |  T_LM35(Β°C) = Vout / 0.010  |  Lux_BH1750 = raw / 1.2
t in seconds Β· Vout in volts for LM35 Β· BH1750 raw = 16-bit register value in default mode
🌑️ Sensor Conditioning: Most sensors need signal conditioning before an ADC can read them: filtering to remove noise, amplification to use the full ADC range, and sometimes linearisation for sensors with nonlinear responses (thermistors, gas sensors). A poorly conditioned signal gives poor readings no matter how good your MCU code is.
πŸ”§

Soldering & Practical Skills

The craft behind real circuits β€” tools, technique, and inspection

Soldering is the process of joining electrical conductors using a fusible metal alloy (solder). A good solder joint is both electrically and mechanically reliable. Poor soldering β€” cold joints, bridges, or insufficient heat β€” is the cause of more project failures than bad circuit design.

🌑️ Iron Temperature

Lead solder (Sn63/Pb37): melt point 183Β°C β€” iron at 320–350Β°C. Lead-free (Sn96.5/Ag3/Cu0.5): melt point 217Β°C β€” iron at 350–380Β°C. Too cold: cold joints, dull finish. Too hot: damaged pads, burnt flux, delaminated PCB. A quality iron with temperature control (Hakko FX-888D, TS100) is worth the investment.

πŸ”¬ Joint Inspection

Good joint: Bright, shiny (leaded) or slightly matte (lead-free), concave fillet, flows all around pin and pad. Cold joint: Dull, grainy, cracked β€” electrically intermittent. Reheat and add fresh solder. Bridge: Solder connects two adjacent pads β€” use solder wick or desoldering pump to remove. Insufficient: Not enough solder for mechanical strength.

🧰 Essential Tools

Soldering iron: Temperature controlled, 40W+. Solder: 0.5–0.8mm rosin-core. Flux: Cleans oxide, improves flow β€” reapply for rework. Desoldering wick: Copper braid absorbs solder. Solder sucker: Pump for through-hole desoldering. PCB holder/third hand: Keeps work stable. Tip cleaner: Brass wool or wet sponge β€” clean before every joint.

πŸ“‹ Through-Hole Technique

1. Heat pad and lead simultaneously for 2–3 seconds. 2. Apply solder to the joint (not the iron). 3. Remove solder, then iron. 4. Inspect β€” should flow with a concave fillet. 5. Clip excess lead after joint cools. Common mistake: heating only the lead, not the pad β€” solder doesn't flow onto cold copper.

πŸ”¬ SMD Soldering

Surface Mount Devices. Drag soldering: apply flux, drag iron across IC pins. Solder paste + hot air: apply paste, place components, heat with hot air gun (350Β°C). Reflow oven: professional method. 0402 and smaller need magnification. Tweezer tip iron helps with fine pitch ICs. Flux is your best friend β€” use generously and clean afterwards.

πŸ“ PCB Basics

PCB layers: copper traces, soldermask (green/black/red coating), silkscreen (white labels). FR4 standard substrate. Track width vs current: 0.25mm handles ~0.5A, 1mm handles ~2.5A (IPC-2221). Ground planes reduce noise and thermal resistance. Via: plated hole connecting layers. Minimum via diameter 0.3mm in most fab processes.

πŸ”§ The Golden Rule: Heat the joint, not the solder. Touch solder to the joint, not the iron tip. This ensures solder flows into the joint properly rather than balling up on the iron. Two seconds of proper heating makes a far better joint than ten seconds of wrong heating.
⚠️ Flux Fumes: Rosin flux fumes are an irritant and potentially harmful with repeated exposure. Always solder in a well-ventilated area or use a fume extractor. Lead-free solder requires more flux and higher temperatures, producing more fumes. Wash hands after handling lead solder β€” lead is toxic with repeated skin contact.
πŸ”

Troubleshooting & Debugging

A systematic approach to finding and fixing faults

Debugging is a skill that separates experienced engineers from beginners. The difference is not luck β€” it's a systematic process: observe the symptom, form a hypothesis, test it, and iterate. Random component swapping without measurement is the slowest route to a working circuit.

πŸ”‹ Power First

Start every debug session by verifying power. Measure Vcc at the IC pin, not just at the power connector. Check for voltage sag under load β€” a weak supply may read 5V unloaded but 3.2V with everything connected. Measure GND continuity between all boards in the system. Most failures trace back to poor power delivery.

⚑ Multimeter Techniques

Continuity: Test wiring before powering up. Voltage: Always measure with respect to GND. Diode test: Check LEDs, protection diodes. Resistance: Measure off-circuit to avoid parallel paths giving false readings. DC current: Must break the circuit to insert meter in series. Set to highest range first, work down.

πŸ“ˆ Oscilloscope Debugging

See what the multimeter can't: signal shape, glitches, timing relationships. Check clock signals β€” are they present and at the right frequency? Look for noise on power rails (ripple, switching spikes). Verify UART/SPI/I2C communication by checking for activity. Measure rise/fall times for signal integrity.

🌑️ Thermal Clues

Components running too hot reveal problems. A linear regulator burning hot means high current draw β€” find the load. A transistor running hot when it should be off suggests it's never fully saturated. LEDs running hot means current is too high. Thermal imaging cameras (FLIR, cheap USB units) are excellent for quickly spotting hot spots on a PCB.

🧩 Divide and Conquer

Don't debug the whole system at once. Isolate subsystems: disconnect modules one at a time and see if the problem disappears. Comment out code sections to find software issues. Replace ICs one at a time to find a faulty component. Add test points (pads or loops of wire) at key nodes on your PCB during design β€” they're invaluable for debugging.

πŸ“‹ Common Faults

Intermittent: Cold solder joint β€” flex the PCB while probing. Works on bench, fails in product: Power supply too weak. MCU crashes: Floating inputs, missing decoupling caps. No comms: Wrong baud rate, missing pull-up resistors (I2C). Motor won't spin: Insufficient current, flyback diode wrong way. Oscillates: Op-amp without feedback resistor, insufficient bypass caps.

πŸ” Document Everything: When you find a fault, write it down. What were the symptoms? What measurements ruled out what? What was the root cause? A personal fault log is invaluable β€” you will encounter the same class of problem again, and past notes save hours of re-investigation.
⚠️ Never Work Blind: Changing components at random without measuring is not debugging β€” it's guessing. Every change should test a specific hypothesis. Without measurement, you could replace a perfectly good component, introduce a new fault, and be worse off than when you started.

πŸ”‹ Power Source Explained

The energy provider of every circuit

πŸ”‹ Example: AA Battery

A standard AA alkaline battery provides 1.5V

It can deliver this voltage until it's depleted. If you need more voltage, you stack them in series: 2Γ—AA = 3V, 4Γ—AA = 6V, etc.

The capacity (how long it lasts) is measured in mAh (milliamp-hours). A typical AA has ~2000-3000 mAh.

➿ Wires (Conductors) Explained

The pathways that carry electricity

⚑ Example: LED Circuit

In an LED circuit: Wire connects battery + β†’ resistor β†’ LED β†’ back to battery -

If ANY connection is broken (wire disconnected, component loose), the circuit is "open" and the LED won't light!

This is why breadboards and connectors are so important - they must make solid electrical contact.

πŸ“ Resistor Explained

The current controller

πŸ’‘ Example: LED Current Limiting

You have a 9V battery and want to power a red LED (needs 2V and 20mA max current)

Calculation:

Voltage across resistor = 9V - 2V = 7V

Using Ohm's Law: R = V/I = 7V / 0.02A = 350Ξ©

Use a 330Ξ© or 470Ξ© resistor (standard values) to safely limit current!

πŸ’‘ Load (LED Example) Explained

The component that does the work

⚠️ What Happens Without a Resistor?

If you connect an LED directly to a battery without a resistor:

The LED will try to draw unlimited current β†’ It will get extremely bright for a brief moment β†’ Then it will burn out and die!

Always use a current-limiting resistor with LEDs!

🎚️ Switch Explained

The circuit controller

πŸ’‘ Example: Flashlight Switch

A flashlight uses a simple SPST slide or push button switch:

Switch OFF: Circuit is open β†’ No current flows β†’ LED stays dark

Switch ON: Circuit is complete β†’ Current flows through resistor and LED β†’ LED lights up!

The switch is usually placed between the battery positive and the rest of the circuit.

⏚ Ground Explained

The reference point for all voltages

πŸ”‹ Example: 9V Battery Circuit

In a 9V battery LED circuit:

Positive terminal: +9V (relative to ground)

Negative terminal: 0V = Ground (our reference point)

Current flows from +9V β†’ through components β†’ back to 0V (ground)

Voltage "drops" across each component, always measured relative to ground!

⚠️ Common Mistake

Problem: "My Arduino and sensor won't communicate!"

Likely cause: Grounds aren't connected

Solution: Connect Arduino GND to sensor GND

Even if both have separate power supplies, they MUST share a common ground for signals to be interpreted correctly!