From f8ff866d325d6a4c2fd73e958d0f2920e10e33c3 Mon Sep 17 00:00:00 2001 From: Julian Daube Date: Wed, 23 Oct 2019 23:24:33 +0200 Subject: [PATCH] project: write extra readme text --- README.md | 34 +- doc/audioMux-brd.svg | 4397 ++++++++++++++++++++++++++++++++++++++++++ firmware/README.md | 35 + kicad/README.md | 29 + 4 files changed, 4480 insertions(+), 15 deletions(-) create mode 100644 doc/audioMux-brd.svg create mode 100644 firmware/README.md create mode 100644 kicad/README.md diff --git a/README.md b/README.md index e271f9e..e89b340 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,31 @@ -## Wat -This pcb is an audio multiplexer, meaning it can switch three analog inputs into one analog output. + -## Why +This project contains all design files for a **6:1 audio multiplexer** , meaning it can switch six analog inputs into one analog output. -Sometimes you just need more inputs. And this is how you do it. +It is based on the [BD3491](https://www.digikey.de/product-detail/de/rohm-semiconductor/BD3491FS-E2/BD3491FS-E2TR-ND/5720882) which does everthing related to the Audio signals. -## How +On top of switching the inputs, it is also able to condition the signal. It can -The BD3491 does all the audio switching. It combines one 6 input switch and an equalizer into a simple package. -The STM32 configures the BD3491 to switch to the specified inputs based on pressed buttons or software control. +- Apply Bass-Boosting and Treble-Boosting (essentially a crappy 3-Point Equalizer) +- Amplify the input signal by up to 20dB +- Add attenuation to the individual channels (aka. balance the left and right channel) -# serial control Syntax -Upon connecting the stm32 to a PC using USB it will register itself as a new Serial Port. The following text commands can be issued via said Serial connection (the baudrate is irrelevant): +All of these feature of the chip can be activated with the on-board STM32, which can in turn be controlled +with either on-board buttons or via it's integrated USB port. One can either use the serial protocol directly +or a [GUI written in python](gui/README.md) -- `C[number]\n` will change the input to the specified channel. The stm32 echo the command as it was understood. e.g: When Sending `C0\n` it will respond `C0\r\n` to acknowledge the channel switched to **Input 1**. When issuing a `C10` there will be no response, since 10 is out of range. *NOTE:* when using the buttons on the PCB to switch the input, the stm will also issue a `C[number]\r\n` over the serial port if it is connected to notify the PCB of the external input change. +The Board can be supplied over said USB port as well (if the primary use-case implies it beeing connected +to the PC constantly) or by applying power using a 2.1mm Barrel Jack. -- `G[number]\n` will activate an input gain of [number] in dB. It will also respond with the closest gain it can do. e.g: `G10` will result in the stm responding `G12\r\n` which means it will add a 12db input boost, which was the closest matching _valid_ input gain value. You can check the datasheet of the BD3491 to find the possible gain values if this peaks your interest :) +For more details on the pcb, check the [PCB readme](kicad/README.md) -- `L[number]\n` or `R[number]\n` will activate an attenuator in either the left or the right channel. [number] is once again in dB. It works much like the `G`-command. Setting [number] to 0 will deactivate the Attenuation. +For details on the Serial command syntax and firmware flashing instructions, check the [firmware readme](firmware/README.md) -- `B[number]\n` or `T[number]\n` adds **B**ass or **T**reble gain to the output -- `M[0/1]\n` will either mute or unmute the output +# Why + +Because ? + +Sometimes you just need more inputs. This is how you do it. -- `S[0/1]\n` will connect all inputs to the output diff --git a/doc/audioMux-brd.svg b/doc/audioMux-brd.svg new file mode 100644 index 0000000..f800eb0 --- /dev/null +++ b/doc/audioMux-brd.svg @@ -0,0 +1,4397 @@ + + + + + + image/svg+xml + + SVG Picture created as audioMux-brd.svg date 2019/10/23 23:11:40 + + + + + + SVG Picture created as audioMux-brd.svg date 2019/10/23 23:11:40 + Picture generated by PCBNEW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/firmware/README.md b/firmware/README.md new file mode 100644 index 0000000..ba73d07 --- /dev/null +++ b/firmware/README.md @@ -0,0 +1,35 @@ + +# Building the Firmware + +In order to build the firmware, [platformio](https://platformio.org/install/cli) must be installed. + +To build the firmware, navigate to this folder using the terminal of your choice and type + +```bash +platformio run +``` + +## Flashing the firmware + +If you happen to have an stlink compatible interface (e.g the [programmer attached the nucleo-boards](https://jeelabs.org/book/1547a/])), +then (after connecting said interface to the PC and the PCB), +the firmware can be flashed with + +```bash +platformio run -t upload +``` + +# serial control Syntax +Upon connecting the stm32 to a PC using USB it will register itself as a new Serial Port. The following text commands can be issued via said Serial connection (the baudrate is irrelevant): + +- `C[number]\n` will change the input to the specified channel. The stm32 echo the command as it was understood. e.g: When Sending `C0\n` it will respond `C0\r\n` to acknowledge the channel switched to **Input 1**. When issuing a `C10` there will be no response, since 10 is out of range. *NOTE:* when using the buttons on the PCB to switch the input, the stm will also issue a `C[number]\r\n` over the serial port if it is connected to notify the PCB of the external input change. + +- `G[number]\n` will activate an input gain of [number] in dB. It will also respond with the closest gain it can do. e.g: `G10` will result in the stm responding `G12\r\n` which means it will add a 12db input boost, which was the closest matching _valid_ input gain value. You can check the datasheet of the BD3491 to find the possible gain values if this peaks your interest :) + +- `L[number]\n` or `R[number]\n` will activate an attenuator in either the left or the right channel. [number] is once again in dB. It works much like the `G`-command. Setting [number] to 0 will deactivate the Attenuation. + +- `B[number]\n` or `T[number]\n` adds **B**ass or **T**reble gain to the output + +- `M[0/1]\n` will either mute or unmute the output + +- `S[0/1]\n` will connect all inputs to the output diff --git a/kicad/README.md b/kicad/README.md new file mode 100644 index 0000000..f5f95eb --- /dev/null +++ b/kicad/README.md @@ -0,0 +1,29 @@ +(THE PCB)[!../doc/audioMux-brd.svg] + +There are a total of six solderjumpers on the board: + +# switching to the barrel jack as voltage supply + +*JP3* and *JP4* set the source for the supply voltage. +*JP4* connects the voltage input to the barrel jack, *JP4* connects it to the USB +5V rail. + +Per Default JP4 is closed and JP3 is open, making the default way of supplying voltage the USB jack. + +If the Barrel Jack should be used, then **JP4 has to be opened first** by cutting the trace which shorts it by default, otherwise **the USB voltage will be shorted with the barrel jack, causing potential damage to the USB port**. +Afterwards, *JP3* can be closed with a small blob of solder. + +# activating the equalizer on + +*JP1* and *JP2* connect the output of the Audio switching part of the Rohm chip. +When left in the default setting, they will connect them to the output jack directly, bypassing the Equalisation part of the chip completely. + +By selecting the other possible path, the equalisation circuit becomes usable. For this to work, +*JP7* and *JP8* have to be closed with small solder blobs as well, since those connect the equalizers +output to the output audio jack. + +# Assembling the rest + +For assembly of the board, check the (documentation folder)[../doc]. It contains the (interactive bill of materials)[../doc/interactive_placement.html], +which indicates what components go where. + +Also take a look at the (BOM)[../doc/BOM.xlsx] for what components can be sourced where.