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

Part

# Speaker, 8 ohm

Eight ohms, so 100 ohms in series or a transistor, and tone() plays through it.

See every part

- 2 pins
- 1 setting
- In 6 projects
- In 2 lessons

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

At a glance

## The Speaker, 8 ohm in brief

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

The 8 ohm speaker in most Arduino kits is a 40 mm paper cone on a voice coil, with two tags and no polarity. Its low resistance is the whole lesson: an Uno pin wired straight across 8 ohms is close to a short, so the pin sags to about a volt while trying to source far past its 40 mA absolute maximum. The Arduino’s own toneMelody example puts 100 ohms in series for that reason, which here gives about 46 mA with the pin holding its voltage; for more volume, drive it through a transistor. Mokxi treats the coil as a real resistance, set by the ohms property, and times each push of the cone from the current through it, rising past 4 mA after falling under 2 mA, to report the note in hertz, however the pin or an H bridge drives it. tone() runs from a timer interrupt as on a real board, and on an Uno it takes timer 2, so PWM on pins 3 and 11 pauses while a note plays. Loudness, coil inductance and the power rating are not modeled.

Family

Outputs

Pins

2

ohms

8

the voice coil's resistance, 8.

Pins

## 2 pins

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

Pin

What it does

1

One tag.

2

The other. Either way around.

How to use it

## How to use an 8 ohm speaker with an Arduino

Put 100 ohms in series: pin 8 to the resistor, the resistor to one speaker tag, the other tag to GND. That holds the current to about 46 mA with the pin’s voltage held up, where the bare speaker would drag the pin down to a volt. For a louder note, or to keep well inside a pin’s limits, switch the speaker with a transistor from 5 V.

tone(8, 440) starts a square wave from a timer and returns at once, and noTone(8) stops it. The music box here makes each note itself instead, toggling the pin with digitalWrite() and delayMicroseconds() for as long as the note lasts, so you can read exactly what a square wave is. Either way, the speaker shows the note it hears in hertz.

Part pin

Board pin

Tag 1, through 100 ohms

Pin 8

Tag 2

GND

On an Uno, tone() takes timer 2, so PWM on pins 3 and 11 pauses while a note plays. On the XIAO and the Uno R4, put the speaker on a PWM pin.

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

A note on the speaker with tone()

How it is modeled

## What is true about the Speaker, 8 ohm, here

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

### Modeled

The coil is a real 8 ohm load. With 100 ohms in series from a 5 V pin it takes
about 46 mA and the pin holds its voltage; straight on the pin, the pin sags to a
volt or so and would be sourcing far past its 40 mA absolute maximum, which a
multimeter in series shows.

The note. The part times each push of the cone, the current through the coil
rising past 4 mA one way after being under 2 mA, and reports the frequency in hertz.
It counts a pin toggling against ground, against 5 V, or an H bridge driving both
ends alike.

### Not modeled

Loudness: the probe is a frequency and says nothing about level, which on a real
speaker rises with the current and falls off at the bottom and top of its range.
The coil's inductance, its power rating (usually half a watt) and burning out.

From Speaker (8 ohm), in full.

Projects

## See the Speaker, 8 ohm in a project

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

Lessons

## Where it turns up in a lesson

2 lessons place it in their own circuits.

### Learn articles

2 lessons

- Arduino Halloween Props to Build in Your Browser
- Arduino Christmas Lights to Build in Your Browser

Boards

## The boards it is shown on

Each of these 2 boards has a built-in project with the Speaker, 8 ohm in it.

- ESP32 DevKit V1
- 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 Speaker, 8 ohm

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
