Complete LM35 Temperature Sensor Circuit Design Guide and Wiring

lm35 schematic diagram

Begin with a 4–20 mA current loop output for industrial stability. Connect the sensor’s analog out to a 10 kΩ pull-up resistor tied to a +5 V rail–this ensures linear 10 mV/°C scaling from 0 °C to 150 °C without clipping. Bypass noise with a 0.1 µF ceramic capacitor directly across the supply pins, positioned within 2 mm of the package. For extended cable runs exceeding 3 meters, add a 10 µF tantalum capacitor at the remote end to suppress induced AC.

Ground reference must be star-pointed to the ADC’s analog ground–avoid daisy-chaining through digital traces. If galvanic isolation is required, insert an opto-coupler rated at 3 kV RMS between the sensor output and the microcontroller. Adjust the 1 kΩ series resistor on the LED side to maintain a 10 mA forward current; verify with a scope that rise times remain under 10 µs to preserve temperature resolution.

For battery-powered nodes, swap the +5 V rail with a low-dropout 3.3 V regulator–test dropout margins below 0.2 V to prevent temperature drift at the lower end. Use a 16-bit ADC with at least 2.5 V reference; configure the PGA gain to 1x if the full 150 °C range is needed, or 4x if monitoring only 0–50 °C for sub-0.1 °C precision. Calibrate offset error by placing the sensor in an ice slurry (0 °C) and trimming digital gain until the reading converges within ±0.2 LSB.

Precision Temperature Sensor Circuit Layout Guide

Connect the sensor’s output pin directly to an analog input on a microcontroller without intermediary resistors to preserve signal integrity–any 1–10 kΩ pull-up or filtering component degrades accuracy by introducing voltage drops. Power the device with a regulated 4–20 V DC supply, ensuring bypass capacitors (0.1 µF ceramic and 10 µF electrolytic) are placed within 2 mm of the VCC and GND pins to suppress noise, particularly in high-impedance environments like industrial control systems. Grounding should follow a star topology from the sensor’s GND pin to the system’s common ground to prevent ground loops, which can skew readings by ±0.5°C at 25°C.

Signal Conditioning and Calibration Steps

lm35 schematic diagram

For applications requiring sub-0.1°C resolution, amplify the raw 10 mV/°C output using an op-amp (e.g., LM358) with a non-inverting configuration and a gain of 5 (Rf = 40 kΩ, Rg = 10 kΩ) to extend the range to 0–5 V for a 0–100°C span. Offset nulling is critical: use a 10 kΩ trimpot between the op-amp’s inverting input and ground, adjusted while monitoring the output at a known reference temperature (e.g., ice-water bath at 0°C or boiling water at 100°C). Avoid soldering near the sensor’s leads–thermal gradients from hot solder can introduce errors up to 2°C during assembly.

Basic Sensor Pin Configuration for Accurate Temperature Measurement

lm35 schematic diagram

Connect the ground pin to the circuit’s common ground. Ensure this connection is stable–any resistance above 0.1Ω introduces errors up to 0.5°C per 100mA current draw. For precise reference, use a dedicated ground plane or a low-impedance star configuration.

Power the sensor with a regulated 4V to 30V DC supply. Voltages below 4V degrade linearity, while exceeding 30V risks permanent damage. A 5V or 12V source with ≤0.5% ripple is optimal. Bypass capacitance of 0.1μF ceramic (X7R) within 2mm of the power pin filters noise.

Signal Output Handling

The analog output pin delivers 10mV/°C, ranging 0V (0°C) to 1.5V (150°C). Load this pin with a high-impedance input (≥10kΩ) to prevent signal attenuation. For accurate readings:

  • Buffer with an op-amp (e.g., LM358) if connecting to high-capacitance lines (>100pF).
  • Avoid long traces (>10cm)–route directly to ADC or use shielded cable for runs >20cm.
  • Add a 1μF tantalum capacitor at the ADC input to stabilize step responses.

Temperature drift errors escalate if the sensor’s self-heating exceeds 0.08°C. Limit current through the device to <50μA when operating at the upper voltage range. For low-power designs, operate near 5V with >10kΩ ADC impedance.

Layout and Noise Mitigation

lm35 schematic diagram

Place the component away from hotspots (≥2cm from power resistors/MCUs). Copper pours under the device improve thermal coupling–use ≥25mm² of 2oz copper for grounding. Keep digital traces ≥5mm distant to avoid capacitive coupling.

For environments with EMI:

  1. Enclose the sensor in a grounded, perforated metal shield if RF fields >10V/m are present.
  2. Use twisted-pair wiring for output signals, grounded at the ADC side only.
  3. Add a ferrite bead (e.g., 60Ω @ 100MHz) on the power line if switching noise is detected.

Calibration offsets drift <0.05°C/year but can be nulled using a two-point method. Reference a precision thermometer at 0°C (ice-water slurry) and 100°C (boiling water) to adjust ADC scaling. For ±0.1°C accuracy, sample at ≥20Hz and average 16+ readings to reject 50/60Hz interference.

Thermal response time (to 63% of final value) is 1.5s in still air and 0.2s in oil. For rapid transients, attach a small heatsink (≥1g aluminum) or use thermal epoxy to bond the tab to the target surface. Avoid mechanical stress–excess torque (>3kg·cm) on leads cracks the die, skewing readings.

Step-by-Step Power Supply Connection for Precision Temperature Sensor

lm35 schematic diagram

Connect the sensor’s power pin to a regulated 5V DC source. Ensure the voltage does not exceed 5.5V to prevent thermal drift or damage. Use a linear regulator like the LM7805 if the input voltage is higher–decouple the input and output with 0.1μF ceramic capacitors to filter noise. Avoid switching regulators unless they include proper LC filtering, as high-frequency ripple distorts readings.

Grounding and Signal Integrity

Attach the sensor’s ground pin directly to the system’s analog ground plane. Keep ground traces short to minimize resistance-induced errors. If sharing a ground with digital components, use a star topology to prevent ground loops. Separate analog and digital grounds at the power source, tying them only at a single point near the regulator.

The Vout pin outputs 10mV per °C, starting at 0V at 0°C. For accurate readings, connect this pin to a high-impedance input (e.g., an ADC with ≥10kΩ input resistance). Use shielded cable for runs longer than 10cm to reduce EMI interference. Twist signal wires with a ground return to improve noise rejection.

Add a 0.1μF bypass capacitor between the power and ground pins, placing it as close as possible to the sensor’s body. This stabilizes supply voltage during transient current spikes. For extended cable runs (over 1m), increase capacitance to 1μF but avoid electrolytic types–ceramic or tantalum are preferred.

Voltage Reference Considerations

If measuring sub-zero temperatures, ensure the ADC’s voltage reference spans the sensor’s output range (0–1.5V for –55°C to +150°C). A 3.3V reference works for up to +125°C; for full range, use 2.56V or lower. Calibrate the system by immersing the sensor in ice water (0°C) and boiling water (100°C) to verify linearity.

Test the setup with an oscilloscope. Verify DC accuracy and check for ripple on Vout–it should remain below 5mV peak-to-peak. If noise persists, add a 10Hz low-pass RC filter (e.g., 10kΩ resistor + 1μF capacitor) at the ADC input to smooth readings without significant lag for most applications.

Signal Output Wiring: Analog Voltage to Microcontroller ADC

Connect the temperature sensor’s output directly to the microcontroller’s ADC pin using a short, shielded cable to minimize noise. Ensure the ADC reference voltage matches the sensor’s maximum output range. For a 5V system, use 5V as the ADC reference; for 3.3V systems, select 3.3V. Misalignment here introduces measurement errors proportional to the ratio of sensor span to ADC range.

Use a low-pass RC filter (10kΩ resistor and 0.1µF capacitor) between the sensor output and ADC input to suppress high-frequency noise. Position the capacitor as close as possible to the ADC pin. Below are recommended RC values for different ADC sampling rates:

ADC Sampling Rate (ksps) Resistor (kΩ) Capacitor (µF)
1 10 1
10 4.7 0.1
100 1 0.01

Route analog traces away from digital signals, switching power supplies, and high-current paths on the PCB. Maintain at least 2mm separation between analog and digital traces. Use ground planes beneath analog traces to reduce EMI susceptibility.

For microcontrollers with differential ADC inputs, wire the sensor output to the positive input and connect the negative input to a clean analog ground. Single-ended configurations require grounding the ADC’s negative input to the same reference plane as the sensor. Avoid sharing ground paths with noisy components like motors or relays.

Calibrate the ADC readings by measuring known reference voltages (e.g., 0V and full-scale voltage) to adjust for offset and gain errors. Most microcontrollers allow calibration via software registers. Example pseudocode for calibration:

adc_offset = read_adc(0V_reference);
adc_gain = (full_scale_reference_voltage) / (read_adc(full_scale_voltage) - adc_offset);
calibrated_value = (raw_adc_value - adc_offset) * adc_gain;

Implement software averaging (8–16 samples) to further reduce noise impact. For battery-powered applications, disable the ADC between conversions to save power. Ensure the ADC sampling rate exceeds the sensor’s bandwidth (typically <10Hz) to prevent aliasing. Verify signal integrity with an oscilloscope before finalizing the design.

Grounding Techniques to Minimize Noise in Precision Temperature Sensor Readings

lm35 schematic diagram

Use a star grounding topology for all analog and digital components. Connect the sensor’s ground pin directly to a dedicated analog ground plane via a short, wide trace (minimum 0.5 mm width for 1 oz copper). Ensure this plane remains separate from digital ground until they converge at a single point near the power supply’s negative terminal. Avoid daisy-chaining ground connections–each component’s return path should terminate independently to the star point, reducing ground loops by over 60% in high-frequency noise scenarios.

Implement a ferrite bead (e.g., Murata BLM18PG121SN1) at the sensor’s power input to block high-frequency noise. Pair it with a 10 μF tantalum capacitor and a 0.1 μF ceramic capacitor, both placed within 2 mm of the sensor’s supply pins. This combination forms a low-pass filter with a cutoff frequency below 1 kHz, attenuating conducted noise by 20–30 dB. For enhanced immunity, add a 10 kΩ resistor in series with the sensor’s output to isolate it from external transient currents.

  • Route analog traces perpendicular to digital traces to minimize capacitive coupling. Maintain a minimum 3 mm clearance between them.
  • Use 4-layer PCBs with dedicated ground planes (layers 2 and 3) to shield signal layers (1 and 4) from radiated noise. Stitch the planes with vias at 10 mm intervals.
  • Twist the sensor’s signal and ground wires if using cables longer than 15 cm. Reduces induced noise by 40% compared to parallel wires.
  • Avoid ground pours near the sensor’s output pin–floating copper increases susceptibility to ESD. Instead, use a solid ground plane under the entire sensor footprint.

For environments with high EMI (e.g., motors, switching regulators), encase the sensor and its analog circuitry in a Faraday shield. Use a grounded copper pour on the top and bottom PCB layers, connected to the analog ground plane via multiple vias. Test shielding effectiveness with a spectrum analyzer–target at least 40 dB attenuation at frequencies above 10 MHz. If noise persists, add a 10 Hz to 1 kHz bandpass filter (e.g., MAX7480) to the sensor’s output to reject out-of-band interference before ADC sampling.