547  Sensor Circuits and Signals

547.1 Learning Objectives

By the end of this chapter series, you will be able to:

  • Interpret Sensor Output Signals: Distinguish between analog voltage, digital pulse, and serial data outputs
  • Design Signal Conditioning Circuits: Apply amplification, filtering, and level shifting for sensor signals
  • Calculate ADC Resolution: Compute voltage resolution and select appropriate ADC bit depth for applications
  • Implement Noise Reduction: Apply hardware and software techniques to improve signal quality
  • Build Sensor Interface Circuits: Create voltage dividers, pull-up/down resistors, and protection circuits
  • Debug Signal Problems: Use oscilloscopes and multimeters to diagnose sensor circuit issues

547.2 Prerequisites

Before diving into this chapter, you should be familiar with:

  • Electricity Fundamentals: Understanding voltage, current, resistance, and Ohm’s Law is critical for designing voltage dividers and calculating component values in sensor circuits.
  • Electronics Fundamentals: Knowledge of semiconductors, diodes, and transistors provides the foundation for building signal conditioning circuits and understanding sensor electronics.
  • Analog and Digital Electronics: Understanding ADC/DAC conversion, resolution, and sampling theory is essential for interfacing analog sensors with digital microcontrollers.
TipMVU: Minimum Viable Understanding

Core concept: Sensor circuits translate physical measurements into electrical signals that microcontrollers can process–requiring amplification, filtering, and analog-to-digital conversion.

Why it matters: Raw sensor outputs are rarely suitable for direct ADC connection. Signals may be millivolts (too weak), noisy (motor interference), or wrong voltage level (5V sensor on 3.3V MCU). Proper signal conditioning is the difference between accurate measurements and garbage data.

Key takeaway: Every sensor circuit needs three considerations: (1) voltage/current levels match MCU input range, (2) noise filtering appropriate to signal bandwidth, (3) adequate ADC resolution for measurement precision. Master voltage dividers and RC filters–they solve 80% of sensor interfacing problems.

547.3 Chapter Overview

This chapter has been organized into focused sections for easier learning. Work through them in order, or jump to the topic most relevant to your current needs:

547.3.1 1. Sensor Circuit Fundamentals

Essential building blocks for sensor interfaces

Learn the fundamental circuit patterns that form the backbone of sensor interfaces: voltage dividers, RC filters, transistor switches, and LED indicators.

  • Voltage dividers for resistive sensors
  • RC low-pass filters for noise reduction
  • Transistor switches for load control
  • LED current limiting resistors
  • Basic debugging with multimeters

547.3.2 2. Signal Conditioning

Transforming raw sensor signals for ADC input

Master the signal conditioning chain: amplification, filtering, and level shifting. Includes worked examples for thermistor and strain gauge interfaces.

  • Signal conditioning pipeline overview
  • Amplifier gain calculations
  • Wheatstone bridge circuits
  • Instrumentation amplifiers
  • Worked example: HVAC thermistor
  • Worked example: Strain gauge load cell

547.3.3 Interactive Simulators

This chapter includes hands-on Wokwi simulators for practical learning:

DHT22 Temperature & Humidity Sensor Simulator

Experiment with a complete DHT22 sensor circuit including: - Digital signal timing analysis - Humidity and temperature reading - Error handling and retry logic

LED PWM Control with Light Sensor Feedback

Build an adaptive lighting system: - Photoresistor voltage divider - PWM brightness control - Feedback loop implementation

Voltage Divider Calculator

Interactive voltage divider design: - Calculate resistor values - Visualize voltage output - ADC range optimization

RC Filter Designer

Design RC filters for sensor signals: - Cutoff frequency calculation - Phase shift visualization - Time constant analysis

547.4 Quick Reference: Sensor Signal Types

Signal Type Example Sensors Interface Method
Analog Voltage Thermistor, LDR, Potentiometer Voltage divider + ADC
Analog Current 4-20mA industrial sensors Current-to-voltage conversion
Digital Pulse DHT22, Ultrasonic, Encoder Digital GPIO + timing
I2C/SPI Serial BME280, MPU6050, ADS1115 Protocol library
PWM/Frequency Hall effect, Flow meters Period/frequency measurement

547.5 Key Formulas

Formula Purpose
Vout = Vin * (R2 / (R1 + R2)) Voltage divider output
fc = 1 / (2 * pi * R * C) RC filter cutoff frequency
R = (Vsupply - Vled) / Iled LED current limiting resistor
ADC_resolution = Vref / 2^bits ADC voltage per step
Gain = 1 + (Rf / Rg) Non-inverting op-amp gain

547.6 What’s Next

Start with Sensor Circuit Fundamentals for the essential building blocks. If you already understand voltage dividers and filters, skip to Signal Conditioning for advanced amplification and bridge circuits.

After completing this chapter series, proceed to:


Fundamentals:

Sensors:

Practice:

Advanced:

547.7 Quick Reference Cards

547.7.1 Common Sensor Connections

Sensor Type Typical Connection
Thermistor (NTC) Voltage divider with fixed resistor (10k typical)
LDR (Photoresistor) Voltage divider, R varies 10k-10M with light
DHT22 3.3V, GND, DATA (4.7k pull-up)
I2C Sensors VCC, GND, SDA (4.7k pull-up), SCL (4.7k pull-up)
Ultrasonic VCC, GND, TRIG, ECHO

547.7.2 ADC Resolution Reference

Bits Steps Resolution (3.3V ref) Best For
8 256 12.9 mV Simple controls
10 1024 3.2 mV Temperature, light
12 4096 0.8 mV Most IoT sensors
16 65536 50 uV Precision measurement

547.7.3 Troubleshooting Checklist