WHY THAT PART?
AJINKYA’S VISUAL ELECTRONICS COMPANION

Why
that part?

Look at a project and understand
what its parts are doing.

+ −WHY?

RECOGNISE · UNDERSTAND · CHOOSE · CONNECT
16 short lessons · 15-part explorer · 11 interactive workbenches
Edition 2 · A source-grounded, selective learning companion

You know how software fits together. Now learn how hardware fits together.

Read a lesson, make a prediction, then change the picture. The aim is to explain why a component is present before asking code to control it.

Everything is inside this HTML file. On a phone, swipe wide diagrams or use Enlarge. A+ increases reading text. Progress is local to this browser when storage is available.

LESSON 01 / 16

What is all this stuff?

Start with a job, then give the part a name.

A project photograph can look like a drawer of unrelated objects. The trick is to stop asking “What are all these names?” and ask “What needs to happen here?” A door needs to detect a person, decide to open, move, and stop at the right position. Those jobs lead you toward a sensor, a controller, a motor driver, a motor and a mechanism.

There are three trails to follow: energy from a source to a load, information from an input through a decision to an output, and force through a mechanism. A MOSFET belongs to the power-control trail. A bearing belongs to the mechanical trail. A sensor starts an information trail. A PCB and its connectors hold the electrical trails together.

Resistor

Limits current or sets a predictable voltage.

Choose: Resistance, power and tolerance.

Connect: No polarity; both leads must reach different nodes.

Read the lesson →

Recognition sketches, not identification guarantees. A package shape does not establish its internal function or leg order.

A component, module and system are different levels. A MOSFET is a component. A motor-driver module contains components and connectors. A car combines modules, wiring and mechanics. Learning the layers prevents two common mistakes: assuming a bare chip includes everything its module includes, and treating the module as a magic box whose connections need no explanation.

Picture a motor next to a small black three-legged part. Can you identify the part?

You can form a hypothesis: it may switch the motor. But it could also be a regulator or another transistor type. Read the complete marking, trace the connections and check a datasheet before choosing a replacement.

SOURCE TRAIL · Source foundation: 1N.1, PDF pp. 31–33; 26N project survey. The component atlas and mechanical selection material are added for your goal.

Next lesson →
LESSON 02 / 16

Electricity needs a complete journey

Voltage is across. Current is through.

A battery has two terminals. Voltage is the potential difference between them. Connect a complete conducting path and current can flow. A break anywhere in the series path stops the steady current everywhere in that path. Current does not arrive at a lamp, get used up, and disappear: charge continues around the circuit while energy is transferred to light and heat.

INTERACTIVE WORKBENCH

Close the loop

Predict what happens when the switch opens. Then change the resistor.

3.3 VDC source+−R = 330 ΩLEDSource → switch → resistor → LED → return
Switch open. No steady current.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

WHAT IT IS

Voltage is a difference in electrical potential; current is the rate of charge flow.

WHY IT IS HERE

They tell you whether a load can operate and how much heating to expect.

HOW TO CHOOSE

Match the load’s voltage; provide enough available current.

HOW TO CONNECT

Every supply path needs a return path. A signal also needs a reference.

A resistor obeys V = I × R approximately over its normal operating range. For 3.3 V across 1 kΩ: I = 3.3 / 1000 = 0.0033 A = 3.3 mA. An LED is not a resistor. In the workbench we use a simplified 2.0 V red-LED drop, leaving 1.3 V across the series resistor. That makes about 3.9 mA with 330 Ω.

Power is P = V × I. A resistor dissipates I²R. Double its current and the heat becomes four times as large. A “¼ W” marking describes a dissipation rating under stated conditions, not a current it always consumes.

There is 3.3 V at one side of an open switch. Is the switch carrying current?

No steady current flows through the open switch in this idealized circuit. A voltage can exist across a break. Voltage and current are related through the circuit; they are not the same thing.

SOURCE TRAIL · 1N.2, printed pp. 5–10 / PDF pp. 33–38. Workbench uses an original, explicitly simplified LED example.

Next lesson →
LESSON 03 / 16

Turn a drawing into real connections

A schematic shows relationships. A breadboard provides nodes.

A node is a set of points electrically joined together. Wires can wander all over a drawing and still belong to one node. Components separate nodes. On a breadboard, metal strips hidden under the holes create nodes for you. Putting both legs of a resistor into the same connected strip bypasses its intended job.

INTERACTIVE WORKBENCH

See through the breadboard

Select a connection group. Green holes are already joined underneath. The small LED circuit uses different rows so current must pass through its components.

+−ABCDEFGHIJ12345678910One row, two groups.A–E connect together.F–J connect together.The gap separates them.R: E3 → E7LED: B7 (+) → B9 (−)Ground jumper: A9 → −
Row 7, A–E: resistor E7 and LED B7 share one node.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

The drawing is a top view of a simplified mini board with continuous side rails. Real boards can have split rails, different orientations or no rails. With power disconnected, use continuity mode to prove which holes connect. A four-leg pushbutton usually has two internally joined pairs: rotating it can turn your intended switch into a permanent connection.

Instrument modeHow you connect itWhat to remember
DC voltsAcross two points, circuit poweredRed to measured node; black to your reference.
Ohms / continuityAcross an unpowered part or connectionParallel paths can alter readings; isolate a part if needed.
CurrentIn series: break the branch and insert the meterUse the correct fused jack/range. Never across a supply.
TRY IT ON THE BENCH

Build the illustrated indicator

Gather: 3.3 V regulated source, red LED, 330 Ω resistor, breadboard, wires and multimeter.

  1. Disconnect power. Establish the board’s actual row and rail connections.
  2. Connect + to A3; resistor E3–E7; LED anode B7 and cathode B9; A9 to return. Verify LED polarity from its part data.
  3. Inspect for shorts, then apply 3.3 V. Measure across the resistor and divide the reading by 330 Ω.

What you should observe: A lit LED and a calculated current of a few mA. If dark, remove power and check polarity and nodes. Do not bypass the resistor.

A schematic can omit long return wires by placing identical ground symbols at several points. They still mean an electrical connection. The ground in a battery project is usually the chosen local zero-volt reference, not a literal wire to the soil.

SOURCE TRAIL · 1L.1–1L.2, printed pp. 25–27 / PDF pp. 53–55; 1N.4.5, printed pp. 20–21 / PDF pp. 48–49.

Next lesson →
LESSON 04 / 16

Resistors do more than dim LEDs

The same component can limit, divide, bias or sense.

WHAT IT IS

A two-terminal component with a specified resistance.

WHY IT IS HERE

It limits current, defines an input’s default state, divides a voltage or turns current into a measurable voltage.

HOW TO CHOOSE

Resistance, tolerance, power dissipation and sometimes pulse or temperature behavior.

HOW TO CONNECT

No polarity for an ordinary resistor. Its two leads go to the two nodes shown.

A pull-up resistor connects an input to a positive logic supply so it has a defined state when a switch is open. A button to ground overrides it when pressed. At 3.3 V with 10 kΩ, pressing the button draws only 0.33 mA through the resistor. Without the resistor, connecting the input directly to 3.3 V would make pressing that button short the supply.

A voltage divider uses two series resistors. The middle voltage is Vin × Rbottom / (Rtop + Rbottom) when the attached load draws negligible current. “Negligible” is doing important work in that sentence.

INTERACTIVE WORKBENCH

The divider that sags

Two 10 kΩ resistors give 1.65 V from 3.3 V. Attach a load between output and ground. Before changing the control, predict the direction of the change.

3.3 VRtop = 10 kΩRbottom = 10 kΩLoadoptionalVout: 1.65 V
No load: Vout = 1.65 V.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

The load sits in parallel with the lower resistor. A 10 kΩ load makes their combined resistance 5 kΩ, so the output becomes 3.3 × 5 / (10 + 5) = 1.10 V. This is why a divider can scale a sensor signal but usually cannot power a motor or a changing electronic load. Source resistance and load resistance are part of the design.

Read common markings: 4k7 means 4.7 kΩ; 1R0 means 1 Ω; a common three-digit SMD code 103 means 10 followed by three zeros = 10 kΩ. Other coding systems exist. Confirm a loose resistor with a meter; do not trust colour under poor lighting.

TRY IT ON THE BENCH

Make the sag real

Gather: Three 10 kΩ resistors, 3.3 V supply and meter.

  1. With power off, build a two-resistor divider.
  2. Power it and measure its midpoint: approximately 1.65 V.
  3. Power off. Add the third 10 kΩ resistor from midpoint to ground, then measure again.

What you should observe: About 1.10 V after loading. Component tolerances and meter loading cause small differences.

Would moving an LED’s series resistor from its anode side to its cathode side change the current?

No, if the same LED and resistor remain in the same single series branch. The resistor’s position along that branch does not change the branch current.

SOURCE TRAIL · 1N.3–1N.4 and 1L.2, PDF pp. 39–55. Values and workbench are adapted to a 3.3 V learning circuit.

Next lesson →
LESSON 05 / 16

Capacitors give a circuit a memory

They resist sudden voltage changes.

WHAT IT IS

Two conducting regions separated by an insulator; capacitance describes stored charge per volt.

WHY IT IS HERE

They support supply transients, filter signals, couple changing signals and create delays.

HOW TO CHOOSE

Capacitance, voltage rating, tolerance, temperature, polarity, ESR and regulator requirements.

HOW TO CONNECT

A bypass capacitor goes from supply to ground, close to the load. A polarized part must face the correct way.

When a capacitor charges through a resistor, its voltage rises quickly at first and more slowly as it approaches the supply. The current falls as the voltage difference across the resistor shrinks. It does not keep charging forever at the starting current.

INTERACTIVE WORKBENCH

Pause a charging capacitor

This model starts from a fully discharged capacitor. Slide time to see how voltage approaches the source. Here R × C = 1 second.

R = 10 kΩC = 100 µF3.3 VVcap+
At 0 s: Vcap = 0 V; current = 0.33 mA.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

The time constant is τ = R × C. After one τ, voltage has reached about 63% of its final change; after five τ, about 99%. For 10 kΩ and 100 µF, τ is one second. A larger resistor or capacitor makes the response slower. An RC low-pass filter uses the same behavior to smooth rapid changes, at the cost of delay.

A common ceramic marking 104 means 100,000 pF = 100 nF = 0.1 µF. A can marked “100 µF 16 V” specifies capacitance and a voltage limit. The stripe on many aluminium electrolytics marks the negative terminal; other capacitor families can mark polarity differently. Read the part data.

TRY IT ON THE BENCH

Watch voltage settle

Gather: 10 kΩ resistor, 100 µF polarized capacitor rated above 3.3 V, meter and 3.3 V supply.

  1. Connect resistor from +3.3 V to capacitor positive; capacitor negative to return. Start unpowered with the capacitor discharged through 10 kΩ.
  2. Measure across the capacitor while connecting the supply.
  3. Disconnect the supply, then discharge through a 10 kΩ resistor and watch the voltage fall.

What you should observe: A rise and fall over seconds. A slow meter may miss the earliest change. Do not short charged capacitors with a tool.

Why does a capacitor in parallel with the supply not permanently short it?

During charging, current changes its voltage. An ideal capacitor draws no steady DC current once its voltage stops changing. Real capacitors have leakage. At changing voltages, current can continue to flow.

SOURCE TRAIL · 2N.1–2N.2 and 2N.4.2, printed pp. 51–55 and 75 / PDF pp. 79–83 and 103–104.

Next lesson →
LESSON 06 / 16

Diodes give current a preferred direction

A tiny part can protect a much more expensive one.

WHAT IT IS

A two-terminal device with asymmetric conduction. An LED is a diode that emits light.

WHY IT IS HERE

Rectification, polarity protection, signal limiting and inductive-load suppression.

HOW TO CHOOSE

Forward current, reverse-voltage rating, forward drop, speed and heat.

HOW TO CONNECT

Anode and cathode matter. A stripe commonly identifies the cathode on an axial diode.

A forward-biased silicon diode often drops roughly 0.6–0.8 V at modest current; that is a rough operating observation, not a universal fixed number. Schottky diodes can have a lower forward drop but different leakage and voltage limits. LEDs vary with colour, current and temperature. That is why a series resistor or current driver belongs with an LED.

M+5 VKAAt turn-off: winding current can circulate through the diode.

A motor winding or relay coil is inductive: its current cannot change instantaneously. Open its switch and it can raise the voltage sharply in an attempt to keep current flowing. A flyback diode across a DC coil gives that current a controlled loop. Its cathode K goes to the positive supply; anode A goes to the switched low side. During normal on-time, it is reverse biased.

The MOSFET’s built-in body diode is not automatically a replacement for the diode across a low-side-switched coil: its location and direction differ. A diode also changes coil release behavior; ordinary flyback suppression can slow relay release. Faster release designs use a different clamp chosen within the driver and coil limits.

TRY IT ON THE BENCH

Find a diode’s direction

Gather: Loose ordinary diode, LED and a meter with diode mode.

  1. Disconnect the components from all power and other circuitry.
  2. Try both probe directions on the diode. Compare the forward indication with the reverse indication.
  3. Repeat with the LED; some meters cannot supply enough test voltage for every LED colour.

What you should observe: Typically one forward reading and an over-range/open indication in reverse for an ordinary diode. Interpret the result with the meter’s manual.

If the diode is “off” during normal operation, why bother installing it?

Its useful moment is the transition when the coil turns off. Parts can be essential even when they appear to do nothing during steady operation.

SOURCE TRAIL · 3N.5, PDF pp. 146–147; 4L.5.2, printed pp. 175–176 / PDF pp. 203–204. The protection circuit is redrawn and explained for a small DC load.

Next lesson →
LESSON 07 / 16

Transistors: the small signal needs help

The controller gives the instruction. The supply provides the muscle.

WHAT IT IS

A transistor controls an electrical path. Here we use it as a switch.

WHY IT IS HERE

A microcontroller pin cannot directly supply a motor, solenoid or ordinary relay coil.

HOW TO CHOOSE

Device type, drive requirement, load current, voltage, heat, switching speed and package pinout.

HOW TO CONNECT

For this N-MOSFET low-side circuit: source to return, drain to load, gate to control.

An NPN bipolar transistor has base, collector and emitter. A base resistor limits drive current. A useful switching design deliberately provides enough base current to saturate the transistor, within the GPIO and transistor limits. Do not size a switch using only a typical small-signal gain number.

An N-channel enhancement MOSFET has gate, drain and source. Positive gate-to-source voltage enables conduction. The insulated gate needs little steady current, but each transition requires charge to move. Large gate charge and rapid switching may call for a separate gate-driver IC.

INTERACTIVE WORKBENCH

Follow the two different jobs

Switch the gate command. The highlighted load branch represents power from the motor supply. It does not come through the GPIO.

MGDS0 / 3.3 V100 Ω*100 kΩMOSFET+VmCommon ground: control source + motor-supply return.
Gate LOW. MOSFET commanded off.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

*The shown 100 Ω gate resistor and 100 kΩ pull-down are illustrative starting values for a small, slowly switched load. The series resistor affects edge rate and peak gate current; the pull-down prevents a floating gate during reset. Pick the final values from drive capability, gate charge and measured switching behavior.

Suppose a MOSFET has 0.05 Ω on-resistance under the actual drive and temperature conditions. At 1 A, conduction loss is I²R = 0.05 W. At 3 A, it becomes 0.45 W. A headline “30 A” rating does not tell you that a tiny uncooled assembly can sustain 30 A. Thermal conditions and switching losses still matter.

Look at the complete package drawing before wiring. A metal tab can be electrically connected to the drain. A TO-220 silhouette does not guarantee a gate–drain–source order, and an SMD adapter can reorder labels. The diagram shows terminal roles, not left-to-right physical legs.

Why can a MOSFET remain partly on after its control wire is unplugged?

The gate can retain charge and pick up interference. The pull-down provides a defined discharge path. Never rely on a disconnected gate as an off command.

SOURCE TRAIL · 4N.5 and 4L.5, PDF pp. 194–204; 12N.1–12N.2 and 12L.1, PDF pp. 493–498 and 514–516. MOSFET package and threshold footnotes were inspected visually.

Next lesson →
LESSON 08 / 16

Relays are two circuits sharing a mechanism

The click is a clue, not proof that your load is wired correctly.

WHAT IT IS

An electromagnet moves one or more sets of contacts.

WHY IT IS HERE

It lets one circuit open or close another; the contacts can provide isolation from the coil.

HOW TO CHOOSE

Coil voltage/current, contact arrangement, DC load rating, inrush and expected switching life.

HOW TO CONNECT

Wire the coil through its driver. Wire the load through COM and the desired NO or NC terminal.

INTERACTIVE WORKBENCH

Look inside the relay

“Normally” means with the coil unenergized. Energize it and watch which contact COM reaches.

COIL SIDECONTACT SIDEElectromagnetNeeds a rated coil supplyand a driver + suppression.COMNONCforceMechanical coupling; no wire across this gap.
Coil off: COM connects to NC. NO is open.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

NO means normally open; NC means normally closed; COM is the moving contact’s common terminal. In a simple normally-off lamp circuit: load supply positive → COM; NO → lamp; lamp return → load supply negative. Applying the correct coil drive closes the circuit. The coil does not generate the voltage at NO.

A bare relay normally has no “logic input.” Its coil may need tens of milliamps or more, plus a flyback path. A relay module may add a transistor, diode, indicator and optocoupler. Its input may be active-low or incompatible with 3.3 V. Check the module schematic; an optocoupler on a board does not guarantee isolation if grounds or jumpers reconnect the sides.

A printed AC contact rating does not establish the same DC switching rating. An inductive load or motor startup can be more demanding than a resistive lamp. Read the load category and endurance conditions. Keep all learning experiments on low-voltage DC; mains switching calls for a different level of enclosure and protection design.

TRY IT ON THE BENCH

Identify contacts with no power

Gather: An unpowered, documented SPDT relay and a continuity meter.

  1. Find the coil and contact pins from the relay’s exact datasheet.
  2. Check COM–NC and COM–NO with the coil unpowered.
  3. If you later energize the coil, use its rated supply and a documented protected driver; do not use an MCU pin directly.

What you should observe: COM–NC normally has continuity; COM–NO normally does not. Pin diagrams may be bottom views—check the viewing direction.

The relay clicks but the lamp stays dark. What would you measure first?

Measure whether the contact-side power source exists, then whether COM reaches NO when energized. A working coil proves only that the mechanism received enough drive, not that the load circuit is complete.

SOURCE TRAIL · 12L introduction, PDF p. 514, motivates comparison with a relay. Coil/contact selection and practical relay wiring are added material; see OMRON references in the source map.

Next lesson →
LESSON 09 / 16

Power is a design decision

Match voltage, budget current, then check heat.

WHAT IT IS

A source delivers energy. A regulator converts or stabilizes its voltage.

WHY IT IS HERE

Different parts often need different supply voltages and transient currents.

HOW TO CHOOSE

Input range, output voltage, continuous and surge current, heat, efficiency, ripple and protection.

HOW TO CONNECT

Confirm input and output labels before power-up; measure an adjustable module before attaching electronics.

µFA typical buck-module layoutIN + / −OUT + / −CapacitorInductorControl ICIllustrative arrangement only; read your board labels and schematic.

A linear regulator behaves like a controlled series element, losing the excess voltage as heat. Its approximate dissipation is (Vin − Vout) × Iout. A buck switches to step voltage down; a boost steps it up; a buck-boost can regulate across input voltages above and below its output. Switching converts energy—it cannot create extra power.

INTERACTIVE WORKBENCH

Where does the missing power go?

Compare a linear regulator with a hypothetical 90%-efficient buck converting 9 V to 5 V. Only output current changes here.

9 V insourceRegulator9 V → 5 V5 V loadLoss becomes heat.
At 0.20 A: load power = 1.00 W.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

A 9 V to 5 V linear regulator at 0.2 A dissipates 0.8 W. Whether that is tolerable depends on package, copper, airflow and temperature. Also check dropout: a regulator needs sufficient headroom to maintain its output. Capacitor type and value can affect stability; use the manufacturer’s application circuit, not a random “bigger is better” capacitor.

Budget a motor supply from loaded current, startup or stall current, and simultaneous loads. A microcontroller reset when a motor starts often indicates supply sag or a poor return path. Place local capacitors near the driver as specified, and avoid routing motor return current through the logic board or a breadboard rail.

Battery Ah describes stored charge. Wh ≈ nominal volts × Ah is a more useful energy comparison across voltages. Runtime estimates must allow for varying load, conversion loss and cutoff. Design for the pack’s full-charge voltage as well as nominal voltage; use a matching commercial charger and properly assembled pack.

A boost module says 5 V, 1 A output from a 3 V input. Can the input current be only 1 A?

At 1 A output the load uses 5 W. Even an ideal converter needs 5/3 ≈ 1.67 A from 3 V. Real input current is higher because efficiency is below 100%.

SOURCE TRAIL · 11N.1–11N.3 and 11N.6, PDF pp. 461–478. Heat, dropout and conversion concepts are condensed; battery and wiring decisions are added.

Next lesson →
LESSON 10 / 16

Motors need the right kind of driver

“Make it move” is several different electrical jobs.

A brushed DC motor usually has two power leads. Reverse the voltage polarity and rotation usually reverses. A gearmotor adds a gearbox. A positional hobby servo adds gears, sensing and a controller; a continuous-rotation servo interprets its command differently. A stepper needs sequenced winding currents. A brushless motor needs electronic commutation, often provided by an ESC. These drivers are not interchangeable.

WHAT IT IS

A motor turns electrical energy into mechanical motion; its driver controls winding power.

WHY IT IS HERE

A controller supplies timing and commands, not the motor’s operating energy.

HOW TO CHOOSE

Motor voltage, loaded speed, required torque and stall current; driver topology, logic levels and thermal capability.

HOW TO CONNECT

For a brushed H-bridge, the two motor leads connect between its two outputs. Neither output is a permanent ground.

When a brushed motor spins it generates back EMF opposing the applied voltage. At startup or stall there is little back EMF, so current can be much higher. No-load current describes a lightly spinning motor, not the hardest case. A driver sized only for that figure may fail or shut down.

INTERACTIVE WORKBENCH

Reverse the voltage without swapping wires

An H-bridge selects opposite diagonal switches. The model shows steady command states; a real driver also controls transitions and inductive recirculation.

Motor supply +Return / GNDMupper Lupper Rlower Llower R
Coast: no active voltage drive. The wheel may keep turning.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

PWM rapidly alternates drive states. Frequency is how often the period repeats; duty is the active fraction. It changes the average electrical drive, but duty is not RPM. A stalled motor at low duty may still heat. Reverse only after stopping for your first bench experiments; rapid reversal can create large current and return energy to the supply.

INTERACTIVE WORKBENCH

Duty changes; pulse height does not

Move the duty slider. This is a 3.3 V command waveform, not a motor power output.

3.3 V0 V
Duty = 30%. The HIGH level remains 3.3 V.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

Choose a driver with documented sustained current and startup handling at your supply and cooling conditions. “2 A peak” is not “2 A indefinitely.” Check its truth table, sleep/enable state, fault behavior and current-limit implementation. A gate driver moves MOSFET gate charge; a motor driver may include the power bridge; a software driver is code. The shared word does not make these the same thing.

A servo has a signal wire. Why can it still need a large power supply?

The signal only describes the command. Its internal motor draws current from the supply wires, especially under load or at a mechanical stop. Signal current is not motor current.

SOURCE TRAIL · 8L.4 PWM motor drive, PDF pp. 368–369; 10N/10L motor feedback, PDF pp. 435–457; 26N mechanical devices, PDF pp. 1072 onward. Driver selection is an added practical synthesis.

Next lesson →
LESSON 11 / 16

Gears and bearings explain where force goes

Electrical success can still produce a terrible mechanism.

WHAT IT IS

Gears transmit rotation; bearings support rotation; shafts, hubs and couplers join the motion path.

WHY IT IS HERE

They adapt a motor’s speed and torque and keep moving parts aligned.

HOW TO CHOOSE

Ratio, dimensions, shaft attachment, loads, tooth compatibility and mounting.

HOW TO CONNECT

A gear or wheel must grip its shaft; a bearing must be located in a suitable housing.

INTERACTIVE WORKBENCH

Trade speed for torque

Use gearbox reduction and wheel diameter to estimate unloaded travel speed. Assume a 3000 RPM input and ignore losses in the speed calculation.

MotorReduction gearboxWheelLower speed ↔ greater torque
30:1 reduction → 100 RPM output. A 60 mm wheel gives about 0.314 m/s.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

For a simple external gear pair, reduction = driven teeth / driving teeth. The output turns in the opposite direction. A 12-tooth input driving 24 teeth gives 2:1 reduction: half speed and about twice torque before losses. Several stages multiply their ratios. If a gearmotor specification already gives output RPM, do not divide it by the internal ratio again.

Choose meshing gears with compatible module and pressure angle, plus appropriate tooth form, material and load capacity. Correct ratio alone does not make two gears compatible. A D-shaft and matching clamping hub can keep a wheel from slipping; a plain hole of approximately the right size cannot guarantee torque transmission.

Wheel ground speed is approximately π × diameter × RPM / 60. Wheel force is approximately axle torque / wheel radius. Bigger wheels travel farther per turn but need more torque for the same push. Tires can slip, so available motor torque is not the only limit.

Bearing + housingShaft supported near its loadshaft

A bearing’s bore fits the shaft; outside diameter fits the housing; width affects the assembly spacing. Radial load pushes across the shaft; axial load pushes along it. Select for the actual load direction, speed and environment. A deep-groove ball bearing often carries radial and some axial load, but its exact ratings govern. A bushing may be sufficient for a simple slow mechanism.

TRY IT ON THE BENCH

Audit a mechanism without electricity

Gather: A wheel, shaft/hub or unpowered chassis.

  1. Remove all power. Inspect shaft fit, screw retention, cable clearance and wheel rubbing.
  2. Rotate only mechanisms that are designed to back-drive; do not force a worm gearbox.
  3. Check whether the wheel turns the shaft or slips around it.

What you should observe: You can separate friction, misalignment and loose coupling from an electrical fault.

Will gearing down always let the motor move an arbitrarily heavy car?

No. Gear and shaft strength, motor heating, traction and efficiency impose limits. Reduction trades speed for torque; it does not create mechanical power.

SOURCE TRAIL · Mechanical supplement. Source book: 10L mechanism example, PDF p. 453, and 26N survey. Gear and bearing selection references: KHK and SKF in the source map.

Next lesson →
LESSON 12 / 16

Sensors speak different electrical languages

A measurement becomes useful only when you know its format.

WHAT IT IS

A device changes an electrical property or sends data in response to a physical quantity.

WHY IT IS HERE

It turns light, position, temperature, force or motion into information.

HOW TO CHOOSE

Range, accuracy, repeatability, update rate, environmental limits, supply and interface.

HOW TO CONNECT

Identify power, return and signal pins; establish voltage compatibility before connecting.

A thermistor changes resistance with temperature; it often needs a divider. A potentiometer provides a position-related divider voltage. A Hall sensor responds to a magnetic field. An encoder produces rotation-related pulses. An IMU sends measured motion over a digital bus. “Digital” means there is a defined electrical and protocol interface, not that every three-pin sensor can be plugged into the same socket.

INTERACTIVE WORKBENCH

A knob becomes a number

Slide the wiper. The ideal divider feeds a high-impedance 12-bit ADC with a 3.3 V reference.

3.3 V10 kΩADCvoltage → number0…409512-bit modelThree-terminal potentiometer: two ends + a moving contact.
At 50%: 1.65 V, approximately 2048.

Teaching model: explains the stated relationship. It does not simulate or validate a physical circuit.

What comes out?Typical MCU connectionWhat you must check
Contact or on/off outputGPIO inputPull-up/down, active state, debounce, output voltage.
Analog voltageADC-capable pinRange, reference, source impedance, filtering.
Pulse train / quadratureTimer input or encoder interfaceCounts per revolution, edge levels, counting mode.
I²CSDA + SCLAddress and all pull-up voltages.
SPIClock, data and chip selectClock mode, framing, logic voltage.
UARTTX/RX as requiredLogic voltage, baud and framing; not RS-232 voltage levels.

An op-amp can buffer or amplify a small signal; a comparator reports which of two input voltages is larger. Some sensor modules provide both AO (analog) and DO (thresholded digital) outputs. Their potentiometer may set the comparison threshold rather than calibrating the sensor’s true physical measurement.

Hysteresis gives a threshold two boundaries. For a light-controlled output, you might switch on above 2.0 V and switch off below 1.5 V. Between them, keep the previous state. That avoids rapid chattering when noise nudges a signal around one boundary. Those voltages are an example, not universal sensor thresholds.

TRY IT ON THE BENCH

Read position before writing software

Gather: 10 kΩ potentiometer, 3.3 V source and multimeter.

  1. Wire the two outer electrical terminals across supply and return. Identify them with the part drawing or an unpowered resistance check.
  2. Measure the wiper relative to return while turning the knob.
  3. Only then plan its ADC connection.

What you should observe: A smooth voltage range from near 0 V to near 3.3 V. Swapping the end connections reverses the direction of increase.

Is a 12-bit number necessarily accurate to one part in 4096?

No. Resolution is the available code spacing. Reference error, noise, offset, sensor accuracy and signal conditioning can be much worse. More bits do not fix a poor measurement.

SOURCE TRAIL · 6N feedback and op-amps, PDF pp. 273–289; 8N.2 comparators, PDF pp. 348–354; 18N.1–18N.2, PDF pp. 717–724. Sensor interface survey is added material.

Next lesson →
LESSON 13 / 16

PCBs and connectors make a circuit dependable

Neatness is useful when it makes the electrical paths clearer.

WHAT IT IS

A PCB is an insulating board with patterned copper and mounted parts. Connectors provide detachable joints.

WHY IT IS HERE

They provide repeatable wiring, mechanical support and serviceable assemblies.

HOW TO CHOOSE

Correct footprints and pin numbering; current paths, clearance, mounting, connector family and wire ratings.

HOW TO CONNECT

The schematic defines nets; the layout must implement them with the right physical pin mapping.

µFICConnectorCopper makes the connections.ConnectorComponent side shown; exact footprints and pin order come from the parts.

A schematic symbol might label a transistor’s pins G, D and S. Its PCB footprint gives pads numbers 1, 2 and 3. The library mapping must connect those identities correctly for the exact package. A beautiful board with a reversed footprint is still wrong. Check top-versus-bottom views, pin-1 markers and mirrored connector drawings.

A via connects copper layers. A ground plane provides a broad reference/return conductor. A test point lets you measure a useful node. Decoupling parts need short connections to the pins they support. Fast current loops should be compact; long paths add resistance and inductance.

Connector featureWhy you care
PitchCentre-to-centre spacing; similar-looking series may not mate.
Contacts and housingBuy the matching terminal series, not just a shell with the right pin count.
Current and wire rangeSmall contacts or poorly crimped terminals can heat at motor current.
Keying and latchHelps prevent reversal and vibration-related disconnection.
Strain reliefCable motion should not pull directly on a solder joint.

“JST connector” is not a complete specification: many distinct connector families exist. Generic friction-fit jumpers are convenient for bench signals but poor choices for high motor current and a vibrating car. A screw terminal also needs correct wire preparation and tightening; a wire merely touching the metal is not a reliable connection.

Move from breadboard to soldered perfboard or a suitable carrier when the circuit works. Inspect joints under magnification, check continuity while gently moving cables, and label both ends of every power cable. Fit standoffs so conductive hardware cannot touch exposed copper. Avoid loose strands and unsupported heavy wires.

A two-pin plug fits. Is that enough to connect the battery?

No. Check polarity, voltage, current rating and the mating terminal arrangement. Two sellers can wire the same-looking connector with opposite polarity.

SOURCE TRAIL · Practical construction extends 1L.1, PDF pp. 53–54, 4L.6 noise, PDF pp. 204–205, and 9N/9S wiring and stability discussions. Connector and footprint selection are additional material.

Next lesson →
LESSON 14 / 16

Choose parts using conditions, not headlines

A datasheet is a set of promises with small print.

You do not have to read every page of every datasheet. Begin with your job: supply range, expected current, control voltage, switching rate, environment and physical constraints. Then inspect the pinout, recommended operating conditions, electrical characteristics and typical application. Treat absolute maximum ratings as boundaries against damage, not desirable operating points.

You need to know…Look for…Question to ask
Can I power it?Recommended supply rangeDoes this include full-charge voltage and likely dips?
Will it recognise my signal?VIH, VIL, output levelsIs a 3.3 V HIGH guaranteed to be enough?
Can it carry the load?Continuous/peak current and conditionsFor how long, at what temperature and cooling?
How much heat?Voltage drop, resistance, thermal dataWhat happens under my actual drive conditions?
How do I wire it?Pin functions and package viewAm I looking from above or below?
What else does it need?Typical application and layoutCapacitors, resistors, pull-ups, protection or driver?

Here is a fictional comparison for a small 5 V, 1 A load switched by a 3.3 V GPIO. Assume voltage ratings are otherwise sufficient; the incomplete data are deliberate.

CandidateHeadlineUseful detail
A60 A MOSFETRDS(on) = 8 mΩ only specified at VGS = 10 V.
B5 A MOSFETRDS(on) maximum = 70 mΩ specified at VGS = 2.5 V.
C20 A MOSFETVGS(th) = 1 V; no low-voltage on-resistance supplied.
Which candidate deserves the next design check?

B: it has an on-resistance guarantee at a drive voltage your 3.3 V system can exceed. Estimated 1 A conduction loss is 0.07 W at that resistance, before temperature effects and switching loss. Next check package thermals, gate charge, maximum VGS, voltage margin and pinout. A and C are not established as suitable from the given information; their impressive headline numbers do not answer the drive question.

Now choose a hypothetical 5 V relay whose coil power is 0.36 W. Coil current is approximately 0.36 / 5 = 72 mA. That points you toward a driver stage, not direct GPIO drive. The contact rating is a separate question determined by the load. The relay’s “5 V” label alone never answers both questions.

For mechanics, make the same kind of decision sheet: shaft diameter and shape, bearing dimensions, rated load, hub attachment and mounting clearance. An exact dimension with a tolerance is more useful than “small bearing” or “fits an RC car.”

TRY IT ON THE BENCH

Read one component you already own

Gather: One marked part or documented module, its manufacturer datasheet and a notebook.

  1. Write the exact marking, including suffix and package.
  2. Fill the selection card. Identify which claims belong to the chip and which belong to the carrier board.
  3. Trace the circuit’s power and signal pins before powering it.

What you should observe: A defensible wiring plan and an explicit list of remaining unknowns.

A typical curve illustrates behavior; a minimum/maximum specification states a guarantee under its stated test conditions. A module seller’s description cannot replace its schematic or a thermal evaluation. Use curves to understand trends, then design with margins and verify on the bench.

SOURCE TRAIL · 12L.1, PDF pp. 514–516, emphasises drive conditions, misleading current headlines and dissipation. The candidate comparison and selection-card method are original exercises.

Next lesson →
LESSON 15 / 16

Read a whole project, one connection at a time

Now the collection of parts has a reason to exist.

Imagine a small knob-controlled fan. It is a better first decoding exercise than a full car: one motor, one direction, no radio. You want the knob to change speed. Before writing code, draw three paths: knob voltage to controller; controller command to switch; motor-supply energy through the motor and switch back to the source.

5 V supplyfuse + switchpower busMGDSController3.3 V logicgate commandUSB supplies logicCommon reference at supply return • high-current wiring kept short

This is a system view. The complete MOSFET circuit in chapter 7 adds the gate pull-down and identifies the gate resistor; the actual driver also needs its specified supply decoupling. Do not treat this overview as a bare-part construction recipe. Use either a fully specified discrete design or a documented low-side driver module compatible with your load and 3.3 V logic.

PartWhy it is presentWhat you establish before wiring
PotentiometerMakes a controllable analog voltageOuter terminals across 3.3 V and GND; wiper inside ADC range.
ControllerMeasures knob and creates PWMChosen ADC pin, output pin and safe reset behavior.
MOSFET / driverSwitches motor powerAdequate drive, current, voltage and cooling.
Gate pull-down / enable defaultKeeps the motor off during resetDriver defaults inactive even before firmware runs.
Flyback pathHandles winding current at turn-offCorrect topology, polarity and ratings.
Local capacitorsReduce local supply disturbanceRequired values, polarity and placement.
Fuse, switch, connectorsProvide protected, serviceable powerRated current, polarity, retention and disconnect access.
Mount and guardKeep movement predictableMotor secure; fingers and cables clear.

There are two supplies in this bench arrangement: the controller’s normal USB-derived logic supply, and a separate current-limited motor supply. Their grounds share a reference. Their positive rails are not casually joined. Motor current should return by an adequate conductor to its supply, rather than wandering through the controller board.

Now pretend something fails. If the motor never moves, first measure motor supply at the driver, then the enable/control state, then output behavior and the mechanism. If the controller resets only on startup, look at supply droop and return paths. If the motor turns but the wheel does not, inspect the hub. Each symptom points to a trail, which tells you where to measure.

Could you remove the controller and still test the power switch?

Yes, with a known compatible manual control source and the documented driver circuit. Prove the power stage using brief attended tests before making software responsible for it. Never use a floating control input as the test method.

SOURCE TRAIL · Synthesis of source topics 1N, 4L.5, 8L.4, 11N and 12N. The fan system and diagnostic exercise are original, created for your component-understanding goal.

Next lesson →
LESSON 16 / 16

Connect this knowledge to STM32—when ready

First understand the circuit. Then let C operate it.

The STM32 replaces manual signal generation and observation. GPIO can read a switch or command a driver. An ADC measures an allowed analog voltage. A timer creates PWM or counts encoder edges. I²C, SPI and USART exchange structured data. None of these peripherals removes the need to choose a suitable power circuit.

Hardware jobSTM32 facilityWhat comes first
Read a pushbuttonGPIO inputCorrect pull-up/down and active state.
Measure a knobADCInput range, reference and source impedance.
Control a motor driverTimer PWM + GPIO enable/directionVerified driver topology and a safe off state.
Count rotationTimer encoder/capture modeEncoder voltage, wiring and count convention.
Read a digital sensorI²C / SPI / USARTCorrect interface, power and pin mapping.

For your STM32F411RE CMSIS learning, retain the path you already use: physical signal → MCU pin → GPIO clock → pin mode or alternate function → peripheral clock → peripheral configuration → observable signal. For example, PA6 can carry TIM3_CH1 through alternate function 2. Its Nucleo D12 header label is another name for that board connection—not a second independent signal.

A timer generates a repeated count. In a common edge-aligned PWM arrangement, frequency = timer_clock / ((PSC + 1) × (ARR + 1)). The compare value chooses duty. Before calculating, establish the actual timer clock, including the applicable APB timer-clock behavior. A memorized register value is not a substitute for the clock configuration.

Start with a button that lights the onboard LED. Then read a potentiometer without a motor connected. Next observe PWM on a logic analyzer or oscilloscope. Finally connect a proven driver stage with its load secured. That ordering makes a wrong pin, bad sensor reading and underpowered motor three separate problems.

The useful change in your understanding is this: a line of C changes a hardware register; a register selects or controls an electrical signal; that signal commands a power device; the power device changes current; current produces force. When you can explain every link, the project has stopped being a collection of mysterious parts.

Does setting an output HIGH mean “send power to the motor”?

It means the pin drives a logic level within its electrical limits. The motor driver interprets that level and switches power from the motor supply. The distinction protects the MCU and makes debugging much clearer.

SOURCE TRAIL · The source’s microcontroller portion uses other devices and interfaces. This short STM32 translation is added; pin mapping was checked against ST’s F411 datasheet and Nucleo manual in the earlier edition. It is conceptual guidance, not new tested firmware.

Pocket reference →

The pocket reference

Use this as a lookup after reading the lessons.

WordPractical meaning
LoadThe part drawing power from a source or signal output.
Node / netElectrically joined points; a net is their named schematic connection.
GroundChosen reference and return network; not necessarily Earth.
High impedanceDraws relatively little current for an applied voltage.
Pull-up / pull-downProvides a default level when no stronger source drives the node.
DecouplingKeeps changing current demands local and reduces supply interaction.
FlybackThe turn-off behavior of current in an inductive load.
StallMotor cannot rotate while energized; high current may result.
TorqueTwisting effort, in N·m; 1 kgf·cm ≈ 0.0981 N·m.
DutyActive fraction of one PWM period.
FootprintPCB pad geometry and pin mapping for a physical package.
HysteresisDifferent thresholds for switching in opposite directions.
Absolute maximumA stress limit, not an intended operating target.

Eight bench sessions, no rush

  1. Trace a complete loop and identify the meter’s voltage socket.
  2. Map a breadboard; build the resistor–LED circuit.
  3. Build and load the two-resistor divider.
  4. Watch capacitor charge and discharge.
  5. Identify diode polarity and relay contacts without a powered load.
  6. Complete a selection card for one transistor or driver.
  7. Measure a potentiometer output; inspect a motor mechanism unpowered.
  8. Combine a proven input, controller and driver, one layer at a time.

How the attached book was used

Primary source: Learning the Art of Electronics: A Hands-On Lab Course, Thomas C. Hayes with the assistance of Paul Horowitz, Cambridge University Press, 2016. The supplied PDF has 1,169 PDF pages. Its contents and relevant sections were inspected to build this selective learning path. PDF page numbers below count from the cover; they are not the printed page numbers.

This guideRelevant source sections / PDF pages
Electricity and breadboards1N.2–1N.4; 1L.1–1L.2 / 33–55
Resistors and loading1N.3–1N.4; 1S / 39–51, 63 onward
Capacitors2N.1–2N.2, 2N.4 / 79–84, 102–104
Diodes and coil protection3N.5; 4L.5.2 / 146–147, 203–204
Transistors and MOSFETs4N.5; 12N.1–12N.2; 12L.1 / 194–195, 493–498, 514–516
Power regulation11N / 461–478
PWM and feedback8L.4; 10N/10L / 368–369, 435–457
Sensors, thresholds and ADCs6N; 8N.2; 18N.1–18N.2 / 273–289, 348–354, 717–724
Mechanisms and broader projects26N / 1050 onward; expanded here with additional material

This is a shorter, topic-focused companion with original explanations, drawings, values and interactions. It deliberately leaves out most amplifier analysis, oscillator design, digital logic construction, HDL and processor-specific labs. Gears, bearings, connectors, relay selection and the STM32 bridge are supplements to the source, not claims about its detailed coverage.

Additional technical references

What the workbenches do: the LED uses a fixed forward-drop approximation; the divider uses parallel resistance; RC charging uses an ideal exponential; regulator comparison assumes a stated constant efficiency; the gears use ideal geometric speed; the ADC uses an ideal endpoint mapping. Switch, MOSFET, relay and bridge views are conceptual state diagrams. None models parasitic effects, thermal dynamics or component failure.

Before building: use the actual component and carrier datasheets, low-voltage DC, suitable current limiting and physical inspection. Build with power disconnected. Secure rotating loads. Do not route motor current through a solderless breadboard. Scope ground clips can be Earth-referenced: do not clip one to a switching motor output as if it were ground.

Edition 2 · September 2026 · Original visual lessons prepared for Ajinkya. The reading style is conversational, visual and experiment-led; it is not an official Head First, Make or Cambridge publication.

Diagram detail · scroll sideways on small screens