The Key & Cable Company

Gainesville's Repair and Restoration Artisans of Pianos, Keyboards, Guitars, Effects, and Amplifiers

Replacing the Brain of a Suzuki Omnichord OM-27

Building an open-source drop-in replacement for the unobtainable AY-5-1317A chord logic IC — and a few other chips while we're at it.

A while back, Filip Kindt wrote up replacing the top octave generator in a Hammond X-5[1] using an RP2040 and some PIO trickery. That project replaced the MM5833, which generates 7 of the top-octave square waves the organ needs. The solution was elegant: let the PIO hardware count clock cycles and flip output pins at the right moments. No software intervention required once it's running. Filip noted at the end that the RP2040's 8 state machines were the limiting factor — a chip with more PIO resources could handle a full 12-tone TOG. I read that, filed it away, and eventually found myself staring at a dead Omnichord that needed exactly that. This blog post tracks my thinking on this subject before making hardware decisions.

The Suzuki Omnichord OM-27's M083A top-octave generator outputs all 12 chromatic tones — more than the Hammond's MM5833. The RP2350 has 12 PIO state machines across its two PIO blocks, which is exactly enough. But the M083A isn't even the hard part. The real problem is the AY-5-1317A sitting next to it — a General Instrument chord logic IC that reads the chord button matrix, selects the right frequencies for the pressed chord, and routes them to a pair of M747 octave dividers that feed the strum plate. It's the whole musical brain of the instrument, and it's quickly becoming completely unobtainable.

Suzuki Omnichord OM-27 open, showing the PCB
The Suzuki Omnichord OM-27. Everything musical about it lives in a handful of ICs that haven't been manufactured in decades.

What the AY-5-1317A actually does

The AY-5-1317A is a 40-pin P-channel MOS IC. It accepts 12 top-octave frequencies on pins 13–24 from the M083A (one full chromatic octave, B down to C), reads a key matrix on pins 7–12 and 36–40, and outputs up to five chord tones on pins 28–32 and 34. It also accepts a 3-bit bass select input from the AY-5-1315 rhythm chip that sequences which chord tone plays as the auto-bass line in sync with the drum patterns.

AY-5-1317A Datasheet
AY-5-1317A pin configuration from the General Instrument datasheet.[2]

The OM-27's key matrix is 3 rows × 6 column pins, covering 9 chord roots via tritone sharing — three of the column pins serve two roots each. Pin 39 covers both Eb and A, pin 40 covers Bb and E, and pin 3 covers F and B. Each physical button connects only one root to one row, so the shared pin is never actually ambiguous during normal playing.

The power supply situation

The AY-5-1317A is P-channel MOS. Its datasheet specifies VDD = -15V and VSS = 0V, which is General Instrument's standard P-channel test configuration. The OM-27 has no negative rail — just +12V and +5V. Suzuki almost certainly wired VSS to +12V and VDD to GND, the standard trick for running P-channel ICs on a positive supply.[3] Under this configuration: logic HIGH = +12V, logic LOW = GND. This is consistent with pin 5 (reset/mute) sitting at +12V at rest and being triggered by grounding it.

Note: The supply orientation hasn't been verified with a scope yet. It fits all available evidence but should be confirmed before committing to a PCB layout.

Replacing four chips with one

Replacing the AY-5-1317A also makes several of the surrounding chips unnecessary:

ICRoleApproach
AY-5-1317AChord logic, key matrix, frequency routingRP2350 firmware in this socket
M083ATop-octave frequency generationPIO state machines, generated internally
4069RC oscillator clocking the M083ANot needed; 78L05 repurposed for RP2350 power
4001NOR gate routing 5th or 7th to bass M747 chain depending on chord typeBypassed — firmware outputs the correct note directly to pin 34

The 78L05 that previously powered the 4069 (dropping 12V to 5V) gets repurposed to feed the RP2350-Zero's VBUS. The AY-5-1315 rhythm chip, 4011 percussion logic, and all downstream audio circuitry are completely untouched.

The M747 octave dividers also need replacing — they're not cheaply obtainable either. The CD4520 is a functionally equivalent substitute (dual 4-stage binary counter, still in production) that covers the three divide stages the OM-27 needs. A passive adapter board in each M747 socket handles the pin translation, no active components required.

Waveshare RP2350-Zero
The Waveshare RP2350-Zero. Tiny, cheap, and has exactly 12 PIO state machines.

The firmware

The firmware is published as The OpenChord Project, split into instrument-agnostic core modules and an OM-27 specific config. The idea is that the core logic can be reused for other instruments with dead top octave generators and chord logic ICs.

Frequency generation

Each chord tone is generated by a PIO state machine counting half-period cycles from the 125 MHz system clock. No external oscillator is needed — the RP2350's internal PLL gives more than adequate pitch stability for this application.

@rp2.asm_pio(set_init=rp2.PIO.OUT_LOW)
def freq_gen():
    pull(noblock)       # grab new counter if available, else keep Y
    mov(y, osr)
    wrap_target()
    set(pins, 1)
    mov(x, y)
    label("hi")
    jmp(x_dec, "hi")
    set(pins, 0)
    mov(x, y)
    label("lo")
    jmp(x_dec, "lo")
    wrap()

Five state machines run simultaneously: ROOT, 3RD, 5TH, 7TH, and MO (the auto-bass output). Changing chord pushes new counter values to the running SMs, so there's no audible discontinuity between chords.

Extended chord types

The original AY-5-1317A supported major, minor, and dominant 7th. With the chord logic in firmware, additional chord types come essentially for free by detecting button combinations:

Button gestureChord
Single buttonMajor / Minor / Dominant 7th
Minor + 7th, same rootMinor 7th
Major + 7th, same rootMajor 7th
Major + Minor, same rootDiminished
All three, same rootAugmented
Two roots, interval of a 4thSus4
Two roots, interval of a 2ndSus2
Two roots, other intervalSlash chord

A solder jumper enables Barry Harris mode, changing major chords to major 6th, minor to minor 6th, and the diminished to fully diminished 7th. The AY pin 5 reset signal is repurposed as a modifier button — holding it shifts all chord roots by a semitone, revealing Gb, Db, and Ab which the original circle-of-fifths layout couldn't access.

Auto-bass

The AY-5-1315 rhythm chip drives a 3-bit signal into the AY-5-1317A (pins 25–27) that selects which chord element plays as the bass note in sync with the drum pattern, coming out on pin 34. That path is internal to the AY-5-1317A and has nothing to do with the 4001. The 4001 is a separate circuit — it NORs the 5th output (pin 28) and the 7th output (pin 32) to route the appropriate tone to the bass M747 chain depending on whether a dominant 7th chord is selected. In the firmware this decision is made directly from the chord type, so there's no need for gate logic.

Important: The AY-5-1315 outputs at +12V logic. The three bass select lines need voltage dividers (68kΩ + 33kΩ) before they reach the RP2350. Don't skip this.

RP2350 Errata 9

The RP2350 has a silicon errata (Errata 9)[4] where GPIO pins configured with PULL_DOWN can latch at around 2.1V when floating, which makes them unreliable as sense inputs. With six key matrix column pins spending most of their time floating between button presses, this matters. The workaround is to use PULL_UP instead and drive the matrix rows LOW during scanning — a pressed button then pulls the column LOW rather than HIGH. The firmware handles this already.


GPIO map

GPIOFunctionAY-5-1317A pin
0ROOT output → CD4520 #1 clock A31
13RD output → CD4520 #1 clock B29
25TH output → CD4520 #2 clock A28
37TH output → CD4520 #2 clock B32
4MO / auto-bass output34
57th Select drive (LOW = 7th active)33
6Row drive: Major11 + 12
7Row drive: Minor9 + 10
8Row drive: Seventh7 + 8
9Col sense: Eb / A39
10Col sense: Bb / E40
11Col sense: F / B3
12Col sense: C36
13Col sense: G37
14Col sense: D38
15MIDI TX (optional)
16Power enable
17Any Key Down drive30
18Memory switch input35
19Modifier button input (was reset/mute)5
20Bass select B3 from AY-5-131525
21Bass select B2 from AY-5-131526
22Bass select B1 from AY-5-131527
23JP1: flat / sharp modifier select
24JP2: Barry Harris mode
25–29Unassigned

What's next

The firmware is written but the hardware hasn't been tested yet. Before anything else:

  • Scope the AY-5-1317A output pins to confirm voltage swing and verify the NPN transistor output circuit
  • Try direct GPIO connection to the CD4520 clock inputs — 3.3V may be sufficient without transistors
  • Build the CD4520 adapter boards and verify they divide correctly
  • Bench test with the OM-27 PCB — minimum wiring is power + 5 tone outputs + key matrix

Everything is up at github.com/keyandcableco/openchord-project. The core modules are written to be instrument-agnostic, so if you're dealing with a similar problem on a different instrument, it may be a reasonable starting point.

More updates once it's actually making noise.

  1. Filip Kindt, "Replacing the top octave generator in a Hammond X-5 with an RP2040", cctv.fm, 2024.
  2. General Instrument Corporation, AY-5-1317A Chord Generator datasheet. Copies circulated in the vintage synth repair community; no official online archive known.
  3. This interpretation is inferred from the OM-27's known supply rails (+12V, +5V) and the behaviour of pin 5, and has not been verified with an oscilloscope. The AY-5-1317A datasheet specifies standard conditions of VDD = −15V, VSS = 0V.
  4. Documented as RP2350-E9, "Latching behaviour on Bank 0 GPIO pull-down resistors," in the RP2350 datasheet (p. 1340). First reported publicly by Dangerous Prototypes; further discussion at Hackaday and the Raspberry Pi forums. Note that several community members have found the latch can occur even without PULL_DOWN enabled.
  5. Erich Izdepski, erichizdepski.wordpress.com. Schematic scans and repair notes for the Omnichord OM-27.