MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

Yamaha CS15 with Broken Key Assigner? Just Make a New One!
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2, 3  Next [all]
Author Yamaha CS15 with Broken Key Assigner? Just Make a New One!
oldcrow
Alas my CS15's original key assigner won't work. It is one of those Yamaha YM24800 custom chips that is part key encoder logic, part analog switches.
Rather than try to find the OEM part, these days it is just easier to make an equivalent replacement circuit. (This is my rationale behind all those CS80 IG-series chip circuits I've been doing for the past 15 years.) SlayerBadger!

The YM part encoded 37 keys as six groups of six plus the low C. It also made octave and note DACs out of resistor strings hung off the analog switch pins. The thing was clocked by a 10KHz free-running oscillator and it would output a gate that was +5V (key up) and -10V (key down).

The obvious choice for replacing all of this is of course some kind of microcontroller. While I have spent the last 30 years doing embedded system designs, mostly for industrial PID controllers, all of my code tends to be written in assembly for Zilog Z8s and Microchip PICs. I have a sort of familiarity with C, but it wasn't my embedded language of choice because compiled code with 2.5 microsecond instruction cycles (an 8MHz Z8 from say 1990) was slow.

Well, these days it seems it is all Arduino this, Arduino that. Since Radio Shack actually has the things I got the cheap one that uses the Atmel ATMEGA328P and decided to see what I could come up with. Which is this thing:



Yes, the layout is very sparse for the board dimensions, but this thing is meant to be a drop-in replacement for the old SSK board, which means ideally it uses the same mounting anchors and has the connectors in positions close to where they were on the SSK as the cable harnesses are all dressed and bundled to expect those locations.

I had to come up with a new DAC method as I was not about to make one (two, really) out of dozens of 0.01% resistors. The problem is the CS15, like most of Yamaha's gear, is a V/Hz response and linear DACs aren't so great at exponential output. You can get one or two octaves reasonably well, but each octave down can only use half the DAC code space of the previous octave and soon the resolution errors become too great to obtain the desired pitches.

So I had to devise a method of using one DAC to select octaves, which uses 4 out of 4096 possible (12-bit) DAC codes and a second DAC to select note values, using 12 out of 2048 DAC codes. Alas, the note DAC cannot span the entire range (I'd need a DAC where I can set the -Vref as well as the +Vref for that) but 11 bits for 12 semitones is fine. It is in fact good enough to allow loading micro-tuning tables eventually.

But the DAC fun is not over just yet. The CS15's pitchbend voltage originally set the YM24800's DACs Vref. So, I do the same thing, the pitchbend voltage sets the octave DAC's Vref. In order to have the note DAC ratiometrically scale to the octave, the output of the octave DAC becomes the Vref of the note DAC. So this chain of pitchbend CV->oct CV->note CV ultimately gives me what I wanted. If folks ever wondered why I made expo response CS VCOs and filter, this is why--it avoids all this exponentiation on the control end. screaming goo yo screaming goo yo

The +5v/-10v gate signal is done with an opto-isolator. I have a pile of PC829s, but I provided for using an PC817 too. It seemed academic to add the hardware for MIDI. The code for it is another matter, but there are many example out there in Arduinoland and I figure I can adapt something.

So, how was your weekend? SlayerBadger! SlayerBadger!
rekem1000
You make it seem so simple we're not worthy
coopersloan
So awesome!! Would it be a similarly feasible to do up the YM26600/YM26700?

I am seriously in awe right now...
oldcrow
I devised a CS50/60/80 key assigner in 2001, but never built it. The operational principle was sound, however. Perhaps I will revisit it again in the future, though it would be a bit different now. The main differences are setting up CV storage and clocking the keys for glissando like the 266 chip does. I also have to send out the note codes for external circuits, etc. The DAC chain would be the same as I did here. --Crow

coopersloan wrote:
So awesome!! Would it be a similarly feasible to do up the YM26600/YM26700?

I am seriously in awe right now...
andrewF
you are a farkn legend! we're not worthy we're not worthy
My CS-15 is still fine, but very pleased to know there are solutions available other than landfill.

My weekend was pretty good, thanks thumbs up
sneak-thief
Nice work.

This project ranks right up there with Neil Johnson's DCO/keyboard-scanner chip replacement for the Jen SX1000 / Siel Cruise:



http://www.milton.arachsys.com/nj71/index.php?menu=2&submenu=4&subsubm enu=1
bookends
Wow! Any chance you'll be doing a run of these for sale?
seanpark
we're not worthy

I've been fiddling with a fatar 61 keybed, microcontrollers, logic ICs, and DACs in an attempt to build a controller. So many new things...
coopersloan
oldcrow wrote:
I devised a CS50/60/80 key assigner in 2001, but never built it. The operational principle was sound, however. Perhaps I will revisit it again in the future, though it would be a bit different now. The main differences are setting up CV storage and clocking the keys for glissando like the 266 chip does. I also have to send out the note codes for external circuits, etc. The DAC chain would be the same as I did here. --Crow

coopersloan wrote:
So awesome!! Would it be a similarly feasible to do up the YM26600/YM26700?

I am seriously in awe right now...


Well if you ever do, you've got a tester with a 50 and 60! thumbs up
oldcrow
One note: the CS15 service manual shows the wiring for the DC power to the SSK as "+15 YE" (yellow) and "=15 BR" (brown). THIS IS WRONG. +15 is brown, -15 is yellow. Fortunately I had this thing on my current-limited power supply set down to 100mA. (The YM248 chip was dead before this incident, btw).

Everything still works, though Yamaha's brilliant decision to use 16V electrolytics on 15V rails means I am replacing all of them with 35V ones.
I will be replacing all the opamps too.

Meanwhile, This thing is in the soup, probably have it next week.

oldcrow
Out with the old, in with the new. Yamaha has these oddball rectangular pin headers I had to transplant (not 0.025" square). Everything seems to work. When I get the MIDI IN code done I'll throw stuff up on cs80.com. SlayerBadger! SlayerBadger!


Starspawn
Excellent, wish someone thought it was worth the time to do something for the analog Electones as well, my D85 has 7 CS filters in it, but all midi options involve either level shift or triggered switches for every key.
oldcrow
I have an Electone EX2. Wavetable oscillators, analog filters and digital EGs. One day I might do something for it. SlayerBadger!

Starspawn wrote:
Excellent, wish someone thought it was worth the time to do something for the analog Electones as well, my D85 has 7 CS filters in it, but all midi options involve either level shift or triggered switches for every key.
oldcrow
I have the MIDI input finished. It uses an 8-note buffer to store a multiplicity of keys so as to be able to do note trilling, etc. Other modes I will tinker with later.

Now I have to figure out what is bugged on my synthesizers.com QKB15S keyboard: some of the MIDI outputs are just strange. If anyone has this unit, as an example does pressing E3 and holding it, then pressing D#3, D3,or C#3 cause the 2nd note to not transmit a MIDI message? Either the unit's microcontroller is broken or the firmware is buggy. There are other odd MIDI message outputs on other keys, too.
oldcrow
For those interested, I tossed the project files up on github. SlayerBadger!

https://github.com/cs80/CS15_SSK


--Crow
/**/
seanpark
oldcrow wrote:
For those interested, I tossed the project files up on github. SlayerBadger!

https://github.com/cs80/CS15_SSK


--Crow
/**/
Oh man! I just saw this on sdiy. Thank you.

w00t
bunnycat
I just fried the SSK board on a CS-15 I was working on, all due to the fact that the original service manual leads you to hook up the +15 / -15 V connections BACKWARDS (as was mentioned by oldcrow). And then, of course, I found this thread. Let me just say.... Thank You, oldcrow! we're not worthy

I went from Dead Banana
to nanners
in about 60 seconds.

So, that said, I will be doing a run of three of these boards (the minimum order at OSH Park) that have been so expertly designed by oldcrow here. It's already been sent to the fabricator, and they should be sent to me around August 20th.

Point being, if there is anyone else who needs one of these boards, please PM me because I'll have two extra ones that I am willing to sell for $50 USD each. Free shipping within the US. International shipping would be possible, but you would need to pay whatever it costs.

And - of course - thanks again oldcrow!!! This is fun! SlayerBadger! This is fun!
oldcrow
Hope you find it useful. Note there are no trimmers on my SSK version, just make sure the power supply is trimmed for +15.00v and -15.00v and you should be set. If you are feeling adventurous you can punch holes in the back plate of the enclosure for MIDI jacks. --Crow
bunnycat
Just to be clear, I'm not profiting off this (at all). The minimum run was 3 boards for $140 (after shipping). I'm just offering the 2 extra ones at cost for anyone who might need them to bring their CS-15 back to life, or add MIDI (and possibly microtuning?)...
oldcrow
That is what open source hardware is all about. SlayerBadger! SlayerBadger! I might offer bare boards at some point, but it would be a more general version that can encode a 61-note keyboard and operate as V/Hz or V/oct.
bunnycat
Ah, thanks for the heads up on the power oldcrow.

Hey, if you have a moment - I've been ordering parts for this build and can't figure out what the long blue part above CN4 labeled RN 10k is? Is it some kind of combined resistor network? Also could you tell me what kind of pushbutton switch you used? I think I've got the rest of it, but those two things kinda have me Lost at Mouser's...

And if you're feeling like it, I would love to hear more about the possibility for microtonality! That would be incredible....
oldcrow
That is a "bussed 10K SIP resistor." A typical Mouser number would be

652-4608X-1LF-10K

The button I use is 612-TL1100

Crow
/**/
synthisland
This is great! Thank you!
bunnycat
What is the simplest method of getting this code on the ATMEGA328P?

Do I have to buy a specific Arduino to do this?

I have a basic grasp of how it's done with an Arduino, but I'd rather not buy a bunch of Arduino gear if I don't need it....

Any help much appreciated!
guest
you could just get an arduino UNO with the socketed m328 on it, and program it with that. then take the chip out and put it on the board. otherwise you will need an isp programmer.
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2, 3  Next [all]
Page 1 of 3
Powered by phpBB © phpBB Group