Design for a phase distortion module based on the CZ-1 chip

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!
User avatar
stevebryson
Wiggling with Experience
Posts: 452
Joined: Sun Dec 28, 2014 4:52 pm
Location: San Rafael, CA
Contact:

Design for a phase distortion module based on the CZ-1 chip

Post by stevebryson »

Hi Wigglers - I'm building a phase distortion VCO module around the CZ-1 chip from http://www.dspsynth.eu , discussed at viewtopic.php?t=155872 . The chip does all the heavy lifting, and I'm designing the control inputs, chip protection and output. I've never designed anything like this so I'm hoping for some opinions and guidance from you folk.

Here's my current schematic:
Image
For the inputs we have two summing amps, one for the 1V/Oct control voltages through U1 and the other for the phase distortion control through U2. Both summing amps use one side of the chips, and the inverted output is un-inverted in the other side of each chip. This design is based on the MOTM 300, using the fancy-pants LT1013 op-amp and RN55E 0.1% resistors for temperature stability.

The summed and inverted control voltages are sent through Shottkey diode protection networks (borrowed from Barton's Dual Nice Quantizer) to keep the voltage inputs to the CZ-1 chip between -0.5V and +5.5V.

The output of the CZ-1 is pretty much usable as is, though it's a little quiet, being in the range of about +-2V (to be expected from a +5V device). C5 is there to make the output signal oscillate around 0V.

Power is designed for +-15V or +-12V, with a 7805 supplying the +5V.

I've breadboarded the whole thing using +-15V, and it works fine. I found I need the trim pot (R17) to get good 1V/Oct tracking.

What do you experienced designers think? Am I missing anything that counts as good practice? Anything to control noise etc.? Since the output is a little quiet, do I want to add a 2x gain op amp in the output path?

Once the schematic is in good shape I'll start on the PCB design.
Last edited by stevebryson on Tue Apr 12, 2016 1:00 am, edited 1 time in total.
The instrument is not the music.
http://stevepur.com/music/synths/
User avatar
snaper
Super Deluxe Wiggler
Posts: 1128
Joined: Mon Feb 10, 2014 12:29 am
Location: Magyarország

Post by snaper »

Looks good for me!
User avatar
kassu
Wiggling with Experience
Posts: 315
Joined: Fri Dec 18, 2015 7:44 am
Location: Finland
Contact:

Post by kassu »

I wouldn't call myself an experienced designer, but maybe I have some tips anyway:

1) Fancy opamps indeed! Which is totally fine. From reading the LT1013 datasheet, it is recommended to have balanced (equal) source resistance at the + and - inputs. This helps keeping the offset voltage low, which I suspect may in turn help with temperature stability. So for the second inverting stages, simply put 100k from +in to ground instead of direct connections. For the first stages the source resistance is lower, because of the summing, so 33k would be suitable.
(The reason is that both inputs draw (actually source in this particular case) some bias current, 15 nA, but they are very nearly equal, to 0.2nA typical or a few nA over full temperature range. When you use unbalanced source resistance, the 15nA converts to some significant offset voltage. Note that this is not relevant for all opamps, but it is for this one.

2) I would change the course and fine pots to 10k. It works fine with 100k, but it is then loaded down by the 100k summing resistor, which gives a kind of nonlinear tuning response.

3) The schottky protection with R7 and R13 is good. I think R5 and R14 have no function and can be omitted (I don't know the reason they were put originally, but I can't think of one). I also don't know what max resistance is allowed here to have good ADC performance in the microcontroller, but I think 10k (and even the 20k you have now) is fine.
User avatar
mskala
Super Deluxe Wiggler
Posts: 2763
Joined: Thu Mar 27, 2014 7:33 am
Location: Toronto
Contact:

Post by mskala »

Is it on purpose that you've built the CV input buffer (U1) with an overall gain of slightly less than unity? When R17 is set to anything other than zero, if the other components are exactly right, you'll be getting a little less than 1V/oct applied to U4 because R16+R17 will be more than 100k, balanced against the 100k feedback resistor R12. That looks like a mistake, but there could be something relevant that I don't know (such as maybe U4 needing less than 1V/oct for some reason). You say you found you needed it to get good tracking on the breadboard, but I wouldn't be surprised if the value you ended up setting it to was a fair bit smaller than 10k, and you were just lucky that the value you needed was positive at all.

Assuming the overall gain really should be unity, I'd suggest using a slightly smaller resistor at R16, such as 95.3k (which is a standard size for 1% resistors). Then the trimmer can add the remaining 4.7k to bring it to exactly 100k and balance R12, and it'll be near its centre. You don't need R16 to be a precision 0.1% resistor because any error in it will be taken up by the trimmer adjustment anyway; you just need to make sure that the error in it and any other associated resistors adds up to a small enough amount that it'll be within the trimmer's range.

I'd also suggest a bypass capacitor on the output of U3, in addition to the one already connected to that line for bypassing U4. Is the capacitor arrangement (C4 and C5) at the circuit output really what you want? It looks odd to me to have the same capacitance going to ground and the output, but I don't know exactly what the requirements are at that point. I guess one of them is meant to act as an alias filter and the other to AC-couple the output, but if the capacitance is big enough to pass a signal for coupling, then it seems like it would also be big enough to dump that signal into the ground (which might be part of the reason you complain the output is "quiet"...).

Are R5 and R14 necessary? What is their purpose? Are they an abundance of caution against pulling the CV inputs of U4 even a single Schottky diode drop outside the power rails? Is the chip really so delicate as to need 10k of current limiting right there when you've already got the protective diodes to limit the voltage excursion, and another 10k of resistance before those? In a worst-case scenario of both CV inputs driven to the positive rail, will the 7805 and all the loads attached to it succeed in preventing the +5V rail itself from being driven above 5V through those protective diodes? (Probably not a problem, but it's worth checking.)

I understand using two op amps from the LT1013 on the pitch CV input because you want to keep the 1V/oct connection very well-behaved (100k impedance to a virtual ground), but if it were me designing it, I'd seriously consider redesigning the PD CV input buffer, where that issue is less critical, to use just a single op amp in noninverting configuration, and then there'd be a spare op amp to use as an output amplifier.
North Coast Synthesis Ltd.

If you tell me that your goal is systemic change toward radical acceptance, and I see that you treat those you perceive as lesser-than with the same kind of scorn and derision that pushed me toward this insular little subculture where I feel comfortable [. . .] then you’ve successfully convinced me that your acceptance is not radical and the change you want not systemic. - "When Nerds Collide"
User avatar
stevebryson
Wiggling with Experience
Posts: 452
Joined: Sun Dec 28, 2014 4:52 pm
Location: San Rafael, CA
Contact:

Post by stevebryson »

Thanks, Kassu -
kassu wrote:I wouldn't call myself an experienced designer, but maybe I have some tips anyway:

1) Fancy opamps indeed! Which is totally fine. From reading the LT1013 datasheet, it is recommended to have balanced (equal) source resistance at the + and - inputs. This helps keeping the offset voltage low, which I suspect may in turn help with temperature stability. So for the second inverting stages, simply put 100k from +in to ground instead of direct connections. For the first stages the source resistance is lower, because of the summing, so 33k would be suitable.
(The reason is that both inputs draw (actually source in this particular case) some bias current, 15 nA, but they are very nearly equal, to 0.2nA typical or a few nA over full temperature range. When you use unbalanced source resistance, the 15nA converts to some significant offset voltage. Note that this is not relevant for all opamps, but it is for this one.
I don't even a little understand this stuff, so I'll take your advice and add the resistors to ground on the +ins. Could this be the cause of a voltage offset, which is why I needed the trimpot to get 1V/Oct?
kassu wrote:2) I would change the course and fine pots to 10k. It works fine with 100k, but it is then loaded down by the 100k summing resistor, which gives a kind of nonlinear tuning response.
I have lots of nice 100K BTI pots, and that's what uncle paults does, so... I don't think I care much about an exact linear response of the knobs.
kassu wrote:3) The schottky protection with R7 and R13 is good. I think R5 and R14 have no function and can be omitted (I don't know the reason they were put originally, but I can't think of one). I also don't know what max resistance is allowed here to have good ADC performance in the microcontroller, but I think 10k (and even the 20k you have now) is fine.
R5 and R14 are because the chip inventor recommended them in front of the inputs. Are they made redundant by the diode networks and R7 and R13?
The instrument is not the music.
http://stevepur.com/music/synths/
User avatar
janost
Super Deluxe Wiggler
Posts: 1262
Joined: Mon Aug 25, 2014 12:45 pm
Location: Sweden

Post by janost »

Yes

You dont need R5/R14 when using D1,D2,D3 and D4.

But they make no difference as the CV inputs to the chip are 100K impendace.
Proud owner of http://www.dspsynth.eu and developer of the smallest MIDI synth in the world, the dsp-G1.
User avatar
kassu
Wiggling with Experience
Posts: 315
Joined: Fri Dec 18, 2015 7:44 am
Location: Finland
Contact:

Post by kassu »

stevebryson wrote: R5 and R14 are because the chip inventor recommended them in front of the inputs. Are they made redundant by the diode networks and R7 and R13?
Indeed, they are made redundant. The chip actually probably has internal diodes in the same configuration as your schottky diodes, and R5/R14 form a similar input protection circuit together with those internal diodes.

So in your case the R7/R13 take the role of R5/R14, and the Schottky diodes kind of "override" the internal ones (because they have a smaller forward voltage drop). The Schottkys give extra protection, which is be useful in this case as you might quite often exceed 5V on the CV input so better be safe.
the resistors to ground on the +ins. Could this be the cause of a voltage offset, which is why I needed the trimpot to get 1V/Oct?
Yes, this could cause a frequency offset error, but not a gain tracking error.

I could think of a few reasons why you need this gain compensation R17 (note that R17 increases the gain).
* Maybe the CZ-1 chip does not track that accurately at all
* Maybe (probably) the 7805 gives out not exactly 5V, they are not precision devices. The micro (CZ-1) probably doesn't have a proper reference itself, so it relies on the 5V rails to calculate 1V/oct.
* Maybe the protection resistors (R7 etc) cause some drop in reading the ADC, but I suspect it doesn't.

Actually, thinking of it, it's probably the 5V supply voltage! Measure it, and see if it is a bit above 5V. If so, there are two ways of fixing it: use a precision regulator (probably end up with something like a LM317 + trim pot), or trim the CV gain as you already do. The latter is probably easiest :).

That brings a final point just like mskala says: maybe you should allow for trimming in both directions if you make a PCB, because with another 7805 the error might be the other way around. You could make R16=91k, and R17=20k (multiturn) for a pretty reasonable range. No need to use 0.1% resistors, by the way, if you have a trimmer anyway.
User avatar
mskala
Super Deluxe Wiggler
Posts: 2763
Joined: Thu Mar 27, 2014 7:33 am
Location: Toronto
Contact:

Post by mskala »

stevebryson wrote:I don't even a little understand this stuff, so I'll take your advice and add the resistors to ground on the +ins. Could this be the cause of a voltage offset, which is why I needed the trimpot to get 1V/Oct?
Ideally you want the overall resistance to ground at both inputs to be the same, which is basically all the resistances in parallel (you assume their other ends are connected to perfect voltage sources). In your circuit, there are basically four 100k resistors from the negative input to voltage sources (two CV inputs, a tuning control, and a feedback resistor), as well as the 2M fine-tune control, so you'd want theoretically a 24.69k resistor (22k or 27k would be close enough) from the positive input to ground to compensate.

The op amp bias current flowing into mismatched input impedances will cause a voltage offset (375uV if it's 15nA into 25kOhm) but that will vanish in the input tuning adjustments - it just means you end up setting the fine tuning knob a hair higher or lower. Although the LT1013 is designed for low offset, you don't actually need that feature here. I'd omit the extra resistor as an unnecessary complication; this offset is going to be smaller than other offsets you can't easily compensate.

Tracking inaccuracy is separate from offset, and would come from mismatches among the resistors that set the gain (assuming the input scaling on the PD chip is accurate in the first place). Tweaking the offset isn't going to fix it.
North Coast Synthesis Ltd.

If you tell me that your goal is systemic change toward radical acceptance, and I see that you treat those you perceive as lesser-than with the same kind of scorn and derision that pushed me toward this insular little subculture where I feel comfortable [. . .] then you’ve successfully convinced me that your acceptance is not radical and the change you want not systemic. - "When Nerds Collide"
User avatar
stevebryson
Wiggling with Experience
Posts: 452
Joined: Sun Dec 28, 2014 4:52 pm
Location: San Rafael, CA
Contact:

Post by stevebryson »

Thanks, mskala! Like kassu you're being very kind, assuming that I did stuff on purpose. Not so.
mskala wrote:Is it on purpose that you've built the CV input buffer (U1) with an overall gain of slightly less than unity? When R17 is set to anything other than zero, if the other components are exactly right, you'll be getting a little less than 1V/oct applied to U4 because R16+R17 will be more than 100k, balanced against the 100k feedback resistor R12. That looks like a mistake, but there could be something relevant that I don't know (such as maybe U4 needing less than 1V/oct for some reason). You say you found you needed it to get good tracking on the breadboard, but I wouldn't be surprised if the value you ended up setting it to was a fair bit smaller than 10k, and you were just lucky that the value you needed was positive at all.
It needed about an extra 2.2K. Could that be because of a voltage offset due to not having the resistors to ground on the op amps, as described by kassu? (It's not like I understand what these words mean - I'm just free associating "voltage offset" with the fact that I had to reduce the gain to slightly below unity.)
mskala wrote:Assuming the overall gain really should be unity, I'd suggest using a slightly smaller resistor at R16, such as 95.3k (which is a standard size for 1% resistors). Then the trimmer can add the remaining 4.7k to bring it to exactly 100k and balance R12, and it'll be near its centre.
I was wondering that very thing. Sounds like a very good idea.
mskala wrote:You don't need R16 to be a precision 0.1% resistor because any error in it will be taken up by the trimmer adjustment anyway; you just need to make sure that the error in it and any other associated resistors adds up to a small enough amount that it'll be within the trimmer's range.
The 0.1% resistors are more for temperature stability than precision. But they come in 95.3K, so I'll substitute that. Wow they're expensive, but I only need one per module.
mskala wrote:I'd also suggest a bypass capacitor on the output of U3, in addition to the one already connected to that line for bypassing U4.
That I actually understand, and just missed it. Thanks!
mskala wrote:Is the capacitor arrangement (C4 and C5) at the circuit output really what you want? It looks odd to me to have the same capacitance going to ground and the output, but I don't know exactly what the requirements are at that point. I guess one of them is meant to act as an alias filter and the other to AC-couple the output,
I think that's exactly right. The cap to ground is recommended in the chip doc, and C5 is to make it AC.
mskala wrote:Is but if the capacitance is big enough to pass a signal for coupling, then it seems like it would also be big enough to dump that signal into the ground (which might be part of the reason you complain the output is "quiet"...).
Without C5, the output has the same amplitude, oscillating around about 2.5V, so that's not why it's quiet. Can you recommend a better way to get the AC output? Also, am I right to assume the low amplitude is because the chip can only swing from 0 to 5V?
mskala wrote:Are R5 and R14 necessary? What is their purpose? Are they an abundance of caution against pulling the CV inputs of U4 even a single Schottky diode drop outside the power rails? Is the chip really so delicate as to need 10k of current limiting right there when you've already got the protective diodes to limit the voltage excursion, and another 10k of resistance before those? In a worst-case scenario of both CV inputs driven to the positive rail, will the 7805 and all the loads attached to it succeed in preventing the +5V rail itself from being driven above 5V through those protective diodes? (Probably not a problem, but it's worth checking.)
See my reply to kassu above regarding R5 and R14. If they are really doing nothing I'll remove them, but I'm a believer in an abundance of caution. But maybe I need them because the diode network clipped a -10V to 10V input to about -0.25V to 5.3V, which is within the chip specs of -0.5V to +5.5V, and the chip designer says should be OK with the 10K resistors R5 and R14.[Edit: while I was writing this the chip designer janost says R5 and R14 are redundant] Is that cutting it too close so maybe I should put a voltage divider after the 7805 so U4 never sees anything above 5V?
mskala wrote:I understand using two op amps from the LT1013 on the pitch CV input because you want to keep the 1V/oct connection very well-behaved (100k impedance to a virtual ground), but if it were me designing it, I'd seriously consider redesigning the PD CV input buffer, where that issue is less critical, to use just a single op amp in noninverting configuration, and then there'd be a spare op amp to use as an output amplifier.
I've never seen a non-inverting summing amp. Maybe I should actually try to learn about this stuff... But I don't mind adding another op amp if I want to amplify the output. I'm not sure I need that: at higher phase distortion index the high stuff really cuts through. On the other hand it wouldn't hurt... Is using a TL071 to amplify the output consistent with the quality of the rest of the circuit?

Thanks again!
The instrument is not the music.
http://stevepur.com/music/synths/
User avatar
mskala
Super Deluxe Wiggler
Posts: 2763
Joined: Thu Mar 27, 2014 7:33 am
Location: Toronto
Contact:

Post by mskala »

kassu wrote:I could think of a few reasons why you need this gain compensation R17 (note that R17 increases the gain).
* Maybe the CZ-1 chip does not track that accurately at all
* Maybe (probably) the 7805 gives out not exactly 5V, they are not precision devices. The micro (CZ-1) probably doesn't have a proper reference itself, so it relies on the 5V rails to calculate 1V/oct.
* Maybe the protection resistors (R7 etc) cause some drop in reading the ADC, but I suspect it doesn't.

Actually, thinking of it, it's probably the 5V supply voltage! Measure it, and see if it is a bit above 5V. If so, there are two ways of fixing it: use a precision regulator (probably end up with something like a LM317 + trim pot), or trim the CV gain as you already do. The latter is probably easiest :).
Does the CZ-1 chip really use its power rails as the voltage reference? If so, ouch! But then yes, that'd certainly be the cause of the problem.

Many of these little microcontrollers have their own references built-in for the analog inputs. I hope it's one of those.
North Coast Synthesis Ltd.

If you tell me that your goal is systemic change toward radical acceptance, and I see that you treat those you perceive as lesser-than with the same kind of scorn and derision that pushed me toward this insular little subculture where I feel comfortable [. . .] then you’ve successfully convinced me that your acceptance is not radical and the change you want not systemic. - "When Nerds Collide"
User avatar
stevebryson
Wiggling with Experience
Posts: 452
Joined: Sun Dec 28, 2014 4:52 pm
Location: San Rafael, CA
Contact:

Post by stevebryson »

kassu wrote: Actually, thinking of it, it's probably the 5V supply voltage! Measure it, and see if it is a bit above 5V. If so, there are two ways of fixing it: use a precision regulator (probably end up with something like a LM317 + trim pot), or trim the CV gain as you already do. The latter is probably easiest :).
Yes, the 7805 is actually putting out +4.97V. I didn't realize that mattered so much. I am planning on replacing R18 with a 95.3K.
The instrument is not the music.
http://stevepur.com/music/synths/
User avatar
stevebryson
Wiggling with Experience
Posts: 452
Joined: Sun Dec 28, 2014 4:52 pm
Location: San Rafael, CA
Contact:

Post by stevebryson »

mskala wrote:
stevebryson wrote:I don't even a little understand this stuff, so I'll take your advice and add the resistors to ground on the +ins. Could this be the cause of a voltage offset, which is why I needed the trimpot to get 1V/Oct?
Ideally you want the overall resistance to ground at both inputs to be the same, which is basically all the resistances in parallel (you assume their other ends are connected to perfect voltage sources). In your circuit, there are basically four 100k resistors from the negative input to voltage sources (two CV inputs, a tuning control, and a feedback resistor), as well as the 2M fine-tune control, so you'd want theoretically a 24.69k resistor (22k or 27k would be close enough) from the positive input to ground to compensate.

The op amp bias current flowing into mismatched input impedances will cause a voltage offset (375uV if it's 15nA into 25kOhm) but that will vanish in the input tuning adjustments - it just means you end up setting the fine tuning knob a hair higher or lower. Although the LT1013 is designed for low offset, you don't actually need that feature here. I'd omit the extra resistor as an unnecessary complication; this offset is going to be smaller than other offsets you can't easily compensate.
Thanks for these details. Which resistor do you mean in "I'd omit the extra resistor as an unnecessary complication"?
The instrument is not the music.
http://stevepur.com/music/synths/
User avatar
janost
Super Deluxe Wiggler
Posts: 1262
Joined: Mon Aug 25, 2014 12:45 pm
Location: Sweden

Post by janost »

mskala wrote:
kassu wrote:I could think of a few reasons why you need this gain compensation R17 (note that R17 increases the gain).
* Maybe the CZ-1 chip does not track that accurately at all
* Maybe (probably) the 7805 gives out not exactly 5V, they are not precision devices. The micro (CZ-1) probably doesn't have a proper reference itself, so it relies on the 5V rails to calculate 1V/oct.
* Maybe the protection resistors (R7 etc) cause some drop in reading the ADC, but I suspect it doesn't.

Actually, thinking of it, it's probably the 5V supply voltage! Measure it, and see if it is a bit above 5V. If so, there are two ways of fixing it: use a precision regulator (probably end up with something like a LM317 + trim pot), or trim the CV gain as you already do. The latter is probably easiest :).

Does the CZ-1 chip really use its power rails as the voltage reference? If so, ouch! But then yes, that'd certainly be the cause of the problem.

Many of these little microcontrollers have their own references built-in for the analog inputs. I hope it's one of those.
Vref for the ADC is Vcc.
So the Power rail is the reference.

And it's only 1v/oct when Vcc is 5volt.

And 4.97v is a tracking error of only 0.6%
Proud owner of http://www.dspsynth.eu and developer of the smallest MIDI synth in the world, the dsp-G1.
User avatar
stevebryson
Wiggling with Experience
Posts: 452
Joined: Sun Dec 28, 2014 4:52 pm
Location: San Rafael, CA
Contact:

Post by stevebryson »

janost wrote: And it's only 1v/oct when Vcc is 5volt.

And 4.97v is a tracking error of only 0.6%
Thanks for the clarification, janost.

Will the trim pot controlling the gain of the 1V/Oct inputs be able to bring the tracking back up to 1V/Oct, assuming R16 is 95.3K? (I could get 1V = 1 octave, but am too much of a newbe to know if that's good enough).

If I understand this at all, the answer is "yes - a swing of +-5K in U1's inverter input = 5% change in gain, which means we should be able to make up for a 5% error in the output of the 7805 = +-0.25V". Do I have that right?

I guess what I don't understand is why a voltage reference error would create a gain error. Is it as simple as converting the input voltage to a proportion of the reference voltage? Trying to learn something here...
The instrument is not the music.
http://stevepur.com/music/synths/
User avatar
mskala
Super Deluxe Wiggler
Posts: 2763
Joined: Thu Mar 27, 2014 7:33 am
Location: Toronto
Contact:

Post by mskala »

We're writing on top of each other, so some of these points may be already answered, but:
stevebryson wrote:It needed about an extra 2.2K. Could that be because of a voltage offset due to not having the resistors to ground on the op amps, as described by kassu? (It's not like I understand what these words mean - I'm just free associating "voltage offset" with the fact that I had to reduce the gain to slightly below unity.)
No. The input buffer is functioning as a simple analog computer that adds and multiplies. Its output is a linear function of its input, looking something like Vout = Vin * A + B. In a perfect world, A would be exactly 1 and B would be a number that determines the tuning.

Mismatches among the gain-setting resistors could cause the number A to not really be exactly 1, and inaccuracy in the CZ-1's internal voltage measurement could cause you to want it to not be exactly 1. The trimmer lets you adjust A to deal with these issues.

Offset in the op amp could add or subtract a small, but basically constant, amount from B. There is some offset built into the op amp because of imperfections in the manufacturing process - relatively little in the LT1013 compared to other op amps, which is why it costs more. There is also some offset that results from the bias current flowing into the input resistors. They make a big deal of this in the LT1013 data sheet because many people use the LT1013 in applications where they really want as small an offset as possible. But since the number B is routinely adjustable with the fine and coarse tuning knobs in your circuit anyway, offset within reason doesn't matter to you. The adjustments you're already doing to tune the oscillator in normal operation, will have the effect of compensating for the offset.
stevebryson wrote:The 0.1% resistors are more for temperature stability than precision. But they come in 95.3K, so I'll substitute that. Wow they're expensive, but I only need one per module.
1% metal film resistors with good temperature stability aren't terribly expensive, and I think your trimmer range is wide enough that those would work fine for you instead of the 0.1% kind.

But you could also use both sides of the trimpot, like this, and avoid the need for any precision resistance other than 100k:

Image

On further thought, that's probably a better idea than looking for a 95.3k resistor.

Edit: sorry, I drew the ground connection in the wrong place there... to make it an inverting unity-gain buffer you want the ground into the positive op amp input and the circuit input where I drew the ground. I'm sure you get the idea.
stevebryson wrote:
mskala wrote:Is but if the capacitance is big enough to pass a signal for coupling, then it seems like it would also be big enough to dump that signal into the ground (which might be part of the reason you complain the output is "quiet"...).
Without C5, the output has the same amplitude, oscillating around about 2.5V, so that's not why it's quiet. Can you recommend a better way to get the AC output? Also, am I right to assume the low amplitude is because the chip can only swing from 0 to 5V?
If you're measuring it unloaded (for instance, with just a scope probe connected to the output) then the coupling cap won't eat much of the signal. With a load it might make some difference. I would use a bigger coupling cap, like 1uF; but this is probably not a big deal anyway. I think you're going to need some kind of amplifier on the output if you want more volts, because the CZ-1's output range is limited by its supply.
stevebryson wrote:But maybe I need them because the diode network clipped a -10V to 10V input to about -0.25V to 5.3V, which is within the chip specs of -0.5V to +5.5V, and the chip designer says should be OK with the 10K resistors R5 and R14.[Edit: while I was writing this the chip designer janost says R5 and R14 are redundant] Is that cutting it too close so maybe I should put a voltage divider after the 7805 so U4 never sees anything above 5V?
No! Not when there's already a worry that the chip is measuring inaccurate voltages because of its supply lines; you really don't need another source of inaccuracy. I'd keep R7 and R13, and remove R5 and R14. The designer said that's okay, and I'd expect it to be okay with any ordinary chip. The chip will have its own protection diodes already, the resistors R7 and R13 limit the current through those, and your added diodes D1 through D4 are "belt and suspenders" extra protection.
stevebryson wrote:I've never seen a non-inverting summing amp. Maybe I should actually try to learn about this stuff... But I don't mind adding another op amp if I want to amplify the output. I'm not sure I need that: at higher phase distortion index the high stuff really cuts through. On the other hand it wouldn't hurt... Is using a TL071 to amplify the output consistent with the quality of the rest of the circuit?
Honestly, you could use TL07x types throughout and you wouldn't notice the difference. The main selling point of those fancy LT1013s is their low offset, which you don't really need.

Here's a short article on summing amps, including non-inverting ones: http://www.circuitstoday.com/summing-amplifier.

If you just connect two voltages through equal resistors to a single point (no amplifier), then the voltage at that point is the average of the inputs.. which is half the sum. So you build that, and then add a noninverting amplifier with a gain of 2, and the result is a noninverting circuit that produces the sum of the input voltages. With more voltages, you use a gain matching how many there are, to compensate the division built into the average. That's the basic theory.
North Coast Synthesis Ltd.

If you tell me that your goal is systemic change toward radical acceptance, and I see that you treat those you perceive as lesser-than with the same kind of scorn and derision that pushed me toward this insular little subculture where I feel comfortable [. . .] then you’ve successfully convinced me that your acceptance is not radical and the change you want not systemic. - "When Nerds Collide"
User avatar
kassu
Wiggling with Experience
Posts: 315
Joined: Fri Dec 18, 2015 7:44 am
Location: Finland
Contact:

Post by kassu »

Regarding temperature coefficients: I have the feeling you are over-engineering a bit here. That is fine in principle, but it may not make any real difference in the end. For example, 0.1% resistors I can find have a tempco of +/-15ppm/degree C, whereas cheap 1% resistors have +/-50ppm/degree C, and the 7805 has -220ppm/degree C.

I doubt if you really need to care about tempcos of these levels: even a 10 degree temperature change, with 50ppm/degree, gives a tracking error of 0.6 cents per octave. Some errors will add together, but still I would say it's not too bad.

Of course its your choice, just giving my opinion :)
User avatar
mskala
Super Deluxe Wiggler
Posts: 2763
Joined: Thu Mar 27, 2014 7:33 am
Location: Toronto
Contact:

Post by mskala »

stevebryson wrote:
mskala wrote:Although the LT1013 is designed for low offset, you don't actually need that feature here. I'd omit the extra resistor as an unnecessary complication; this offset is going to be smaller than other offsets you can't easily compensate.
Thanks for these details. Which resistor do you mean in "I'd omit the extra resistor as an unnecessary complication"?
I would just connect the positive op amp input to ground without putting a resistor there to compensate bias current.
North Coast Synthesis Ltd.

If you tell me that your goal is systemic change toward radical acceptance, and I see that you treat those you perceive as lesser-than with the same kind of scorn and derision that pushed me toward this insular little subculture where I feel comfortable [. . .] then you’ve successfully convinced me that your acceptance is not radical and the change you want not systemic. - "When Nerds Collide"
User avatar
wsy
Super Deluxe Wiggler
Posts: 2728
Joined: Wed Aug 24, 2011 10:20 pm
Location: near Boston Massachusetts USA

Post by wsy »

I would say you should add an op-amp for the output buffer; put your DC-restoration capacitor between the CZ1 chip and the op-amp.

By convention, synth modules are something like 100Kohms to ground on their inputs, and 1000 ohms protective resistor on their
outputs (but the output usually has an output buffer so you can do the pickoff point after the resistor, which means that until the
op-amp saturates, you have essentially *zero* loading and mult pulldown... which is very nice because otherwise at 1000 ohms
and 1V/octave, with a note 2 octaves (volts) up, adding a second oscillator should pitchbend the oscs down by 2% of 2 volts,
which is 0.04 volts, which is close half to a semitone (1 semitone is a multiplier of 1.05946).

Anyway, add an output buffer stage. Your CZ1 chip will live longer with it's protection.

- Bill
"Life is short. But we can always buy longer patch cords" - Savage
User avatar
mskala
Super Deluxe Wiggler
Posts: 2763
Joined: Thu Mar 27, 2014 7:33 am
Location: Toronto
Contact:

Post by mskala »

I agree with putting the DC-blocking capacitor between the CZ1 and the output buffer, but then you will need to remember to create a DC path for the bias current from both inputs of the output buffer op amp. If it's a standard unit-gain non-inverting buffer (real input to op amp +, op amp output to op amp -) then the capacitor can't be the only thing connected to the op amp positive input. A resistor from the op amp positive input to ground (between 10k and 100k... low for better noise/offset, high for better power consumption) would resolve this issue.
North Coast Synthesis Ltd.

If you tell me that your goal is systemic change toward radical acceptance, and I see that you treat those you perceive as lesser-than with the same kind of scorn and derision that pushed me toward this insular little subculture where I feel comfortable [. . .] then you’ve successfully convinced me that your acceptance is not radical and the change you want not systemic. - "When Nerds Collide"
Jarno
Super Deluxe Wiggler
Posts: 3121
Joined: Mon Nov 15, 2010 6:34 am
Location: Rosmalen, NL

Post by Jarno »

Not sure if it is mentioned before, but you need to take care which LT1013 you choose as there is one available with a different pinout, a potential for f*ckups. You may want to put in an opamp which is only available in a generic pinout and choose something higher or lower end.

By the way, great thread this, been eyeing these IC's as well, but the lack of a proper application note with a complete schematic kept me from pulling the trigger.
User avatar
stevebryson
Wiggling with Experience
Posts: 452
Joined: Sun Dec 28, 2014 4:52 pm
Location: San Rafael, CA
Contact:

Post by stevebryson »

Jarno wrote:Not sure if it is mentioned before, but you need to take care which LT1013 you choose as there is one available with a different pinout, a potential for f*ckups. You may want to put in an opamp which is only available in a generic pinout and choose something higher or lower end.

By the way, great thread this, been eyeing these IC's as well, but the lack of a proper application note with a complete schematic kept me from pulling the trigger.
Yup, Jarno - I was careful about that to get the right 8-pin pinout. Since the breadboard works I must have gotten it right, but everyone should beware of this...

Glad you're enjoying the thread as much as I am :party:
The instrument is not the music.
http://stevepur.com/music/synths/
User avatar
fitzgreyve
Veteran Wiggler
Posts: 707
Joined: Mon Jul 15, 2013 4:49 am
Location: UK
Contact:

Post by fitzgreyve »

janost wrote:

Vref for the ADC is Vcc.
So the Power rail is the reference.

And it's only 1v/oct when Vcc is 5volt.

And 4.97v is a tracking error of only 0.6%
78xx series regulators have quite a high tolerance for the actual output voltage - not ideal where this is also a referecne.. To get an exact reference use a variable regulator such as LM317 or similar to allow Vcc to be adjusted to exactly 5.00V (set it before inserting the processor chip into the ciruit!). I've done this with similar PIC based circuits.
User avatar
stevebryson
Wiggling with Experience
Posts: 452
Joined: Sun Dec 28, 2014 4:52 pm
Location: San Rafael, CA
Contact:

Post by stevebryson »

Thanks everyone for the excellent detailed advice, especially for explaining to me that "offset" means "offset" and not "gain". Pretty obvious when you put it that way :doh:

Here's my new version of the circuit, incorporating essentially all suggestions from mskala, kassu, janost and (I hope) wsy:

Image

The changes are:
- Moved the 1V/Oct trimpot per mskala's suggestion to use both sides.
- Changed the PD input summer to a non-inverting unity-gain summer per mskala's suggestion and link, so now this uses only the left side of U2.
- Use the right side of U2 as a 2x non-inverting amp on the output per mskala, with the recommended resistor to ground on the input.
- Removed the 10K resistors after the diode network per everyone.
- Added a decoupling cap to the +5V output of the 7805.

I have not yet breadboarded this new version. Did I get the suggested changes right? Did I miss anything?

Questions:
- The link from mskala on summing amps has a "load resistor" on the output. I put that in (R5). Do I need that? Do I want it on all my op amp outputs? I don't know what load resistors are about.
- Does the 2x output amp satisfy wsy's concerns about having a buffer on the output?
- I really do care about offsets in the PD control path because even a small voltage going into the PD input of the CZ-1 puts distortion into the base sine curve. In other words I want to have the sine curve when I have the PD knob turned down and no PD CV input. Does the current design balance the + and - inputs on pins 2 and 3 of U2 to minimized voltage offsets? (Do I see 2x 100K in parallel on both pins, or does the 100K to ground not count?)

Thanks again for all the great guidance :yay: :yay: :hail: :hail: :tu: I have to get up early tomorrow :zombie: so I'm signing off for now, and look forward to seeing what you have to say tomorrow night.
The instrument is not the music.
http://stevepur.com/music/synths/
User avatar
stevebryson
Wiggling with Experience
Posts: 452
Joined: Sun Dec 28, 2014 4:52 pm
Location: San Rafael, CA
Contact:

Post by stevebryson »

fitzgreyve wrote: 78xx series regulators have quite a high tolerance for the actual output voltage - not ideal where this is also a referecne.. To get an exact reference use a variable regulator such as LM317 or similar to allow Vcc to be adjusted to exactly 5.00V (set it before inserting the processor chip into the ciruit!). I've done this with similar PIC based circuits.
I've been thinking about this, but understood that the 1V/Oct trimpot is just as good as getting exactly 5V into the chip.

Is this true? Is it worth the trouble of a second trimpot? I have a little experience with the LM336 and a trimpot...
The instrument is not the music.
http://stevepur.com/music/synths/
User avatar
wsy
Super Deluxe Wiggler
Posts: 2728
Joined: Wed Aug 24, 2011 10:20 pm
Location: near Boston Massachusetts USA

Post by wsy »

mskala wrote:I agree with putting the DC-blocking capacitor between the CZ1 and the output buffer, but then you will need to remember to create a DC path for the bias current from both inputs of the output buffer op amp. If it's a standard unit-gain non-inverting buffer (real input to op amp +, op amp output to op amp -) then the capacitor can't be the only thing connected to the op amp positive input. A resistor from the op amp positive input to ground (between 10k and 100k... low for better noise/offset, high for better power consumption) would resolve this issue.
Yes, that's correct ("goes without saying").... but yeah, I should have said it.

Glad you did.

And that cap should be nonpolarized (either nonpolarized electrolytic, or a type that doesn't care, like ceramic or polyester)

Another useful point: the RC time constant of the DC-blocking cap and the following DC-restoring resistor to ground will set
the low frequency rolloff of your module. Bigger cap and more ohms in the resistor == lower minimum frequency. The formula
to use (the "RC time constant" formula, if you want to wikipedia it) is:

Fmin = 1 / ( 2 pi R C)

That's the frequency where you get a signal only half as strong as you would have without the resistor and capacitor. It's
sometimes called the cutoff frequency.

For scale, to get 1 Hz out at the cutoff, you need 1 microfarad and 1 megohm, or 10 microfarads and 100Kohms, or
100 microfarads and 10Kohms.... to me, 10 microfarads and 100Kohms sounds like the cheapest and easiest to consistently
get right and not have fiddly issues.

- Bill
"Life is short. But we can always buy longer patch cords" - Savage
Post Reply

Return to “Music Tech DIY”