Saturday, April 27, 2024

Electro Harmonix EH400 Mini Synthesizer

 A friend asked me about adding CV and gate inputs to an Electro Harmonix EH400 Mini Synthesizer. Don't get it confused with their "Micro Synthesizer", "Micro Synth",  "Mono Synth", "Synth 9", etc.

I couldn't find all that much about the synth, or how to mod it, but there is a low quality scan of the schematic. It's hard to make out, and the layout obscures what the parts of the circuit are.

Original schematic

Of course I redrew it in Eagle CAD. I broke the circuit down into logical parts, laid them out in a more conventional way and labeled some signals.


Redrawn schematic

The Oscillator

The oscillator uses a single comparator and is based on a classic relaxation oscillator.
A comparator-based hysteretic oscillator - Wikipedia

It has some tweaks though. The osc can be turned on and off by applying a gate signal to D2. This is needed because there is no VCA; the oscillator has to be turned off to prevent it from droning.
The octave can be changed by toggling switch S1. It changes the configuration of the two timing caps from parallel to serial. This gives a 2 octave difference between the positions.
The addition of D1 keeps the timing caps from being charged up by the R4/R5 voltage divider through R3 and R2. Instead, they're charged by an external voltage that goes through R1 and R2.

The Keyboard

This brings us to the CV generation circuit. The lefthand side of the circuit lets the user dial in a voltage that will be put through the keyboard's chain of resistors (represented by one resistor labeled "KEYBOARD"). This voltage sets the maximum pitch, and allows for tuning and pitch bend.
It's worth noting that the keyboard is made of metal foil and doesn't have conventional, mechanical keys.
When a "key" is pressed, the KEYBOARD-C node will connect to a node on the resistor ladder. This will send current through the intonation trimmer and on to the oscillator, charging the timing capacitors.
Pressing a key also puts a voltage across C4 where it can be seen by comparator IC1C. It gets compared to a divided version of the voltage that was put into the keyboard. Due to the divider, C4's voltage will always be the more positive signal when a key is being pressed. This generates a gate signal at the comparator's output.




The LFO and PWM

The LFO is based on the same circuit as the main oscillator, not that anyone would be able to tell from the original schematic. They call it "phasing", but it's really accomplishing pulse width modulation by comparing the LFO with the main osc.
The "phasing" adjustment is an odd one. It changes the switching points of the LFO. This changes both the period and amplitude of the LFO. The actual rate that the timing cap charges/discharges stays the same though (in terms of voltage/time).
If the switch is toggled, it stops being an LFO and instead delivers a constant CV. The potentiometer now adjusts this voltage, and the comparator acts like a crude unity-gain buffer.


Here are both switch states modeled separately. Falstad doesn't like to simulate the right one at high speeds and it results in the capacitor draining some before the comparator notices. This happens to turn it back into an oscillator.



The Filter

The original's filter looks especially tangled and odd. It makes more sense once you see that R29 and R37 form a voltage divider that's used as a reference voltage. That said, it's still odd.

There are two stages to the filter and they're in parallel. They have the same topology, but are tuned differently (C8/C10 vs C12/C15). Switch S5 can be used to disconnect the lower stage, and boost the upper one.

Both stages are built around CA3094 OTAs. These chips are typical OTAs that include a darlington pair that acts as a buffer. One unique feature is that all three terminals of the pair are exposed at pins 1, 8 and 6.



Here's the Falstad simulation. The buffer design is based off of the CA3094's datasheet.


The Envelope

The envelope is interesting because it uses a start and stop voltage instead of amount/offset. Unfortunately, it doesn't perform very well (at least in the simulation).
Q1 should be applying the start voltage to C6 when the gate signal is low, but C6 is always influenced somewhat by the stop voltage via R21.
When the gate is high, the start voltage is disconnected, and gives the stop voltage full control.
C6 is buffered by Q4 and sent to the current control pins of the filter stages.

There's also a piezo disc that generates a voltage when the keyboard is played forcefully. It gets buffered by Q3 and Q2 before being tied directly to the envelope's capacitor.


Leftovers

Maybe later I'll get into adding the CV control that started this. The simple answer is to add an exponential current source in place of the keyboard resistor ladder. I suspect that the oscillator's sluggish reset will cause the tuning to go flat at higher pitches though. 
It looks like a gate signal can be applied across C4 to recreate the signal from the keyboard.

The suboscillator is uninteresting as it's a simple d-type latch that's set up as a divider. The square output of the oscillator feeds into one half of the latch that seems to be used as a buffer, before going into the divider half.

There's also a 6V regulator built around a zener diode and a buffer transistor.

Lastly there's speaker amplifier that isn't drawn, because it's not relevant to the synthesis.

Sunday, March 10, 2024

Korg Monotron Oscillator Sync

I  developed this mod specifically for the Montro Duo, so that one oscillator could sync to the other. Since all three models of Monotron share the same oscillator design though, the mod is applicable to them all. Here we'll look at the original model.

The crux of syncing is resetting an oscillator, but not every oscillator lends itself to being reset. I also wanted to avoid heavily modifying the Monotron board. That means limiting things like cutting traces, lifting legs, removing/replacing components.

Here's the VCO we have to work with, taken from the Monotron schematic. It's a saw-core that uses a couple schmitt triggers and a transistor for the charging phase, plus a current sink for the discharge phase. Q2 is constantly discharging the timing capacitor, C11. Meanwhile, the schmitts watch the voltage of C11. When it gets too low, they recharge it through Q5. The built-in thresholds of the schmitts define when they start and stop this recharging stage. 

This "recharge" is a method of resetting. So, the oscillator already has an internal reset signal and reset mechanism.

Monotron VCO

Korg's Sync Circuit

We need look no further than the LFO to find an actual sync circuit (though they call it "reset"). The LFO is essentially the same as the main oscillator, just with this sync circuit added.

Monotron LFO with sync circuit highlighted

I've created a version of the LFO in Falstad's Circuit Simulator, link here. I've renamed the input to "Sync", and the internal pulse to "Reset Pulse" on the trace below.

When the sync pulse goes high, Q8 pulls the input of the first schmitt low, as if the capacitor's charge was low. This forces the circuit into the recharge stage. Q7 pulls the second schmitt low, and delays the recharge until the sync pulse goes low. This is enough to sync the LFO.

Simulated LFO

While this is promising, there is a catch. The reset circuit inserts resistors R33 + F1 before schmitt one, and R32 between the schmitts. This would require some fiddly trace cutting if we were to apply it to the VCO.

My Sync Circuit


I took a different approach, and tried to discharge the capacitor using the sync pulse. This can be done with just an NPN transistor. We have to be careful about how much we discharge the capacitor though. A naive approach might discharge the cap below the point that it should begin charging again, changing the pitch and amplitude.

We can prevent this overshoot by checking the output of the second schmitt. While it's high, we're safe to discharge. Once it goes low, we've hit the lower threshold, and it's time to stop. If we AND this signal with our sync pulse, we can safely limit how much the capacitor will discharge. We also get a free sync enable/disable input if we use a three-input AND.

New sync circuit


This works well in practice, but there are limitations. 
If the sync pulse is too long, it will extend past the capacitor recharging stage, and force it low again. This will keep it cycling rapidly until the sync pulse stops, and produce a high pitched tone.
If the sync pulse is too short, the capacitor won't fully discharge before the pulse ends, and the oscillator won't reset.
So, the ideal length for the sync pulse would be exactly long enough to discharge the capacitor.
Keep in mind that the capacitor is always being discharged based on an ever-changing pitch voltage. The capacitor will also be charged to an arbitrary voltage when we try to reset it. This means that the discharge time is a moving target, and there is no one perfect sync pulse length.

We can fix this by adding a set-reset latch that will catch the edge of the sync pulse, stretch it out to the right length, and end it once the capacitor is fully discharged. Here's an exaggerated trace to demonstrate the concept.

Latched sync pulse example


Here's is the Falstad link for the latched version

Latched sync circuit


The sync pulse sets the latch, which starts discharging the capacitor. Once it discharges to the lower limit, the second schmitt will go high, resetting the latch, and allowing the capacitor to recharge.
While the non-latched circuit might be good enough, this circuit will work across a much broader range of frequencies.

Monday, February 19, 2024

Korg Monotron Duo modifications

    I've been experimenting with Monotrons since around the time of the original's release. I took an interest in the Duo model more recently though. The extra oscillator opens up some modulation options, and paraphonic possibilities. I thought it would be fun to digitally control as many parameters as possible. 

    After experimenting with using OTAs to control things, I determined that digital potentiometers would be easier. Unfortunately, there has been an ongoing shortage with the digipots that the project calls for. Because of this, the project has been shelved for some time. While working on this, I developed some modifications that don't require digipots though: 

  • Oscillator sync
  • XOR ringmod
  • Squarewave anding
  • Sub oscillator
  • PWM 
  • filter HP input
  • VCF crossmod

    I'm posting now to at least keep the schematics from sitting on my hard drive. I hope to follow this up with a breakdown of each mod.


Full schematic