Modular Preamp Design

FALK PA01

Backround
I'm working on my first DIY audio project. I need a new preamp and wanted to build something instead of buying something off-the-shelf. I also wanted something modular so I could swap things out over time and pretty much start simple and get more complicated if I wanted to.

That expanded to a new idea: what if you could build a set of modules so anyone could take the designs/PCBs and build their own preamp from the components, swapping out mine for their own designs where wanted. For example, a few different volume control options (pot vs. attenuator) and you pick the one you want and build it. I'm not setting out to design every possible board, so feel free to ask for something or even design your own PCBs and submit them here so others can use them - this can be a community project!

So, goals are:
  • Options for Single Ended + Balanced design (end to end)
  • Completely modular, so you can pick parts and add in others (buffers, RIAA stages, etc.)
  • Can leverage other components
  • Flexible design
  • Offers both MCU-controlled and discreet controlled options

I'll be posting images of schematics, PCB designs, build files (Gerber) and BOMs for everything. I'd really like to get some feedback on the schematics and PCBs to make sure I'm not making any mistakes along the way!

Advanced Control Board (ESP32)
The advanced control board hosts the MCU (in this case an Espressif ESP32-WROOM-32U). This is the module without the built-in antenna, so you'll need a U.FL antenna. The board can be configured with either a Bluetooth or IR remote.
This board accepts input via buttons and shows state via the Screen Board. It connects to the other audio board using the Chain connector, which provides power (5V) and control (i2c). The Control Board turns on and off the other boards by switching the 5V rail on and off. Some boards (including opamp-based boards) will need dedicated power supplies.
Wh3YpCI.png
RuXCRtS.png

Orderable BOM Mouser (includes transformer and FTDI programmer)
Code GitHub - gilphilbert/falk-pa01-advanced: ESP32 code for FALK-PRE-01

Basic Control Board
The Basic Control Board offers the same basic functionality as the Advanced Control Board. It uses an i2c connected LCD as the ATMega isn't powerful enough to drive the big screen used in the Advanced configuration. Other than that, it's compatible with all other boards. This board offers IR for remotes only.
CyRckpd.png
CEt7jQ9.png

Orderable BOM Mouser (includes transformer and ICSP programmer)
Code GitHub - gilphilbert/falk-pa01-basic

Volume Relay Board
The Volume Control board is designed to be deployed in either a single-ended or balanced mode. For single-ended, use a single board and pair with the RCA input board. For balanced configurations, use two boards paired with the XLR board. They have the same i2c address configured, so the same command will be sent to both boards.
4a9s0I1.jpg
ZtqEqQ8.png

Orderable BOM Mouser

Balanced Input Board
This board supports 4 balanced inputs via XLR. Input 4 can also be single-ended (RCA), selected by an on-PCB switch.
Pbn3KX2.png
3ZSDUPO.png

Orderable BOM Mouser
Daughterboard
The input board supports a single daughter board that clips over the single-ended input and converts it to differential. When installed, the switches need to be flipped to RCA and the board will automatically connect to the input relay. When not installed, the RCAs on the input board can be used as desired, for a phono stage, etc. But the output from that stage back to the input board must be differential (or the fourth set of balanced inputs can be used). Requires a 15V dual rail PSU - power requirements are pretty low (since there are only two dual opamps). Use your own or my 15V dual rail PSU (coming soon!)
mMNoaIh.jpg
vNwBBzG.png

Orderable BOM Mouser

Unbalanced Input Board (8 RCA)
1p6b8sw.png
nRi22vu.png


Output board
The output board features both XLR (Balanced) and RCA (Single-Ended) outputs. Either can be used and, with the optional Balanced > SE output daughter-board, both can be used at the same time.
8vml7b7.jpg
gcPjag7.png

Orderable BOM Mouser
v1.1 adds the optional daughterboard for balanced >SE conversion

Screen Board
This board is designed to be attached directly to a NewHaven 3.12" OLED display (NHD-2.8-25664UCB2) using standard header pins. It connects directly to the Advanced Control Board.
25mD4Kn.png
0qz70Z3.png

Orderable BOM Mouser

Button Board
This board provides connections and debounce circuits for two rotary encoders for input.
1jLYJW7.png
stj5csN.png

Orderable BOM Mouser
v1.1 changes the capacitor footprints and spaces the encoders more widely to support larger knobs
v1.2 changes the layout to allow for one 48mm encoder knob and one 28mm knob

Mute Board
This board auto mutes the audio when power is cut. This board is optional but without it, standby and powering off the unit won't cut the audio.
hzxdFvh.png
zkl0VBh.png


Convenience Control Board
If you have a power control system (a line conditioner, etc.) that requires a mains-voltage trigger to power on/off equipment, this board can provide that switch based on the power state of the control board.
MG9tSfa.jpg




NoteI can't change the attachments, so ignore the below and instead you can find the full set of designs in my Google Drive folder. In that folder you will find:
  • Schematics
  • PCBs
  • GERBER files

I can also share the designs on EasyEDA if that's useful to anyone.

Any feedback would be greatly appreciated! I'll update this post as I build more modules.

Thanks for all the feedback, I hope these end up being useful to someone else.
 

Attachments

Last edited:
Well you only need one transistor and diode to drive two 28mA relays, you can parallel the windings no problem.


Adding base resistors on this board means you don't have to remember that it needs them, connecting one of the inputs to 5V would fry transistors as things stand.
 
FWIW, when I build a preamp I use a shallow 19" rack chassis. That gives me plenty of room to screw down various circuit boards. It's easy to change them, so as close to "modular" as I need to be. I've tried various RIAA stages, various volume control schemes and various output buffers. I always come back to a very simple configuration- opamp based RIAA board, moderate impedance stepped attenuator and no buffer.

Agree with the above on latching relays, but be sure to buy spares. It seems like the minute I choose a relay for a project at work, it gets discontinued with no drop-in substitute. If you can find one with several alternate manufacturers, so much the better.
 
Thanks Mark, I had that in an earlier design and somewhere along the line they crept back in. I've reduced it to one transistor per relay pair. Added base resistors too.

Kevin, that's a good idea - it'll consume less power and you don't have any noise at all. As you've probably noticed, I've designed this so there's no crossover between power and audio - they're separate on the board. Anything I can do to reduce the potential for noise I'm interested in!

Conrad - I was planning on building this in a 2U chassis, most likely. It depends on how much space I have. I was considering making the modules stackable, so the control board could sit on top of the volume control board, for example. This would be helpful in 2U enclosures, but the modules could always be laid out side-by-side in a 1U chassis (or smaller!).
 
Hi Phill,

I am also interested in a modular approach to a pre-amp. Personally, I would like a 6-input single-ended selector with mute relay. Just a couple of thoughts for your schematic.

1) Would things be simplified by the use of a ULN2803 relay driver rather than several transistors? It can drive up to 500mA and also incorporates the base resistors and protection diodes? Other members of that family will work for voltages other than 5V. For an input selector I am considering the 74xx145 logic chip that has sufficient drive (80mA) for a relay and allows me to drive up to 8 relays with just 3 pins of an arduino (and trivial software logic).

2) Is there a need for being able to reset the latching relays individually? With latching relays you will be switching using short pulses. Would a "reset all" pulse serve your purpose for the input selector board? There would be no need to remember which input channel was previously selected. (The volume board could be different as you might, for example, be looking for make before break).

Regards
Geoff
 
Personally, I would like a 6-input single-ended selector with mute relay.
You'll need half the number of relays, which makes things much easier. I've ended up with a four-layer board, but you could do this with two layers.

Would things be simplified by the use of a ULN2803 relay driver rather than several transistors?
You'd certainly have fewer components, and I actually started with that very transistor array, but I wanted to go with something that had no ICs on the audio boards. Then I put a transistor relay on the control board but this made the control boards complicated. In the end, I went with discreet components on the board. If you're OK with SS on the boards, use a Darlington pair transistor array by all means.

For an input selector I am considering the 74xx145 logic chip that has sufficient drive (80mA) for a relay and allows me to drive up to 8 relays with just 3 pins of an arduino (and trivial software logic).
Since I have tons of pins, there's no AVR chip that can support the number of inputs/outputs I'll need. It's not finished yet, but my first control board is based on an ESP32 MCU paired with two Atmel MCP23017 GPIO extenders. They'll deal with the relays, while the ESP32 inputs will largely be used for rotary encoders and an SPI-based display. The MCP23017 is also cascadable and uses i2c, so it only uses two pins for up to eight GPIO extenders (128 GPIOs!)

Is there a need for being able to reset the latching relays individually? With latching relays you will be switching using short pulses. Would a "reset all" pulse serve your purpose for the input selector board? There would be no need to remember which input channel was previously selected. (The volume board could be different as you might, for example, be looking for make before break).
For the input board, you could have a shared reset and I have considered this. You'd reset everything before you set the correct input. Make sure you've got a transistor relay that can handle the amount of relays you want to switch - or use multiple transistors and tie the inputs together.

I’m thinking ‘shallow’ means front-to-back kept small for short cable runs between connectors on the back panel and controls on the front. The height, in “U’s” being less important ?
Ah, gotcha. My initial design has electrical isolation between the controls at the front and the boards at the back. But for some modular approaches where you don't have that luxury, absolutely. I have been considering some "stackable" boards, where the input and volume boards all stack on top of one another and use IDC-style connectors to join together. This way, you could create a system where you have a single input board and then stack either one or two volume boards on top depending on whether you have a single-ended or balanced configuration. This would make them taller, but shallower. Basically one volume control board design and two input boards (SE/balanced).
 
Looks like a great project, I really like the modular design 🙂


For modularity, the board contains only the relays transistors and diodes.

Why not just use a relay driver IC? Then you can skip the transistors and diodes and it makes layout cleaner. e.g. ULN2803 or ULN2003.

I wanted to go with something that had no ICs

I don't really get this logic, inside the IC is just those components you're adding manually one by one 😉

I am also interested in a modular approach to a pre-amp. Personally, I would like a 6-input single-ended selector with mute relay.

I made exactly this here, you can download the PCBs and get them made if you wish: preamp-two/PCBs/input-selector at master * FutureSharks/preamp-two * GitHub

my first control board is based on an ESP32 MCU paired

Great choice! If it helps, I made a similar project but using MCP23S17 (SPI version of MCP23017) and Itsy Bitsy M4 instead of the ESP32. If you can, I really recommend using CircuitPython instead of arduino code, it's 10000 times easier to write, read and debug.
 
... I actually started with that very transistor array, but I wanted to go with something that had no ICs on the audio boards. Then I put a transistor relay on the control board but this made the control boards complicated. In the end, I went with discreet components on the board. If you're OK with SS on the boards, use a Darlington pair transistor array by all means.

Hmm. Not sure I understand so, from ignorance: the discrete component is a transistor in a plastic package; the ULN23008 is 8 transistors (actually pairs) in a plastic package; why is 8 discrete components better in this application (driving relays)? I don't mind if the answer is simply "my preference", I'm comfortable with personal preferences in DIY 🙂 .

Since I have tons of pins, there's no AVR chip that can support the number of inputs/outputs I'll need. It's not finished yet, but my first control board is based on an ESP32 MCU paired with two Atmel MCP23017 GPIO extenders. They'll deal with the relays, while the ESP32 inputs will largely be used for rotary encoders and an SPI-based display. The MCP23017 is also cascadable and uses i2c, so it only uses two pins for up to eight GPIO extenders (128 GPIOs!)

Using MCP230xx extenders adds I/Os even to AVR chips and that's the approach used by Oleg in his design at R-2R attenuator PCB layout question . He chose to build mini I2C to relay boards.

For the input board, you could have a shared reset and I have considered this. You'd reset everything before you set the correct input. Make sure you've got a transistor relay that can handle the amount of relays you want to switch - or use multiple transistors and tie the inputs together.

My thinking was that you will have to reset the current input selection before selecting the next one anyway (or you will briefly have two inputs select simultaneously) so it make no difference if the reset is to all the relays. And the ULN can drive 500mA so no problem with several 30mA relays.

Regards
Geoff
 
Thanks for all the feedback / questions!

Why not just use a relay driver IC? Then you can skip the transistors and diodes and it makes layout cleaner. e.g. ULN2803 or ULN2003.

I don't really get this logic, inside the IC is just those components you're adding manually one by one 😉
I actually started with this design, but ultimately decided to go with discreet components, probably more for personal preference than anything else. The control boards are filled with ICs but I've kept the audio boards entirely with discreet components. Since the relays provide electrical isolation, it's probably an unnecessary step, especially with latching relays.

Great choice! If it helps, I made a similar project but using MCP23S17 (SPI version of MCP23017) and Itsy Bitsy M4 instead of the ESP32. If you can, I really recommend using CircuitPython instead of arduino code, it's 10000 times easier to write, read and debug.
Took a look, that's pretty cool - and tiny, too! I've played with MicroPython in the past, which if I recall is where CircuitPython came from. I've actually got most of the code ready in C++ now anyway. One thing this will have the ability to do is offer Wifi (which you can turn off), but from there you can "name" the inputs to whatever you've plugged into them via a simple webpage. The names will appear on the screen when selected.


I don't mind if the answer is simply "my preference", I'm comfortable with personal preferences in DIY 🙂 .
You pretty much hit the nail on the head. I like the idea of the audio boards having discreet components. As I said above, probably completely unnecessary. One advantage is that I can build a control board that has no ICs as well, so if there's someone who wants a preamp with no ICs then this can do it. I've also built a lot of boards (unrelated) using SMD ICs everywhere and it's nice to have a change and go back to basics sometimes


Using MCP230xx extenders adds I/Os even to AVR chips and that's the approach used by Oleg in his design at R-2R attenuator PCB layout question . He chose to build mini I2C to relay boards.
It sure does, I prototyped this on a vanilla ATMega328p. If you don't want to do anything fancy, you could actually do the whole thing with an ATTiny 84 or similar, a few buttons and a pot/rotary encoder (I did that, as well...)


My thinking was that you will have to reset the current input selection before selecting the next one anyway (or you will briefly have two inputs select simultaneously) so it make no difference if the reset is to all the relays. And the ULN can drive 500mA so no problem with several 30mA relays.
Absolutely. One of the great things about the MCP23xxx chips is that you can write to all the pins on a given port at the same time, so you don't need to switch one then the other, you can switch them on/off simultaneously. However, the relays can take 1-2ms to switch (depending on your relays - find fast ones!) so I need to make sure they won't be open at the same time. I'm waiting for my two first boards to arrive so I can start trying these things out. If it doesn't work, expect and updated version with this approach! 🙂
 
Oops, after I ordered the boards I discovered a mistake, of course. Input board design was using female sockets for input and output, that won't work of course. Corrected, but the pin configuration is different so my input board is useless. Fortunately that was the cheaper one...

For the redesign, I gave in and went with the Darlington pair IC ULN2803A. I suspect I'm being over cautious with discreet components and the cost of (a lot of...) transistors adds up pretty quickly so this will not only simplify the board, but also reduce the cost for anyone else who wants to build one. I'll update the volume board to include ULN2803A as well, but my "legacy" board will still have separate transistors!
 
After much consternation, I've decided to scrap my current balanced board in favor of a pair of stacked volume boards. This uses less space and allows me to use one board in a single-ended configuration and two boards stacked in a balanced configuration. This means I can have a single volume control board whether it's SE or balanced. Even better, since I'm using ribbon cables for control, I just need a cable with a connector at each end and one in the middle. The middle connector is only needed for balanced configurations.

The input board is updated with some changes and a cleaner schematic. I'm working on a single-ended 6-input board as well that can be paired with a single volume control board. After that, I'll finish off the control board. I also have a display board (for the OLED) and buttons board (rotary encoders). The five boards together constitute the whole system. An optional buffer can be used before/after the control board as desired.

You can find the updated boards in the first post and the link to Google Drive now includes the images, PDFs, BOMs and Gerber files.
 
I have just looked at your new input board and I think there’s an error. On the schematic the outs from the relay are pins 4&13 but on the board you appear to be connecting to 6&11.

As luck would have it, I have just bought the relays for such a board and I opted for the single coil latching relays. It’s an easy mod from your board - just omit the +5v from the relays and connect the set/reset from the ULN to opposite ends of the coil.

Are you willing to share the Eagle/Kicad files?

I could then also add a mute relay using the spare channels on the ULN.

Cheers
Geoff
 
Hi Geoff,

Thanks for the scrutiny! The text on the schematic is slightly offset for pins 4-13 so I'll fix that. The outs are on pins 6 and 11, the common pins, and this matches the board. If you look closely, you can see the green X next to pins 4 and 13, showing they're not connected. Apologies for the confusion!

I made the mistake of starting this project in easyEDA, which is a fine tool and easy to use not the export options are limited. I'm not in front of my PC right now, but I'll export all the options I have and upload them to the same folder - you're free to edit in whatever way you like.

Cheers,
Phill
 
I've updated the boards, it turns out that while the pins are clearly documented in the datasheet, the schematic and the PCB footprint, I still managed to wire all of them the wrong way. That'll be sleep deprivation at work... it's now corrected on all boards.

I've also now included EasyEDA PCB files, Schematic Files and KiCAD PCB files. I can't find a way to create KiCAD schematics though.

I'll post my control board and display board soon as well. The first one is based on the ESP32, but I plan to create one based on the ATTiny (possibly ATMega) as well. I'll include any source code for the MCUs.

Cheers,
Phill
 
OK, so an update... it's been a busy few weeks but I've made a lot of progress. First of all, I ordered a full set of boards. Even before they were delivered, I discovered two had pretty significant faults and I had to order replacements... soon after, my full set of prototype boards arrived:

Q8qjoIo.jpg

SffVFKM.jpg

U5UvRPO.jpg

Nhdfo36.jpg

(Missing: photo of prototype input board)

I started enthusiastically soldering components, the input board first, followed by the control board then the other boards, finishing with the volume boards.
sDeIngN.jpg

qK6S8o3.jpg

Kr42s7o.jpg

nWC8F5L.jpg

hJIbUTO.jpg


What did I learn so far?
My control board has a few faults, one that creates a short-circuit (whoops) one that means it's hard to program the ESP32. My input board has a short across multiple pins (so now I have to desolder a bunch of components...). Ultimately, most of the boards need to be changed. I've done most of the changes so I will upload new versions soon. There's also no power button anywhere. You can put one directly in the power line, but since the ESP32 and the other ICs support low power standby, we can just power down everything, so I've added a power header on the main board.

All that said, there's some good news... it works! (mostly)
lWZrxPx.jpeg


There's still some software work to do and until my final boards arrive, there are some pretty horrible workarounds in place (both hardware and software). But, the input is correctly selected as is the volume. The display works nicely and accurately shows the output too.

The volume boards work perfectly and don't need rev'ing and the stacking works too:
LdsBoNB.jpeg


I'll update as I make more progress, but for now, things are looking pretty good! A few new boards, a full case and (most likely) an output buffer and I'll pretty much be there.
 
  • Like
Reactions: thimios