Project files: A smaller mains controller…

What is it?
As mentioned a few weeks ago I’ve recently built another control board for switching a mains transformer with a low-voltage (latching) switch. This in a slightly different form factor so that if your application requires it, the board can be stacked with a matching standby-PSU and mains splitter and/or my passive softstart board. It is possible (just) to stack all three boards on top of each other in a 2U/80mm high enclosure or just two boards in a 50mm tall enclosure.

You can decide which standby voltage should be used by choosing the right relay in resistor values and in addition to using a latching switch for engaging the relay, you can also use a DC-voltage between app. 3-30V as the trigger. This input is isolated via an optocoupler and the trigger circuit only requires app. 15mA from the triggering device.

The matching standby PSU board uses the (by now) well-known IRM AC-DC power modules from Mean Well. There are two versions, one for the 3W module which is 100% outline-compatible with the control board and a version for the 5-10W modules where some of the connectors had to be shifted but the mounting holes still fit. The PSU board also provides a splitter-function to give two mains outputs.

How big are the boards?
All the boards are 2” x 2” (app. 51 x 51 mm) – the original theslowdiyer industry standard ™ 😀

What is the status of the boards?
These boards are v1.0 and they all work as expected.

Does it use any special/expensive/hard-to-find parts?
No.

Anything else I need to know?

  • The switch must be a latching type (meaning it stays in either on or off positions) and to turn the relay on you connect the switch so that the + voltage is connected to the switch pin. This turns on a transistor which switches the relay on.
  • The relay is rated for 5A inductive loads, so should be good for transformers up to around 1000VA at 230VAC (to give a bit of safety margin).
  • The optocoupler on the trigger input is fed from a constant-current source (CCS) made from an LM317L voltage regulator. If I was designing a commercial product this would probably be a sacking offence because it’s much more expensive than the alternatives, but for our purposes it works quite well 🙂
  • There are two LEDs on the control board, one to indicate the board is powered and one to indicate the relay is on.
  • The “ext” output is intended for us if you want to feed the unswitched standby voltage to some other circuit. There’s space for a bigger resistor here if you need to drop voltage for e.g. LEDs, but you can also jumper the resistor to just get the raw voltage (or leave the output if you don’t need it).
  • The mains connectors on the standby-PSU are marked as inputs and outputs, but in reality it doesn’t matter what you use as inputs and outputs.

Downloads:
Download design files here

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

Remember that these boards use mains voltage. Be careful when mounting and handling them!

Another mains controller…

I’ve designed and built a few control boards for switching on mains (e.g. this and this), because it tends to be a thing that many of my projects need. Good (and good looking!) mains switches are hard to come by, especially for higher currents, so it makes sense to use a lower-voltage switch combined with a relay or an SSR for this duty. An obvious downside to the relay-based approach is that a standby voltage is needed to control the relay, but as described in a previous post there are now several types of switching AC-DC converters able to do that job very cheaply and reliably.

However, more often than not I have found that I prefer to keep the standby PSU separate and so this addition to the control-board portfolio was delberately made smaller and to fit my usual 2”x2” format to make it stackable with my softstart-board. For anything with a large transformer in it, this is a combination that is very useful.

Another addition is an external trigger input (isolated with an optocoupler) which I don’t often use to be honest, but which I could see some potential in anyway. To make this feature a bit more versatile I have opted for the “deluxe-version”, by feeding the optocupler from a constant-current source made from an LM317L. This should mean that it’s not just the usual “12V-trigger” input, but actually it would work with any voltage between app. 3-30V and draw less than 20mA from the triggering device.

“In flight” (or at least on the way) are boards for a matching standby PSU based on the Mean Well IRM power modules – when everything is here and tested I’ll publish some files and more pictures 🙂

An “Autopower” Circuit…

This is another Rod Elliot circuit (from here) but as usual I have done my best to add my own personal touches to it.

Basically this is a signal-activated trigger circuit (such as you would expect to find on just about any active subwoofer). The board turns on the power when a signal is detected and switches it off again when no signal has been detected for a while (usually 10-30 mins). For schematic and details on how the circuit works I’d refer you to Rod’s original page.

What I have done to make my mark is partly to keep the relay offboard and make a matching relay board instead, and then of course to actually lay out a PCB for the design. Both the relay board and the main PCB are in my own industry-standard of 2” x 2” 😀

The main connectors on the control board and the relay board line up so the boards stack perfectly on top of each other. The relay board also includes a separate regulator (mostly because there was a bit of space left :D), so the board can be powered from any DC voltage above app. 15V. If you have no suitable standby voltage available in the device, I have also made a small unregulated PSU that can provide power to the circuit using a small (app. 1.5-2.5VA) mains transformer.

I’ve done some basic testing on the prototypes and it seems to work fine as such. However, one potential issue needs further exploration: The time is set by an electrolytic discharging through a very large resistor (10M). This makes the delay time a bit unpredictable. Also because the “must-release” voltage of most relays is around 10% of the nominal coil voltage the relay doesn’t actually release until very late and the indicator LED is therefore slightly pointless.

Tiny teaser…

Just a short “teaser” for one of my work-in-progress ideas, a (sort of) universal audio controller based on the ATtiny85 microcontroller (hence the slightly saucy headline…) and the Arduino IDE. It’s not ready yet, but some progress has been made.

The idea was to make something much smaller than the Ampduino and then make a few versions for different purposes. So far the “pipeline” consists of the following:

  • Universal motorpot controller, partly inspired by the controller I did for the Ampduino project.
  • Universal model with all pins broken out, to be used as the “brain” of a preamp or also (in the longer term) to control soft start circuits, clipping indicators, speaker protection circuits etc.
  • RX/TX version for remote control, although the RX-version may end up being something bigger based on a “full-on” ATmega328P like the Ampduino (and the normal Arduino boards).
  • Matching linear PSU if there is no other power supply required for a given circuit (or if a suitable aux-voltage isn’t available).

Current status is that I have hardware prototypes for most of these already (only the Rx remote receiver is missing) but as usual when there’s software involved that takes a bit longer for me to get around to and so I haven’t really tested anything yet. I have bought a couple of development boards for the ATtiny which seem to work well for testing and optimising code (which will be a definite requirement with the ATtiny-chips as they have fewer I/O pins and less memory than the ATmega-series) but I still need to get started on coding in earnest.

As usual there is no real timeframe for finishing these boards, but right now the Scandinavian summer is definitely working in my favour by nearly constantly bringing weather that makes you want to sit inside and code instead of being out and about 😀

tinypot-1

Project files: Little helpers – Powerhelpers

What is it?
A few auxiliary boards to match the mainscontroller boards or for use one their own. More specifically, there are a couple of relay boards for use with the relay-less version of the Mainscontroller. The large relay board is intended for a “T90”-type relay which is typically rated 20/30A. The smaller board is using a Omron G5LE relay which is rated 6/10A.

There is also a simple softstart-board that can be used when powering transformers over app. 250-300VA. This is based on a very old (and frequently copied) circuit from Elektor that seems to work well, at least for medium-sized PSUs.

How big are the boards?
The Softstart board and the large relay board are both 2″ x 2″ (app. 51×51 mm.). The smaller relay board measures 1.5″ x 2″ (app. 38 x 51 mm.) As the pictures show, mounting holes and connectors line up so the boards can be stacked and cables routed neatly between them.

What is the status of the boards?
The softstart board is now in v1.5 as it is an improved version of one I did earlier. The large relay board is v1.1 as I have prototyped it and corrected the relay footprint which wasn’t perfect (my own design, obviously…). The small relay PCB is in v1.0. I haven’t actually received and tested the prototype boards yet, but as it is the exact same circuit as the large board and the footprint for the relay is an eagle standard one I am OK with releasing this design as well.

Does it use any special/expensive/hard-to-find parts?
Not really, but:

  • The T90 relays can commonly be found on ebay. There are name-brand equivalents as well from Omron, Finder and other manufacturers of relays.
  • The Omron G5LE can be puchased cheaply from Mouser or Reichelt. Alternatively there are equivalents available on ebay, usually marked with SRD-xxx designations.
  • The relay on the softstart is an Omron G2R-24V type which is also available from Mouser or Reichelt.
  • Note that the large 330nF capacitor on the soft start board must be an X2-rated type.

Anything else I need to know?

  • When in use, these boards may feature exposed mains parts (the softstart certainly will). One especially “problematic” thing is that the legs of the axial resistors are partly exposed so make sure that the board is protected from accidental touches. If you are stacking boards, I suggest putting the relay PCB on top as it has fewer exposed parts, but even so a cover** of some sort could be a good idea.
  • Whether used with the Mainscontroller board or on it’s own, be sure that you are aware of the current consumption of the mechanical relays. The T90 relay typically consumes app. 1W (1200 mW worst case) and the G5LE relay consumes app. 400mW, which for instance means they cannot be controlled directly by a micro controller.
  • I have never tested the softstart board on transformers larger than 500VA. I imagine it should be good up to around 800-1000VA, but anything more and I would be cautious and probably look for something with bigger relays and resistors. The same applies if you are using exceptionally large capacitor banks.
  • **The cover is based on an idea I had a while ago but didn’t test until now: I wanted to have an easy way to make covers to shield sensitive and hot/live parts from touches. I could use Front panel express to have 2mm acrylic sheets made but that is comparatively expensive, so I came up with another way: The Gerber files give me the board outline for each design and so by rendering the Gerbers e.g. with Circuitpeople I can get a true-size outline. Once that is scaled I can then import into a graphics program to add warning symbols, text or anything else. To get the cover I simply laminate the printout using a home laminating machine with the thickets foil type and then use a hole punch to cut out the mounting holes which are clearly marked. It’s obviously not a safety-approved material in any way, but it fits perfectly and it will protect against accidental touches which is bound to be better than nothing.

Downloads:
Download design files here

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

Project files: Mains controller with offboard relay

What is it?
A version of my Standby-PSU & controller for applications that need to switch very high (or very low) currents, switch multiple relays or simply prefers to use an offboard relay, be it mechanical or SSR. A couple of matching PCBs for relays and a soft start will follow very shortly, I just need to process the pictures and finish the write-up. This is basically the same circuit as the “v1.5” of the standbyPSU (found here) without the onboard SSR.

How big are the boards?
This version measures 3.2″ x 1.875″ (app. 81 x 48mm) – so just a little smaller than the v1.5.

What is the status of the boards?
This board is v1.0 and it works as expected – not entirely surprising given that it is mostly identical to the v1.5 circuit which also worked well.

Does it use any special/expensive/hard-to-find parts?
No.

Anything else I need to know?
Note that big mechanical relays tend to draw a lot of power, so there might not be that much power left over to power anything else. As an example, the relay board that I will post later draws app. 1.2W. Throw in a couple of LEDs and the losses in the transformer, and there isn’t actually that much left over from the 2.5-3VA transformers that are the maximum that will fit on the board. You can of course use the controller to control a separate standby-PSU as well.
If you want to use an SSR, then be aware that they can be a bit tricky to work with and some attention must be paid to minimum load etc. I can recommend reading this document from Omron that explains a lot.

Downloads:
Download design files here

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

You can also read the other posts on this controller design for information.

Project files: Relay-based attenuator

What is it?
This is the board files for my relay attenuator described here.

How big are the boards?
The board measures 3.85″ x 2.4″ (app. 98 x 61 mm.)

What is the status of the boards?
This board is version 1.0. It has been built and tested and I haven’t really found it necessary to make any changes based on the prototype.

Does it use any special/expensive/hard-to-find parts?
Not really 🙂

  • The relays must be the specified Omron G6K 5V version and the ULN and MCP ICs should be in the right packages (SO-IC). All these parts should be available from the usual sources, i.e. Reichelt in Europe and Mouser/Digikey in the US and worldwide.
  • The resistors should be 1% tolerance or better and some of the values are from the E96 range which might not be available in the shop around the corner but should be available from most of the mail order companies.

Anything else I need to know?

  • Refer to the original build article (link) for some additional information and helpful links to Arduino code samples etc.

Downloads:
Download design files here

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

relayattenuator-1

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 😀 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.

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 🙂

Downloads:
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!

Downloads:
Download design files here

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