Source: https://mokxi.com/parts/ledbar
Updated: 2026-11-10

Part

# LED bar graph, 10 segments

Ten LEDs in a row in one DIP, each with its own two legs and its own resistor.

See every part

- 20 pins
- 1 setting
- In 2 projects
- In 1 lesson

Drawn live by the editor's own code, at the size you see it.

At a glance

## The LED bar graph, 10 segments in brief

What it is, and every setting the properties panel gives it.

The 10-segment LED bar graph, sold as the DC-10 or simply an LED level meter, is ten separate LEDs in a DIP-20 block with no chip inside. Pins 1 to 10 are the anodes A1 to A10, and the cathodes come back along the other side, so C1 is pin 20, straight across from A1, and the block straddles a breadboard’s channel. Each bar wants its own resistor: on an Uno, anodes on pins 2 to 11 through 220 ohms and every cathode to ground; on an ESP32, ten free GPIOs at 3.3 volts, where blue and white bars, with their higher drop, are much dimmer. Mokxi models each bar as the plain LED, with a forward drop set by the color property (red, green, blue, yellow or white), nothing at all when reversed, and a two-pole 6 millisecond eye average, so a PWM bar looks dimmer instead of flickering and a fast chaser keeps up. The classic mistakes are the block in backwards, which leaves every bar dark, and one shared resistor in the ground return, which dims every bar as more come on. Bar-to-bar brightness spread, the mixed-color blocks and heat are not modeled.

Family

Displays

Pins

20

color

red (or green, blue, yellow, white)

red, green, blue, yellow or white.

Pins

## 20 pins

Named as the editor names them, so a wire lands where you expect it.

- A1
- A2
- A3
- A4
- A5
- A6
- A7
- A8
- A9
- A10
- C10
- C9
- C8
- C7
- C6
- C5
- C4
- C3
- C2
- C1

How to use it

## How to use a 10-segment LED bar graph with an Arduino

It is ten separate LEDs, so it wants ten resistors. Anodes A1 to A10 go to pins 2 to 11, each through 220 ohm, and every cathode, C1 to C10, goes to ground. Pin 1 is at the chamfered corner, and each cathode sits straight across from its anode, so the block straddles the breadboard’s channel.

The level meter here maps a knob on A0 to whole bars and dims the top bar with analogWrite() where its pin has PWM (3, 5, 6, 9, 10 and 11), so the meter moves smoothly. One shared resistor on the ground return dims every bar as more come on, and a block in backwards lights nothing at all.

Part pin

Board pin

A1 to A10

Pins 2 to 11, each through 220 ohm

C1 to C10

GND

On an ESP32 ten free GPIOs work the same; at 3.3 V a blue or white bar, with its higher drop, is much dimmer than red or green.

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

How it is modeled

## What is true about the LED bar graph, 10 segments, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Modeled

Each bar is the same diode as the LED: a forward drop set by the
color, the current your resistor allows, and nothing at all when it is reversed. Ten
bars want ten resistors, or a resistor network; a single resistor in a shared return
would dim every bar as more came on, as it does on the bench. Brightness is what the
eye sees, so a bar dimmed with PWM looks dimmer rather than flickering.

### Not modeled

Bar-to-bar brightness spread, the mixed-color versions (green, yellow and red bars in
one block), and anything to do with heat.

From LED bar graph, in full.

Projects

## See the LED bar graph, 10 segments in a project

2 built-in projects use it. Each opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

One lesson places it in its own circuit.

### Learn articles

1 lesson

- How Many LEDs Can One Arduino Pin Drive?

Boards

## The boards it is shown on

This board has a built-in project with the LED bar graph, 10 segments in it.

- Arduino Uno R3

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the LED bar graph, 10 segments

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
