Tools of the trade? (part 1)

I don’t honestly get a lot of tool questions, but in the interest of being prepared I thought I’d write up a bit of experience about what I think is necessary tooling (and which ones are just very helpful) 🙂 This got pretty long, so it’s going to be in (at least) two parts – the second one will follow shortly.

Read more of this post

Project files: Filtered IRM power supplies (part 1)

As promised a while ago, here are my designs for the “filtered” power supplies based on IRM AC/DC modules. These are excellent for adding compact and powerful single and dual supplies which still have a reasonably good performance to any small preamp/headamp amplifier.

Read more of this post

Project files: Electronic Load files (untested)

My post on Kerry Wong’s electronic load continues to be one of the posts that consistently drives referrals and traffic to the site, even four years on from publishing it. I guess this is more of a testatement to Kerry Wongs’s original idea and design than to my efforts, but it also means that regularly someone will email me and ask what happened to the project. For the last few years I’ve only really be able to answer “not much more than what you can see” and “no, I am not expecting to do anymore about it in the foreseeable future”.

However, I have been thinking that I should get a grip on myself and at least package up my design files so that someone else might be able to carry the project forward forward. Last week another email from a reader managed to prod me just enough that I finally relented and started doing just that, so here I am publishing something that I generally do not like – a completely untested design. However, i do hope that someone can continue with the design and get it tested and running because I’m sure it is worth it (and if at some point I need a load myself, I will be grateful that someone else has done the work 😉 )

Read more of this post

Experimenting with ESPs… (part 2)

One of the few projects that has moved a little lately is my ESP-based IoT-experiments (which started here). As mentioned then, I had just managed to crack how to do the mains-powered PCB layout I originally wanted to make so that’s what I have been spending time on building and refining since. Having a mains-powered board makes more sense when you need mains power for a relay anyway, otherwise a plug-in USB supply is just as good (or actually better/safer). The board is shown here in full prototyping mode, it is going into a case – of some sort – very soon.

Apart from adding mains power to the board I also removed the original DHT22 sensor and replaced it with an off-board BME280 instead. That was super smooth and it works even better than the DHT, not to mention that it also measures barometric pressure. I’ve been looking at other sensors as well (UV, air quality, light intensity etc.) but they don’t really make a lot of sense for my immediate application (which is remote monitoring of temperature and humidity in my basement).

Since I finished my original version I’ve made a few enhancements to the software and so now I’ve got the code for both LCD and web-UI mostly finished and especially the web part was a great learning experience. As mentioned in the previous post, it’s also a learning experience I am not sure I would have been able to complete without the help of the excellent ESP- and Arduino tutorials by Rui and Sara at, so obviously very grateful for those.

Now I can still do more improvements to the software but instead of picking at it for another six months I think I’ll try and package it up shortly and then publish it here so that someone else can hopefully have a go at it as well. Stay tuned! (but as usual, don’t hold your breath while you wait…)

Buying “suspicious” parts…

With the current trend in audiophile parts being that all the “old” audio grade parts that we know and love are either being discontinued outright or at least replaced with something in impossibly small surface mount packages, it’s almost inevitable that we all at some point face a choice between giving up on a project and sourcing parts from “questionable” channels such as eBay or Aliexpress.

Here are the questions I personally ask myself before buying something and while they are definitely not a guarantee against wasting your money, they might help someone decide when to take a (calculated) risk and when to pass up what otherwise looks like a good opportunity.

Read more of this post

Trial and errors….

Like most blogs, social media showcases etc. this page is to some extent a massive display of selection bias – you only see the stuff that works, and only when it works. You never (or at least rarely) see the things that don’t work. Because of that, I just thought it would be funny to at least give you a few examples of the memorable mistakes I’ve made during the life time of this blog – along with the lessons I’ve (hopefully) learned from them.

Read more of this post

Experimenting with ESPs… (part 1)

…ESP8266’s that is (if you hadn’t guessed that 🙂 ).

Although I am not directly involved with it, I have several colleagues at work that are looking at Industrial IoT applications for various use-cases. Quite a few of them have built personal home-automation systems of one sort or another, and as I would actually like to do a ittle bit of monitoring/control around my house as well I started looking at options a while back.

My old Ampduino project was of course a big inspiration, but the Arduino lacks onboard wifi which is a big drawback, even for “IoT” at home, and so the ESP8266 was a very logical step up. The original plan was to build from scratch using “raw” ESP-12 modules, but after a bit more research I stumbled upon the Wemos D1 mini. I then decided to go back to the original “Ampduino” approach of building a baseboard for a ready-made module instead. This gives a good amount of flexibility while at the same time ensuring that USB, programming and all other standard functions work as they should.

For once, I decided that I was going to get started on the software-part of this immediately (that’s usually my weak spot) and since I have had to wait three weeks for the fist PCBs to arrive I’ve made very good progress. Two things helped me along though: Firstly that I found a basic sketch at RNT that did a rudimentary version of exactly what I wanted, namely control via a web-UI. Secondly, I had a standard NodeMCU-board which I could pop in a protoboard immediately. That made it feasible to start getting individual pieces of the code together as soon as the PCB-order was submitted and then subsequently assembling the pieces of code into the “real” thing later on. My prototyping efforts while the v1.0 boards were in the mail also gave me input to v1.1 boards, so I can actually start placing those orders in a couple of weeks (no point doing it now because all the PCB factories are closed for Chinese New Year).

As usual for this type of project I’ve ended up making several versions of the board. The “original” version is USB- or DC-powered and has an onboard relay and an onboard DHT22 temperature/humidity sensor in addition to a couple of spare in/outs (analog/digital). The smaller version shown here ditches the onboard relay and instead breaks out a full set of SPI-pins. This allows connecting an SD-card adapter so that data from either the onboard DHT22 sensor or any of the other inputs is saved to a local card as well as being displayed on a web interface and a local LCD/OLED display (via I2C).

The original plan was to do a mains-powered version but I couldn’t get a good design together at the time and so I went DC-powered instead. However, I think I’ve cracked it now so the next run is going to include a mains-powered version as well. Other changes for v1.1 will be some routing improvements and (most likely) doing away with the onboard DHT22-sensor and replacing it with the option of one or more offboard sensors based on the BME280 and/or the DS18B20 sensors.

Board sizes are from app. 50-75mm squared, so these are quite compact and versatile. More updates and also some code samples later on 🙂

Improving small DC-DC converters…

I’ve written a few posts about DC-DC converters and I’ve found them very useful for many circuits where a “complex” (= multi-rail with fixed voltages) power supply needs to be replaced with something “simpler” and more flexible (= single-rail with large variations allowed). However, I have previously largely ignored small SIP-type converters because I didn’t believe they were powerful enough to be of much use. As I (recently) realised you can actually get 3W from several manufacturers and even 5-6W from certain others. That makes it’s possible to get 100mA or more at +/-12-15V which is more than plenty for most small opamp circuits such as buffers, preamps and RIAAs, and of course single-rail 5-12V currents more than suitable for small auxiliary circuits in power amps etc.

Now, there are a few drawbacks to these converters: Even the small converters normally still have quite large ripple voltages and I expect there is quite a bit of HF-noise as well, but I’ve tried to use a passive filter to compensate for that. The basic idea is that because the switching frequency of the converter is very high (typically 50-100 kHz) which is nearly 1000 times higher than a linear supply, a simple passive filter is also 1000 times better at removing ripple and noise and so even small capacitor/resistor values for the filter gets you very far. A second drawback is that the converters have limited tolerance for capacitive loading, so it’s normally a good idea to think the power source into the design/build of the consumer circuit. That’s normally also doable though.

The basic SIP-8 form factor is used by several manufacturers so there are quite a few different converters to choose from, both cheap and not-so-cheap. One thing that differs between manufacturers seems to be the allowed capacitance load that the converters will tolerate. Here, the more expensive Recoms and Tracos list considerably better specs than the cheaper converters, so that’s worth looking into before you choose. Given how the converter works, this restriction mainly applies to higher voltages of 12-15V or higher – at 5V the load margin is likely to be fine even for the cheaper converters.

The boards I’ve made are both a single and a dual version with the same form factor and they both work as expected. However, after I received the boards and assembled the prototypes I had a couple of ideas to improve the filtering a bit so I’m going to hold off making the board files public until I’ve tried those ideas 🙂

Project files: Line Attenuators

What is it?
If you are using a preamp with gain you may have problems with only using a fraction of the available range on your volume control which is very annoying. The problem is usually caused by too much gain and/or an incorrect gain structure. If it is not possible to reduce the gain of one or more of the amplifiers in the chain, a solution can be to use inline attenuators from e.g. Rothwell Audio instead. These are quite expensive though, and they only come in predefined attenuation levels so for testing purposes a DIY-option such as I am presenting here might be better.

The attenuator is built on a small board with RCA sockets for input and output, as well as an option for fitting two parallel resistors on the output side. The gives two (or even three) selectable attenuation values. The selection can be either by jumpers or even via a switch to make the boards suitable for testing etc.

How big are the boards?
The board measures 1.75″ by 0.9″ (app. 44 x 23 mm) – plus of course the off-board part of the connectors.

What is the status of the boards?
The board is in v1.0, meaning it has been tested and confirmed working.

Does it use any special/expensive/hard-to-find parts?
The RCA sockets are clones of Vampire RCAs. They are normally the best board-mounted RCAs I know of and available on ebay. If you don’t want to use connectors or can’t find them, just connect the signal via a 0.1” header (or a JST XH/Molex KK connector) instead.

Anything else I need to know?

  • Important: The reason that Rothwells are built into the RCA-plug is to keep the signal path short and especially the load capacitance on the output side as low as possible. Use the shortest possible cables on the output of these to avoid the cables inducing an RF-rolloff.
  • The resistor values are quite important and should ideally be matched to the source and load impedance. I’ve used this thread (post #6) as a starting point but it’s worth reading up on the theory behind the operation as there are a few trade-offs involved.
  • The center-to-center spacing of the RCAs is 1.1″ (28mm)

Download design files here

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

Project files: PassHP headphone amp

What is it?
It’s the project files for the PassHP headphone amplifier from last week’s post and judging by the number of views since then they are eagerly awaited 😀
As mentioned last time, this design is a clone of the one from here and my version consists of a mono amplifier board and a stereo PSU board instead of the original “all-in-one” design.

How big are the boards?
The amplifier boards measure 2.95” x 3.0” (app. 75 x 76 mm.) and the PSU board measures 2.0” x 5.05” (app. 51 x 128 mm.).

What is the status of the boards?
Both boards are in version 1.0 as the prototype seems to work well and I couldn’t be bothered to make any cosmetic changes 😉

Does it use any special/expensive/hard-to-find parts?
Well, the recommended 2SJ313/2SK2013 output transistors are a bit hard to find, but there are plenty of substitutes available. This is a fairly simple design, so otherwise no problems.

Anything else I need to know?

  • Resistors: I’ve used RN60-type resistors which are rated 0.5W, but that probably isn’t necessary – at least not for all the positions.
  • Heatsinks: The heat sink profile is the one Fischer calls SK104 but there are many substitutes. The power dissipation isn’t great so even the small 25mm high version should suffice, but if you want to use bigger ones for cosmetic reasons that should be just fine 🙂
  • Transistors: I’ve used 2SJ313/2SK2013 output devices because I had them, but if you don’t then I recommend using IRF610/9610 or one of the other substitutes mentioned in the diyaudio build thread. The 2SJ/2SK pairs are now either very expensive or very fake (and sometimes even both!), so using parts that are still in production should be safer.
  • Optocoupler: In theory this is also substitutable for something else, but in all honesty I don’t know exactly how the optical bias-system works so it’s probably best to stick with the standard 4N35.
  • Gain: The default gain is app. 6 but that can be lowered or raised by tweaking the value of R4. In theory you should recalculate the BW-limiting capacitor across the resistor if you change the value, but in practice you’ll probably be fine unless you make major changes. My prototype version has a gain of 3 (R4 = 2k) and I haven’t observed any problems.
  • Opamp: My version uses a single-channel opamp which gives a bit more choice. Start out with something like the OPA604, OPA134 or LME49710 and then experiment from there if you want to change the sound.
    Most opamps have a max. supply voltage of +/-15V so as a starting point I’d recommend this as the supply voltage. If you want more voltage swing use the OPA604 which is good up to +/-22V.
  • PSU voltage adjustment: Just as in the original you can use LEDs to raise the output voltage of the supply above the regulator voltage (although I’ve ditched the resistor option). Using 7×15-regulators and green/red LEDs should give you around 17V output whereas using 7×18-regulators and LEDs should bump that to app. 20V. If you just want the regulator voltage as the output, remember to jumper across the LED pins and omit the capacitor.

Download design files here

Related information:
You really should chew your way through the diyaudio-thread for information about the amplifier. As mentioned this version was mostly because I did not like the original form factor. If you just want a functioning amplifier then I strongly recommend that you buy one of the “real” boards from Wayne Colburn via DIYaudio (or wait a few weeks for when the boards show up in the diyaudio store).

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