Monday, December 21, 2020

DCO 1.4 with memory / 3.3v Vcc

I intend to access memory from the DAC when using it as a wavetable oscillator. I have bought a large number of Winbond W25Q128 128Mbit SPI flash memory chips, however, they are 3.3v max.

That's not really a problem though - the PIC16F18346 and the DAC8830 runs fine on 3.3v, I just need to remember that when adding memory! I've tested and it looks ok. I can however NOT use 5v for the DAC reference, so to get the same output amplitude we need to recalculate the charge voltages.

DCO 1.4 tiny but major bug

Crap. I really messed up when I ordered the DCOs. I misread the datasheet, it says the DAC can drive loads of 60k unbuffered. I read this as "max 60k resistors" on the output, when in fact it is the opposite, minimum 60k. 

I even changed the 100k input resistor to 22k to prevent issues - 100k would have worked just fine :-(

I have tested the circuit and the effect is that the DAC is not able to get the output all the way up to 5V, it tops out around 4V and more importantly, at an unknown voltage. For charging the cap this may not be a big deal as the charge time is calibrated anyway, but for using the DAC as a wavetable DCO this really messes up things.

So, what can be done about it? Well, we have a few options

- 1: Replace R5 and R3 with 120k resistors (this lets us do what was originally planned, having a second external buffer to use as wavetable output.

- 2: Remove R3, R5 and R1 and R5. Replace R3 with a solder blob, effectively making an op amp buffer connected to ground, the same way we normally disable opamps. Then use an external opamp instead of IC3B, tapping the CHARGE_VOLTAGE pin and re-injecting the result at the CAP output pin. We may even be able to leave R3 in place, though I'll need to read up on this first.

- 3: remove R5 only, tapping the CHARGE_VOLTAGE, buffer it and then reinjecting at the other end of R5, however, that point is not exposed so we need a wire.

- 4: Desolder R5, cut the power lines and both cap inputs to the IC3 TL072 and use a whole separate one for both A and B.

Seeing as I can't solder anymore, option 2 or 4 is the simplest work for someone else desoldering the resistors, or me cutting the resistors in two. Option 2 will use a little bit more power as the opamp will still be in place, option 4 requires more opamps on the "main" board.

Distortion tested

 I breadboarded the distortion PCB today and it works as it should. 

As designed the overdrive is effective from above 5v, and tops out at approx 10V for soft clipping and a bit higher for hard. This means that the output is a lot louder when distorted, but that can be adjusted using the gain pot.

Take these considerations when wiring on the breadboard:

- If no filter caps are used, you must put a wire between the two HP pins (3 and 4). 

- Use a 200/100k resistor divider from 15v to a positive input opamp buffer to get 5V for the logic level

- Use a 10k resistor to GND on the clip mode pin, then you can use a wire from clip mode to 5v to change mode without removing the GND connection

- Input/output: I used my i/o module. Input should be amplified 5x (2x att, 10x gain), output should be attenuated 5x (10x att, 2x gain). Even with this, the input is not high enough to distort. I had to add an additional inverting amp (10k input and 100k feedback resistors, 10x gain) to get proper distortion.

PS: I have a couple of errors on the I/O board: the 1/4" jacks have Tip and Ring swapped so it shorts when using a mono cable. Also, the silk screen is wrong, it says that Gain is 2x when jumper is open and 10x when closed, it should be the other way around. Also, it seems that there is a fair bit of HF loss but that may have been before I got att/gain set correctly.

Sunday, December 20, 2020

Muliplexed evelopes

I've dreaded doing the envelopes for a long time, mostly because there is always something crazy happening that takes a long time to debug. But now I have a very good working prototype.

I looked at my previous post here: http://atosynth.blogspot.com/2015/02/sample-and-hold-acquisition-time.html

Using 10nF sample and hold caps I wrote (5 years ago...) that an update time of 25uF seems appropriate. I have, however, not shown the original circuit, I have to go back and check if I buffered the op amp or not - because when I redid it now I could not get the desired speed. I had to run updates for at least 50uS. When I added an opamp after the dac however, things changed. I can't see any difference even when I run updates at 16uS. 

So, I've written an arduino program that updates a dac every 25uS. This is multiplexed to as many channels as possible, and the overall refresh rate is 1kHz.  I had a lot of issues related to starting/stopping the various times and ended up with a 25uS timer running all the time, just turning off the DAC update when all channels have been updated.

The output chain goes like this:

DAC8830 -> TL07x buffer -> CD4051 mux -> output buffer, 10nF cap + TL07x 

The mux is controlled by aCD4520 clock (only two pins needed for clock, one for next and one for reset-to-zero). Before an update, the inhibit signal of the mux is raised, turning off the outputs. The clock is progressed, switching to the next output. The DAC is updated and settles in 1uS, then inhibit is turned off and the output turned on. It is left to charge the cap for the remainder of the time between DAC updates, approximately 16uS. Rinse and repeat.

I tried updating a square wave at 1kHz too, it looks surprisingly good. The edges are slightly rounded, but that seems to be an artefact of the caps as increasing the charge time does not affect it.

DAC control. 1: chip select, 2: SPI clock. 3: DAC data, 4: mux inhibit

1kHz square wave on one of the outputs

Envelope output, 1kHz sample rate

Closeup of steps. Each step is held by the sample and hold cap, the DAC is disconnected right after the start of each step



Friday, December 4, 2020

Tons of new circuits ready!

So much has happened this summer and fall, and I haven't written about half of it! Some of it is directly related to the XM8, but most is utility circuits. I simply decided that I had to take time to do do some intermediate steps before building the final voice cards.

A shortlist of circuits I've designed, breadboarded, tested and finally produced at JLCPCB/DirtyPCBs follows below. Everything has been soldered by my good friend and colleague Stig-Rune!

Analog CV bank with 16 CVs in groups of 4.



For each CV you can select between lin or log/antilog  response, as well as uni or bipolar operation. Per group of four you can select the CV range, 0 to 2.5V, 5V or 10V (or +/-2.5V etc for bipolar). I did fuck up the PCB slightly so I had to cut a trace in three places and solder a wire. Also, I messed up a cable so I shorted the outputs, almost overheating the opamps. After that it worked perfectly. Output is via 10 minijacks and a 10p IDC connector for easy connection to a breadboard.


Quad input/output module with 1/4" jacks


For each module you can select input or output connected to the 1/4" jack, and the opposite will be connected to a minijack. Both ends are also connected to a 10p IDC connector for easy connection to a breadboard. For each channel there is an option of 10 or 2 x attenuation and 10 or 2 x gain, meaning you can either have a unity gain circuit, a 5x attenuation (for line out-ish) or 5x gain (for input).


24/48 button module, digital

A digitally scanned button module (without the microcontroller), chainable for up to 48 buttons. Serially read so it only requires four pins + power, making it possible to combine it with the potentiometer module on the same cable.


8 to 64 potentiometers module, digital


A digitally scanned potentiometer module (without the microcontroller). Each module has 8 potentiometers, and 8 modules may be chained for a total of 64 potentiometers. As with the button board, it only requires four pins, and it shares the same clock and reset pins at the button module so a total of six pins + power is needed for all digital modules. During testing I discovered that pin 9 on IC2 - one of the address lines - should have been connected to GND. Now it is floating, so it isn't possible to set the address correctly. It's an easy fix however.


4 x IDC Passthrough module

A simple panel with IDC connectors on both sides, makes it possible to route IDC connectors as a group through the front or back panel without putting the cable through a hole.


Bitcrusher

A combined 12 bit sample rate reducer and bit rate reducer with analog and digital control, based on a PIC16F18446 microcontroller with built-in ADC. Described in separate posts. I've ordered 25 of these.


20kHz LPF

A filter module that can be used as an anti-aliasing filter for ADC input and reconstruction filter for DAC outputs. I use the same configuration in the Bitcrusher and intend to use this for the combined DCO/wavetable oscillators. The circuit comes from this page: https://www.analogfilters.com/anti-aliasing-filter/


Voltage Controlled Distortion

A distortion module for the XM8, the second of the two pre-filter FX (the bitcrusher being the other). Controllable distortion amount and output amplitude, as well as switch between hard and soft distortion. Untested.


Memory


A DIL mounted SMD chip, 128Mbit, for use as sample memory for the wavetable oscillators etc. Untested.


Prophet VS keyboard controller

A new revision of the 68b01 clone for the Prophet VS. I've ordered 20 of these so I have for future sales. They have all been programmed but are missing legs.


Modular synth power bus board

16p Doepfer standard boards with 7 connectors. A bit short but cheap to build.


10p and 16p breadboard IDC connectors

Tiny boards with an IDC connector on one side and legs on the other, making it easy to use ribbon cables between breadboards and modules


Unbuilt designs

In addition, I have PCBs for the following that has NOT been soldered yet:



Breadboard power and I/O module

Has input for +/-15v and a regulator for 5V. Also has IDC connectors for chaining multiple boards, and small chain-boards that can be fitted upside down to connect multiple boards. Connects to the power busses on the breadboard. No more risk of messing up polarities! Also: a 10p Doepfer compatible power connector, although the doepfer uses +/-12V, not 15V, and a 10p I/O connector that connects a ribbon cable to 10 pin headers for easy and stable connections. Pin 10 may be connected to ground with a jumper.


Breadboard coax connector and I/O module

A board with four coax connectors and the same 10p I/O connector as the board above. Will give stable connection points for oscilloscop, function generator and other gear that uses coax.


15-to-12v DC converter module

A module that converts +/-15v from either a molex connector or a 10p IDC connector to +/-12v and +5v. Output is through a 16p connector, compatible with the Doepfer standard. Also has a two pin header for injection of Gate and CV 


All in all 16 different boards! Needless to say, I'm more than pleased! I'm getting so close to being able to test an initial voice board, I just need to program some digital envelopes.


Bonus

I finally got the following soldered and ready for testing:

Two versions of the sample and hold buffer, one with some large caps and some filtering and one in a tiny DIL14 format, both quad sample & hold:



Then the second version of the DCO, this time with DAC output to make it a wavetable oscillator too: