Author Topic: A simple VCO for an analog synthesizer  (Read 10217 times)

0 Members and 1 Guest are viewing this topic.

Offline brananarchyTopic starter

  • Newbie
  • Posts: 1
  • Country: us
A simple VCO for an analog synthesizer
« on: January 02, 2018, 04:17:55 am »
This (relatively) simple oscillator outputs a triangle wave with a 1V/octave control voltage (that is, a 2V input produces a signal with twice the frequency of a 1V input). It's my first analog design, so feedback and comments are very welcome!

A basic functional overview:
  • U1A scales the input voltage from 1V/octave to 20mV/octave, and the trimmable voltage divider finishes scaling to the ~17mV/octave to drive the exponential converter.
  • U1B, Q4, and Q5 are an exponential voltage to current converter. This arrangement cancels out most of the temperature dependency in the relationship between Vbe and Ic of a single BJT.
  • Q1, Q2, and Q3 along with Q6 and Q7 form a pair of current mirrors which can charge or discharge C1 with the same magnitude current as output by the converter
  • The diode bridge allows C1 to either charge via Q3 or discharge via Q7, depending on the output of the schmitt trigger made with U2A
  • U2B just buffers the voltage from C1. Its output is also the output of the oscillator.

The triangle output is slightly lopsided - the rise time is about 1.25 the fall time. I suspect that this is due to the totally unmatched jellybean transistors I used to breadboard this causing the current mirrors to be imperfect. I have a few THAT corp matched transistor arrays, and I intend to re-breadboard the circuit using those to see what happens.

It maxes out at about 7kHz, and I imagine goes pretty flat some time before that (I haven't done a full tuning test yet). I'm unsure what's causing that. I'm going to try experimenting with some other schmitt trigger designs to see if that helps. It's also possible I'm saturating the exponential converter, and will either need to tweak the resistors in that, or just use a smaller cap to increase the top end. It's stable well below audio frequencies right now, so a smaller cap would be feasible.

Once I've dealt with those issues, there are still several more modules I need to design and build to turn this into a practical synthesizer. It's already pretty awesome to twiddle the control voltage knob and hear the frequency sweep, though!
« Last Edit: January 02, 2018, 04:29:14 am by brananarchy »
 
The following users thanked this post: nugglix

Online jbb

  • Super Contributor
  • ***
  • Posts: 1128
  • Country: nz
Re: A simple VCO for an analog synthesizer
« Reply #1 on: January 02, 2018, 07:56:54 am »
That’s a fun circuit. I’m always amazed to think about building music from op-amps.

I’m not fantastic with this style of analog, but something looks odd around Q7 and D1-D4. It clearly works, so maybe just a drafting issue.

It looks like your output is a bit asymmetrical. This could be due to inaccuracy in the current mirror (maybe some emitter resistance would help balance things up) or the comparator hysteresis. As it stands, variations in the +-12V rails or temperature differences between the transistors will affect the symmetry and output frequency. You might want some kind of fixed reference for the hysteresis.

The exponential converter looks interesting - I might knock one up on a breadboard...

I also suggest some low pass filtering (10kHz+) of the input signal to avoid weird radio-receiver operation and provide some ESD protection to U1A.
 

Online jbb

  • Super Contributor
  • ***
  • Posts: 1128
  • Country: nz
Re: A simple VCO for an analog synthesizer
« Reply #2 on: January 02, 2018, 08:03:18 am »
Also thanks for the description and clear schematic.

Edit: the document http://electronotes.netfirms.com/s019.pdf looks very helpful and suggests some additional measures for improving performance over temperature.
« Last Edit: January 02, 2018, 09:09:50 am by jbb »
 
The following users thanked this post: nugglix

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14071
  • Country: de
Re: A simple VCO for an analog synthesizer
« Reply #3 on: January 02, 2018, 10:58:32 am »
Q7 is very likely draw the wrong way around (E and C swapped).
 
The following users thanked this post: Wimberleytech

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23017
  • Country: gb
Re: A simple VCO for an analog synthesizer
« Reply #4 on: January 02, 2018, 11:42:26 am »
Interesting design. Thanks for taking the time to post. Good job if that's your first design :)

The THAT arrays are quite expensive. Have a look around for the good old CA3096 IC. I scored a whole tube of them on ebay for £10. There is a modern HFA3096 array by Intersil which is a good bet as well but Vce(max) is low and the fT is 8GHz (!) so it may have oscillation problems. Also some of the BCM847 series arrays are well matched and a lot cheaper: https://assets.nexperia.com/documents/data-sheet/BCM847BV_BS_DS.pdf
« Last Edit: January 02, 2018, 11:44:03 am by bd139 »
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: A simple VCO for an analog synthesizer
« Reply #5 on: January 02, 2018, 12:02:19 pm »
I do not understand how the diode switch works.  Isn't D2 and D4 also drawn with a wrong polarity?

And regarding the current mirrors: There are a lot of dual transistor singlechip solutions available, such as BCV61/62 current mirrors. By stacking two of those, you can get a quite well behaved current mirror.
« Last Edit: January 02, 2018, 12:05:04 pm by Yansi »
 
The following users thanked this post: Wimberleytech

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19342
  • Country: gb
  • 0999
Re: A simple VCO for an analog synthesizer
« Reply #6 on: January 02, 2018, 02:01:12 pm »
U2A is acting as a comparator, yet the TL072 is designed to be a linear amplifier. This will slow it down and could be contributing to the asymmetrical waveform. Look at the square wave output with an oscilloscope. Is the duty cycle 50%? Is the positive voltage, equal to the negative voltage?

The circuit is quite complex, considering the performance isn't that great. I've had more success with a comparator, op-amp based integrator and some switching transistors. See the thread linked below. I've only posted simulations but I have actually built some of those circuits, with reasonable results. I'll post some pictures, if I find it and have the time.
https://www.eevblog.com/forum/beginners/simple-analog-function-generator-design/
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: A simple VCO for an analog synthesizer
« Reply #7 on: January 02, 2018, 02:24:24 pm »

The THAT arrays are quite expensive. Have a look around for the good old CA3096 IC. I scored a whole tube of them on ebay for £10. There is a modern HFA3096 array by Intersil which is a good bet as well but Vce(max) is low and the fT is 8GHz (!) so it may have oscillation problems. Also some of the BCM847 series arrays are well matched and a lot cheaper: https://assets.nexperia.com/documents/data-sheet/BCM847BV_BS_DS.pdf

Thanks for the tip on the HFA3096.  I love the CA3096 and also bought a few off ebay (not as good a deal as you).  Was gonna be miserly about their use until now I can get the Intersil part when I run out!!
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23017
  • Country: gb
Re: A simple VCO for an analog synthesizer
« Reply #8 on: January 02, 2018, 03:30:54 pm »
Just be careful if you do get the HFA3096. While a compatible device it's somewhat more fragile with much lower breakdown voltages. Keep your rails to +/-5V which isn't much headroom with a Vbe drop or two in your circuits. If it goes over 12V it will go to silicon heaven. I only bothered to look at the datasheet properly when I was soldering my third one onto a carrier board  :-DD

The BCM847 is much better for that really.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14071
  • Country: de
Re: A simple VCO for an analog synthesizer
« Reply #9 on: January 02, 2018, 04:02:09 pm »
For the current mirrors one could add small emitter resistors, to make them less critical. Dual transistors like the BCM or BCV61/62 should be good enough. If at all the log converter is critical.  There is still a residual temperature dependence in this log conversion - those 1 V/octave is still about proportional to absolute temperature. To make is really temperature stable, a compensation with something like a PT1000 or a KTY81 is needed.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 6923
  • Country: ca
Re: A simple VCO for an analog synthesizer
« Reply #10 on: January 02, 2018, 06:33:28 pm »
Temperature and Vcc variations make a VCO design that stays in tune very difficult.  Some discussion here: Re: Syncing Synth VCOs
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: A simple VCO for an analog synthesizer
« Reply #11 on: January 02, 2018, 06:36:56 pm »
Q7 sure looks upside-down, and the diode steering arrangement looks wrong.  I did a simpler variation of the basic circuit (minus the voltage controlled current source & mirror bit) as a circuit tutorial video a few years ago:


YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 
The following users thanked this post: mikerj

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16544
  • Country: us
  • DavidH
Re: A simple VCO for an analog synthesizer
« Reply #12 on: January 02, 2018, 11:41:36 pm »
A lot of old discrete plus operational amplifier function generators work this way with a pair of variable current sources driving a diode bridge for switching feeding an integration capacitor.  With care, this topology is suitable to 10s of MHz.  Check out the schematics for the old Tektronix FG501, FG502, FG503, FG504, and FG507 function generators.

In your case, the discrete transistor current mirrors need emitter degeneration for better accuracy.  Even then, the resistance may be trimmed for best symmetry.  Usually operational amplifier are used for each current source for best accuracy.

If at all the log converter is critical.  There is still a residual temperature dependence in this log conversion - those 1 V/octave is still about proportional to absolute temperature. To make is really temperature stable, a compensation with something like a PT1000 or a KTY81 is needed.

Or ovenize a transistor array by using one transistor as a temperature sensor and another as a heater.  For examples, see figure 21 of Linear of Technology application note 14, figure 4 Linear of Technology application note 5, and National Semiconductor application notes 256, 264, and 299.
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23017
  • Country: gb
Re: A simple VCO for an analog synthesizer
« Reply #13 on: January 02, 2018, 11:56:26 pm »
There’s a log amplifier in art of electronics 1st edition as well. That uses two junctions in different feedback paths to compensate for temperature drift. I built that successfully and using both Vbe junctions in a CA3096 and it was rock solid. Drift was completely unmeasurable with my kit even giving it a blast with the wife’s hairdryer.  I had crap kit back then so that’s not a glowing recommendation :)
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16544
  • Country: us
  • DavidH
Re: A simple VCO for an analog synthesizer
« Reply #14 on: January 03, 2018, 01:24:51 am »
There’s a log amplifier in art of electronics 1st edition as well. That uses two junctions in different feedback paths to compensate for temperature drift. I built that successfully and using both Vbe junctions in a CA3096 and it was rock solid. Drift was completely unmeasurable with my kit even giving it a blast with the wife’s hairdryer.  I had crap kit back then so that’s not a glowing recommendation :)

I do not have the first edition but if it is the same circuit shown in the second edition, the second transistor only compensates for the temperature dependent offset and not the gain which varies by  0.35%/C necessitate a +3500ppm/C resistor.  The second edition points this out in the text and suggests using a thermistor network to adjust the gain of the output amplifier which is normally how it is done.

« Last Edit: January 03, 2018, 01:34:34 am by David Hess »
 
The following users thanked this post: Someone

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23017
  • Country: gb
Re: A simple VCO for an analog synthesizer
« Reply #15 on: January 03, 2018, 09:25:59 am »
You may be correct there. I don't have a second edition to verify the differences either. Will scan and post it later if I get a few minutes. The first edition might be devoid of that explanation. It was a little terse compared to later volumes (one reason I keep it around - doesn't try and murder you like 3rd edition does)
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16544
  • Country: us
  • DavidH
Re: A simple VCO for an analog synthesizer
« Reply #16 on: January 04, 2018, 03:48:46 am »
A +3500ppm/C resistor shows up in most log amplifier designs and if there was a way for making one without it, they would as with the temperature stabilized examples that I linked.  Monolithic construction is not sufficient by itself or you could make a log amplifier with a transistor array and no further temperature compensation.  If you do a search for this resistor, it comes up most common in connection with analog music synthesis for obvious reasons.
 

Offline Keicar

  • Regular Contributor
  • *
  • Posts: 73
  • Country: au
    • My YouTube Channel
Re: A simple VCO for an analog synthesizer
« Reply #17 on: January 04, 2018, 11:27:26 pm »
This might be relevant and/or helpful:

http://www.openmusiclabs.com/files/expotemp.pdf

Karl.
 
The following users thanked this post: nugglix

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: A simple VCO for an analog synthesizer
« Reply #18 on: January 05, 2018, 12:53:48 am »
Have you tried the very simple circuit in the datasheet of an LM324 or LM358 opamp? it would work better with a better opamp.
 

Online Someone

  • Super Contributor
  • ***
  • Posts: 4509
  • Country: au
    • send complaints here
Re: A simple VCO for an analog synthesizer
« Reply #19 on: January 05, 2018, 01:18:51 am »
Have you tried the very simple circuit in the datasheet of an LM324 or LM358 opamp? it would work better with a better opamp.
That example does not have the exponentially scaled control voltage the OP is working around.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19342
  • Country: gb
  • 0999
Re: A simple VCO for an analog synthesizer
« Reply #20 on: January 05, 2018, 09:56:55 am »
Have you tried the very simple circuit in the datasheet of an LM324 or LM358 opamp? it would work better with a better opamp.
That example does not have the exponentially scaled control voltage the OP is working around.
Yes, I missed that too.
This (relatively) simple oscillator outputs a triangle wave with a 1V/octave control voltage (that is, a 2V input produces a signal with twice the frequency of a 1V input).
Why not add an exponential circuit to the circuit posted by audioguru? If higher frequencies are needed, then the LM358 should be replaced with an op-amp and comparator.
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: A simple VCO for an analog synthesizer
« Reply #21 on: January 05, 2018, 02:56:17 pm »
Why not add an exponential circuit to the circuit posted by audioguru? If higher frequencies are needed, then the LM358 should be replaced with an op-amp and comparator.

Because the amplitude of the triangle output of this circuit is frequency dependent (constant charge/discharge current in the integrator).
YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16544
  • Country: us
  • DavidH
Re: A simple VCO for an analog synthesizer
« Reply #22 on: January 05, 2018, 03:30:46 pm »
Why not add an exponential circuit to the circuit posted by audioguru? If higher frequencies are needed, then the LM358 should be replaced with an op-amp and comparator.

Because the amplitude of the triangle output of this circuit is frequency dependent (constant charge/discharge current in the integrator).

Huh?  It is not a very good circuit and I have used it before but the triangle wave amplitude is only controlled by the operational amplifier on the right side operating as a comparator.  The input voltage controls the integration current and the comparator controls the triangle wave amplitude so frequency is linearly dependent on input voltage.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19342
  • Country: gb
  • 0999
Re: A simple VCO for an analog synthesizer
« Reply #23 on: January 05, 2018, 04:31:59 pm »
Why not add an exponential circuit to the circuit posted by audioguru? If higher frequencies are needed, then the LM358 should be replaced with an op-amp and comparator.

Because the amplitude of the triangle output of this circuit is frequency dependent (constant charge/discharge current in the integrator).

Huh?  It is not a very good circuit and I have used it before but the triangle wave amplitude is only controlled by the operational amplifier on the right side operating as a comparator.  The input voltage controls the integration current and the comparator controls the triangle wave amplitude so frequency is linearly dependent on input voltage.
Yes, that's right, the comparator controls the amplitude. However, at higher frequencies, the amplitude does tend to increase, due to the propagation delay of the comparator, the output tends to overshoot somewhat.
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: A simple VCO for an analog synthesizer
« Reply #24 on: January 05, 2018, 06:11:55 pm »
Why not add an exponential circuit to the circuit posted by audioguru? If higher frequencies are needed, then the LM358 should be replaced with an op-amp and comparator.

Because the amplitude of the triangle output of this circuit is frequency dependent (constant charge/discharge current in the integrator).

Huh?  It is not a very good circuit and I have used it before but the triangle wave amplitude is only controlled by the operational amplifier on the right side operating as a comparator.  The input voltage controls the integration current and the comparator controls the triangle wave amplitude so frequency is linearly dependent on input voltage.
Yes, that's right, the comparator controls the amplitude. However, at higher frequencies, the amplitude does tend to increase, due to the propagation delay of the comparator, the output tends to overshoot somewhat.

Yeah - my bad.  I only glanced at the circuit for a few mS and thought I saw an integrator being driven by a variable freq square wave.  Of course, the amplitude of the triangle is basically set by the hysteresis limits of the second op amp (comparator) stage. 
YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf