> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/benz206/SpotifyMacroBoard/llms.txt
> Use this file to discover all available pages before exploring further.

# Hardware components

> Complete list of required hardware components for building the Spotify MacroBoard

This page lists all the hardware components you'll need to build your Spotify MacroBoard. Each component has been carefully selected to work together seamlessly.

## Core components

### ESP32 development board

The ESP32 is the brain of the MacroBoard, handling WiFi connectivity, input processing, and display control.

<Info>
  The ESP32 must support WiFi 2.4GHz connectivity. 5GHz networks are not supported by the ESP32.
</Info>

**Specifications:**

* Microcontroller: ESP32 (any variant with WiFi)
* Memory requirements: Minimum 1.3MB program storage, 327KB dynamic memory
* The sketch uses approximately 886,189 bytes (67%) of program storage
* Global variables use 45,808 bytes (13%) of dynamic memory

**Recommended boards:**

* ESP32 DevKit V1
* ESP32-WROOM-32
* Any ESP32 board with at least 30 GPIO pins

### SSD1306 OLED display

The OLED display shows the current track information, WiFi status, and volume level.

**Specifications:**

* Model: SSD1306
* Resolution: 128x64 pixels
* Interface: I2C
* I2C Address: 0x3C
* Operating voltage: 3.3V or 5V
* Color: Monochrome (white or blue)

**Pin connections:**

* SDA: GPIO 21
* SCL: GPIO 19
* VCC: 3.3V
* GND: Ground

### WS2812B RGB LED strip

The addressable RGB LEDs provide visual feedback with colors matching the album art of the currently playing track.

**Specifications:**

* LED type: WS2812B (NeoPixel compatible)
* Number of LEDs: 20
* Data pin: GPIO 18
* Operating voltage: 5V
* Color order: GRB
* Brightness: 230 (out of 255)
* Power consumption: Maximum 500mA at 5V

<Warning>
  The LED strip can draw up to 500mA at full brightness. Ensure your power supply can handle this load.
</Warning>

## Input components

### Mechanical switches

You'll need 7 mechanical keyboard switches for the control buttons.

**Requirements:**

* Quantity: 7 switches
* Type: Any Cherry MX compatible mechanical switch
* Mounting: PCB mount or plate mount
* Popular choices: Cherry MX Red, Brown, Blue, or any tactile/linear switch

**Switch functions and pin assignments:**

<Tabs>
  <Tab title="Button layout">
    | Button | Function | GPIO Pin |
    | - | - | - |
    | 1 | Shuffle | GPIO 4 |
    | 2 | Volume down | GPIO 5 |
    | 3 | Volume up | GPIO 12 |
    | 4 | Loop/Repeat | GPIO 13 |
    | 5 | Previous track | GPIO 14 |
    | 6 | Play/Pause | GPIO 25 |
    | 7 | Next track | GPIO 26 |
  </Tab>

  <Tab title="Pin configuration">
    All switches are configured with internal pull-up resistors:

    ```cpp theme={null}
    pinMode(keys[i], INPUT_PULLUP);
    ```

    Switches connect between the GPIO pin and ground. When pressed, the pin reads LOW.
  </Tab>
</Tabs>

### Keycaps

Keycaps are optional but recommended for a professional finish.

**Options:**

* Standard Cherry MX compatible keycaps (any 1U size)
* Custom 3D printed keycaps (STL files may be available in the project repository)
* Blank keycaps or printed with custom legends

## Power supply

The MacroBoard requires a stable 5V power supply.

**Requirements:**

* Voltage: 5V DC
* Current: Minimum 1A (1.5A recommended)
* Connection: USB Micro-B or USB-C (depending on your ESP32 board)

<Info>
  The FastLED library is configured to limit power consumption to 500mA at 5V for the LED strip, but the ESP32 and OLED display require additional power.
</Info>

## PCB and electronics

### Custom PCB

A custom PCB is included in the project repository to simplify assembly.

**PCB files location:**

* Design files: `PCB/SpotifyMacroBoardDesign.json`
* Schematic: `PCB/Schematic.png` and `PCB/Schematic.json`
* Manufacturing files: `PCB/Gerber.zip`
* PCB preview: `PCB/PCBDesign.png`

See the [PCB design](/hardware/pcb-design) page for detailed information about ordering and specifications.

### Additional components

The following components may be required depending on your PCB design:

* **Resistors:** Check the schematic for specific values
* **Capacitors:** Decoupling capacitors for power stability (typically 100nF and 10µF)
* **Headers:** Pin headers for connecting the ESP32 and OLED display
* **Wire:** 22-24 AWG solid core wire for connections
* **USB cable:** For programming and power

## Tools required

To assemble your MacroBoard, you'll need:

* Soldering iron (temperature controlled, 300-350°C recommended)
* Solder (60/40 or 63/37 tin/lead or lead-free)
* Wire strippers
* Side cutters/flush cutters
* Multimeter (for testing connections)
* Helping hands or PCB holder
* Safety glasses

## Component checklist

Use this checklist when ordering components:

* [ ] ESP32 development board
* [ ] SSD1306 OLED display (128x64, I2C)
* [ ] WS2812B LED strip (20 LEDs)
* [ ] Mechanical switches (7)
* [ ] Keycaps (7, optional)
* [ ] Custom PCB (or order using Gerber files)
* [ ] 5V power supply (1A minimum)
* [ ] USB cable
* [ ] Resistors (see schematic)
* [ ] Capacitors (see schematic)
* [ ] Pin headers
* [ ] Wire for connections

## Next steps

<CardGroup cols={2}>
  <Card title="PCB design" icon="microchip" href="/hardware/pcb-design">
    Learn about the PCB design and how to order your own
  </Card>

  <Card title="Assembly" icon="screwdriver-wrench" href="/hardware/assembly">
    Follow step-by-step instructions to assemble your MacroBoard
  </Card>
</CardGroup>
