digitalaudioswitch/README.org
2023-06-06 21:57:40 -04:00

1.6 KiB

Audio Input and Volume Control

/github/digitalaudioswitch/media/commit/1c85769c5d9afaca307e3dbc3f146bb9da3c3888/pcb.png

Features

  • Switches between three external inputs, outputting through the 3.5mm LINE OUT jack.
  • Volume control and input switching can be done using the pressable dial on the front
  • Current status is displayed on a 128x32 OLED display
  • Can be fully controlled via Home Assistant as an MQTT-discoverable device.

Firmware

Configuration

Create a file named settings.json in the project directory with WiFi and MQTT connection information.

  {
      "wifi": {
          "ssid": "MY-SSID",
          "password": "my-wifi-password"
      },
      "mqtt": {
          "broker": "192.168.1.123",
          "prefix": "digital-audio-switch"
      }
  }

Deploying

Connect the ESP32 to your computer. If you haven't already, flash it with the latest version of MicroPython, and ensure you have mpremote installed.

Running make will install dependencies and copy the code and configuration to the ESP32, resetting it when done.

Circuit Design

The schematic and board layout can be found in the kicad folder.

Case

The (incomplete) 3D-printable case is built using OpenSCAD and can be found in the openscad folder. Running make in this directory will gather dimensions from the KiCAD design and generate STL files using them. The build tool requires Python 3 with the sexpdata library installed to read the KiCAD files.