Codey OnlineArduino & ESP32 component library › Speaker 3W
Speaker 3W
Other

Speaker 3W

Small passive speaker, 3W 4-8 ohm. Requires an amplified signal — cannot be driven directly from a DAC line-out or microcontroller GPIO.

Width: 50.8 mm

Pinout — Speaker 3W

Pin Signal Description
SPK + audio Speaker in positive
SPK - audio Speaker in GND

Wiring notes

A passive speaker MUST be driven by an audio amplifier (e.g. PAM8403, MAX98357A, LM386). NEVER connect directly to a DAC line-out or microcontroller pin — the signal is too weak and may damage the source. Connect amplifier output (+/-) to speaker (+/-).

Example wiring diagram — Speaker 3W

From To Wire
board:D9 spk1:SPK + green
board:GND spk1:SPK - black

Example Arduino code — Speaker 3W

This example was written and compile-checked for the arduino-uno. Codey Online adapts it to any other supported board for you.

// NOTE: A passive 3W speaker must be driven by an audio amplifier.
// This minimal sketch is included for documentation purposes, but do NOT connect
// a passive speaker directly to an Arduino pin in real hardware.

const int speakerPin = 9;

void setup() {
  pinMode(speakerPin, OUTPUT);
}

void loop() {
  tone(speakerPin, 440);
  delay(500);
  noTone(speakerPin);
  delay(500);
}

Related components

4-Channel Optoisolator Board

4-Channel Optoisolator Board

AD9850 DDS Signal Generator Module

AD9850 DDS Signal Generator Module

Adjustable Step-down Module 3-40VDC  1.5-35VDC LM2596

Adjustable Step-down Module 3-40VDC 1.5-35VDC LM2596

Breadboard 400 pin

Breadboard 400 pin

Build your Arduino or ESP32 project with AI

Describe what you want to build. Codey Online writes the code, draws the wiring diagram, compiles it and flashes your board straight from the browser.

Start for free