Wednesday, December 13, 2017

Roland PB-300 Schematic



Here are some scans from the Roland PB-300 service manual. It was released in '83 as a
companion to their HP-400 digital piano. It stands as Roland's final, fully-analog drum machine.

First, a runthrough of the presets:




Higher resolution and additional images on imgur here.




An AVR replacement CPU offering MIDI triggers



Saturday, September 16, 2017

Korg Nanokontrol Schematic + New Firmware

Ages ago I drew a schematic for Korg's original Nanokontrol. I finally decided to dust it off and do something with it.

From the outside the Nanokontrol is just a USB control surface, but inside it hides an AVR microcontroller. It even has the ISP (programming) header broken out, though the pinout differs. With this it seems pretty natural to write a new firmware for it.

I wanted a simple project that demonstrates interfacing the potentiometers, LEDs and buttons. The idea of a CV step sequencer sprang to mind. In order to get nice clean voltage output I decided to add a DAC. The problem with adding to this setup is the general lack of IO pins. The serial pins TX and RX are conspicuously unused, but I chose to leave them free for possible MIDI communication. I don't plan on using USB MIDI, so I freed up IO by removing the USB chip.

PDIUSBD12 USB chip
The USB chip actually serves as the clock source for the AVR, so a replacement clock must be supplied. Step one is to flash the AVR fuses such that it can accept a crystal clock source. This has to be done while we still have an external clock. After that the USB chip can be removed and a crystal can be attached to the XTAL pins of the AVR. Conveniently the USB chip has an external crystal footprint that we can repurpose.

Now most of IO PORTD is free to use. I used one external interrupt pin for the trigger input. This makes it fast and easy to step the sequencer in response to an external clock/trigger. This leave plenty of pins for the DAC (MAX528). It gets its own clock and chip select lines, but it shares the data line with the LED shift register since it's clocked separately.

This is what the schematic looks like after the modifications:

Modified Nanokontrol
This setup works, but the CV output only spans about 0-4V. To broaden this, the DAC can operate on +12V while still responding to TTL level control. It just needs the supply rail and reference voltages changed to 12V. For convenience sake, I also added a 5V regulator. This makes it easy to run the entire setup off of 12V.

MAX528 12V configuration
Now all of the hardware modifications are done. It's time to write some code. The only trickiness comes from interfacing the multiplexed IO. Here is an overview of how to read/write them:

Read Buttons:
  1. Pull PC0-3 low one at a time to enable one column
  2. Pull PC4 low to enable buffer
  3. Read PINB for button statuses (low = pressed)
  4. Repeat steps 1-3 pulling each column low

Read Pots:
  1. Set PA0-2 to select pot from Mux
  2. Read Mux on PA4 and PA6
  3. Read single pots on PA5 and PA7
  4. Repeat steps 1-3 selecting each set of pots

Write LEDs:
  1. Set PC7 high to disable LED output
  2. Write first bit to PD7 (low to turn on)
  3. Set PA3 high, then low to clock in bit
  4. Repeat steps 1&2 for all 8 bits
  5. Set PC5-7 to select column and enable LED output
  6. Delay to allow LEDs to shine
  7. Repeat steps 1-6 selecting each column

The code and schematics can be found on my github here. The code is pretty barebones and simple. It just serves to demonstrate interfacing the Nanokontrol hardware. There are some obvious upgrade and features that can be added, so this is just a starting point.

Wednesday, September 13, 2017

Novation Bass Station Schematic

It seems that no one has a schematic of the original Bass Station, so I drew one up. This is from the keyboard version with board markings "Novation Bass Station SM, Issue 4, 1995".

DCO

At the beginning of the signal chain is the DCO. There are two identical DCOs, so we'll just look at one I've dubbed "OSCA".

DCO

At the top is an exponential current source that charges capacitor C10/2. It's built around a transistor pair marked "FMA1". Based on that marking I believe this is the correct datasheet.

At the bottom left is the sync pulse generator. When a pulse or square wave is fed into the "OSCA_SYNC" net a short pulse is output at pin 4 on U20B. The width of this pulse is determined by the RC network formed by R29 and C9. Together they cause a small delay between pins 5 and 6 changing logical state. While these inputs are unequal the output will be high.

This sync pulse enables transistor Q2 to sink the charge stored in C10/2 thereby "resetting" it to VSS. The capacitor is then able to charge back up via the exponential current source. This cycle results in a sawtooth wave that is present on pin 5 of U18B.

U18B serves as a buffer for the sawtooth, but can also be switched to generate a squarewave. Nets OSCA_WF_SW and OSCA can be connected or disconnected via multiplexer U12. If connected the opamp is configured as a noninverting amplifier outputting the sawtooth. If unconnected the opamp is configured as a comparator, comparing the pulse width CV, OSCA_PWM_CV, on pin 6 and the sawtooth on pin 5. This results in a PWM squarewave as pictured below.


Multiplexer
PWM CV

Mixer

Next in the chain is the mixer. The mixer is made of two simple VCAs, one for each oscillator. Each VCA works off of a single linear CV. The mixers serves only to change the relative volume of the oscillators, not to apply the volume envelope.
Oscillator Mixer

VCF

After the mixer is the filter. It's closely related to the OSCar filter that is, in turn, based off of the Wasp filter. It should be noted that the inverting stage present in the OSCar has been removed from the Bass Station. This stage allowed the filter to be switched into a high-pass mode. Without it, the Bass Station is stuck in lowpass mode.

Bass Station VCF
OSCar VCF
I find it interesting that the resonance is under CV control, but cannot be modulated. It does respond to MIDI though.

VCA

Last in the chain is the main VCA. It's another simple, one-OTA VCA. Unlike the mixer VCAs it includes an exponential current source and responds to modulation from one of the envelopes. It also has a trimmer to adjust the offset voltage.
VCA

CV Header

The final thing of note is an unlabeled header. It breaks out most of the internal CV and audio outputs. Almost all of them tap directly after a buffer and, with the addition of a 1K resistor, are safe to connect to other devices.

Unfortunately none of them are really suited to take a signal as input. Nearly every signal would have to be disconnected from its destination and fed through a summing-amp instead. With this summing-amp an external CV signal could then be mixed in with the existing CV.
CV Header

Full Schematic

Here is the majority of the analog section of the Bass Station. I've omitted the dull CV multiplexer and buffers.



Bass Station Schematic




Thursday, December 22, 2016

TR-606 Sync and Run/Stop Repair

So, I got a 606 with sync and start/stop issues. It would always be in play mode, but the "RUN" LED wouldn't turn on. Neither the "RUN" button nor the DIN sync in/out would do anything.

Looking at the schematic, there's a flip-flop latch (IC2b) that seems to hold the play/paused status. When probed, no surprise, its output never changed. Working backward, the schmitt inverter that clocks it, never changes its output either. Back one more step and Q1, that buffers/inverts the run/stop input jack, doesn't change its output by much either.




Q1 is outputting a max of 1.3V, not enough to register a change on the schmitt. Time to try replacing it. The part reads "603 31F", conflicting with the schematic. I think it's actually a 2SC2603 as used in the Boss DR110, so I used one of those. The LED now works!

It's still stuck in play mode though. Looking at the schematic more, I realise the flip-flop doesn't directly tell the CPU if we're in play mode or not. It goes through Q4, SW1, Q5, IC3 and some passives. Q4 and SW1 seem ok because they're part of the path to the now working LED. So, Q5 was the first candidate. Turns out it had the same low-output problem. Slap in another new transistor and everything works!

Both of these transistors are directly connected to input jacks, so I suspect some external voltage killed 'em. These are probably prime candidates for replacement in any unit that has similar problems.


Sunday, September 11, 2016

Pearl DRUM-X Schematic

Pearl's DRUM-X is a somewhat overlooked, five voice, analog drum synthesizer. It's intended to be connected to drum pads, similar to the old Simmons SDS line.

I'm generally interested in analog drums, so I wanted to try understanding the design. Unfortunately, there doesn't seem to be a copy of the schematic anywhere. So, I took some photos of the board and pieced together a schematic. The five voices are nearly identical, so only redrew one. Here it is:



To give a general summary, each voice has 3 VCOs, 1 Lowpass VCF, 2 Envelope generators and 5 VCAs

If you compare schematics, it looks like it evolved out of the Syncussion. The strange transistor-pair and CMOS inverter clusters have been (mostly) replaced with more normal OTAs. Some portions of the schematics are still nearly identical. The envelope generator and final VCA for example.

Another part of the evolution is the presence of CMOS bilateral switches. When switched at a high frequency, they act as duty-cycle controlled resistors. If switched by a VCO with voltage controlled duty-cycle, they act as voltage controlled resistors.
There are two 4016s per voice, used to voltage control the various VCO pitches and filter cut. Strangely, they are run on a +5V rail, while the rest of the system runs on ±8V.


VCOs

There are three identical, but differently tuned VCOs. One is the regular, fundamental tone of the drum. Two serve to generate the "overtone" signal, a somewhat atonal sound that can be mixed with the fundamental.

The VCOs are a pretty standard 4069 square/triangle oscillator design. In this case, only the triangle output is used. Most designs include a potentiometer for pitch adjustment. These instead use a 4016 switch to implement voltage control. They cannot be tuned separately due to sharing the same CV signal.


VCAs

All but the main VCA use the same LM13700 design. It's the bare minimum, leaving out the buffer and bias diodes. Here it is compared to the example from the datasheet:



The transistor pairs driving them are more interesting. I've only ever seen them in hand clap circuits. They form a differential pair, but are biased to be an exponential current source.



The transistor pairs driving the "Attack VCA" and "Over-T VCA" (pairs T1 and T4) are also acting as VCAs themselves. They're multiplying the CV at the base with the Envelope CV coming in the emitter. This allows voltage control over the volume without changing the envelope.

The pairs driving the "VCO/Noise Bal" are opposites of each other. That is to say, one pair is inverting and the other is non-inverting. This lets one CV signal mix the VCO and Noise signals relative to each other.

Over Tone VCA

This VCAs serves to mix out the over tone signal based on the main envelope. This gives more over tone signal at the start of the sound and less at the tail.

Attack VCA

This VCA lets in a quick burst of noise to simulate a real drum transient.

Main VCA

The main VCA is a differential pair + current source. It uses a variation on an exponential converter to multiply the volume CV with the main envelope and drive the main VCA.

Envelope Generator

This is a decay-only envelope generator. C20 is the core of it. It's charged by a trigger through T5 and drained by Q2.

Transistor pair Q2 and Op-Amp IC6B also look like a variation on an exponential convertor. They serve as a current sink to voltage control the draining of C20(decay).

T6, C22 and R55 form a second, simpler envelope generator. It works the same way, minus voltage control.

VCF

There is only one VCF per voice. The entire mix is passed through this filter before hitting the main VCA.

It's a standard Sallen-Key low-pass filter. The resistive elements are realised with more 4016 switches. IC15B biases it to a virtual ground sitting at +2.5V. This is so the signal falls within the 4016's supply rails.

4016 CV

As I've said, the 4016 switches need to be given a duty-cycle (PWM) signal to change their resistance. This is accomplished by generating a sawtooth wave (labeled PWM_4016) and comparing it to a CV signal.

For example, the filter CV (FLT_CV) is fed into buffer IC8C, passively mixed with the main envelope and biased toward the positive rail. This signal, along with our sawtooth are fed into comparator IC4B and output to the 4016.

When the CV signal is higher than the sawtooth, the output is high. When the CV is lower than the sawtooth, the output is low. This page demonstrates it nicely with this image:

The result is a pulse-width modulated wave that reflects the incoming CV.

CV Mux

The control logic (not pictured) generates CV signals and multiplexes them over one connection: MUX_CV. The CV's destination is defined by signals 4051_A, B and C.

The CV Mux circuit de-multiplexes the CV signals from the control logic. It select the output that corresponds to the 4051 signals and connects it to the incoming CV signal. This charges a capacitor at the output. Once the multiplexer moves on to the next output the previous output goes hi-Z. This prevents the multiplexer from draining the capacitor and allows the capacitor to retain its voltage.

In this way, the multiplexer is also a multi-output sample and hold, grabbing voltages and holding onto them.


Noise

The noise circuit is part of the control logic, so is not pictured with the rest. It's built around a reverse biased 2SC1815 NPN transistor, similar to the 808's. It's lowpass filtered before being sent to the separate voices.


Odds and Ends

There are some unconnected and strangely arranged components. I'm guessing these are utilised in the other voice configurations.

The most obvious one is IC13 (4016). It has two switches connect to the attack VCA's output and not much else. They look like the start of a sallen key high-pass filter, but there's no op-amp connected to them.

Here is a block diagram of one voice:


The full schematic images and eagle files are on my github here.

Monday, July 4, 2016

Resurrecting "C Programming for MIDI"

I've been playing with a DOS computer that I recently added to my studio. It's pretty limited, but it still speaks MIDI.

Finding old software for it can be difficult, but programming books are still floating out there. Enter "C Programming for MIDI". It details an Alpha Juno patch editor/librarian that uses an MPU-401 interface.

I've tried to find the original files or a copy of the floppy, but they're nowhere to be found. So, I had to copy the program out of the book.

The book has a number of mistakes: typos, wrong variable names, missing values/functions, etc. I fixed enough typos, and added few enough, that it compiles and seems to run correctly.


The source and binary are on github here.

It's almost useless today and was fairly basic in its day, but I think it's a decent starting point for making a DOS MIDI program.

Saturday, June 18, 2016

CZ 1000 Noise Fix (DAC Adjustment)

So I picked up an as-is CZ 1000. It started off terribly distorted, but after jumping a few corroded traces it started to sound more normal. Still not right though. Some presets had an odd harshness and some a "zipper" sound as they decayed.

It might not come across on soundcloud, but here's an example.



After some searching I found several people discussing similar problems. Each time the solution was to adjust the DAC's offset voltage. The schematics can be found easily and they depict the DAC portion like this:



VR2 is the obvious candidate, but turning it had no effect. I started looking at the board and it turns out that there is another, less visible trim pot (VR4) up near the MIDI jacks. I can't even find it in the schematics, but once you get it in range (12 o'clock in my case), VR2 starts being helpful.

If VR2 is too far clockwise, you get more of the aliased "zipper" sound and too far counter-clockwise you get a more hissy/breathy sound. I can't find a specified voltage nor a test point for calibration, but I found it easy enough to calibrate by ear.

I had to take the CZ completely apart for other repairs. The screen had missing rows, but almost any HD44780 based LCD works as a replacement. Some buttons were unresponsive, but contact cleaner made them operable.
While I had it disassembled I took some photos of the trimmer locations. They're on the main board appropriately marked "M4152-MAIN".
To be clear, you only need to remove the bottom of the case to adjust things. Casio was nice enough to provide some holes so you can access the trimmers from the underside of the board.