Thursday, January 23, 2025

Timex Sinclair 1000 New Case and Keyboard

    The Timex Sinclair 1000 (ZX81) is a charmingly limited computer from 1982. It has one of the worst keyboards of all time, and it begs for you to DIY something better. Many people have have already created improved keyboards and cases, but I wanted to try my hand. I figured there are enough chunky, old computers out there though; I want to make something thin and sleek.

Video

RF modulator

    The RF modulator is the tallest part of the board, and needed to go. It can be replaced with a simple transistor buffer to get composite video. Some ULAs require a more advanced mod to get usable video. One option is this Ginger Electronic board. It has the bonus feature of allowing you to invert the screen "colors".

Channel switch

    The channel switch on the bottom of the PCB also adds to the height, and needed to be removed.

Power

Heatsink

    The heatsink isn't thick, but it is quite large. It's meant to extend under the keyboard, but this would add to the thickness of our new keyboard. Out it went. The regulator can't run without it though, so that had to be replaced. I found these generic buck converters that are drop in replacements, and don't require heatsinks.

Keyboard

Redragon K603

    The original keyboard is as thin as it is unpleasant to use. To keep the new one thin, I looked for low-profile switches and especially short keycaps. I found the Redragon K603 keyboard to be a cheap source of both. The switches are even socketed, so they can be easily removed. The switches can be found separately though, and there are many options for keycaps.

Keycap stickers (image from 4keyboard.com)

    The next issue was the key legends. They're unique to this computer. Luckily I found these stickers from 4keyboard.com. They have all the information of the original keys, and they fit on a standard keycap.

Keyboard membrane connector

    It's easy enough to design a mounting plate and board for a custom keyboard, but it has to connect to the motherboard's strange connector. It's expecting the mylar sheets of the original button matrix. I could have bypassed or replaced the connector, but that felt like cheating. Instead, I designed a flat flex cable that fits into the original connector, and a standard flat flex connector on the new keyboard PCB.

New flex cable

Case

    I don't have any experience with 3D printing, and I'm not always impressed with the results I see. I stuck with 2D and designed a laser cut case. To keep things simple, I used all right angles, and dovetail joints. I settled for using super glue to join the majority of pieces (these nozzles helped immensely). The rest are held with screws and m2 nylon standoffs. Many of these are recessed into the bottom of the case as a way of achieving non-standard heights.
    A few standoffs go through the case lid also. This requires a screw with a head larger than the standoff to secure the lid. I found this pack that includes "large head" m2 screws.


M2 case screws

Jacks

    The power, video, ear & mic jacks need to be brought to the outside of the new case. One option is to butt the motherboard against the left side, and expose the original jacks. This offsets things strangely due to the width of the new keyboard. The expansion edge connector ends up in the middle of the case, and the mounting holes off to the left. So, I placed it at the far right, and used new panel mount connectors instead.


Motherboard placement

    I took the opportunity to remove the headphone-style connector that's misused for power, and replace it with a normal 2.1mm barrel jack. I also added the conspicuously missing power switch. Lastly, I included a small toggle switch that can be used to invert the video signal.

Lettering

    The case needed some lettering to differentiate the "Ear" jack from the "Mic" jack, and to add some character. These letters can be etched in, but you get very little contrast with acrylic. Paint is pretty much required. Luckily, laser etching usually gets you a free stencil because they etch through the protective film that comes on the acrylic. This makes it very easy to paint the parts, and then remove the film. I found that model spray paint works well for this. 

Lettering on the new case

Putting it all together

    After all the gluing, painting, soldering, and desoldering, I had a finished case.


    

    The design files are on my github.




Sunday, November 24, 2024

Synsonics Pro Dual Kit Drum schematic

    I'm always looking for drum synths to document, and I recently found a "Synsonics Pro Dual Kit" from Japan. Not to be confused with any other drum by a toy manufacturer, or guitar for that matter.

    It consists of two identical drum voices, so I've drawn one of them. Sadly, there's nothing too novel here. We have a decay-only envelope, a triangle VCO, and an OTA-based VCA.

Synsonics Pro Dual schematic

    The VCO design pops up a lot when you look for simple, DIY designs. Despite this, I realized that I had never taken the time to learn how it works. As always, it has an integrator and a schmitt trigger; How different could it be?

Basic Oscillator

    Let's start by looking at a non-voltage controlled version of the circuit. Rt sets the frequency of the oscillator by limiting the current flowing between the schmitt's output and the integrator's input.


Voltage Control

    We could maybe put a voltage controlled current sink in place of Rt to achieve voltage control. The trouble is that we don't only need to sink current; Half the time we need to source current instead. 

    Here's one solution to that, courtesy of the LM13700 datasheet. The righthand OTA is again just a schmitt trigger. The lefthand OTA is used as a voltage controlled current sink/source. You can specify the direction (sink/source) via its non-inverting input. The addition of the capacitor turns it into an integrator of sorts.


    Here's a closer look at this funny integrator. It has two controls: one for rate (amount of current), and one for the direction (inversion).

OTA integrator

    Really, the "rate" control is a normal integrator input, except it can't go negative. The "direction" input is what specifies that the input is negative (or positive).


The Synsonics Version

    We can see that the Synsonics version doesn't use an OTA, but it still has an integrator that can be inverted. How do they pull it off? The integrator works very much like a summing amp, and they're making it do arithmetic.

    The transistor is acting as a switch that can connect R17 to ground (0V). R15 and R16 form a voltage divider that puts half of our "Rate" voltage at the non-inverting input of the op-amp. We can substitute those in the simulator to simplify things. 

simplified circuit

The Math

    The voltage at the non-inverting input (non-inv) is subtracted from each of the inputs. Each difference drops across its respective resistor, and the resulting currents are summed.

We can represent a single input's current like this: (input - non-inv)/resistor

    In our circuit, the non-inv input will always be half the rate voltage, so we can put that in the formula. Now we can calculate the current for the regular rate input: (rate - rate/2)/100kΩ = (rate/2)/100kΩ

If we plug in 10V, we get this: (10V/2)/100kΩ = 5V/100kΩ = 50uA

Rate current


    Here's the second input when it's connected to ground: (0V - rate/2)/50kΩ = (-rate/2)/50kΩ

We plug in our 10V again to get: (-10V/2)/50kΩ = -5V/50kΩ = -100uA

0V current


    So, the second input's current is twice the magnitude of the first, but negative. Remember these currents get summed together, giving us this: current - 2*current = -current

Inverted current

That's how the integrator is inverted, by subtracting twice the normal current. The rest of the oscillator is standard, so we'll leave off with a Falstad simulator link.


Falstad simulation


Sunday, November 3, 2024

Ibanez EM5 and DL5 schematic comparison

     After redrawing the Ibanez DL5 schematic, I moved on to the EM5 from the same line. The EM5 has become sought after, and commands hundreds of dollars. The DL5 goes for tens.

    There is an official schematic available for the EM5, but I thought it would be interesting to rearrange it to match my DL5 layout. This highlights differences and similarities. So, here they both are for a-b-ing.

Redrawn EM5 schematic


DL5 schematic

Delay Line

    The biggest visible difference is the delay chip, M50195 vs M65831. The DL5's M50195 uses external RAM and an external comparator, but it functions the same way. Both chips are built around the same adaptive delta modulation converters and 1-bit delay line. The external RAM is larger, at 64kb vs 48kb.

    The input filters got moved around a little, but they're identical 5.8kHz lowpasses. The integrator caps in the modulator/demodulator are also the same. The M65831 datasheet specifies that it needs 30Ω series resistors for some reason.


Clock

    The clock is exactly the same, and validates what we found when investigating that part of the DL5.

    For some reason, the extra gates from the inverter weren't used for the bypass logic this time. Instead, they added transistors set up as inverters. These pedals are a bit unreliable when it comes to switching on/off, so maybe this was an improvement to the circuit.


Filters

    The input stage, preemphasis, and deemphasis stages are all basically the same. The frequencies that are boosted and attenuated haven't changed.

    We already compared in the delay line's input filters, and found that they're the same. We also have output filters though, and they're different. The DL5 cuts at 5.8kHz, matching its input filter. The EM5 cuts lower at 3.9kHz. Immediately after that, there's an additional lowpass formed by R16 and C19. Together these give the EM5 a darker sound, and probably help filter the additional noise that comes from using less memory for the same length of delay.

    The EM5's output filter also has soft-clipping diodes, presumably to prevent runaway echos that get louder and louder. There's more gain in the feedback loop (lower R17 value) to compensate for this lower output. Strangely, R20 has been more than doubled, limiting the maximum volume of the repeats.


In Closing

    The two pedals don't have any major differences that explain the 10x price gap, at least not to my satisfaction. I suspect people happen to like the darker sound, and maybe the clipping of the EM5. It should be trivial to make the DL5 sound the same though. Since it's built on the same tech, I believe a humble PT2399 delay could also sound the same.


Saturday, October 26, 2024

Ibanez DL5 schematic

    

     I've been looking at various delays, digital and analog. I came across the Ibanez DL5, from their "Soundtank" line. There is a reverse-engineered schematic, but it just didn't make sense to me.


Tic Toc, Ya Don't Start


    The thing that I was most interested in was the clock source for the delay chip. It vaguely looks like an oscillator, but not really. There are two inverting stages made from IC6. You need an odd number of inversions to make an astable oscillator though. Also, what is TR6 doing? It has two fixed voltages going into it, and a current flowing into C29?

Bad clock schematic

    I wanted to validate this, so I opened up my pedal, took some pictures, and started tracing.

Traced PCB

    It turns out that TR6 was labeled incorrectly, and it's actually TR3. R28 is actually R26. R24 and R25 don't go to different voltages; they both connect to what is probably +5V.

    The key mistake was the omission of R23. This connects TR6(TR3) to the second inverter, and totally changes what's going on.

    Here it is redrawn. TR5 helps to bias the CV going into TR4. TR4 acts as an exponential current sink, pulling current out of C29. The inverters monitor the capacitor voltage at pin 1, and use TR3 to recharge the capacitor when it gets low.

Corrected clock schematic

    I made a version of it in Falstad, so you can experiment with it. Link here

Falstad simulation


    It's actually very similar to the Monotron's VCO that we looked at previously

Monotron VCO

I Can't Be Your Lover


    The number of mistakes in this one area calls into question the whole schematic. What else can we find wrong?
Incorrect schematic

    The "Ref" pin (24) of the M50195 delay chip is incorrectly labeled "OP1+", making it look like it's an input for one of the internal opamps. It's acutally a reference voltage that's used by the opamps.

    The opamp on the delay's output (IC5B) is connected backwards. What should be its output is instead its input.

    Long story short, I decided to redraw the schematic. This let me make some more conventional layout choices too.

Redrawn schematic

    I skipped a few things that didn't interest me, like the LED, some power filtering, and jacks.

    Now we can see what all the blocks of the circuit are, and how the signal flows through them.


    At the top left we have an input buffer, and a preemphasis filter that feeds into the delay line. We also have a deemphasis filter that mixes the dry and wet signal together.

    Below that is a lowpass filter that cleans up the wet delay signal. After that is a FET that bypasses the effect. Then comes the repeat control that mixes the signal back into the delay line.

Input, filtering, and mixing

    At the bottom left is the delay line itself. It has a similar lowpass filter that's built using one of the M50195's internal opamps.

Delay line and RAM


    Bottom right is the latch that controls the FET. Pressing the tact switch toggles the state of the latch, and the FET, turning the effect on or off.

Bypass Latch

Bonus

    Here are the traced and redrawn boards. It's not a faithful recreation, but good enough to make a schematic from. The 70mil-spaced 36 pin DIP was "fun" to recreate.

Saturday, September 7, 2024

Koogo Analog Delay schematic (Donner Yellow Fall)

    I've been experimenting with controlling analog effects pedals, like this chorus. I bought a cheap "Koogo Analog Delay" to try to repeat my success. Turns out that it's not analog at all. It's the same digital PT2399 chip that seems to be in every delay. It does have a leg up by adding a sa571 compander though. Turns out this is the same design as the Donner Yellow Fall pedal; It's just been rebranded.

    I decided to draw a schematic in case there was anything to learn from it. I didn't add any capacitor values since they're not marked, and would have to be desoldered and measured. I did put in a few speculative values though.

    The PT2399 lives on a daughterboard and follows the datasheet design pretty closely. So closely that I just copied and pasted the last schematic I made from a PT2399 board.

PT2399 daughterboard

    
    The main board isn't too interesting either. It uses variations on the compressor and expander from the SA571 datasheet.

    
    An extra lowpass filter has been added before the expander. This is probably to help knock down some of the aliasing noise that would throw off the envelope detector of the SA571.

    A bypass FET has been put in the feedback loop so that you'll still get "tails" when turning off the circuit. This means that the delayed signal won't be immediately cut off; The last repeat will ring out, but no additional repeats will be created.

    The input buffer adds pre-emphasis, boosting the high frequencies. The summing amp is the complement to it, doing de-emphasis duty. These cancel each other out, and have no real effect on the dry signal. The benefit is to the signal-to-noise ratio of the delay line. By de-emphasizing (low passing) the output of the delay line, the high frequency noise can be greatly reduced.

Mainboard schematic


    I think these additions were inspired by actual analog pedals, despite the delay line being digital. You can see the pre/de-emphasis, lowpass filter, compander, and feedback bypass in the Boss DM-3

Boss DM-3


Saturday, August 10, 2024

Adding CV to the Electro Harmonix EH400 Mini Synthesizer

    This is a follow up to our previous look at the EH400 here. Now we're investigating methods of voltage controlling the oscillator.

    As a reminder, this is what we're up against. It's similar to a relaxation oscillator, but it's been modified to charge through a resistance labeled "keyboard".

The original oscillator circuit

Get your VCRs ready

     One approach to adding CV would be to replace the resistor with some kind of voltage-controlled resistor (VCR). These circuits are a bit uncommon though. Another difficulty would be figuring out the relationship between resistance and frequency, then replicating it in the VCR. The saw recharges quite slowly because of R2, and this impacts the relationship.

Update

    I decided to graph the resistance that corresponds to each of the 24 note (1 being the lowest, 24 being the highest). With the help of a curve fitting tool and Wolfram Alpha, I ended up with this formula: resistance(k) = 188.198 - 44.8472 * e^(0.0574576 * note)

Current affairs

    We can do away with the resistance worries by instead forcing a current into the timing capacitor C2. We could then use a much more conventional voltage controlled exponential current source, instead of a VCR. This is a circuit that's very common in synthesizers, and will give us a standard 1 volt per octave response, while also being relatively temperature stable.
    There are some voltage requirements that make the oscillator a little hard to current control though. The cap needs to swing from 2V to 4V. The typical expo source can't do this directly, but we can add a current mirror to help it along.
    Here we've added a standard expo source (actually a current sink). We've also lowered R2 to 1k to help mitigate the slow recharge time.


Expo sink and current mirror design

    This mostly works, but the tuning goes flat on the low end. I'm unsure what to blame this on, maybe the current mirror. Regardless, it's back to the drawing board.


Derivation

    Part of the trouble with this oscillator is that it's too different from typical VCOs. How can we bring it more in-line without replacing it entirely? Well, we have to look at it differently. What we've been calling a "modified relaxation oscillator" can also be thought of as a variation on a schmitt trigger.


Schmitt Trigger

    The majority of VCOs have a schmitt trigger in them somewhere, and many of them are related to this schmitt + integrator design:



    By adding an integrator we can turn this into a more normal oscillator, one that lends itself to being voltage controlled. We only have to make minimal changes to the original board to accomplish this. The original timing cap needs to be removed, and the integrator needs to be connected in its place. If we want to replicate the original's sawtooth waveform, we can tap the "pulse" output and use it to reset our integrator. As a bonus, this resets much faster than the original oscillator did, and pretty much cures the slow reset problem. Now we have a fairly conventional oscillator.


Sinking lower

    With our new oscillator design, the exponential current sink becomes more useful. It doesn't have to make the capacitor swing to any voltage, not directly anyway. The integrator does all the work, while presenting a relatively constant voltage to the current sink.

    Since the integrator is the one charging the cap, it does have to worry about the voltage swing. It must reach both 2V and 4V. If we run it using half of VCC as our AGND, then we'll run into a problem on reset. The reset pulse will only bring it down to 6V/2 = 3V, and not the 2V that we need. This is because the reset pulse "closes" T3 and turns the op-amp into a unity gain buffer. This effectively forces the AGND voltage (from the non-inverting input) to show up at the output.

Unity gain buffer

    We can fix this by lowering our AGND voltage to below 2V. We just need to play with the values in a voltage divider until we come up with something that's a safe margin below 2V. Our 6V supply into 33k + 15k yields 1.875V.

    Here it is all put together. Conveniently, it only requires one quad op-amp to add the expo sink, integrator, and buffers. Falstad link here


The complete CV circuit


    

Saturday, August 3, 2024

Atari XC12 FSK Decoder

     I have a bit of a fascination with tape storage interfaces. They're just an interesting junction between analog and digital. How do you make a computer talk to a cassette? It turns out there are many answers to that question, but here's a quick look at one.

    The Atari "Program Recorder" is a line of cassette storage devices made for their 8-bit range of computers. The last of the line was the XC12 from 1986. It stores data using frequency shift keying that we looked at previously. The two tones required are generated by the computer, but they're decoded by the XC12. How though?

Normalizing

    First the signal is normalized (brought to a consistent volume) by an op-amp with diodes in the feedback path. This is actually a clipping amplifier, as used in distortion pedals.

XC12 Clipper

more reading here

Decoding

    The core of FSK decoding is discerning between the two tones used. In this case we're using 5,327 Hz and 3,995 Hz. Atari took the very analog approach of separating the tones with bandpass filters. The high tone will pass more through the top filter, and less through the bottom filter. The opposite for the low tone. This isn't particularly responsive, nor precise.


    The two filters then feed simple diode-capacitor envelope followers. The idea is to extract the amplitude of each signal, rather than the tones themselves. A good deal of the tone still spills though tough.

XC12 filters

Comparing

    An op-amp setup as a simple comparator is the trick to countering the slop of the filters. We use it to test what filter has a higher amplitude, and the winner dictates the logic level of the output. This means that the output of the filters + envelope followers can get away with being quite messy, so long as the correct one is higher than the other.

    

Cleaning

    Unfortunately, the comparator alone isn't enough to scrub the noise from the filters. They change amplitude rather slowly, meaning they'll sluggishly cross over each other while jittering around. This puts the wrong signal at the higher amplitude, and the comparator will momentarily give the wrong result. A lowpass filter is used to remove these glitches from the comparator's output. Finally a transistor buffers the digital output.



Simulating

    It's always interesting seeing these circuits in action, so I recreated it in falstad. Link here

    For input two oscillators, a clock, and a digital switch are used to generate a signal that toggles between 5,327 Hz and 3,995 Hz. This gets squashed by the clipping circuit and sent to the filters.
    We can see the output of the envelope followers slowly ramping up and down as the frequency changes. We can also see how much of the tones end up in what should be the envelope of each signal.
    Finally we get a square wave out that tracks the original clock used to switched the tones.