Elektor softstart…

Over the summer, Elektor magazine has been giving away a free article every week to subscribers to their newsletter. Most of them have been interesting, if not especially audio relevant. However this week’s article is a new softstart based on an ATtiny microprocessor with IR functionality, ability to learn remote commands, audio signal detection etc. (so actually more of a control center than purely a softstart)

I haven’t looked through the details of the project and the software yet, but the article includes some softstart-math which is nice to have, and the combined project might well serve as inspiration for how to implement the features you want into your own project (because at least I honestly don’t see myself needing everything on offer here). You can find the project information here but be quick to grab it and save it to your computer because I expect it will be behind Elektor’s paywall again soon 🙂

Image (C) Elektor

ESP/Arduino accessories…

As I’ve spent more time working on my “IoT-T” design – I really should publish the files for that soon – I’ve found myself making a few additions to the main board. They are small extension boards that add functionality without cluttering up the mainboard – in no particular order:

– Different breakout boards to convert the I/O pins on the board to screw clamps for prototyping use or for easier connections.
– Board to add opto-isolation to a pair of digital out pins.
– A smaller watchdog timer to reset an IoT-device that is located remotely in case it freezes up for some reason.
– A breakout board for DS18B20 “One-Wire” temperature sensors.

Alone these boards are not really very impressive, but as extensions they really add to the versatility of the IoT-T main boards and they allow the mainboards to stay simple and universal. Of course these add-on boards can also be used for straightforward experimentation and prototyping, so I’ll be building a few extras to keep on my desk as well.

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 Randomnerdtutorials.com, 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 🙂

Distractions….

Once again I find myself in a period where “real life” is intruding significantly on my build time. Not only at work (which is the normal reason), but also in my personal life. Therefore, the progress I am managing on my projects is mostly so incremental that it doesn’t really make sense to write about it – it would be the DIY-equivalent of a book with every page as a separate chapter!

However, the inspiration for projects is still there and both the various online forums and my blog-feed serve as good sources of new ideas and inspiration. One recent example that I specifically think is worth mentioning is this post on Arduino “watchdog timers” for standalone Arduino projects where a self-reset capability in the event of an error is a good idea. Like all the other posts on the site, this is very comprehensively documented and easy to follow and in this case it’s a topic that I didn’t think about but immediately thought would be useful.

And the best part is that even if you are busy, sketching out a simple PCB doesn’t take that long – does it? 😀

(note: hat-tip to the referenced wikipedia-article for the image below)

Linear PSUs are better…

…aren’t they? 😀

No, I don’t really want to start up that discussion here because in my opinion it’s much more complex subject than most audiophiles believe. However, one thing that is obvious is that as more and more small audio components run on single DC rails from an external PSU (streamers, DACs, headphone amps etc.), a fairly large market for aftermarket “upgrade” PSUs has opened up. Some manufacturers (e.g. Auralic) even offer separate PSUs as upgrades themselves. Well, a linear PSU is normally a relatively simple thing so why not DIY it?

Since I now have a DAC, a preamp, a streamer and quite a few other things that run on single-rail DC this seems a worthwhile project and it’s actually been on the drawing board for a while. I did have a bit of trouble getting started on the circuit and layout though, and I didn’t manage to really break the deadlock until remembered a design called STEPS by headwize/head-fi user Tangent from (many) years ago. The design isn’t up anymore, but thankfully I managed to locate it on the wayback-machine.

It’s basically a standard LM317-based PSU, but with a few tweaks added to tease as much performance as is possible out of the LM317 regulator (or one of its many derivatives). My version isn’t a straightforward copy of the STEPS, but I owe a big thanks to the the STEPS all the same. Compared to a “normal” LM317-based circuit this one includes:

  • A simple mains filter on the primary side of the transformer.
  • A snubber circuit on the secondary side of the transformer.
  • Space for high-speed/soft recovery diodes and snubber caps.
  • Space for 2+2 18mm filter capacitors in C-R-C (pi-filter) configuration before the regulator.

Everything else looks like the “high-performance” circuit variation from the data sheet of any LM317-type regulator. The onboard transformer is a 25VA Talema PCB-mounted toroid type meaning the design should be good for most applications requiring less than app. 20W power. The 15VA type transformer will fit as well and allow for mounting in a 1U enclosure, but the constraints on heat sinking and capacitor height might then be an issue.

The pictures show the completed 12V prototype for my Arcam IRdac as well as a partially completed 16V board for an Auralic Aries Mini (a recent purchase) – I’m waiting for a transformer in the mail before I can finish that and test it 🙂

LED-tester deluxe…

A few months ago I stumbled upon a presentation thread for an “LED-tester” circuit by Muffsy-creator H. Skrodahl on a Norwegian audio forum. Two things immediately occured to me:

1) I want one!
2) I think I can improve this a bit 😀

So rather than simply downloading his posted Eagle files and ordering boards from there, I started doing my own board instead. With the final result arriving earlier this week it’s time to put it to the test.

The basic idea is to use an LM317 regulator as a variable Constant Current Source (CCS) to test unidentified LEDs and confirm what currents are required for acceptable brightness – something that isn’t always easy to guess based on the published specs. I’ve kept the basic circuit intact but my modifications basically consist of:

– “Real” connectors for all connections instead of just solderpads.
– Additional outputs for LED connections to allow direct plugging in, permanent wired connections and also temporary connections via test leads/crocodiles clips.
– Space for a stereo pot to give a bit more mechanical stability.
– Optional “high-current” mode for testing constant-current LED bulbs as a supplement to just normal LEDs.
– Four real mounting holes to allow the board to be fixed to a bit of scrap metal or similar for use in a lab environment.

I need to do a bit more validation on the prototype before I publish my board files, but at least I can confirm that it works and that it is a very useful way to identify the operating parameters of e.g. LEDs in pushbutton switches.

Hard times ahead for Audio DIY?

It’s no secret that as mass-market electronics become increasingly compact and integrated, the availability of parts that are DIY’er friendly is shrinking rapidly. Most of Toshiba’s audio transistors (bipolar and JFETs) have disappeared, most of the high-voltage parts used for Stax amps have gone as well (together with the CRT TVs they were intended for), Onsemi killed a load of small-signal transistors not long ago and more and more semiconductors are disappearing in their through-hole versions and moving to SMD-only.

This has been going on for at least a decade, but I think a recent diyaudio thread highlights the issue and deals another crushing blow: A while ago Texas Instruments (TI) acquired National Semiconductor, and now TI has decided to discontinue a large chunk of audio-grade parts. You can see the whole list at Mouser here but among the “highlights” for the audio DIY’er are:

  • The LM3875 – discontinued with no replacement (!!)
  • The LM4780 – discontinued with no replacement (the listed LM4766 isn’t really comparable and will not fit the many LM4780-designs already out there)
  • The LM4562 – DIP-package discontinued, but SMD still available.
  • The LME497x0-series and many other LME49xxx opamps – all DIP-packages discontinued. In some cases the SMD-package stays available but some devices are going completely (like the LME49990)
  • The LME498x0 power amplifier drivers – discontinued with no replacement.
  • The LME496x0 buffers – discontinued with no replacement.
  • etc.

Now, according to the PCN the last order date isn’t until September next year and last delivery is in March 2017, but there is no doubt to me that this isn’t the last notice we’ll see of this type in the coming years. Also, there is a risk that some distributors will drop the parts earlier to avoid building up excess stock making parts difficult to source even before the official deadline, and in any case many designers will be reluctant to use parts that are marked EOL.

Certainly, my next Mouser-order will include a few spares of some of these parts and I can only advise you to do the same 😦