Monday, September 25, 2017

Xonik Waveshaper - breadboarded version

I finished breadboarding the waveshaper last night. Here is the schematics (not bug checked though) and a few photos of the output waveforms from the sub oscillator. The saw wave looks like crap but that is because I used a function generator without saw output as the source of the original wave (using a triangle wave with a very unbalanced center in place of the saw). It will look a great deal better with a real saw wave input.

Full waveshaper circuit. Note that the sub saw output has the same polarity as the input. It is also possible to get an inverted output.
Square wave (top) and square wave sub oscillator

Pulse wave and square wave sub oscillator

Saw wave and saw wave sub oscillator. Note that the spikes are artifacts created by the not-completely-a-saw-wave input (the vertical lines in the input wave are not fully vertical). This will disappear when using a real saw wave as input.

1 oct down and 2 oct down saw waves.





Sunday, September 24, 2017

Coming soon: the Xonik Waveshaper


On my breadboard today: The Xonik Waveshaper - insert a non-centered 0-10V saw wave from the Xonik DCO and you'll get the following (centered) waves:

- Saw
- Inverted saw
- Triangle
- Sine
- Pulse/square with VC-PWM and VC amplitude (no VCA needed)
- Sub oscillator with square -1oct, square -2 oct, saw -1 oct and saw -2 oct.

The current triangle/sine circuit is based on the Jupiter 8 and Yusynth modular, the sub oscillator is a simplified version of the Xonik Sub oscillator. The pulse circuit amplitude control idea (but not circuit) is lifted from the Juno.


Friday, September 22, 2017

Alesis Andromeda A6

While searching for noise samples to compare my breadboarded noise against, I had a look at the Andromeda A6 circuit diagram. It is fun to study what the big guys think are good designs and I've picked up a few ideas already. I will probably post more as I go anlong.

My first findings

Separate center reference voltage

The A6 seems to use a reference voltage, PMID/PDMID in place of ground whenever ground would be expected on any of the inputs of an opamp. My guess is that PMID/PDMID means Power Middle/Power Digital Middle or something like that, as ground in these places would normally be the center of the wave.

The PxMID originates with a 5V voltage regulator. I've calculated PxMID to be 2.05V. The A6 uses +/- 12V internally, with an offset of +2V this means that any positive amplitude is reduced to +10V minus any opamp limitations.

The PMID line is littered with bypass caps. I assume that by using a separate, well regulated reference voltage, one may get rid of some noise from other components, and also that its hard to get 0V from a regulator, thats why it's 2.05V (?).

Noise


The A6 has most of its analog circuitry inside a bunch of ASICs. The noise section however, is discrete. Only one noise source is used for all voices and it supplies white, pink and red noise.

The noise source seems fairly standard, it is based around a zener diode (which is the same technique as using a transistor without connecting the collector). The pink noise filter seems to be a true pink noise approximation (3dB/oct) as it uses a multiple filter sections in the same fashion as Elliot Sound Products. It is not entirely similar as it has the filter sections connected to between the positive input and ground, whereas the Elliot version have them in the feedback loop, but I assume this is only because the A6 one is a non-inverting filter and the Elliot an inverting filter. All noise outputs are connected to an inverting amp which also adds the PMID reference and acts as a low pass filter with cutoff at 493Hz.

Analog pots


All analog pots (that are read digitally) have 10nF caps across them - I assume this is to stabilize values or prevent that noise from one pot falsely triggers another one. 8 5kOhm pots are multiplexed through one CD4051 mux.

FX bus


The FX send has both positive and negative sends that are inverted versions of each other. Not sure if this means that it uses a balanced bus but it could be likely. Further investigation necessary :-D

Master volume


Master volume is a physical pot connected directly in the audio path, no VCA is used. No master volume saving is possible which makes sense.

Monday, September 11, 2017

Noise research

I intend for the XM8 to have noise as a waveform for both oscillators, and also to be able to switch between various 'colors' of noise. At the very least, white and pink noise should be present, possibly even red. But what exactly does this mean?

White noise is noise where the signal has equal intensity at all frequencies. In the synth world, it is commonly generated by using a transistor with one leg disconnected.

Pink noise is a signal where each octave carries the same amount of noise energy. But how is this achieved in practice?

According to Wikipedia, pink noise falls off at 3dB per octave. To get pink noise one filters white noise through a filter with 3dB/octave drop off.

Problem is, most basic active low pass filter has a 6dB drop off (which would actually give us red noise if used). So how may this be solved?

This page shows one method - use multiple filter sections to approximate a 3dB filter with a flat response. The more sections the better, but even four sections is pretty good for a 20-20 000kHz signal.

As a side note - the same page mentions NP capacitors, bipolar electrolytics, and says that film capacitors cannot replace them - this is interesting information as I've stumbled across NP in other circuits.

A similar approach seems to be in use on this page, which is a modification for the Sequential Circuits Pro One. It uses fewer sections (two?) and has an additional cap (C3).

But how does one calculate the frequency of each section?

In a normal active low pass filter (6dB), the frequency is 1/(2*PI*R2*C) and the gain is -R2/R1 where R2 is the resistor in the feedback loop.

It seems that the same holds true for each section in the multi section filter. For example:

1/6.28*100nF*1MOhm) = 1.59Hz
1/6.28*33nF*330kOhm) = 14.6Hz
...
which matches the frequencies next to the sections.

This would mean that the lower section of the Pro one filter is 338.8Hz, but the rest - the 270k and 3.3n combined gives us a 268.1Hz filter which seems a bit strange - however, I'm not sure this is the way to calculate the combined frequencies.

As for the gain, if the same formula as before is correct, it would be -270k/15k = -18.

The pink noise filter in the pro one matches the inverting shelving low pass filter found on this page. However, the only formula, found in the gif, is missing the lone cap in the feedback circuit.

Funny enough, the same filter topology is found in the BOSS CE-2 pedal's de-emphasis filter :). The de-emphasis filter reduces treble, which of course means it is a low pass filter of sorts. :)

On that page, the circuit is fully explained. When calculating the frequencies, the lone cap is omitted. It says that it is an LP of some sort but it is not essential when calculating the shelving frequencies.

The filter right after the transistor in the pro one circuit is a simple non-inverting HP filter. C2 and U1b forms a shelving HP filter like this.

The first filter in the Ray Wilson Noise Cornucopia is a simplified non-inverting amplifier filter as shown here and here. Its gain is 1 + R10/R9 (=48), the frequency is 1/(2*PI*R10*C4), or approx 34kHz.

ERROR: det er et lowpass non inverting shelving filter.

Saturday, September 9, 2017

Wiring the Xonik PSU3 v1.0

The Xonik PSU3 v1.0 is a copy of the Ken Stone CGS66 Rev 1.1.

In addition to the dual voltage of the CGS66, it has a third part meant for digital/logic voltage.

The input to the third channel may either be a dual secondary/centre-tap transformer or a single secondary. If using a dual secondary, do NOT connect D11 and D12.

Using two transformers - connect earth to ground/0V on both connectors and mount D11 and D12

Using one transformer (or two centre-tap transformers): do NOT mount D11 and D12.
NB: Remember to fit suitable fuses and switches on the primary sides of the transformers.

The colors on the dual secondary transformer are the ones used on my Noratel TA050/15:



PS: The Xonik PSU3 has the main smoothing capacitors mounted close to the heat sinks. If the heat sinks get hot, the lifespan of the caps may be reduced.

On transformers and rectifiers

Everywhere that you find information about transformers, it says "make sure that you know what you do, these things can kill you".

Well, I thought I knew, but I still managed to mess up. I didn't get killed, but I learned a bit about transformers and rectifiers.


Let me explain.

There are two basic ways of turning an AC voltage into a DC voltage. One uses a half wave rectifier, the second a full wave rectifier.

The difference is that the half way rectifier only uses the positive part of the voltage swing, whereas the full wave rectifier uses both parts by magically reflecting the negative part. The full wave rectifier requires a few extra diodes but gives a smoother DC voltage (or at least one that requires a smaller smoothing capacitor and is more efficient).

Then there are two basic transformer configurations - single and dual secondary. When the two outputs of the secondary are of equal voltage, and the "bottom" of one is connected to the "top" of the next, we call it a centre-tap transformer. This kind of transformer is often used if you want a dual voltage output, for example +15V and -15V for audio circuits.

Here is how the different transformers may be connected for a single output voltage.

First off, a single secondary, half wave rectified configuration:

Here, the lower pin of the secondary is connected to ground, and the top is connected to a smoothing cap through a power diode.


Then we have the single secondary, full wave rectified configuration:

Here, none of the secondary output pins are connected to ground. Instead, they are connected to the top and bottom of a diode bridge rectifier. Then, one of the other rectifier junctions is connected to the smoothing cap, and the last one is connected to ground.


Now, if we have a centre-tap transformer, we get to use a little trick:

Instead of using four diodes, we get away with two. Ground is connected to the centre tap.


So what if we want a dual (positive and negative) output from a centre-tap transformer? Well, just duplicate the circuit, but turn the diodes the other way around for the second half.

This looks suspiciously like the full wave rectifier for the single secondary transformer, but there is a crucial difference!

Instead of connecting the last pole of the diode bridge to ground, it is used as the point where we tap the negative voltage/connect the smoothing cap for the negative voltage.

This may seem obvious, but when I tried to use a centre-tap transformer for a single output voltage, I didn't think this part trough. I left the four diodes in and connected both the last pole of the diode bridge AND the centre-tap to ground. This immediately blew the input fuses (luckily I was using fuses) and it is easy to see why: With the diodes in place there is a direct short (well, through the diodes anyway) between the negative half wave and ground, which drew a large current.


As for my circuit design - the fact that I both have a three pin input with one pin connected to ground, and room for four diodes in the bridge rectifier, means I can use both a centre-tap and single secondary transformer - as long as I do not connect the diodes when connecting the centre tap.

Friday, September 8, 2017

DCO: Slow crystal startup

I have problems with the crystal startup on the DCO. For some reason the crystal doesn't start up properly, and the Fail-Safe Clock Monitor kicks in and starts the internal oscillator, which runs at 16MHz (The external crystal runs at 32MHz). Switching over to the external crystal again after startup works fine.

Someone on the mikroe forum suggested that this was due to a too high stray capacitance on the breadboard. Today I read up on crystals and capacitors, and tested a few combinations to see if I could get it to boot up at the right speed.

First of all, in the datasheet of the crystals, the parameter C load tells what capacitance to use. For my crystals this is 18pF.

I always thought this meant that each of the two caps should be 18pF. This is definitely incorrect. Instead, the total capacitance should be 18pF. But what does this mean?

First of all, the two caps connected from the crystal to ground are in reality two caps in series between the two legs of the crystal. Two equal caps in series have a equivalent capacitance of half the capacitance of one of them. So running two 18pF caps in parallel would yield an equivalent capacitance of 9pF.

But in addition to this, the crystal sees an additional capacitance CS. CS is the stray capacitance of the circuit and the input/output capacitance of the inverter or microprocessor chip at the Crystal 1 (C1) and Crystal 2 (C2) pins, plus any parasitic capacitances (here). This is normally around 5pF but may be higher.

The total capacitance C load should then be CS + C1 * C2 / (C1 * C2), which means that C1 * C2 / (C1 * C2) = C load - CS.

C1 * C2 / (C1 * C2), as mentioned, will be half of C1 if C1 = C2.

For my crystal then, C1/2 = 18pF - 5pF = 13pF, which means C1 should be 26pF (or 27pF, which is a standard value).



So, would changing from 18pF to 27pF on the breadboard change anything?

I tried the following combinations with the following results (half frequency means the MCU fell back to the internal oscillator):

18pF: half frequency
22pF: half frequency
33pF: half frequency
36pF (two 18pF in parallel for each side): half frequency
9pF (two 18pF in series for each side): CORRECT frequency!

This is strange and interesting. At 9pF the serial equivalent is 4.5pF (leaving "room" for CS up to 12.5pF). At 18pF the serial equivalent is 9pF (with CS up to 9pF). If my reasoning is correct, the stray capacitance is more than 9pF. It does not sound implausible. I will have to retest this once I get a PCB made, in theory at least 27pF caps should be the ones to use.