<strong>Casio SA Keyboard Modification.</strong>

I got an email from Jeff Stonestreet the other day with an attached schematic.
"Attached is a schematic I created for the Casio SA-7 keyboard. I am working on a microprocessor-controlled sound generator and plan on using the SA-7 for parts. I got frustrated trying to figure out how the thing was wired, so I finally spent about a week carefully mapping every circuit board trace.
Maybe the schematic will save others the same frustration!"
<a href="http://casperelectronics.com/images/finishedpieces/Casio SA/schematic.JPG"><img title="" src="http://casperelectronics.com/images/finishedpieces/Casio SA/_schematic.JPG" alt="" width="400" height="283" /></a>
<strong>Thanks Jeff!</strong>

<a href="http://www.casperelectronics.com/images/finishedpieces/Casio SA/SA-X.jpg"><img title="" src="http://www.casperelectronics.com/images/finishedpieces/Casio SA/_SA-X.jpg" alt="" width="400" height="256" /></a>

This is an engineered modification which works on most of the Casio SA series ( SA-1, SA-5, SA-7, SA-8 etc). There will be an Amplifier chip ( No AN8053 ) common across the SA series and a mask programmed CPU which will be made by OKI and have the part No M6387-xx where xx is the variant for the specific keyboard it is installed in, in the case of the SA-5 it is M6387-16. The different variant number accommodates different key / button layouts of the keyboard it is fitted into, the PCM sounds however remain the same. There are 5 interesting modifications that can be easily fitted:

<strong>1) Pitch Shifting</strong>
<strong>2) Power Crash
3) 5th's Switch
4) Glitch Randomizer
5) Filter/ Feedback Adjustment </strong>

&nbsp;

<a href="http://www.casperelectronics.com/images/finishedpieces/Casio SA/inside5.jpg"><img title="" src="http://www.casperelectronics.com/images/finishedpieces/Casio SA/_inside5.jpg" alt="" width="400" height="201" /></a>

1) Pitch shifting. The CPU runs at a fixed speed of 22Mhz which it needs to create the internal sounds out of its Rom and to run the main program that scans the keyboard / buttons and plays the sounds. It has to run at a precise fixed speed as a lot of the internal processes are calculated by dividing the clock signal internally. It is not possible to just remove the Casio's crystal and swap it with another, as the original crystal has 3 legs, and most others have 2. In order for the crystal to oscillate it needs two capacitors, these are built into the original crystal and come out on the 3rd pin in the middle. To successfully swap the crystal we need to add two 22pf ( very tiny ) capacitors to a new crystal and complete the oscillator circuit. I have got it to run as low as 6Mhz but at this speed it executes it's system program slower also, so there is a tiny delay after switch on before the keyboard responds.. this is normal! It is also possible (although I have not tried) to increase the clock speed and put a 30Mhz crystal in, which would increase the pitch of the keyboard.. it may even go higher, just like overclocking your PC!

<a href="http://www.casperelectronics.com/images/finishedpieces/Casio SA/inside4.jpg"><img title="" src="http://www.casperelectronics.com/images/finishedpieces/Casio SA/_inside4.jpg" alt="" width="400" height="300" /></a>

2) Power Crash. The CPU needs a stable regulated voltage to run normally. If a variable resistor is put in series with the supply to the keyboard (removing the DC in Jack off the PCB and using the solder pads works very well) it will reduce the available voltage the CPU can use, and there is a threshold where the CPU does not have enough power to run correctly, but it has enough to not stop, this causes random sounds.. glitches in playback etc. Different results are achieved if the speaker is removed or not as the speaker requires a lot of power to run, the CPU does not glitch out as much with it in circuit, it just gets quieter when the power is reduced. A good value potentiometer is 500 ohm, which maybe hard to get but can be made with a 1K pot with a 1K resistor in parallel, giving a 500 ohm potentiometer

<a href="http://www.casperelectronics.com/images/finishedpieces/Casio SA/inside2.jpg"><img title="" src="http://www.casperelectronics.com/images/finishedpieces/Casio SA/_inside2.jpg" alt="" width="400" height="300" /></a>

3) 5th's Switch. When you play a key, activating this mod will play a second note at the same time, either a 5th up or down depending on the position of the toggle (centre off toggle switch needed). This mod simply fools the CPU into thinking an extra key is pressed. All the keys are wired in a sort of X Y matrix that the CPU scans the X and the Y lines to see if a key or button is pressed. By shorting out an extra line, when the key is pressed the CPU sees 2 key presses and plays 2 notes. The switch is wired to short out either 1 line up or 1 line down of the line that scans the keyboard. It may not work on all the SA series as the CPU is configured to scan different button arrangements on different models, these pins may connect to buttons rather than keys on a different model.

<a href="http://www.casperelectronics.com/images/finishedpieces/Casio SA/inside1.jpg"><img title="" src="http://www.casperelectronics.com/images/finishedpieces/Casio SA/_inside1.jpg" alt="" width="400" height="300" /></a>

4) Glitch randomiser. This causes a random effect on the CPU dependant on how the knob is set, and what the keyboard is doing at the time. I previously mentioned that the CPU constantly scans all the keys and buttons.. This mod takes the final amplified audio signal out of pin 5 of the amplifier chip and injects it back into the scanning matrix via a 1Meg pot. Instead of the CPU seeing a definite signal (such as when a key is pressed) it doesn't know what to do when it finds a much amplified audio signal where it is expecting a scan signal, and it locks the CPU up. If the keyboard is idle and not making any sound, then turning the knob has no effect as there is no audio signal there to inject back into the CPU.

<a href="http://www.casperelectronics.com/images/finishedpieces/Casio SA/inside3.jpg"><img title="" src="http://www.casperelectronics.com/images/finishedpieces/Casio SA/_inside3.jpg" alt="" width="400" height="300" /></a>

5) Filter / Feedback pot. This works exactly the same way as sticking a live microphone in front of an amplifier speaker and you get howl or the Larssen effect ( usually heard at drunken speeches - or after dinner events ). The modification takes the audio output frm the amplifier which is quite large, and injects it back to the CPU output that is connected to the input of the amplifier chip, which then amplifies it further, feeds it back and amplifies it more.. the amplifier chip cannot cope and goes into self oscillation which is heard when the knob is wound right up. The Potentiometer used is a 1K pot, but a trimmer is also fitted in the 1 leg, so with the pot turned right down there is still some resistance between the input and output of the amplifier, otherwise it would feedback all the time. When setting up, adjust the trimmer so that oscillation starts approximately 1/3 of turning the main 1K potentiometer. When the amplifier is in self oscillation / howling, it draws a relatively large amount of power, which causes the power glitch mod to not work properly, it is better to put a switch between the 1K potentiometer and the wire to pin 5 of the amplifier chip, so the feedback loop can be broken

There are further potential modifications, such as Rheed's body contacts and instability pot.. these both work on the Crystal oscillator circuit, and cause the CPU to miss a clock pulse causing a crash in the internal program. The same effect can be achieved by switching the clock speed, as the time it takes for the switch to disconnect one crystal and connect the other by moving the lever, may only be a fraction of a second for us, the CPU has missed literally thousands of clock pulses and doesn't know where it is in it's program. Very occasionally I have managed to play a note, flip the switch and it continues to play but dropped in pitch 99% of the time it will crash the CPU.. the most spectacular results occur if you have the power reduction pot right on the threshold, where the SA is fighting to make sense of what is going on, and then you change the crystal.. utter mayhem :)

P.Parry Aka OCEANUS 15/1/08