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-amp | Op-amps and Integrated Circuits |
| compare a voltage with a threshold, or build a window detector | Op-amps and Integrated Circuits |
| make a pulse, a delay or an oscillator with a 555 | Op-amps and Integrated Circuits |
| read a thermistor, RTD or thermocouple | Sensors and Signal Conditioning |
| read a strain gauge or load cell with a bridge and an instrumentation amplifier | Sensors and Signal Conditioning |
| scale a 4-20 mA or 0-10 V signal into an ADC | Sensors and Signal Conditioning |
| choose a voltage regulator or reference for a precision circuit | Op-amps and Integrated Circuits |
| decide why a reading is noisy or drifts | Sensors 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.
- Op-amps and Integrated Circuits: Op-amp circuits, comparators, the 555 timer, logic gates, voltage regulators and converters, and how to read a datasheet.
- 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
| Topic | Formula | Page |
|---|---|---|
| Inverting amplifier gain | A = −Rf ÷ Rin | Op-amps and Integrated Circuits |
| Non-inverting amplifier gain | A = 1 + Rf ÷ Rg | Op-amps and Integrated Circuits |
| Bandwidth of an amplifier | BW ≈ GBW ÷ gain | Op-amps and Integrated Circuits |
| Slew-rate limit | SR ≥ 2π f Vpeak | Op-amps and Integrated Circuits |
| 555 astable | f ≈ 1.44 ÷ ((Ra + 2Rb) C) | Op-amps and Integrated Circuits |
| Instrumentation amplifier (three op-amp) | G = 1 + 2R ÷ Rgain | Sensors 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 × 100 | Sensors and Signal Conditioning |
| Strain gauge | ΔR ÷ R = GF × ε | Sensors and Signal Conditioning |
| Averaging N readings | random noise falls by √N | Sensors and Signal Conditioning |
Calculators
- RC Time Constant and Filter Calculator: Time constant, cutoff frequency, filter gain and charging times.
- 555 Timer Calculator: Frequency, duty cycle and pulse length of a 555 circuit.
- Reactance and Resonance Calculator: Capacitor and inductor reactance, resonant frequency and impedance.
- Voltage Divider and LED Resistor Calculator: Output of a divider with and without a load, and the resistor for an LED.
- Resistor Network and Standard Value Calculator: Series and parallel totals, nearest E-series value, and a pair of standard resistors for a target.
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.
