No description
Find a file
2023-07-20 14:53:27 -04:00
freecad Polish up the freecad case 2023-06-17 01:01:40 -04:00
kicad Add audio jack 3d model 2023-06-08 12:58:50 -04:00
tests Abstract state change tracking 2023-05-18 14:38:36 -04:00
.gitignore Initial commit 2023-05-17 18:10:49 -04:00
button.py Add mute and input switching button controls 2023-05-28 13:04:43 -04:00
cd4052.py Update switch select log message 2023-05-27 21:33:46 -04:00
main.py Fix channel labels 2023-07-20 14:53:27 -04:00
Makefile Remove repl from the Makefile 2023-05-18 14:51:49 -04:00
mcp4.py Add tests 2023-05-18 12:37:43 -04:00
pcb.png Add README 2023-06-06 21:57:40 -04:00
README.org Update readme to reference the FreeCAD case design 2023-06-17 01:17:24 -04:00
rotary.py Add rotary knob volume control 2023-05-27 17:36:27 -04:00
rotary_irq_esp.py Add rotary knob volume control 2023-05-27 17:36:27 -04:00
ssd1306.py Initial commit 2023-05-17 18:10:49 -04:00
statetree.py Abstract state change tracking 2023-05-18 14:38:36 -04:00

Audio Input and Volume Control

/correlr/digitalaudioswitch/media/commit/b38a9ba590dd95675b70ff4bb7bddbc10dbddf7d/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 3D-printable case is built using FreeCAD and can be found in the freecad folder. It is divided into a top and bottom piece. The PCB is affixed using four M3 threaded inserts and 6mm M3 bolts, the case is assembled using 2 M3 threaded inserts and 2 10mm M3 bolts.