>
YAMAHA
STRINGS
SS-30
RACK-MOUNTED WITH MIDI
MIDI STRINGS

Tuesday, March 22, 2005

The interface nitty-gritty

Okay, I'm a bit bored of all this mechanics talk. I'm still working on the case, but I thought I'd talk about the interface for a change.

To recap, the aim of the inteface is to provide a MIDI in port that will take note on/off and velocity data messages on a specified channel and not only individually switch the keys of the SS30 on and off but also individually set their amplitude from the velocity data.

I have found from experimenting that if instead of simply shorting the key inputs to ground (as with the original keyboard) place a 10K potentiometer between the input and ground you set the loudness of the note played by that key. I'd suspected this was the case previously as the volume of the keys across the keyboard wasn't uniform and I'd put this down to the dirty contacts creating an impedance where there should have been a zero ohm contact.

So, if I can set a resistance across the key inputs from a combination of the note on/off and velocity data then I'll have a velocity sensitive MIDI interface for the SS30!

There are severals way to do this but I think they boil down to these two:

1) Use a DAC to set the gate voltage to a JFET acting an amplifier with gain between 0 and 1
2) Use a dedicated digital potenetiometer.

So which is better? The dedicted digital potenetiometers can be found in packages containing 6 pot's each. They would ceratinly make wiring easy and would keep the number of components low. I will err on the side of simplicity and persue these for now. If they become unworkable I may have to switch to the DAC-FETs solution.

So how am I to get the right MIDI data to these digital pots? I need a microcontoller to decode the MIDI data and then drive the pots and the simplest and most popular solutiuon with other people doing this kind of task is the range of 8-bit micros from Microchip Technology known as PICs (Programmable IC's) . I'm not going to say much more about them now but I will want one with an SPI (Serial Peripheral Interface) bus to drive the digital pot's.

Time for some maths! Hooray!

MIDI is transmitted at 31250 baud (31250 bits/s). Which means each bit's period is 1/31250 = 32us. Messages are transmitted in 10 bit packets with 8 data bits plus start and stop bits. So the message period is 320us.

Typical clock rate of a higher-end PIC is 40MHz (e.g. 18F458). This gives a clock period of 25 ns but a 100ns instruction cycle period with some assembler instructions (e.g. goto) taking 2 instruction cycles.

The SPI bus on a 40MHz PIC has a max clock rate (for 40MHz device) of 10Mbps. Which is 100ns per bit.

So what? Well, part of the key to this design is going to be the time avalibale to set a key after receiving a MIDI note message. The time avaliable would be 32us without a UART module in the PIC. Without a UART the program will have to be available every 32us to read the next bit but with a UART it only needs to read every byte which will arrive at the message rate of 320us.

320us is time to carry out 320 x 10e-6 / 100 x 10e-9 = 3200 single assmebler instructions or transmit as many bits on the SPI bus which should be plenty of time to decode the bytes and when neccessary update the digital pots for the 49 keys.

Analogue Devices make a 6 pot device, the AD5206 . The 5206 takes 11 data bits on the SPI bus, 3 to select the pot and 8 to set the postion of the wiper. So each pot is randomally accessable giving a fast access time. 9 of these could be used in parallel with a 4-16 line decoder selecting which device the data is for. This would give a write time in the region of a few micro seconds. With 9 AD5206’s daisy-chained (which might be easier to wire up) over 99 instructions would be needed per write but we're still well within the 3200 available.

But the PIC can only output a whole byte at a time so 11 bits will be tricky to manage.

The Maxim have a 6 pot packege DS1806 which clocks in 48 bits to set up the 6 pots. This equates to 4.8 us per device or 43.2 us for 9 devices in series which is still comfortably within the 320us. Good.

The only issue with the Ds1806 packge is that the resistance is linear and there are only 64 steps. If the key inputs respond in a logarithmic fashion, which I would expect, then I would have to re-scale the input velocity logarithmically. This can be done but as there are only 64 steps this may make the response a bit 'grainy'. The AD5206 is better in this respect as it has 256 steps but there remains the problem of writing 11 bits on the SPI bus.

An approximate log scale can be made from the linear taper by adding a resistor between the the wiper and ground as shown here. The flaw in this approach is that the 'pad' resistor is present even when the potentiometer is at zero ohms. More work needs to be done to see if this can be made to work.

That's enough for now...

Monday, March 14, 2005

Vinatge Synth Explorer & More Case Notes

Well, my comments have been added to the Vintage Synth Explorer site and perhaps even more excitingly this blog has been linked from that page. So, thanks to the guys over at VSE.

I've now ordered all the screws, nuts, washers and pillars I think I'll need to get the PCBs mounted. I've cut a piece of MDF for the base so all I'll need to do now is get the drill out. Previously I mentioned the four bushes fitted to the sides of the case. I postulated that they were for mounting something inside but if I'd read the data-sheet properly I would have seen that they are actually for fitting support rails to the sides of the case. Not to worry though as you can screw right through to the bushes and I can still use then for supports if I need to.

The next problem is wiring. You can see from the pictures that the wiring is something to behold and it's all been carefully tied into bunches with lengths of cotton. The looms were obviously laid out in the best arrangement for the keyboard case but now they're just making life difficult as I have a eleven PCBs all tied together and then all the front panel controls. All the moving about of boards and the years I've been fiddling with them have put a lot of stress on the wires and quite a few have come free. So in an effort to wrest control I've started to cut all the cotton ties and when I come to start fitting the PCBs to the base-board I'll undertake some resoldering and maybe desoldering and reattaching of various parts. Also, I think I'll disconnect all the front panel controls and get those wires loose until I'm ready with the temporary front panel.


I haven't thought much about the power supply lately (still need to consider the needs of the interface at some point) but once it's fitted into the case I'm going to have to put some sort of guard over the mains side of things. It'll probably just be some sort of cardboard box but I need something so that I can get my hands into the case when it's on and stay alive. I also need to get an RCD (Residual Current Device) to be on the safe side.

Thursday, March 10, 2005

SS30 on the web

I haven't looked for any SS30 stuff on the web for while and there's a couples of nuggets I've unearthed.

Firstly a discussion over on http://elists.resynthesize.com/analogue-heaven/2003/05/ threw this up...

From: Michael E. Caloroso ( [EMAIL REMOVED] )Date: May 7, 2003Subject: Re: [AH] yamaha SS30Jim Black wrote:
> Someone told me they were never available in the states - only sold
> in Canada and Europe. Considering their hybrid synth's came out at
> about the same time over here - that makes sense.
My guess is it was more that the SS30's ensemble FX was too close to the
patent ARP and Solina had on the ensemble FX used in their string
machines. They skirted the US patent system by restricting distribution.
This happens a lot in many industries.
MC

This lack of distribution in the U.S. may explains why the SS30 has remained relatively obscure.


Secondly there is now an entry for the SS30 at http://www.vintagesynth.org . I've already had word about putting it down as 4-voice polyphonic so we'll see if they change it. I've since noticed that they've also said there's no filter. Well the brilliance control could be considered a filter so I might mention that too.

Wednesday, March 09, 2005

PCB mounting

Here's a picture of the case!


I'm now worried I won't be able to get all the original switches to fit on the front panel.
I'm planning to make a mocked up front panel in MDF to see if it will all fit using the original switches.

So, now I have a case it's on to the mundane but vexed question of how I mount the PCBs in the case. I originally though about mount the PCBs vertically (along the long edges) as they were in the orignal case but the wiring terminals scattered around the edges make this difficult. So instead I'll stack the boards in horizontal layers. This still leaves one problem.

The case has a completely blank base (apart from an earthing point) so there's nowhere to fix anything to it without drilling through. If I drill though the base any nuts or bolts used to fasten into it will stand proud of the base and ultimately scrape the lid of whatever the case is resting on top of. As eth base is only 0.9 mm thick counter sunck screws won't pass muster here either.

I could drill holes and then fit bushes (AKA clinch nuts). These are nuts that are stamped into sheet metal and basically give you something to screew your bolts into. RS do bags of 50 for around £3.50 part number 827-625. Or they sell a 'nutsert' kit for abot £7.50 which has 100 pillars with threaded stubs which are also stamped into sheet metal like the bushes. You get a tool with kit too. This is a bit of scary option though and I'd rather not drill 30 or more holes into the base of my unit espescially when I'm a) not that experieced at metal work and b) new bases are expensive.

Fortunately the case already has bushes fitted on the inside of the side panels. There are two on each side about 1-2 cm above the base. You can just see the front two in the picture. I'm guessing that these are fitted for the purpose of mounting your own base plate and at present this is what intend to do. I can use a piece of MDF, around 5mm thick and then attach it to the side bushes with angle brackets. The MDF is easy and safe to drill and cut and I can fit counter sunk M3 bolts from the underside to fit M3 PCB pillars to on the top.

This is the next task then. I have to cut a piece of MDF to size and calculate how many nuts, bolts, washers, lock-washers, pcb-pillars I need and of what sizes. I also need to determine what size nuts the side bushes take and find suitable angle brakets to fix the MDF to the side bushes with.

The Case

At last another post and it's good news - I have a 19" chassis case.

After failing to find one of the right size from any of the usual suppliers (RS, Farnell etc) I got in touch with APW www.apw.com. Farnell stock their cases but not in the 450 deep version which I need to fit all those long (over 30cm) Generator boards with room to spare. APW put me on to their distibutors, Surtech http://www.surtechdist.co.uk were happy to ship me a single case for the pricley sum of £66.92. No exactly cheap but I don't intend to skimp too much on this project and will probably spend as much again on the front panel and internal fixings.

You can see the technical details of the case here but I'll post soem pictures when I get around to it.

I ordered the case sans front-panel as I intend to get the panel made by Schaffer - http://www.schaeffer-ag.de. More on them later.