Programming a MiniMO Synth

April 19, 2020 at 12:03 pm (computers, maker, music, Uncategorized) (, , )

I’ve been playing with a home-grown version of the MiniMO synth as the creator has very kindly put the designs out into the public domain.

But a key issue with programming the ATtiny85 devices used in the synth is incompatibility with the latest versions of the Arduino IDE and the SpenceKonde ATTiny85 core that is now easily installed within it.

Warning: The official advice is still to build using Arduino 1.5.7, so treat all this as unverified and experimental.

I did have a look at this in the past and the issue seems to be one of incompatible timers, that I’ve described before.  The MinoMO uses both timers of the ATTiny85, but by default the core assumes the use of Timer 0 overflow interrupt for the delay/millis function, but several of the programmes for the MiniMO also want to use the overflow interrupt.

Expanding on the solution described in my previous post  – if we are assuming an 8-bit timer then it will overflow at 255, so setting the compare-on-match to 255 should have the same effect, but generate the TIMER0_COMPA_vect interrupt instead (at least for the mode being used here).

However, there is one caveat to all this.  The MiniMO synth code (I’m looking at the DCO code right now) sets the following parameters for Timer 0:

  //Timer Interrupt Generation -timer 0
  TCCR0A = (1 << WGM01) | (1 << WGM00); // fast PWM
  TCCR0B = (1 << CS00);                // no prescale
  TIMSK = (1 << TOIE0);                // Enable Interrupt on overflow

As far as I can see the original use of Timer 0 in the ATTiny Core is Fast PWM but with a prescalar value of 64.  Changing it to no prescale value here means that the “tick” used for the delay and millis functions is now running 64 times faster than previously assumed.

I’m guessing the author had the same issue in the original code though (although presumably with the settings for Timer 1), as in almost all other cases he uses the library function _delay_ms() rather than the Arduino function delay() or millis() – there is one exception – a couple of functions called on power-up prior to changing the timer values, which use the Arduino delay() function.

So from what I can see for the few programmes I’ve used with the MiniMO so far, I believe this is probably the only thing that needs changing if programming your own from the latest Arduino IDE and SpenceKonde ATTiny85 Core.  At least, on manual review of the code so far, I’ve not spotted any potential issues with having delay() and millis() running too fast!  But this isn’t an extensive review, and I repeat, the official advice is still to use an older version!

I don’t have an original MiniMO to compare waveforms to see if all the timing appears correct or not, but so far, I’ve been able to calibrate the frequency of the DCO (required as my ATTiny85 had no pre-set values stored in EEPROM), change waveforms, and see all three frequency ranges.

The fuse settings I used (as detailed by the menus in the SpenceKonde Core for ATTiny85 and then set using “burn bootloader”) were:

  • 8 MHz Internal
  • B.O.D disabled
  • EEPROM not retained (removes calibration data on re-programming)
  • Timer 1 Clock = CPU
  • LTO = Enabled
  • millis = Enabled

Which translates over into the following fuse settings:

  • efuse: 0xFF
  • hfuse: 0xDF
  • lfuse: 0xE2

I’d really like to know if anyone can compare the waveforms and frequencies generated by an original MinoMO DCO with one programmed with the above to see if they are the same.  Either way, for me I have a functioning unit, programmed using a current version of the Arduino IDE and ATTiny85 support and look forward to trying some of the other programmes for it too.

Of course, a massive thanks to Jose of course for putting the designs out there for experimentation like this in the first place.



Permalink Leave a Comment

3U 8HP 4 Channel Panning Mixer

July 14, 2019 at 7:01 pm (maker, music) (, , , )

As I mentioned in my last post, I used an off-the-shelf 4 channel mixer board in my synth-in-a-box, but I wanted it to be accessible as a eurorack modular panel.  I also wanted it to take mono inputs and be able to set the panning as required to the L or R channels of the mixer.  I managed to squeeze it into one of my 3U, 8HP panels.

Now I didn’t need an on/off switch, and I wanted some space to add a stereo output jack, so I removed the switch and soldered a couple of links in its place as can be seen in the bottom left of this photo.  The plan was to pass the pots through the panel and use leads to connect sockets to the inputs and output.

2019-07-09 19.17.12

The panning circuit was quite simple.  I found it in the book “Make: Analog Synthesizers” by Ray Wilson from MFOS.  In chapter 7 he describes a simple circuit to allow you to hook up your (mono) sound output to a (stereo) PC sound card. It involves a 10k pot and four 2k resistors, with the wiper of the pot connected to ground.  Full details can be found in the book.

For me, I was planning to just solder the resistors directly onto the pots and sockets and then use a short stereo cable to connect to the input sockets of the mixer.  This is all shown in the following photos (complete with my dodgy machining skills).

The four input sockets are mono of course, with the stereo input signal coming off the resistor network.  The output socket is stereo. I soldered the four resistors for each channel together first then “applied” them to the pot and socket.

Then it was just a case of adding the mixer itself and making a simple power cable from the 16-pin eurorack connector to the DC barrel jack.

I used the four knobs that came with the mixer as the pan-pot knobs, as they were nice and small.  Then I used some generic ebay knobs for the volume controls.

When it came to fixing into the rack, I ended up soldering on an additional stereo lead to the output so it can be routed internally straight to the amp.  So in normal use, the output socket isn’t needed, but I can power off the amp and use the output if I wanted to send the audio off to an external amp.

I’m really pleased with how it came out. Not bad for a $15 board and a handful of components.


Permalink 1 Comment

Modular Synth in a Box

July 14, 2019 at 2:30 pm (maker, music) (, , , )

Inspired by Morocco Dave who built a small “almost 5U” modular synth case out of a plastic storage box, I have created one of my own.  My goal was to build something that could take Eurorack modules, so looking at around 3U high modules, so for me the best layout was a dual-rack layout with the box standing vertically as follows.

2019-06-16 15.33.08

The box is a common “9 litre” box, with rough external dimensions of approximately 40x25x15 cm.  Mine came from a local discount store.

I’ve just used a few pieces of wood for the cross-bars and covered them with some of that aluminium tape you can buy for patching up cars.  The measurements are taken from the Eurorack standards and based on the instructions from the Synth-DIY Modular Synth Cabinet Howto from MFOS, gives me around 44HP of module space.  Each module has around 10cm height of usable clearance for electronics and

I created two bus-bars following the 16-pin Eurorack power standard out of stripboard and build and connected up a PSU from Frequency Central (£10 for the PCB).  The whole thing is powered using a 12AC “wallwart” power supply via a barrel jack socket on the side.  I drilled out a grid of holes top and bottom to allow air to circulate.

In addition I created a set of USB sockets hanging off the +5V line from the PSU as some of the modules I’m using will be Arduino and similar based, being to power directly from USB will be really useful.  The PSU is probably not powerful enough for an entire rack full of modules, but the idea is to have a platform that allows experimenting and playing around with designs, so that isn’t a major issue right now.

In terms of power bus cabling, I have a whole pile of old IDE cables so I picked up a bulk set of 16-pin IDC connectors and can now make my own bus cables.  The first one was the connector shown in the first photos, linking the PSU to the two stripboard buses.

I wanted a cheap way to make panels for modules, and in the end opted for a supplier on ebay who provides 2m lengths of 2x40mm wide flat aluminium bars.  This particular supplier also included some basic cutting, so for less than £25 I’ve ended up with a whole pile of approx. 260x40x2mm aluminium panels I can cut further as required.

I just use a wire brush to give a “brushed aluminium” finish.  If you want to follow this path, look up “aluminium flat bar” on ebay, and be warned that a cheap supplier will not be giving you accurate dimensions if cutting them for you!  I know 40mm wide isn’t a standard “HP” module width, but as it is almost 8HP, its fine for me.

One thing I was particularly keen to do was have a complete “synth in a box” and by that I wanted to include some basic amplification and speakers.  I had some speakers from an old CRT TV set that seemed pretty good for their size, so then looked around for means of amplification and mixing.  Again basic modules on ebay solved this for me, and I ended up with a cheap 4-way mixer board ($14) and amplifier ($5).  The mixer is based on a NJM3414 low-voltage, high-current op-amp and the amplifier is based on a TDA7297.  Both can be powered from a 12v supply and the amplifier claims 2x15W output.

I’ve built the mixer into a panel and added some simple panning “front ends” to each input, but I’ll leave details of how I did that for another time.  For now, here is the basic case with built-in stereo speakers and amp.

Being able to just unplug the power and pick the whole thing up is great.

My physical construction skills are not particularly great.  I don’t have the patience to do a really good job, and don’t have the skills, tools or experience for anything approaching any kind of professional finish.  But for a homemade “just for me” project,  I’m really please with the results.




Permalink 1 Comment

The Age of Synthetic Humans

June 15, 2015 at 8:54 pm (interesting) (, , , , , , , , )

I don’t watch much scheduled TV these days (although made an exception for the new clangers today, but that’s another story), but I was very interested in the new Channel 4 drama ‘Humans’ that started yesterday.  I first saw references to it popping up via Twitter, following the creation of @PersonaSynths on Twitter advertising their new generation “synthetic humans”.  The marketing was very good – they even had an ebay shop and a ‘store front’ on Regents Street London – and apparently it had a number of people fooled for a while, thinking it was real and that you really could buy one!

So having quite liked the trailer, I tuned in (apparently with 4 million others) to watch it last night, and I have to say it was really good.  I lost count of the number of social and ethical issues around the future of technology that the show raised in just that first episode.

Here are some rambling descriptions of some of the issues I spotted that were interesting to explore in the programme.  Warning – spoilers ahead!

In the very opening scenes, one of the “synths” (the robots) standing in a room full of synths slowly turns to look up at the moon.  The Implication being that there is something more emotionally special about that one – that maybe a robot can appreciate the view of something beautiful, such as a clear, bright, full moon.  We see her later staring at the moon from a garden too.  As the plot unfolds, we are slowly discovering there are synths designed for emotions, but don’t quite know the ramifications of them yet, other than the fact that they appear to be in hiding among the “regular” synths.

When the family is struggling to cope with the mother being away working at the weekend, they (well, the husband and father), decide to buy a Synth, and immediately you are struck with the uncertainty of it being the right thing to do, by the looks on their faces … but the salesman wins out, with special finance deals and so on, just as it someone is buying a car.  It is that easy.

On the way to the showroom, there are a number of times that you see a synth in the street doing things that people do today – handing out leaflets, giving directions and help people navigate public transport.  What are the people who used to do those things doing now – do they have a life of luxury?  Are they working elsewhere?  We also see a number of synths working in a plantation picking food, doing repetitive, mechanical tasks, where they can work overtime and not need paying.

As things develop, we feel the sense of guilt that builds up with the mother, as Anita (their new household synth) steps in more and more with the youngest – reading stories (“but I like Anita reading to me – she doesn’t rush the stories”), or just how quickly the child adapts to having the synth around … (reminds me of the Paro therapeutic robot).

If that wasn’t enough, we have the old man attached to his young boy synth, so much so that he keeps hiding him and maintaining him himself, long after his health carers have tried to force him to upgrade.  We don’t know why yet – is there a hint of being a son or grandson that never was?  Is it companionship since his wife is gone?  Is it something more sinister – perhaps an accomplice?  I guess we will find out in time.  Either way it is obvious that we are seeing emotional attachment built up here that was not anticipated when he was “issued” with his carer synth originally.  We also get a sense of the trust he has in his synth, as we find out that it “knows too much” – something that could perhaps also be said of our technology today!

An interesting side plot point – the NHS has invested in 500,000 synths to support care work in general – although I think they need to upgrade the bedside manner of Vera if they are to catch on … but maybe that is a result of those heavily subsidised, bulk government, special offer personas from the company!  Is this the “NHS synth” designed to a budget perhaps?

And then of course we have the teenage daughter’s relationship with the synth – it is a slave, to be controlled, to be abused, to be shot with an air rifle should she wish it.  Why this hatred?  We get a clue later – she sees no worth in continuing her education, the jobs are being performed by synths – why do people need education?  Why to people need to work anymore at all?  What is the point of sitting her exams at school?  The resentment follows, alongside laziness – why bother even getting up to fetch something, when the synth can be told to do it for you?

We get glimpses of other dynamics too – the woman recovering from an accident (or is she disabled?) who has a hunky male synth giving her physiotherapy, and then carrying her to her bath, as her husband walks in.  Will she grow closer to her synthetic carer we wonder, as her real-life partner fails to live up to the ideals of the synth?

We still don’t know the meaning of the pocketed ‘adult add-on pack’ that the male of the family found with their newly acquired synth.  Once again there are implied ethics here – how far does the “command” extend.  We see one working in the sex industry for example, but then find out it is actually one of the emotional ones in hiding “Did you turn off your pain sensors as I told you to?”  “No, I was designed to feel pain” …

There are so many fascinating questions raised by this piece, that even if it has peaked out exploring social dynamics of technology and people, even if the plot doesn’t follow through on the promise so far, it has been very interesting to watch.  I don’t think it will go down hill – the acting of the synths is superb.  Just enough ‘uncanny valley’ behaviour to allow you to suspend belief and imagine the technology could exist today.  The questions keep piling up and the plot is developing.  It is a nice ‘just around the corner’ extrapolation, almost a parallel world where all other technology is the same (I wonder how they are powered).

And all the way through, @PersonaSynths maintains the “hey look, we’ve lent our products to a TV crew and they are using them in this great new drama” pretence which is continuing the innovative marketing style of the show.  I particularly liked some of the tweets that went out whilst the show was airing:

I’ll leave the last word to them then:

In short, I look forward to the next episode.  Fingers crossed it lives up to its initial promise.

(Aside, I now want to read up on the Swedish drama it is apparently based on.  Actually, maybe I won’t as it has already been extensively documented – maybe I’ll just wait for the UK one to unfold).


Permalink Leave a Comment