TEMPERATURE INDICATION USING LM3914 & LM35 ONLY

Photo of author

By Jackson Taylor

Home » Hardware » TEMPERATURE INDICATION USING LM3914 & LM35 ONLY

As an Amazon Associate we earn from qualifying purchases.

This project shows a temperature indicator built with only two chips: an LM35 temperature sensor and an LM3914 LED bar-graph driver. There is no microcontroller and no code. The sensor produces a voltage that follows temperature, and the driver lights more LEDs as that voltage rises. The video below shows the circuit working.

How the circuit works

The idea is simple. The LM35 outputs a voltage proportional to temperature in degrees Celsius. The LM3914 reads that voltage and switches on a number of LEDs in proportion to it. Together they make a basic thermometer with a bar-graph display.

The LM35 temperature sensor

The LM35 is an analog sensor with three pins: supply, output and ground. Its output rises by 10 mV for every degree Celsius. In the basic configuration, 25 °C gives about 250 mV and 50 °C gives about 500 mV. Because it is already calibrated in Celsius, you do not need to convert from kelvin or add an offset.

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video

It needs no external parts for basic use, and it works from a single supply in the range of a few volts up to about 30 V, depending on the version. A 5 V supply is common in hobby projects.

The LM3914 display driver

The LM3914 drives ten LEDs. Inside the chip is a chain of ten comparators fed from a precision resistor divider. When the input voltage on the signal pin passes each step on the divider, the next LED turns on. The steps are linear, so each LED represents an equal slice of the input range.

The chip also has an internal voltage reference of about 1.25 V. It sets the top of the scale and also sets the current through the LEDs, so you do not need a resistor for each one.

  • Bar mode: every LED up to the current level stays lit, like a thermometer column.
  • Dot mode: only the LED at the current level is lit.
See also
ARDUINO

The mode is chosen with the MODE pin (pin 9). Connecting it to the positive supply gives bar mode, and leaving it unconnected gives dot mode.

Connecting the two chips

The wiring follows the usual LM3914 bar-graph arrangement, with the LM35 output as the input signal.

  1. Power both chips from the same supply, with a shared ground. Check the LM3914 supply range in the datasheet.
  2. Connect the LM35 output to the LM3914 signal input (pin 5).
  3. Connect the low end of the divider (pin 4) to ground.
  4. Set the high end of the divider (pin 6) to the voltage you want for full scale. You can feed it from the reference output (pin 7), or from a trimmer if you want a custom range.
  5. Connect a resistor from the reference output to ground to set LED current. The datasheet gives the relationship. As a rough guide, LED current is about 12.5 divided by the resistor value in kilohms, in milliamps.
  6. Connect ten LEDs between the supply and the ten output pins, then choose bar or dot mode with pin 9.

Always check pin numbers against the datasheet for your package before wiring. A wrong connection on a reference pin is a common reason for a display that does not behave as expected.

Choosing the temperature range

Since the LM35 gives 10 mV per degree, the voltage at the top of the divider decides what the full scale means:

  • With 1.0 V at the high end, full scale is 100 °C and each LED covers 10 °C.
  • With 0.5 V at the high end, full scale is 50 °C and each LED covers 5 °C.
  • With the full 1.25 V reference at the high end, full scale is 125 °C and each LED covers 12.5 °C.

For a room or desk thermometer, the second option is more useful than a 0 to 100 °C scale, because the LEDs change with small differences in temperature. You can also lift the low end of the divider above ground. For example, 0.2 V at pin 4 and 0.5 V at pin 6 would spread ten LEDs across 20 °C to 50 °C, about 3 °C per LED.

See also
DRIVER (LOW POWER)

Calibration and accuracy

The LM35 is accurate enough for a simple indicator, but the display is coarse. With ten LEDs you only see ten steps, not an exact reading. To check your build, compare it with a trusted thermometer at one or two temperatures and adjust the high-end voltage with a trimmer until the LEDs light at the right points.

A few practical tips:

Sustainable Tech

Keep Toxic E-Waste Out of Landfills

Don't throw away your failing laptop, phone, or car batteries. Learn how to recondition them at home in just a few hours. It's better for the planet—and your wallet.

Learn How It Works
  • Keep the sensor away from the LEDs and the regulator, as heat from nearby parts can raise its reading.
  • Use a stable supply. Noise on the supply can make the top LED flicker near a threshold.
  • If you use long wires to the sensor, a small capacitor close to the LM35 output can help reduce noise. Check the datasheet for suitable values.
  • The basic LM35 circuit does not measure below 0 °C. Measuring negative temperatures needs a different configuration from the datasheet.

When to use a different approach

This circuit suits demonstrations, classroom projects and simple at-a-glance indicators. If you need an exact numeric reading, logging or alarms, a microcontroller is a better fit. Our guide on how to read a temperature sensor with Arduino covers that route. If you are still choosing a part, see the best temperature sensor for Arduino projects. The same sensor also works with other boards, as in this example of the LM35 with the MSP430G2553. For a PC readout, see displaying temperature in Python.

FAQ

Does this circuit need a microcontroller?

No. The LM35 supplies an analog voltage and the LM3914 turns it into an LED display on its own.

What does the LM35 output at a given temperature?

It outputs 10 mV per degree Celsius, so 30 °C gives about 0.3 V.

Can I show a single LED instead of a bar?

Yes. Leave the MODE pin unconnected for dot mode, and only one LED lights at a time.

How do I change the temperature range?

Change the voltages on the divider pins. Because the LM35 gives 10 mV per degree, a lower high-end voltage gives a smaller range and finer steps.

See also
Best iPad for Procreate: 5 Picks Ranked by Real Layer Limits

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works