1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Semi-custom amp & network audio player

Discussion in 'Project Logs' started by Byron C, 2 Aug 2020.

  1. Byron C

    Byron C Multimodder

    Joined:
    12 Apr 2002
    Posts:
    10,009
    Likes Received:
    4,639
    For a long time I've wanted to do some kind of DIY audio project, it's one of those ideas I come back to every now and then but never actually do anything with.

    Recently I installed a copy of Pi MusicBox on my spare Raspberry Pi 3B+ and hooked it up to an amp:

    [​IMG]

    For the curious, that's a pHAT DAC sticking out the top of the Pi.

    The main purpose of this little setup over here was somewhere to house & play my retro systems - as you can see, that is still something of a work in progress...

    [​IMG]

    Side note - those cube storage things make great places for curious kitties to curl up and sleep...

    [​IMG]

    But I was pretty impressed at how well that little amp performs - it's an SMSL SA-50 I picked up on Amazon recently. I mean, it's not exactly the best quality amp out there, but for background music or hooking up retro consoles it's more than good enough.

    [​IMG]

    It turns out that this amp is basically a reference implementation of the TDA7492 IC. "I bet I can do that!", goes my somewhat misguided inner voice. So I looked up the data sheet. "Yeah, you know what, no thanks!", went my somewhat more sensible inner voice...

    [​IMG]

    I mean... sure... I could do it eventually... but there's a bit of an art to designing PCBs/layouts for audio use, and there are loads of pre-built amp boards you can buy which implement this IC or similar.

    Which leads us to the start of this project... I quickly realised that I could probably string together some off-the-shelf parts to create my own custom amp & network music player.

    So I have a number of features I want to integrate into this project:
    • Amplifier - minimum 50W
    • Raspberry Pi music player
    • Bluetooth input
    • At least 3 external inputs
    • Display showing current input
    • Motorised volume pot
    • Remote control
    • Microcontroller to run everything
    Therefore, I've started ordering bits and pieces so I can get prototyping.

    First up, the amp. I bought this board based on the TPA3116D2:

    [​IMG]

    I am going to have to modify it at some point so I can replace that pot with a motorised one. I will also need to do something about the on-off switch - I might switch it via the microcontroller as part of the startup process, or I might just wire it so it's permanently on.

    Next, power supply. The amp board takes DC instead of AC, which is WAY easier! I bought this beastie from Amazon - 24V 15A output power, so that should be more than enough!

    [​IMG]

    Three output terminals, which will come in handy later. I will definitely be using a fused IEC socket in front of that power supply in the finished version!

    Bluetooth input! After a bit of hunting around I chose this module:

    [​IMG]

    This will all be inside some kind of aluminium enclosure when I'm done, so those piddly little PCB antennas are not going to work. This module however has an external antenna connector - handy! It also has built-in voltage regulation that accepts between 5V and 35V - meaning, I don't need a 24V to 5V module, I can simply feed in the output of the power supply.

    IR module next. I went for this off-the-shelf board for the sake of simplicity when prototyping, but there really isn't much going on here, I'll roll my own further down the line.

    [​IMG]

    Of course I wanted a screen, so this 128x64 I2C OLED module will do for now!

    [​IMG]

    I've no idea what kind of refresh rate I'll get. Arduino might not cut it, but I have a spare Arduino Pro Micro gathering dust so that'll do to get on with. I may also want a larger screen, but this will do for prototyping purposes.

    Next, a bunch of breadboarding stuff for prototyping/development. Not really much to say about this TBH!

    [​IMG]

    So. That's pretty much it for the off-the-shelf stuff. The last big puzzle piece is the input switcher.

    I found this project on Hackaday. It's an audio input switcher using Panasonic TQ2 relays and controlled by a Node32 microcontroller board; it's also open source, which is absolutely perfect.

    [​IMG]

    I really like the white soldermask! Here's the schematic:

    [​IMG]

    I'll be implementing everything except the Node32 part - I'm keeping the input resistors and transistors, but it remains to be seen whether it's needed or not. The Node32 uses 3v3 instead of 5v; these are 5v relays, which is why the transistor driver was needed in the first place. I might well be able to drive the relays directly from an Ardiuno because it uses 5v; even if I leave the transistors in place all I'll need to do is change the resistor value at the base.

    So I spent a bit of time in KiCad this afternoon and came up with this schematic:

    [​IMG]

    The relay designators have the suffix '_BLC' because I customised the parts to re-arrange the pins - this just lets me know that it's my part and not the standard one :happy:.

    An hour or two later and I had this PCB knocked up and ordered:

    [​IMG]

    [​IMG]

    As @Bloody_Pete already pointed out, this is a completely unoptimised layout! :grin: This is a pure prototype at this stage - I need to see whether the circuit actually works, and I need some hardware to start development with. I've got a lot of microcontroller code to write and it'll really help to have hardware here to work with. Eventually this board will be a lot larger, but for now this will do.

    So that's pretty much as far as I am so far. I'm afraid there probably won't be an update on this for a while. I've got a lot of parts I'm waiting for at the moment, and there are already a couple of retro projects on the go which are blocking up workbench space!
     
    Last edited: 3 Aug 2020
  2. Bloody_Pete

    Bloody_Pete Technophile

    Joined:
    11 Aug 2008
    Posts:
    8,438
    Likes Received:
    1,111
    For prototypes you may like the look of these :)
     
  3. Byron C

    Byron C Multimodder

    Joined:
    12 Apr 2002
    Posts:
    10,009
    Likes Received:
    4,639
    Sorry, missed this!

    Noted :thumb:
     

Share This Page