Monday, July 29, 2024

New PCBs from JLCPCB - Voice card ++

All new cards. Top left: Bus mixer, VCO and Juno filter. Top right: Moog and Jupiter filter. Center left: Voice mainboard. Center right: 2X waveshaper, FX module and bus mixer angled connector. Bottom: CV board
 
Everything mounted together. Looks a bit Frankenstein-ish but it fits!

Even the Juno filter, sandwiched between the voice card and the Moog/JP6 filter fits. I wonder how hot it will get though.

A true beauty!


Assembling voice card and other boards

The day after we left for our summer vacation, the voice card and associated cards arrived from JLCPCB.

I won't test the cards for a while but I DID try mounting everything. It fits beautifully. I had to adjust the spacer/standoffs a bit, here are my new measurements:

Red = expected spacer heights
Blue = actual spacer heights

My conclusion is thus:

Left most (waveshaper) spacer: 11mm + 2 x 0.3mm washer
Left bus mixer spacer: 28mm + 3 x 0.5mm washer (or 29 + 0.5, but I ordered 28mm and it works fine)
Right bus mixer spacer: Not needed, but IF needed, combine a 15mm with 3 x 0.5mm washer (or 16mm + 0.5mm washer) on top.
Top filter spacer: 4mm + 0.5mm washer
Bottom filter spacer: 5mm + 0.3mm washer


Output module - thoughts on architecture

 It's summer time again, and a few days away from home really gets my creativity going!

This time I've started looking at the output module for the synth. I have several goals for the output:

  • Design should support 16 voices
  • Stereo, with per-voice panning
  • Individual outputs per voice
  • Multiple (2 or more) stereo FX pipelines
  • Voice chaining through the voice's ext input, with summing of multiple voices to each input and return to same voice

I also want the following to make a future vocoder feature possible

  • Each voice's SVF can be used as a carrier modulation channel
  • Selectable vocoder carrier: Voice 1 Juno LPF, Sum of multiple voices, external input, noise (for voiced/unvoiced)
  • Voiced/unvoiced selector that effects return to voice


Outputs

We can use two 16 x 16 crosspoint switches (left and right) to select one of 16 outputs for each of the 16 voices. This will support both individual outs and grouping of multiple voices into a single output group. For example channel 1 to 4 can be output 1, 5 to 16 as output 2 etc. We would also need a similar setup to send the effect outputs to the right output groups. PS: Unless we have the same number of FX pipelines as we have voices, it won't be possible to have per-voice effects at the output.

Thought: Do we need per-voice group output amps or will it be enough to use the amps on each voice card?

Effect pipelines

I've designed each voice card with two FX outputs. I intended this to be one output per FX pipeline, but I'm reconsidering using them as left and right outputs instead. I COULD have just tapped the main L/R voicecard outputs, but this will let us pan the FX and main outputs separately - not sure if it is anything worth doing but since the outputs and VCAs are already there it might be a cool feature. 

As a start, each pipeline should consist of a chorus module and a DSP based multieffects module. These will be chained, with the chorus feeding into the DSP. Both chorus and DSP should be possible to disable/bypass. As a side note, the juno chorus always mixes its output with the dry output. In my pipeline the dry signal is completely separate, so  if we include the original signal in the chorus output, the base signal will be twice as high as all other delayed signals. If we REMOVE the original, we need to consider what should happen when chaining, will the original be included in the DSP input??

Either chorus is always added to the input before the fx dsp (but with mute possibility), which adds the original dry signal to the mix - or the chorus replaces the dry signal before the FX, but that means we have to re-add the dry signal later. Not sure it really matters but lets test. Also, the input to FX DSP at the bottom is missing.

At the moment I have two options for the DSP. The Spin Semiconductor FV-1 or the Daisy seed. The FV-1 has a lot of ready-made effects and may be compatible with cards from Tiptop audio. It is however harder to control as it doesn't have any digital inputs and is limited to three analog CVs. It is also limited to a fixed set of effects (8?) but that can be worked around.

The Daisy is a more modern platform with a much higher-performing DSP and DACs. I think it can be digitally controlled as well as controlled using CVs. 

It would be a good idea to see if a future proof FX pipeline bus can be made - using a fixed number of CVs and I2C/SPI bus inputs. 

Vocoding

Now, this is something I promised myself not to work too much on, but it would be stupid not to include support for it, so here goes.

Each voice card has a state variable filter that can be used to create separate bands from the synth/carrier signal by feeding it into the external audio input of each voice. We can then (obviously) use an external synth as the carrier.

A vocoder switches between a carrier signal (normally a harmonics rich synth sound) and a noise source to make voiced/unvoiced sounds, so we need to be able to select between these. By adding an input selector mux to the external input signal, this can select between external input and noise.

It would be cool to be able to use the synth engine of the XM8 itself for the synth part. I previously considered using voice 1's LPF output as the synth/carrier for all bands. This would let us use the SVF of voice 1 for vocoding as well, giving us up to 16 bands.

I've since reconsidered this, perhaps it would be cool to be able to sum multiple of the voices to get a more harmonic-rich signal? By summing multiple voices and sending them to the external input of every other voice card, we can get a compromise between the number of voice cards used as vocoder bands and voice cards used for generating the carrier. For example, voice 1 to 3 can generate the carrier, and the remaining 13 channels can be vocoder bands.

We do get an issue though, as we need to change the center frequencies of each vocoder band when we reduce the number of bands. This means that instead of having fixed filter frequencies in the vocoder analyzis module, we need voltage controlled ones. These can use a subset of the JP6 SVF, requiring two LM13700 per band.

The first and last bands (LPF and HPF respectively) may stay the same but their CVs must be routed to different voices (at least one of them - we can let the top band always map to the last voice card).

External input select vs voiced/unvoiced

Given the following four channel mux selection truth table:

A B = SRC

---------

0 0 = external input

0 1 = Voice card 1 juno LPF

1 0 = Voice 1 return channel

1 1 = Vocoder noise source.


If we OR the selector signals A and B from the MCU with the V/U signal from the vocoder analyzis module, the V/U will override the MCU, turning on the noise whenever needed.


Return routing

We should make it possible to return the signal from any voicecard to itself or any other voice card. It should also be possible to sum and route multiple voices to the same target. All this can be achieved with a 16 x 16 crosspoint switch. The switching point should be at the summing point of an op amp at each output. This will, however, mean that an input may be routed to ONE output at a time. We can still route multiple inputs to the same output though. Also, we may have to add a resistor to ground at the summing point, to be used when no inputs are connected to that channel?



It must then be possible to select between (global) external in and the per-voicecard return as inputs to the voice card's external input.

Some uses of this would be:

  • Overdrive/feedback - by returning the signal to the same voice card (in phase!) we can make up for the lack of feedback-based overdrive in the filter module. This is how the minimoog does it. It may still lock up filtes though, so it must be properly tested.
  • Phasing - we can sum a set of voices and then chain the output through the rest of the voices' SVF filters, which each one having a different notch frequency set. NB: 
  • Vocoding - return routing lets us sum multiple voices to use as the carrier signal. This requires a special case for the first voice where the routing output is sent to the external input selector to be used as external input for all the other voices


A suggested output block schema


EDIT:

As the ETI vocoder has 14 bands, a simplification would be to allow two of the 16 XM8 voices to generate the carrier, and use the 14 others for vocoding. By doing this, and not allowing a varying number of vocoder bands, we greatly simplify the analysis module - it can have fixed frequency filters and fixed output routing. Two voices for carrier will still mean 6 oscillators which should be plenty for making a complex signal.

We could then also leave out the LPF input to the ext in mux, making the voiced/unvoiced switching much simpler (no need for or-gates). 
 
We should even tap the carrier signal before the return mux to make the routing logic simpler. We need a way to disable output of the two carrier voices from the output. Since the Voice out signal is pre-output VCAs we can tap this and just turn down the voice output VCAs.

Friday, July 5, 2024

Fatar TP9/S in Fusion 360

I've created a 5 octave fatar keybed in fusion 360 to be able to test collisions and to position screw holes correctly. The drawing is based on the Fatar technical drawing so it should be good enough for production






Tuesday, June 25, 2024

All things voice card related ordered

 ...well, almost - the digital parts remain.

But still - tonight I placed a huge order with JLCPCB, 5 copies of every card needed for a voice:

VCO

Pre-filter FX

Bus mixer

Bus mixer angled connector

Juno filter

Moog + JP6-filter

Waveshapers

Mainboard


Ordering 5 instead of just 2 copies is kind of a gamble as I don't know if everything works yet. But the cost (excluding shipping) is only 50% more for five than for 2. I guess I just have to wait and see if the gamble pays off. 

I have yet to sign off on everything, but I expect that part to go smoothly. So while we wait, here are some cool board shots

3D model

I've used Fusion 360 to check that everything fits together and that we have the clearances between cards that we need. 

I COULD have converted the eagle designs into something that Fusion can read, but this is the next best thing:

All the cards making up the voice. To the left is the (yet to come) digital board.


The narrow board closest to the camera is the bus board. To the left is a combined Moog/JP6 board and to the right a dual waveshaper board. Top left is the bit crusher (the only PCB I am not redoing!), below it is the FX board. Below the Waveshapers is the VCO


Under the Moog/JP6 filter board is the Juno filter. I really wonder if this will work out, the spacing is very narrow and it may get hot in there. Also note the vertically mounted board connecting the bus mixer to the mainboard.

On to the PCBs

A panelized board containing two waveshapers, the FX board (ring mod, distortion and noise) plus a special board that will make it possible to mount the bus mixer board parallel to the mainboard but 3cm away from it


Another panelized board, this time it's the VCO, Juno filter and bus mixer boards


The third board is the dual filter PCB, containing the moog-style ladder filter and the extended JP6 state variable filter.


The CV board - made on a four layer card to minimise noise (hopefully). This one has 56 output CVs!


Finally, the mainboard. I've spent six months or close to 200 hours on routing this, I REALLY hope it works.






Tuesday, June 18, 2024

DAC8565 and 16ch sample and hold

I intend to use the DAC8565 quad 16 bit DAC for the XM8, I've even bought 20 of them on breakout board and written a test - but for some reason, I haven't written anything about it.

Right now I'm making the final CV mux board, so I had to retest my program. For some reason though, it doesn't complie anymore?

In my code I'm using SPI.send24 as well as SPI.hasInterruptFlagSet, SPI.clearInterruptFlag and SPI.enableInterrupt. 

I can't find ANYTHING about send24 anywhere, and very little about the others. But I found another SPI project locally, SPI-master, that has the send24 code. It says it is from https://www.pjrc.com/teensy/td_libs_SPI.html, but going there leads nowhere. Not sure what has happened, I feel completely gaslit!

Anyway - I copied the SPI-master into my project to get send24. As for the interrupt stuff, it's not really necessary as it only makes it possible to listen to send completes to trigger Load dac - and this can be done in software without penalty anyway, by adding it to the setting of the last DAC channel.


Ok, so how do we use the DAC8565.

The following pin config works:

pin 1,2, 7 and 8 are the four output channels

pin 3, Vref H, is the high reference voltage. It outputs the internal reference voltage (2.5V) if the internal voltage reference is used, and should be connected to ground through a 150nF cap. If using an external voltage reference instead, it can have an additional 4.8uF (!) cap to ground for reduced noise.

It is important to note that the max output when using the internal reference is 2.5V. To get a 5V output, we need to use an external 5V reference.

It is also important to note that the external reference CANNOT be higher than the Analog voltage AVDD, or the output will be clipped. 

Pin 4, AVdd, power for the analog parts. It may be 3v3 if using the internal 2.5V reference as output, or 5V if using an external reference.

Pin 5, Vref L, the low reference voltage. Usually connected to GND

Pin 6, GND

Pin 9: !Sync. = SPI Chip select

Pin 10: Serial clock

Pin 11: D in, Serial data. Connect to master MOSI

Pin 12, IOVdd. This should match the logic level of the MCU, which for the Teensy is 3v3. However, I had some success setting this to 5V even with 3v3 output, but I get glitches when running the SPI bus at 50MHz. Also, it says in the spec sheet that 3v3 logic has a max bus speed of 25MHz (I have successfully used 50MHz on the current breadboarded circuit, and 46MHz earlier, but IOVdd must be 3v3.

I will try using 5V logic but that requires a high speed level shifter between the Teensy and the DAC.

Pin 13: !RST - when set to 0, all DAC outputs are reset to the value of RSTSEL

Pin 14: RSTSEL - reset select. If 0, DACs power up and reset to 0, if 1 they reset to the middle of the reference voltage.

Pin 15: !Enable - "Connects the SPI interface to serial port". This is currently confusing me though connecting it to 0 works fine.

Pin 16: LDAC: Load Dac. Connect to GND and control this through software or connect to MCU


Running a loop with IOVdd at 3v3, AVdd at 5V and using a 5V external reference

50MHz SPI works fine


There is significant noise on the output

The noise is however only while the SPI bus transfers. This may make it bearable even if present in the real circuit, as we can transfer the data and let the signal settle before turning on the output muxes that load the sample and hold caps.

5V IOVdd also works...

Unfortunately, we get glitches at 5V IOVdd

The glitches go away when reverting to 3v3IOVdd


With MUX

I spent a long time trying to get my 16ch CV buffer to work with the DAC. Turns out I had mislabeled pin D0, it should be next to D1, not next to GND. 

Anyway, once I got that out of the way, the 16ch board works fine:

DAC Output through opamp buffer and 470R to mux. Works great!

Output is very stable. DAC slightly overshoots when switching (meastured after the buffer I think)


I tried various combinations:

5V external reference, 470Ohm resistor directly to DAC

5V external reference, no resistor, DAC directly to mux. DAC has no problem driving the charging

2.5V internal reference, 2x positive gain op amp, 470R input resistor

5V external reference, 470R input, no buffer. Something is very wrong! Not sure exactly what.

Some closeups

Extreme closeup of 2.5V ref through 2x gain and 470R resistor.

Extreme closeup of 5V ref, buffered and 470R resistor. Pretty much the same

Extreme closeup of 5V ref direct from dac without resistor. A tad noisier?

Then some charge times:

Dac output when run as 5V ref direct from DAC without resistor. Rise time is around 5.5uS

5V ref direct from DAC without resistor. Charge time 0 to 5V for CV buffer cap. Around 1.5uS

This is as far as I got, because here I somehow killed the Teensy :-( I would have liked to have the same two checks when running with 2.5V internal reference and 2x gain through 470R. Have to look for a new Teensy

...oh, I found one. Let's go on

Cap charge time through 470R resistor, around 3.4uS

But what if we change to a 220R instead?

Cap charge time through 220R resistor, around 2.2uS

 

That's pretty good. Let's look at the DAC settling time:

Rise time from 0 to 5V, as seen at the output of the buffer after the DAC, is around 2.9uS. The drops in voltage coincides with the charging of the caps and are not present at the DAC output.

All in all, this looks very promising. For my first production version I will use a 2x positive gain buffer with a 220R charging cap.