Displays and indicators

Temperature Reading with a Display and Sensor

Measuring a physical quantity and passing it to a readable display is a core task of embedded systems. In this project we connect a temperature and humidity sensor to a display and follow the data chain step by step.

November 22, 20267 min readCircuit 132
Setup diagram of a temperature and humidity sensor with a seven-segment display
Setup diagram of a temperature and humidity sensor with a seven-segment display on a breadboard. The image shows the same circuit as the components and connections on this page.

Interactive circuit guide

Run the simulation, follow the build steps one by one and try it in our real app.

Real screenshot of our circuit simulator Stopped
Open in our app →

Step-by-step build

Before you start building, open the circuit in the simulator to see the pin order and wire routes.

Open in simulator

Parts you need

Build the circuit on a breadboard with the parts below. Each LED load uses its own series resistor; never skip the resistors.

PartQtyRole
Control board1Reads the sensor and drives the display.
Seven-segment display1Shows the reading as digits.
Temperature and humidity sensor1Measures ambient temperature and humidity.
220Ω resistor1Limits the current of the segment LEDs.
Jumper wires7Creates the data, power and ground lines.
Ground (GND)1Common reference point.

Placement on the breadboard

The temperature and humidity sensor sits at the lower left of the breadboard, the seven-segment display at the upper right and the series resistor in between. The display’s data pin goes through the resistor to board pin 1, and its common pin to ground. The sensor’s data pin goes to board pin 2, its power pin to pin 4 and its ground pin to the common line. All ground connections return to the board’s GND pin at one point.

Build steps

  1. 1. Place the sensor and the seven-segment display on the breadboard.

    Tip: Read the sensor’s pin order from the breadboard area.

  2. 2. Connect the display’s data pin through a 220Ω resistor to board pin 1.

    Tip: The resistor protects the segments.

  3. 3. Connect the display’s common pin to ground.

    Tip: The common pin is the return path.

  4. 4. Connect the sensor’s data pin to board pin 2.

    Tip: The measurement is read through this pin.

  5. 5. Connect the sensor’s power pin to board pin 4 and its ground pin to the common line.

    Tip: Power and ground make the sensor work.

  6. 6. Connect the ground line to the board’s GND pin and print the reading on the display.

    Tip: The display updates when the value changes.

How it works

The temperature and humidity sensor sends the quantities it measures as a digital signal through its data pin. The control board reads this signal at set intervals and interprets the value. The resulting number is converted into the appropriate segment pattern on the seven-segment display; each digit is formed by lighting different segments.

The series resistor protects the display by limiting the current through its segment LEDs. The sensor’s power and ground pins connect to common lines so the measurement stays stable. The common ground is the reference point for both the sensor and the display. This chain is a basic example of measuring a physical quantity and passing it to a human-readable display.

Expected result

The display shows the temperature read by the sensor with correct digits and updates when the value changes. When interpreting the result, first identify which path the signal came from, then describe how each component responded.

Checks and troubleshooting

The checks below help you spot the most common wiring and setup mistakes.

  • If the sensor value cannot be read, check the data pin and power.
  • If the display shows the wrong digits, review the segment pattern.
  • If the reading fluctuates, add a short delay between readings.

What you gain

  • Explains how to read digital data from a sensor.
  • Builds the data chain from measurement to display.
  • Applies segment encoding to the reading.
  • Understands why sensor power and ground matter for a stable reading.

Try it yourself

After building the circuit, try the following experiments in order. Change only one variable at a time so you can interpret the result correctly.

  1. Read the ambient temperature and print it on the display.
  2. Apply heat to the sensor and watch the value change.
  3. Read the humidity value too and show both values in turn.

Finding the parts

If you want to build this project in real life, you can get the parts from hobidevre.com.

Looking for more project ideas? Browse the guides on the hobidevre.com blog.

Open the circuit in the simulator and repeat the steps hands-on.

Open in simulator

Frequently asked questions

Why is a series resistor needed for this circuit?

A series resistor keeps the current through loads such as LEDs and displays within safe limits. If it is omitted, current rises without control and the component can be damaged.

Why is the common ground connection important?

The return path of all components meets at a single reference point. Without a common ground the signal is incomplete: the display stays dark, the LED does not light, or the reading remains unstable.

What does the Open in simulator button do?

The button loads the ready schematic of this circuit into the simulator. You can inspect the pin order and component behaviour without drawing the wires from scratch.

You may also like