Switched on?

Another project that’s been on hold for a very long time because I did not really need to finish it….

It’s a balanced two-in/two-out passive switch box which I intend to use partly to add an additional input to a spare amp, and partly to build a more comprehensive test setup for comparisons of sources and amps.

The signal switching is done via relays (see here for original post – oh how time flies!) and the power supply for the relays is an IRM power supply module as showed a few weeks ago. Switching of relays is done with latching button switches that I still need to wire up once the front panel is drilled and that’s about it really 😀

The relays are transistor controlled and 5V types, so while it is simple for now there is plenty of scope for adding functionality via an Arduino/ATtiny-based controller of some sort. The most obvious feature would be an IR remote control, but another thing I was originally thinking would be to add ABX-logic to try some blind testing. I sort of gave up on figuring that out, but if anyone knows how to build this in Arduino code give me a shout 🙂

More ATtiny experiments…

Since I managed to breathe life into my ATtiny-based speaker delay project I’ve been working on more ATtiny-based boards. There are many potential applications I can see (if I look hard enough…) for a small SW-based controller and that is what I’ve tried to build. The hardware was done a while ago, but the software was lagging (and still is somewhat).

I also received my TinyLoadr programmer a few weeks ago and it was definitely worth the wait. I’ve mounted the board to a piece of aluminium to keep it stable and now its more or less a perfect tool – very highly recommended if you want to play with ATtinys!!

To speed up my development cycle I’ve build a prototyping setup with a ZIF-socket and a solderless breadboard. I’m not a fan of solderless breadboards in general, but they do have their occasional uses and this would be one of them. I bought a few small ZIF-sockets from ebay and together with the tinyloadr programmer they make up an excellent prototyping platform. Swapping ICs from one ZIF to the other is still a bit of an annoyance, but it’s far more flexible than the alternative 🙂

If you need more memory space (or more I/O-pins) than the ATTinys can provide then I am also working on an update of my AmpDuino-concept. This will be a fully-fledged controller based on a stand-alone ATmega-chip that can do the same as the old version AmpDuino, but in a more optimised way. Connections etc. will be laid out for what I consider to be typical audio applications. ETA is, as always when there is software involved, unknown 😀

Project files: ATtiny-based power delay

As the PCBs for my next ATtiny-based designs have landed over the weekend and I am back from my holidays, now seems to be an appropriate time to post this 🙂

What is it?
It’s my ATtiny85-based power delay controller which can be used for speaker protection etc. as described here. In addition to the controller board itself are also a couple of relay boards to do the actual signal switching. One board is stereo and based on 10A relays, the other is mono and based on a 30A relay.

The controller board includes an on-board 5V regulator, an LED coupled directly to the ATtiny to indicate when the relay is engaged (or another purpose) and two FET-switched outputs. The last two ATtiny I/O pins can be used to trigger the chip with buttons, sensors etc. which gives tremendous versatility.

How big are the boards?
All three boards are my “industry-standard” 2”x2” (app. 51 x 51 mm.) in size, meaning they can be stacked on top of each other if needed.

What is the status of the boards?
All three boards are version 1.0 and the prototype boards looked and worked as expected.

Does it use any special/expensive/hard-to-find parts?
Nothing serious this time either 🙂

  • The small heat sink for the regulator is a Fischer type SK95 with an M3 hole in the bottom, but if you’re having trouble finding this there should be plenty of other small heat sinks that will fit. In any case, the heat sink isn’t always required, it depends on your input voltage and current draw from the 5V line.
  • The relays are standard types, either Omron G5LE (small board) or Omron G8P (large board). I’ve quoted Omron part numbers to give you something to go on, but there should be plenty of identical replacements from other manufacturers available.

Anything else I need to know?

  • The intention is that the ATtiny chip should be programmed using the Arduino IDE. That means you need to have either a dedicated programming shield for ATtinys or wire up the chip to an Arduino board that is used as an ISP. You also need to have the ATtiny cores installed in your Arduino IDE (see explanation here) and you have to burn the Arduino bootloader onto the ATtiny yourself before filling it with the actual program.
  • For programming, I highly recommend something with a ZIF-socket because it will make the whole thing much easier. I’ve got one of these on order (which recently came back in stock) because that looks brilliant, but there are shields on ebay that can be used as well. I’ve been working with this one so far and it works well, but of course you need a dedicated Arduino board to run it.
  • As you can see from the schematic, the intention is that the controller board is fed from a higher voltage (9-24V) than the ATTiny requires, in order to be able to use relays that draw less current. The onboard regulator will provide the 5V that the ATtiny requires.  If you are using the big mono relay boards, be aware that the worst-case power draw for these is around 1.2W each. This means that if you are using a pair of 9-12V relays here you’ll need to be sure that your power supply can handle that.
  • The second output is intended as just that – a secondary switch – but since it’s connected to one of the ATtiny pins that provide a PWM-output, you could probably do something clever and use this for controlling a variable-speed fan fed from the same voltage as the relays. If anyone does that I would love to steal, ehm…. borrow your code 😀
  • Although the relay boards have on-board protection diodes across the coils, there is also space for optional SMD diodes on the bottom of the controller PCB. Use these if you’re driving off-board relays etc.
  • There is a sample sketch included in the download file, but please don’t laugh (too loudly) at my pitiful attempts to code – it’s just an example 🙂

Downloads:
Download design files here

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

Most of the complexity here is around the coding. There are tons of links available around the web for how to use ATtinys with Arduino, so I’ll not list them here. Start from the link to the official Arduino page and then do your own search from there.

The plot thickens….

Bit of a pause here lately as I’ve been away on holiday. I just have a few days left at home before work starts again, so time to get some building in 🙂

Some progress on my “mystery” project – hence the post title – with most of the mechanics now ready. And no, I’m still not revealing what it is yet 😀

More ATtiny-powered stuff in the pipeline as well, but unfortunately the weather is too good to be sitting inside doing SW, so that will have to wait a bit longer (maybe 😉 ).

mysteryproject-1

Delayed delay…

Was going to post something else today, but as I managed to finish something that includes software (which happens very rarely) I had to show that instead 🙂

It’s a small delay-circuit, useable for amplifier muting etc. via external relays. Nothing new in that as such, but unlike many other such circuits this one is based around an Arduino-enabled ATTiny85 microcontroller. This means that in addition to basic mute-on-startup functonality there’s room for expansion as well, including connecting external sensors etc. to the board.

The (laughably) basic Arduino sketch that I have just made to do mute-on-startup and read a manual mute-switch for control is less than 1kB in size, so even with just 8kB of memory on the ATTiny there’s still quite a bit of room to add software-based features to suit any particular application.

In terms of hardware, the board includes FETs for driving the relays, a separate indicator LED attached to one if the pins on the ATTiny and also a 5V power supply. The board is wired so that the relays are driven from the raw input voltage with the FETs acting as level shifters. In the standard configuration there is two I/O-pins left for control purposes, but with a bit of hacking it’s easily possible to repurpose either the LED connection or one of the relay driver pins if required.

I have a few other ATTiny85-based projects where I have done the hardware ages ago, but now with a (modest) success under my belt I feel much more inclined to start developing software for those as well 😀

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