No description
Find a file
2023-06-06 21:57:40 -04:00
kicad Ignore generated gerber files 2023-06-06 00:14:43 -04:00
openscad Add multiple export options to the case design 2023-06-06 21:57:22 -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 Add mute and input switching button controls 2023-05-28 13:04:43 -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 Add README 2023-06-06 21:57:40 -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/579aab0ecd2dd8c2abaf0df4a2d8a8ab33d55d4a/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.