Tuesday, November 26, 2013

Sub oscillator board finished

Last night I finished the initial version of a sub oscillator PCB. It is based on the circuit in the previous post, but since I had one flip flop to spare I've included a two-octave down square wave as well as a 25/75-duty cycle pulse wave, similar to (and heavily inspired by) the Roland SH-101. The kind of square wave to output is selectable by a three position switch.

The board measures 30 x 100 mm, with 3 mm screw holes 4 mm from all sides, and should fit behind a 6HP panel. Cut-outs have been added near the input, output and switch connectors, to be able to mount the board with the components facing backwards and then route the cables to the front without adding any width to the module. This makes it possible to adjust the saw wave matching trimmer after the PCB has been attached to the panel.

The board has a slight shortcoming related to the pulse output - since the average voltage over one cycle is not 0V, the centering capacitor will not center the wave around 0V but slightly lower. This has no effect on the sound of the output but may lead to unwanted effects/clipping in subsequent modules/when mixing waves. I have still provided the pulse output as an option because it only requires two additional parts and may be useful to someone.

Sunday, November 24, 2013

Updated saw suboscillator

I have been working a lot on the saw divider circuit lately. Last night i finalized a prototype that works for all audible input frequencies. It can also use both saw waves that start high and ramp down and the ones that start low and ramp up, as inputs.

The circuit has two outputs - saw and square wave, and the saw wave has two modes - frequency division and a more exotic one where the frequency is sort of both doubled and divided. Have a look at the pictures later to see what I'm talking about.



The divider works on the same principle as earlier, by shifting half of the saw teeth up and then reducing the amplitude back to +/-5V. However, it now uses fewer parts than my initial prototype and achieves more. Instead of using an offset voltage to center the wave around zero, it uses a capacitor to do the same thing. I've also added input and output buffers to the flip flop, and the rather complex voltage dividers used for the square wave have been replaced with a resistor ladder and an op amp buffer instead. The need for trimmer pots has been reduced to a single one, and all resistors are from the E12 standard values. The need for a RC-network between D and not Q of the flip flop also disappeared once I introduced the buffers.

The input is connected to a switchable inverting/non-inverting op amp buffer. The comparator used to make the initial square wave needs the input saw wave to ramp down to output the correct square wave necessary to generate a saw wave on the output. If your input wave ramps up instead, flip the buffer polarity switch. Running the "wrong" kind of saw wave through the comparator will lead to an interesting, useful and very nicely sounding output, so feel free to try both polarity settings independently of the input wave.

You may also use other input wave types. The output won't be a saw wave, but will have a frequency related to the input frequency, and be within the same amplitude range. Try it out!

In addition to the saw output, a square wave output with +/-4V amplitude is provided. This will work independently of the type of input wave (well, for "normal" waves anyway) and always have close to a 50/50 duty cycle.

The single 100k trimmer pot (I use a 20 turn one, but any multi turn will do) adjusts the matching of the two saw teeth that are combined to make the new half-frequency wave.

Output

These pictures show the various modes in real life. The scale in all pictures is 1 square vertically = 5V.

Saw wave

First, the saw wave output when the input is not inverted:

Input wave

Output wave, half frequency

Input and output shown at the same time

Inverted saw wave input

Then, the saw output when the input has been inverted (the input itself is the same but the invert switch has been flipped):

Input wave
Output wave - notice how it forms a crude saw wave of half the frequency but with the opposite phase as the input wave and made up of four small saw waves. It sounds great.
Input and output shown at the same time
The reason why we get the strange wave is that the square wave used to lift half of the input saw tops has been shifted 1/4th of a cycle, so instead of lifting a whole saw tooth, it lifts half of one and half of the next one.

Square wave

Finally, the square output. As a square wave is already generated to shift the saw up/down, making a square wave output is only a matter of scaling the amplitude to the correct +/-4V range:


Input wave
Output wave
Input and output shown at the same time