Monday, March 29, 2021

From 3.3mm square to D-shaft

I've bought a ton of 10mm button caps in black sandblasted aluminium. They match my larger potentiometer caps perfectly and I want to use them as potentiometer caps. Only problem is, they are meant for 3.3mm square shafts, not D-shafts, so I had to find a way of replacing the insert inside.

I've experimented with various sizes of 3D-printed inserts and this is my best result:

The inner diameter is 6.2mm, the outer is 7.9-7.95.   

7.95 works with press fit, but 6.2 inner and 7.95 outer made the part stick too hard to the shaft.

6.3 was too loose for the plastic shaft but may work on the metal one - however, there we need a section without D as the D-part is much shorter.

I didn't have time to try 6.25.

The insert height is 9.5mm. The inner height of the cap after removing the existing plastic is barely more than this. However, this seems like the perfect height - it leaves a 2mm gap on the prototype, but that prototype is 2mm lower than the button prototype, meaning that it will be a perfect match if the panel is similar to the button prototype.

The turning force necessary for the metal pot with this 10mm cap is actually ok. Quite heavy but a certain quality feel. The plastic shaft on the other hand feels a bit too light, especially when compared to the bigger caps on the metal pot. However, it is comparable to the force necessary on my other gear (Prophet 5, Little phatty) so I need to make a full mockup to try it properly.





I removed theexisting insert by 

- Drilling a 10mm hole in a wood block, then cutting it in half to make a clamp.

- I then put the clamp around a cap and inserted it into a vice to prevent the cap from rotating during drilling

- Then I drilled a progressively larger hole - 5mm, 6.5mm and finally 8mm.



Saturday, March 13, 2021

AS3364 quad linear VCA

Since I want direct control of my VCAs I consider using linear VCAs instead of the exponential quad x2164. 

Alfa Rpar has come out with the AS3364, a quad version of their CEM3360 clone (AS3360). It drops the exponential input in favour of more VCAs in the same package.

One very unfortunate thing about the 336x is that it cannot be run from a +/-15V supply, which is what I intended to run my synth on. Now, I am considering switching to +/-12V anyway since it may save some power, but still.

Anyway, synths from the 80s, like the OB-8, used the CEM3360 with a +15V Vcc rail. As the chip can have a Vcc-Vee = 26V at max, they used Vee = -5V.

What I wanted to find out was how this affected the signal, especially, would the voltage still swing around 0V?


I breadboarded this tonight, and read the datasheet. The chip has a Vref connected to ground via a 100Ohm resistor and a 5nF cap, I presume that is for centering. 

Here is what I figured out:

  • The voltage swings around 0V even when Vcc and Vee do not have the same absolute value.
  • The maximum swing is to within 1.5V of each supply rail, so with a +15V down to -5V the lowest the VCA can go is -3.5V, anything after this is cut off. 
  • The chip can be run at +15V/-9V, so a 18Vp-p signal is still possible.
  • CV range is 0 (-80dB) to 2V (unity gain). Absolute max VC is 2.5, so be careful!

When connecting the output (as configured in the datasheet) directly to my scope, I saw quite a lot of low pass filtering on the output (but later testing showed that this went away when attaching a non inverting buffer).

I then connected the output to the negative input of an opamp, and put the 47k resistor as negative feedback. This got rid of the LP but introduced a lot of ringing/overshoot. This was removed using a 33pF cap. I got an even cleaner square output with a 15pF so I guess I should do a little calculation here.

I do however see that neither the crumar spirit, nor the OB-8 do any kind of filtering here, presumably it's taken care of later (or by using different op amps). The Jupiter-6 uses 22pF/100k feedback. The Prophet 600 uses a 20k resistor to ground plus a non-inverting buffer.


Update: While at it I've tested the following:

Increasing the feedback resistor 

The output is a current that is fed to the negative input of an op amp. Changing the feedback resistor would have the same effect as in a regular inverting amplifier configuration, but there is no input resistor. However, we know that a 47k resistor gives unity gain, so for example doubling to 94k will double the output voltage, adding a 22k will almost give a 1.5x gain etc. I tested this and it's correct.

Using a non-inverting buffer

Using the circuit in the datasheet, and attaching a non-inverting buffer directly afterwards works very well. No need to filter the output it seems. Increasing the resistor from 47k to 47k+22k gives 1.5x gain. BUT - we still can't go below the negative power rail, so the output is clipped at -3.5V (it looks like 4 on the scope though).

CV Linearity

There is very little response for the first 250mV, the rest seems fairly linear.

Top: CV, 0 to 1.5V. Bottom: Response on a 3V constant input. Notice that nothing happens in the beginning, but then the rest is fairly linear (slightly dropping but not too bad).



CV resistor voltage divider

The maximum CV input is 2.5V, and full range is 0-2V. By using a resistor voltage divider at the input we can transform a 5V CV to a 2V CV for example by combining a 33k from CV to CV input and 22k resistor from CV input to GND. This worked nicely. One could also use two equal resistors to get 2.5V which makes slight maximum adjustments possible.

There is no effect on the linearity so using a voltage divider seems perfectly fine.

Other interesting things

The chip doesn't seem to self destruct immediately if CV is > 2.5V (yeah, that happened, chip still works)

My chip seems to give max gain at CV = 1.5V, not 2V. 

Same as above but with 1.8V max CV. Notice how gain maxes out before the CV reaches its peak.


OB-6 CV generation revisited

After getting the closeups of the OB-6 it's time to put together what I've learned so far.

Hardware

1) The DAC used is AD5668, an 8 channel 16bit DAC with built in voltage reference (2.5 x 2 = 5V). The chip used by Sequential is the AD5668-3 that resets to midscale (2.5V). 

2) The multiplexers are TI CD74HCT4051

3) The op amp buffers are most likely TL06x as that's about the only thing found on the voice card

4) There is no DAC output buffering op amp as that is built into the DAC.

5) I'm not sure what size of sample and hold caps they are using


Timing/performance

Brian from Abstrakt Instruments has a great breakdown of how the refresh is done here:

https://youtu.be/4WwXlRYw_S0?t=1937

Each DAC channel updates 8 cv channels at 24kHz meaning

  • DAC channels are updated at 192kHz
  • There is about 5.2uS available for refreshing a single CV, this includes time to set the DAC, cap charging and any propagation delays/slew through the mux.
  • From the oscilloscope output, a full rail to rail change takes around 3uS

DAC performance

  • The DAC has a max SPI speed of 50MHz, meaning one bit takes 20nS to transfer. Each update is 32bits long, meaning updating 8 channels takes at least 32 * 8 * 20nS = 5120nS = 5.12uS.
  • Settling time is typically 2.5uS, but can be as bad as 7uS. (But it is stated that this is 1/4 to 3/4 settling so that means that it is only a change of 2.5V?)
  • Slew rate is 1.2V/uS

Multiplexer performance

  • On resistance is 90-180Ohm (?)
  • Propagation delay from in to out is 4nS, higher with higher capacitive load but still in the nS range
  • Switch delay is around 20nS
  • Charge injection: does not say.

What does this mean in practice: 


Well, we've got 5.2uS to update a single CV. First of all, if updating all channel takes 5.1uS, this cannot be done during that period. We want to update all channels at once, if we didn't we would need separate address lines for all the multiplexers which is infeasible. 

Luckily the DAC has a LDAC pin. This means we can write data to all channels, and when ready, flip the LDAC and load channels at the same time. By writing the next update while the current one charges the capacitors, we have just enough time to do a full 8ch update. We will also have to use hardware "fire and forget" SPI, writing the necessary 32 bytes of data in the background. If we use blocking SPI, we will have no time left between updates to calculate the next bytes!

Next, we still have to let the dac settle before we turn on the multiplexer output, or we would see an error in the voltage. Settle time is, from both the oscilloscope photo and the datasheet, around 3uS, but it could be as bad as 7uS. I would also think that the slew rate of 1.2V/uS also means that it would take around 6uS for a 5V change.

The multiplexer propagation delay is negligible. That leaves 2uS for charging the cap and turning off the mux again. 

Now, as I've noted in earlier posts, I could charge a 10nF cap rail to rail at 40kHz from a TL072, meaning charge times are around 25uS.  2uS means we need to use a cap at least 1/10th that size, or less than 1nF. 

I did some tests with the DAC8830 and a DG408 multiplexer. Using a 1nF cap did NOT let us fully charge the cap rail to rail in the 5.2uS window.  I got close but not close enough. The AD5668 may be able to deliver more current but that remains to be tested. 

So what do I make of all this? 


I suspect that Sequential is "cheating" here. They haven't spec'ed their system for charging rail to rail in <5uS, as they don't have to! The fastest moving signals would be the envelope attacks, and those NEED intermediate steps to sound good (?). 

I have ordered both the AD5668, CD74HCT4051 and TL072. It will be exciting to see the results of using those parts. Will I still have the charge injection issues? Does the AD5668 charge the caps faster? I will definitely post the results!


OB-6 - closeups

I got some incredibly nice closeup pics of the OB-6 voice card (and parts of the mainboard) from a friend of a friend. They make it really easy to figure out what is going on. You can clearly see the thermistor in the VCO expo converter for example, as well as laugh a little about the fact that they use coolaudio chips (Behringer, remember?). 

Pro tip: Use http://www.smdmark.com to figure out what chips are used from their markings!

Here they are:

Coolaudio V2164 quad expo VCAs. Great little chip.



TL064 all the way!

Top left - the green chip with '33' on it is the thermistor, the K4A is a dual 3904 transistor used as an expo converter

DACs, those are AD5668 8 channel 16 bit dacs

Voice card slots. Notice the HCT4051 CV multiplexers in between.




Thursday, March 11, 2021

Side quest: ribbon controller!

 I have thought for some time that I should drop the ribbon controller, but a few posts on FB sparked a new interest and I may now go for a DIY solution here too.

Some posts: 

https://www.facebook.com/groups/68014942752/permalink/10158488144187753

https://www.youtube.com/watch?v=BdZcVEC8SZU

http://www.deviantsynth.com/2015/09/27/the-volt-axxe/?fbclid=IwAR3tjNLcU9p0SN4fNNYUZ9u39vq12uZNNZIrOOl3KMZ1sD8xJQva7cM2Gdg

https://www.kickstarter.com/projects/156507812/onestring-an-open-source-usb-ribbon-synth-controll?fbclid=IwAR2j7TtJpjW8MtI6q3Ei-PJ1pqZM9gV5V_miraengnvvDj0JxUIsqQQuh3M


Mouser have them, search for Spectra Symbol's soft pots and look under Force Sensors and Load Cells for FSR02CE


Tip: "Use a connector! Use a connector! Use a connector! Don't try to solder directly to the device. Ask me how I know..."


Problem: SoftPots are 400, 500 or 750mm, that's a bad match for a 600mm FSR

Saturday, March 6, 2021

CV refresh issues

Argh, I thought it would be much easier to get stable CVs than it has turned out to be so far.

I spent a long time messing around with clock chips, until I realised that I probably only need to clock eight steps, and that can be done directly using three pins on the microcontroller. This means I won't have to wait for the clock to stabilise, no need to reset it afterwards etc - it just frees up a lot of time.

After this, I realised that I won't have time to update four DACs sequentially and still wait for the last one to settle/sample before moving on. I could solve this with separate address lines and enable lines to each mux, but that would quadruple the needed pins, so I did the only sensible thing - I bit bang the DACs in parallel. Doing this I actually managed to get an SPI speed of 50MHz, though it seems a bit sensitive to noise from my logic probes etc.

Next up, I did not account for the long DAC settle time. The DAC8830 needs at least 1uS to properly settle after a change (it seems it may even be a little more). It then has to stay on until the sample and hold cap is fully charged and even a little longer, until the mux has been turned off again. All this eats of the charge time and means I must use a smaller cap.

Finally, I want to do 16CVs per DAC channel. This means I need to clock the MUX'es at 384kHz to get 24ksps per channel. The total time available to update one channel is thus 2.6uS, meaning we are quickly running out of time.

I've had a lot of problems making this work in practice. I also have had a lot of false alarms due to noise on the scope from neighbouring probes. After reducing the cap size and increasing the time available for the DAC to settle, I'm starting to see some good results. But one stupid issue remains:




When using a Vishay DG408 8ch mux, whenever the mux is turned off, the output jumps up by approximately 200mV! When the mux is turned off again it instantly jumps down to the DACs level. It is always UP however, even if the CV before/after is lower, so it's not crosstalk or similar.

I tried switching back to using a CD4051 but got even worse results then. But there I got LOWER output when the next CV is lower, and HIGHER output when the next is higher, leading me to belive that it is a different issue.


Anyway, I posted a question about this on electro-music.com (https://electro-music.com/forum/viewtopic.php?p=448370#448370) and got a tip that this could possibly be due to charge injection. The poster even linked to more info about it here: https://www.analog.com/en/analog-dialogue/articles/ask-the-applications-engineer-26.html#

Basically, the remedy is to 

- Increase the cap size - Now, I had actually tried this already, and it definitely helps, but it also increases the charge time so I can't reach my goal of 24ksps. 

- Use a slower switching time - this is as far as I know something that is built into the mux so I would have to change to a different mux

- Use a mux with HIGHER on resistance. This also means changing to a different mux.


Soo. 

After posting the question, I revisited the awesome video from Abstrakt Instrument that explains in detail what the OB-6 is doing: https://youtu.be/4WwXlRYw_S0?t=1937

It actually has quite a few important details.

- First of all, the OB-6 uses two 8 channel dacs to update approx 120 channels, meaning each channel only updates 8 CVs. This gives twice the time to do updates so the caps can be doubled.

- Second, the OB-6 actually uses the 4051 mux, but from the video it looks like it is the 74HCT4051.

- It says that the op amp buffers are placed on the voice cards themselves. I've found some closeups of those too (https://www.sequencer.de/syns/davesmith/OB6.html), and it looks like all op amps are in fact TL06x! Those have a very slow slew rate of 3v/uS, perhaps that can affect things too?

I've asked a couple of friends to help me chase down an OB-6 or Prophet-6 to get some even more detailed pics of the circuits, but it really looks like Sequential is doing things the old fashioned way and not with some fancy sample and hold circuit. That makes me so relieved! They even use the cheaper 4051 mux'es. So if Sequential means this is good enough, it's good enough for me - I just need to make it work...


At the moment I'm really in doubt about my next steps. Should I order more parts to test on a breadboard or should I design some circuits and have them produced by JLCPCB? Doing the latter would definitely result in a less noisy board, but it is also much more expensive, and nearly impossible to fix if something is wrong. I consider separating the DACs from both the voice controller and the sample and hold buffers, meaning I would have three cards. Doing this I could replace only parts of the circuit if something doesn't work.

Also, I need to figure out exactly what caps to use.

DAC notes: I thought I could use the DAC8562 dual 16 bit dac, but it has a 10uS settle time (50MHz SPI though). 8552 is even worse, 12uS and 30MHz SPI. In comparison DAC8830 has 1uS settle time and 50MHz SPI

More on OB-6:

The OB 6 uses two 8 channel DAC and each channel updates 8 CVs. Running at 24kHz, each channel must be updated in 5.2uS, this includes dac settle time and capacitor charging.

From the video we can see that a 0 to 5V charge takes around 3uS. This leaves as little as 2uS for charging the cap, so either they accept that the cap isn't fully charged in one cycle in the extreme cases OR they use a very small cap; it would be very interesting to known which one it is. It is also entirely plausible that they never go rail to rail during an update. As the 24kHz refresh rate is to be able to do fast envelopes, they WANT some intermediate steps. If we limit the step size to, say, 1/4th of the max amplitude (5V), we only need 1/4 of the charge time. I think I may have to consider this. If I can quadruple the cap size, effects of charge injection will definitely be reduced. Oh how I wish I could see the labelings on the Abstrakt Instruments DAC board...

Update: 

Now I'm confused. On the AI site it says that they update 16bit CVs 4000times per second...: https://www.kickstarter.com/projects/abstraktinstruments/vs-1-polyphonic-analog-synthesizer


In the video however, he says 48kHz in High resolution mode, and 85 control voltages from an 8ch DAC, meaning more than 8CVs per channel. Maybe some are 48kHz and some slower...