Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Op-Amp Sensor Signal Conditioning Front End

Analog front-end design that scales a low-level 0–150 mV sensor signal for a 3.3 V ADC. The circuit uses an AD8541 non-inverting op-amp stage followed by a first-order RC low-pass filter. MATLAB provides the analytical model, while LTspice verifies the design with a real op-amp model.

Design

  • Sensor input: 0–150 mV
  • Supply: 3.3 V
  • Op-amp: AD8541
  • Rg = 1 kΩ
  • Rf = 20 kΩ
  • Closed-loop gain: 21 V/V
  • Ideal maximum output: 3.15 V
  • Filter: 10 kΩ + 10 nF
  • Filter cutoff: ≈1.59 kHz

Schematic

LTspice schematic

For the non-inverting stage:

Av = 1 + Rf/Rg = 21

At the maximum sensor input:

Vout = 21 × 0.150 V = 3.15 V

The RC cutoff is:

fc = 1 / (2πRC) ≈ 1.59 kHz

MATLAB Analytical Model

The simplified analytical transfer function is:

H(s) = 21 / (1 + sRC)

It models the gain stage as ideal and includes the RC filter pole.

DC Transfer

MATLAB DC transfer

Transient Response

The transient test uses:

Vin = 75 mV ± 50 mV at 100 Hz

so the input remains between 25 mV and 125 mV.

MATLAB transient response

Frequency Response

MATLAB Bode plot

Console Results

MATLAB console results

LTspice Verification

LTspice uses the real AD8541 model on a 3.3 V single supply.

DC Sweep

The source was swept from 0 to 150 mV.

LTspice DC output

LTspice amplifier DC output

The result remains approximately linear and reaches about 3.15 V at 150 mV input.

100 Hz Transient

The source was configured as:

SINE(0.075 0.050 100)

LTspice transient response

The output is approximately 0.53–2.62 V, closely matching the analytical model.

AC Sweep

LTspice frequency response

At low frequency, the gain is near the expected 26.4 dB. The filtered output begins rolling off near the intended 1.59 kHz corner. At higher frequencies, the LTspice result shows additional attenuation and phase lag from the finite bandwidth of the real AD8541 model.

MATLAB vs. LTspice

Metric MATLAB model LTspice simulation
Closed-loop gain 21 V/V ≈21 V/V
Low-frequency gain 26.44 dB ≈26.4 dB
Output at 150 mV input 3.15 V ≈3.15 V
RC cutoff 1.591 kHz ≈1.59 kHz
100 Hz output minimum ≈0.527 V ≈0.53 V
100 Hz output maximum ≈2.623 V ≈2.62 V
High-frequency response First-order analytical model Additional AD8541 rolloff

The MATLAB model closely predicts the circuit's DC gain, low-frequency transient response, and intended filter cutoff. LTspice agrees within the intended bandwidth while also revealing the non-ideal high-frequency behavior of the real op-amp model.

What This Project Demonstrates

  • Analog signal-conditioning design
  • Non-inverting op-amp gain calculations
  • Single-supply op-amp operation
  • RC low-pass filter design
  • DC, transient, and AC simulation
  • MATLAB transfer-function modeling
  • LTspice device-level verification
  • Comparison of analytical and non-ideal circuit behavior

Tools

MATLAB · Control System Toolbox · LTspice · AD8541

About

Op-amp sensor signal conditioning front end with MATLAB modeling and LTspice verification

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages