Analog Circuits and Sensing

Op-amps, comparators and timers, and how to read, amplify and filter the signal from a sensor.

Real-world signals are analog: a temperature, a weight, a light level, a pressure. A sensor turns them into a small voltage, current or resistance change, and an analog circuit has to amplify, filter and condition that signal before a microcontroller’s ADC can read it. This guide covers the building blocks (op-amps, comparators, the 555 timer, regulators) and then the sensors themselves, with worked numbers for gain, scaling and resolution. It builds on Electronics Fundamentals (resistors, capacitors and dividers), and the digital end of the chain is in Digital Electronics and Microcontrollers.

Start here: what do you need?

I need to…Go to
amplify a small signal, buffer a voltage, or build a filter with an op-ampOp-amps and Integrated Circuits
compare a voltage with a threshold, or build a window detectorOp-amps and Integrated Circuits
make a pulse, a delay or an oscillator with a 555Op-amps and Integrated Circuits
read a thermistor, RTD or thermocoupleSensors and Signal Conditioning
read a strain gauge or load cell with a bridge and an instrumentation amplifierSensors and Signal Conditioning
scale a 4-20 mA or 0-10 V signal into an ADCSensors and Signal Conditioning
choose a voltage regulator or reference for a precision circuitOp-amps and Integrated Circuits
decide why a reading is noisy or driftsSensors and Signal Conditioning

A suggested order

Read the op-amp page first for the building blocks, then the sensing page, which uses them. Each page follows on from the one before.

  1. Op-amps and Integrated Circuits: Op-amp circuits, comparators, the 555 timer, logic gates, voltage regulators and converters, and how to read a datasheet.
  2. Sensors and Signal Conditioning: Thermistors, RTDs, thermocouples, strain gauges and load cells, photodiodes, 4-20 mA loops: how each works and how to amplify, filter and read it.

Quick reference: formulas

TopicFormulaPage
Inverting amplifier gainA = −Rf ÷ RinOp-amps and Integrated Circuits
Non-inverting amplifier gainA = 1 + Rf ÷ RgOp-amps and Integrated Circuits
Bandwidth of an amplifierBW ≈ GBW ÷ gainOp-amps and Integrated Circuits
Slew-rate limitSR ≥ 2π f VpeakOp-amps and Integrated Circuits
555 astablef ≈ 1.44 ÷ ((Ra + 2Rb) C)Op-amps and Integrated Circuits
Instrumentation amplifier (three op-amp)G = 1 + 2R ÷ RgainSensors and Signal Conditioning
ADC step (1 LSB)Vref ÷ 2N (3.3 V, 12 bit: 0.806 mV)Sensors and Signal Conditioning
4-20 mA to percent% = (I − 4 mA) ÷ 16 mA × 100Sensors and Signal Conditioning
Strain gaugeΔR ÷ R = GF × εSensors and Signal Conditioning
Averaging N readingsrandom noise falls by √NSensors and Signal Conditioning

Calculators

The other Electronics guides

  • Electronics Fundamentals: The circuit basics every maker needs: Ohm’s law, resistors, capacitors, inductors, diodes, transistors and switches, with worked examples.
  • Digital Electronics and Microcontrollers: Logic gates, counters and timing, and the hardware around a microcontroller: power, reset, clocks, GPIO, level shifting, the ADC and buses.
  • Power and Motor Electronics: Batteries and supplies, switching converters and thermal design, and driving DC motors, steppers, servos and solenoids.
  • Design, Testing and Troubleshooting: Reading datasheets, keeping a design quiet, measuring a circuit, finding faults with flowcharts, and complete worked projects.
  • PCB Design and Layout: schematic to layout, stack-up, routing, return paths and design checks.

FAQ

Which op-amp should I use for a first project?

A general-purpose rail-to-rail part such as the MCP6002 or LM358 works for most single-supply sensor circuits. Choose a lower-noise or lower-offset part only when the measurement needs it; see Reading Datasheets.

Why is my sensor reading noisy?

Check the supply and the ADC reference first, then the source impedance and the wiring. Troubleshooting Flowcharts has a flowchart for it.

Do I need an instrumentation amplifier?

For a bridge sensor such as a load cell or strain gauge, whose output is a few millivolts on a large common voltage, yes, or a dedicated bridge ADC. A single op-amp is fine for a thermistor divider.

References

  • Texas Instruments, Op Amps for Everyone (SLOD006) and Analog Engineer’s Circuit Cookbook.
  • Analog Devices, Op Amp Applications Handbook.
  • Horowitz, P. and Hill, W., The Art of Electronics, 3rd ed., Cambridge University Press.
  • Manufacturer datasheets and application notes for the parts you use: they give the limits, pinouts and example circuits.

Last reviewed: October 2026. Values are typical: check the datasheets of the parts you use, follow the electrical code for mains work, and do not work on live mains equipment unless you are qualified.