Click-click! A relay-based attenuator…

Yes, when you are not lucky enough to score a good deal on expensive pots (see my last post) then getting suitable attenuators for your project can be a bit of a pain :D If you are looking for a balanced attenuator there isn’t really much “middle ground” out there between an Alps RK27 costing app. €30 and a real stepped attenuator such as a DACT (which retails for more than €300).

The typical answer to this is simple – use relays. I was never really a fan of relay attenuators though, having always found the loud clicking noises whenever you even looked at the volume knob really annoying and not something I’d want to have to live with on a daily basis. However, relay attenuators do have a couple of advantages, among which that they can be built for a reasonable cost. A stepped attenuator also has very good channel matching, but whereas even the expensive DACT only gets you 24 steps, typically with 2dB between them, 128 or even 256 steps of 0.5dB each are quite easily achieved with relays. So, having thus abandoned my principles, I wanted to try one as well :)

Even a cursory look at the schematics would reveal this as a clone of TPAs “Joshua Tree” attenuator, however it is by way of another design. I actually started from the eagle files shared by diyaudio user MaxW in this thread. I have kept the circuit more or less intact, but removed the input selector that Max had and converted it to a (nearly) complete through-hole design.

I have decided to keep the I2C-controller and the attenuator itself onto a single PCB. A couple of reasons for this, mainly that it makes for easier wiring when the PCB is “self-contained” apart from the controller and PSU, but also that when the attenuator is used in a balanced or multichannel configuration each channel gets its own I2C-address, meaning you can easily control levels separately. The added parts cost is negligible to me. The attenuator stage itself uses Omron G6K 5V miniature relays and Vishay RN55 resistors. As far as I know there are no substitutes from other manufacturers for the relays (because of the uniform 2.5mm pin spacing), but Reichelt has them for a decent price so even that is manageable. The unit is intended to be controlled by an Arduino (or similar microcontroller) with I2C-capability and I have used MaxW’s sample code from the diyaudio thread as my starting point which seems to work very well.

Now, I have put together the first sample PCB and I am honestly a bit impressed. Obviously the clicking is still there, but it isn’t too loud with the tiny Omrons. The volume ramps very smoothly when you turn the encoder and I heard absolutely no audible clicking or noise in the headphones I used for testing. My next step is to build a pair of additional boards for a balanced setup and modify the Arduino code to support a balanced configuration as well :)


PS: If you need a different value for the relay attenuator, there are a few good pages out there with information and online calculators:

- AMB’s “Delta 1″ project. (also the AMB discussion forum is a good source of information)

- Jos van Eijndhoven’s “Relaixed” preamp.

- Twisted Pear Audio’s “Joshua Tree” and the matching controller.


I don’t normally post about all the audio-related stuff I buy (then this would not be a blog but a twitter-feed :) ), but here’s an exception:

In a post coming very shortly I am going to complain about how expensive it can be to get decent quality volume control attenuators for DIY audio projects. I still think that I am right in saying that, but nevertheless – sometimes you have to be a little lucky ;)

A few days ago I was fortunate enough to find a sales listing on a local audio forum for three Penny & Giles RF15 stereo log pots. I saw the listing only minutes after it was posted and so managed to beat about a handful of others that wanted them.

I know that P&G pots are very highly regarded (and very expensive) but having never handled one before I didn’t really know why. Now that I’ve collected mine from the post office I can however see why. They are heavy, they seem very solidly built and the feel of the action is silky smooth. These are used and probably quite old, but I expect that they will work fine still. I already have a project lined up for one of them and the other two are going into storage until I find something else worthy of these beauties :)

And the price? Oh, about the same as you’d pay for a standard blue Alps pot when purchased from a reputable supplier… (I did say I was lucky to find these, right? :) )


Project files: Mains controller v1.5

What is it?
As promised in the original post, an update of the Mainscontroller design to v1.5.

This is the transformer-based version 1.1 which I have tweaked a bit. There aren’t really any functional changes but I cleaned up the layout a little and included some things from the rev. 2.0 such as a “”proper” terminal block for the switched DC output. Also, two versions are included, one with an onboard fuse and a single output connector, the other without the fuse and with two parallel outputs instead. The holes are compatible between the versions and all parts except the output connectors and fuse holder are identical between the two versions.

There are some minor tweaks to the included BoM as well, mainly the addition of values for a 9V option but also tweaks to some resistor values for more consistent operating points between the versions.

How big are the boards?
Both board versions measure 3.7″ x 1.875″ (app. 94 x 48mm) – the same as the older v1.1.

What is the status of the boards?
As mentioned, this is v1.5 of an already tested design. I have built one copy of the single-output version and it works as expected.

Does it use any special/expensive/hard-to-find parts?
Compared to the original v1.1, no.

Anything else I need to know?
If you’ve read the comments in the original post, then no :)

Download design files here

Related information:
Note: Always read the “intro post” for additional important information about my designs.

50k and counting…

Regular readers here may remember that I posted when the blog reached 15k page views just before New Year’s and 30k views in mid-May. Now the next milestone is up – 50000 page views since I started writing!

I am still a little baffled (and humbled) by this, not to mention the fact that the blog has been visited by readers from more than 100 countries all over the world – 103 to be exact (!). Also, the project files I have posted have been downloaded a total of more than 1000 times, which hopefully means that at least a few people out there have built some great stuff based on my designs :-D

However, as good as all of this might be, the best part about running this blog is actually that I get a chance to come in contact with so many people from around the world that share my hobby. A big thank you to everyone and I hope you’ll keep checking in – I’ll do my best to keep posting new stuff :-)

Project files: The ManyCaps PSUs…

What is it?
A little sideline project one might say :). For one of my other (upcoming) projects I needed to buy quite a few Panasonic FM series capacitors in one specific value. As is sometimes the case, buying 100 wasn’t much more expensive than just buying the 35 I needed and so I ended up with a question: What can you do with the rest?

In theory, paralleling multiple small capacitors gives you lower ESR/ESL and higher ripple current than a single big cap. However, due to the physical distance required between the many small caps some of the benefit is negated and overall I am not sure I dare say that one approach is inherently better than the other – that depends on what you are trying to achieve I think.

However, as I already had the capacitors I might as well try it. Obviously, something as groundbreaking as this needs to have a suitably audiophile-sounding name, so without further ado allow me to introduce the “ManyCaps”(™) audiophile PSU boards :D

There are two versions, single and dual, with space for either 2×12 or 1×15 13mm radial capacitors. The most obvious application for these is probably gainclones and smaller class D amplifiers but they can be used anywhere where an unregulated supply is OK. The boards can of course also be used with a DC input, either with the rectifier in place or with the rectifier bypassed.

How big are the boards?
The single board measures 3.8″ x 2.0″ (app. 97 x 51 mm) and the dual board measures 3.925″ x 3.2″ (app. 100 x 81 mm).

What is the status of the boards?
Both boards are in v. 1.0. They are simple designs, so I didn’t need to make any changes and they worked the first time round :)

Does it use any special/expensive/hard-to-find parts?
Nothing really stands out:
  • The main capacitors are 13mm max diameter and voltage obviously depends on the application.
  • Rectifier is GBU-type and should probably be rated at least 6-8A.
  • The decoupling capacitor should be around 1.0 uF MKP or MKT. The lead spacing is 22.5mm on the dual board and 15mm on the single board.

Anything else I need to know?
Can’t think of anything :)

Download design files here

Related information:
Note: Always read the “intro post” for additional important information about my designs.

Project files: Mains controller & standby PSU

What is it?
These are the project files for my mains controller and standby-PSU shown here. Also included are the files for a simple standby-PSU without any control logic for a MeanWell IRM-series power module from 5-20W if you just need an AUX-voltage (or a very simple single-rail PSU).

As mentioned in the original post I am not completely happy with these inasmuch as I haven’t really been able to get to a “one-size fits all” version. However, as both versions work (and should work well in the right application) then I am posting the files anyway. You should probably use the transformer version if you need 5V power for logic circuitry because they output is well-regulated. Max. DC output capability is probably around 250-300 mA for supporting circuitry if you subtract the power drawn by LEDs and the SSR etc. (assuming a 6VAC EI-30 transformer is used). For 12V out with a 12VAC transformer, you are probably closer to 150-200 mA as the limit. You should use the IRM-based version if you need more power, such as 12V/24V for fans etc. With an IRM10-12 power module you have around 12V/800mA to play with – plenty for even large fans and other supporting circuitry.

Note: If you are interested in the transformer-based version you may want to hold on for another couple of weeks as I have a “version 1.5″ of this on order. Same transformer and same board size, but a few layout tweaks that should make the board more usable.

How big are the boards?

  • Transformer version: 3.7″ x 1.875″ (app. 94 x 48 mm)
  • IRM-version: 3.625″ x 1.75″ (app. 92 x 45 mm)
  • Separate IRM PSU: 2.95″ x 1.25″ (app. 75x32mm)

What is the status of the boards?
The transformer-based version is in version 1.1. The only change from v1.0 is that I changed the lead spacing for the snubber capacitor from 5mm to 7.5mm so that a proper X2-rated part can be used.
For the IRM-version, the files are the same v2.0 version that I built and showed in the original post.

Does it use any special/expensive/hard-to-find parts?
Not too many :)

  • The snubber cap across the SSR must be 7.5mm lead spacing and X2-rated. Mouser has them and you may be able to get them from elsewhere as well.
  • The SSR can be had from many sources, including Reichelt, Mouser, ebay etc.
  • The transformer is a fairly common EI30 type which can also be bought from many sources such as Reichelt, TME etc. Note that EI-30 is, strictly speaking, only the core type of the transformer. Always confirm dimensions and pin connections etc. against the manufacturer’s datasheet before you buy.
  • If you want to build the IRM-version then the IRM module itself is a bit expensive. Mouser has them, but if you are in Europe then TME is actually cheaper although at the time of writing this their stocks are a bit erratic.

Anything else I need to know?

  • The connections are quite simple:
    – Mains: For AC input.
    – Load: For the device to be turned on by the SSR. On the IRM-version there are two outputs, but they are in parallel so it does not matter which one is used.
    – Switch: This is the “main” trigger. Short the “trigger” pin to the positive rail via a latching switch to turn on the SSR.
    – Test: This is a shorting jumper for testing purposes. Shorting these two pins turns on the SSR. While intended for testing, you can also use it as an extra trigger, especially if you want galvanic insulation between the logic circuit and the SSR trigger – simply use an optocoupler where the secondary side transistor shorts these two pins.
    – Ext: This is for turning on the SSR via an external circuit, i.e. microcontroller or other logic signal.
    – DC out: This has DC output at all time when the board is powered on.
    – DC switched: This has DC output only when the SSR is turned on.
  • I normally do not post BoMs with these circuits, but this time there’s one included since it may not otherwise be logical how to choose the right parts. The BoM is correct as far as I can see, but if you believe you have found an error or if you have a question you are welcome to contact me.
  • Lastly: Always remember that this circuit is mains-powered. Be careful when building, testing and mounting it and always respect your local electrical code of practice. In short: If you’re not sure what you are doing – then stop and ask someone who does!

Download design files here

Related information:
Note: Always read the “intro post” for additional important information about my designs.

A good idea…

Like many people, I use running and walking as a way to try and stay in shape (yes I admit, you can’t really see it ;)) and also to take my mind off work and daily life in general. I also very often use this time as a way of solving problems and generating new ideas. Some of the ideas are definitely good, some are probably not so good and some of them just turn out to be very expensive :D

A couple of months ago while out, I had the idea for a way to build a balanced Beta22 headphone amp from AMB. I didn’t technically need that, but since I have a pair of balanced headphones I thought I’d give it a go.

The B22 is not a cheap project by any means, especially not in the balanced configuration – and when you then start adding a few custom-fabricated enclosure parts and transformers then it is really starting to hurt! But hey, I am not into DIY audio to save money (definitely not…) so here we are :D

Still quite a bit of work left to go as you can see, but even the electricals are coming along nicely. And while I am confident that the result will end up being worth it, I have to admit it was a pretty expensive run I went for that day :D

Project files: Little helpers – Connectors

The second part of my “little helpers” project series consists of a few connector boards amplifiers or for testing/lab use.

What is it?
Three boards for various connectors and purposes:

  • An XLR/TRS-board which is a small breakout-board for a Neutrik NC6FI-H XLR/TRS combo connector that means you can then use bare wires or a three-pin connector to wire up the socket.
  • An XLR I/O board which is intended for XLR in and loop out with “standard” PCB-mounted Neutrik D-series XLR connectors.
  • An RCA I/O board which is designed for some board mounted RCA connectors. I don’t actually know who makes these but they are pretty much the only decent-quality style PCB mounted RCAs that I know of. There are a couple of of internet sources for them (ebay, audiophonics, Rapid electronics, ) and I think they are identical (if nothing else then in size/dimensions) to the ones sold by Vampire at a more “audiophile” price ;) If anyone knows the “true” source of these then I’d like to know?

How big are the boards?
Small… I don’t want to list them all here :)

What is the status of the boards?
The boards are in v1.0 which means they have been tested and are working.

Does it use any special/expensive/hard-to-find parts?
Mostly there’s only one real part on the board and that is the connector itself which can be a bit expensive, so yes, I guess so :D

Anything else I need to know?

  • Note that although the XLR/TRS sockets do fit into a standard Neutrik D-series hole, for reasons I don’t quite understand the board will not sit completely straight if mounted that way. For most uses that will not be a problem, but if you want to use these in a 1U enclosure you need to be a bit careful or mount the board upside down. To avoid this, make your panel holes exactly as it is shown on the drawing.
  • On the XLR-boards there is an onboard jumper to connect pin 1 to ground, so depending on usage (SE or BAL) and grounding scheme of your build, this is an easy way to manage ground loops. There is also a jumper to connect the chassis to ground which should not ever be necessary if everything you connect is made properly. If it isn’t, then that jumper is here to save the day :D
  • The “XLR loop” boards are included in a “right” and a “left” version which are mirrored. If you only need one version and don’t really care which one, I’d recommend the one marked “left” as it has the nicest routing (unbroken ground plane).

Download design files here

Related information:
Note: Always read the “intro post” for additional important information about my designs.

As usual, please remember to consult the manufacturer’s datasheets as well and ensure that you verify the connector part numbers before hitting the “buy” button on anything :).

Standby-PSU & Controller board

For many of my amplifier builds, I have needed the ability to control and switch a mains connection for a transformer or SMPS with a low-current switch. I also frequently need a “stand-by” voltage for LEDs, fans and other circuitry outside of the main amplifier voltages. Some pre-made soft starts include both of these features, but they are mostly either fairly expensive or very low quality ebay-stuff (I have a few of those that work well, but I have also blown up a couple in the process of finding the good ones…).

One potential alternative is AMBs epsilon24 “switch driver” circuit. This was partly what I needed, but not quite. Firstly I wanted to use a latching switch (so you can easily see if the damn thing is on or off :D ) and secondly I wanted to integrate the mains switching part of the circuit as well, in order to eliminate as much clumsy mains wiring as possible. The end results (at least for now) are what you see here. I say “results” because actually I ended up with two versions of the board :D.

The first type is the one with the transformer. It includes the transformer (which is an EI-30 core type, so power is limited to around 3VA maximum) with a small rectifier and 78xx regulator to generate a regulated standby voltage – normally either 5V or 12V. The standby voltage is available for powering external circuitry and it also switches an on-board SSR (solid-state relay) to control a larger, mains-powered transformer or SMPS. The switch can be either a simple latching type and/or an input from a logic circuit such as a flip-flop or a microcontroller. There is also an onboard fuse for the load and the SSR is protected from transients by a snubber circuit and a varistor (MOV).

On the second board version I have replaced the transformer + the regulation stage with an integrated MeanWell IRM-series power module. I also added a second mains output, removed the fuse which should be placed off-board instead and thus managed to shrink the board by a few mm. in the process. Although a bit more expensive than the transformer, on paper there are several advantages of the integrated power module: More power (up to 10W instead of less than 3W), universal mains input, very low standby consumption (so easily compliant with the < 0.5W standby regulations), simpler and takes up less board space than transformer and regulator etc. However, the output voltage seems to fluctuate a bit more than I would like. If you’re just powering fans, LEDs or relays this is most likely not an issue, but the idea was that it could power logic circuitry as well and then I am suddenly not so sure it will work – we’ll see once I manage to do some more detailed testing.

So, even with two board versions that both work I am not sure it is really “mission accomplished” just yet: The transformer version might be a bit underpowered for what I would like (especially at 12V) and the SMPS version might not be stable enough for powering digital logic. If so, I might go for a rev. 3 of this idea and see if I can squeeze a bigger transformer on there to make just “one board to rule them all” :D

EDIT 07-09-2014: I have now done some more testing on the v2.0 board and it seems I was wrong about the output of the IRM module. At least now I can’t replicate the unstable output I saw last time any more. With both my normal multimeter and the more expensive Fluke, the output is now a rock solid 5.00VDC. I have also measured another IRM module (a 12V version) and that also shows a very accurate and completely stable output voltage. So, I guess it is “mission accomplished” after all and I I’ve shelved the plans to make another transformer version – at least for now :)

Project files: DC-DC converter boards

What is it?
PCBs for DC-DC converters as described here. There are three sizes, for 1”x1”, 1”x2” and 2”x2” converters respectively. These footprints are industry-standard so you can use converters from a variety of manufacturers such as Traco, Recom, Murata and many others.

How big are the boards?

  • 1”x1” PCB: 1.875″ x 1.475″ (app. 48 x 38 mm)
  • 1”x2” PCB: 2.85″ x  1.475″ (app. 72 x 38 mm)
  • 2”x2” PCB: 2.85″ x 2.5″ (app. 72 x 64 mm)

What is the status of the boards?
All the boards are in version 1.1, meaning they have been prototyped and minor tweaks made to silkscreen etc.

Does it use any special/expensive/hard-to-find parts?
The ceramic caps between the primary and secondary sides should typically be rated for 2-3kV which can be a bit difficult to find. Mouser/Digi-key obviously have them but your local parts suppliers might not. Otherwise, apart from the converter itself, not really.

Anything else I need to know?

  • The external components are for EMI filtering and (usually) not required in order for the converter to work. All the caps on the primary side have 1812 SMT footprints.
  • The two component positions on the secondary side can be used for decoupling (required for stability with some converters) or for voltage trim if your converter supports that. These have 1206 SMT footprints.
  • Not all converters have enable-pins and some has the functionality, but wired as “always-off” instead of “always-on”. In this case you need to wire the enable-pin to the negative input voltage in order for the converter to turn on (you can of course also use the optocoupler here, but with the logic inverted).
  • If you use a 4:1 input range converter and you expect to actually use that input range, you need to be a bit careful with the value and power rating of the LED resistor, at least on the two small boards. Both the LED and the resistor are 1206 SMT here. On the 2”x2” board you can fit a 1/2W or 1W leaded resistor and then there should be no problems.
  • Many converters are sensitive to the capacitive loading on the output, so remember to check the datasheet for maximum allowed capacitance. If you exceed this limit it is possble that the converter will refuse to start up.
  • You can sometimes find DC-DC converters as cheap surplus items. Normally that is absolutely not a problem, but remember that even if the footprints are industry standard there can be quite a few differences between manufacturers. I recommend that you do not buy anything that is so obscure that you can’t google your way to a datasheet/application note for it :D

Download design files here

Related information:
Note: Always read the “intro post” for additional important information about my designs.

Always remember to refer to the manufacturer’s datasheet and application notes for specifics on pin connections, external component values etc.

EDIT 20-08-2014: Added comment on capacitive loading.



Get every new post delivered to your Inbox.