electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software
Integrator / Schmitt VCO
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
robynm



Joined: May 30, 2013
Posts: 10
Location: Melbourne

PostPosted: Fri Jun 07, 2013 4:16 am    Post subject: Integrator / Schmitt VCO
Subject description: Designing a VCO
Reply with quote  Mark this post and the followings unread

Hi everyone, congratulations on this beautiful forum. This is my first post here, but I have been acquiring a lot of knowledge by just reading other people's threads so far.

Now I want to design my own VCO. I think my understanding of electronics is getting good enough to do it... with help of course Smile My design won't be perfect but I don't mind a bit of glitch and building from the ground up will surely teach me a lot.

So the starting point of my VCO is an integrator / schmitt trigger. I found it on the datasheet of Texas Instruments for the LM124 (p.17) and I recently came across it in the book The Art Of Electronics. It also seems to be the heart of Thomas Henry's VCO-1. I want to make sure I really understand what's going on in those schematics before I start adding to it.

Attached are both the TI and the AOEE schematics. Two things strike me:

1. The 49.9K resistors in the AOEE book are replaced by 51K resistors in the TI datasheet. Why is this? Which option is... better?

2. In the TI schematics there is a BJT with a 10K at the base to "relax" the inverting input of the integrator and allow the cap to discharge. In the AOEE they use a FET with no resistor at the gate and provide a more complex circuit made of two transistors if you decide to use a BJT.

3a. I have built the TI version and I know it works. But I understand that the FET seems to be a better option as it is voltage driven and the op-amp will output mostly voltage and almost no current. Is this right? Why does the TI version even work?

3b. In the AOEE alternative BJT version they use two transistors. Are the basically just amplifying the signal?

Thanks in advance!


VCO - AOE.jpg
 Description:
from The Art of Electronics (p. 240)
 Filesize:  882.06 KB
 Viewed:  96 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

VCO - AOE.jpg



VCO - TI.jpg
 Description:
LM124 datasheet (p. 17)
 Filesize:  1.86 MB
 Viewed:  98 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

VCO - TI.jpg


Back to top
View user's profile Send private message
elektrouwe



Joined: May 27, 2012
Posts: 45
Location: Germany

PostPosted: Sun Jun 09, 2013 5:27 am    Post subject: Re: Integrator / Schmitt VCO
Subject description: Designing a VCO
Reply with quote  Mark this post and the followings unread

robynm wrote:

1. The 49.9K resistors in the AOEE book are replaced by 51K resistors in the TI datasheet. Why is this? Which option is... better?

R4( references from AOE book) must be exactly 1/2 of R1 to get a symmetrical triangle. I always use 2 pcs.R1 in parallel for R4, or 2 pcs. R4 in series for R1, because then you can choose any standard R value (47k...220k). The same value can be used for R2 and R3 and also for R5,6,7 - then it's simply 1 value for all Rs to get the best precision.

robynm wrote:

2. In the TI schematics there is a BJT with a 10K at the base to "relax" the inverting input of the integrator and allow the cap to discharge. In the AOEE they use a FET with no resistor at the gate and provide a more complex circuit made of two transistors if you decide to use a BJT.

for small currents like here , the CE saturation voltage is only some ten mV, which does not do much concerning symmetry. The circuit can be improved by swapping C and E of the discharge trans. and tweaking the 10k base resistor until you get <2mV Vce-sat. I don't see a reason to use a a second transistor to buffer the comparator because the 3160 can easily drive >1.5 mA, which is required here. A discrete MOSFET can be used instead of the 4007 or a 4066/4053/.... analog switch if you prefer ICs.
The circuit would even work with a diode as discharge switch ( symmetry/linearity not so nice then ...) or use a true comparator with OC like LM339 to get rid of the extra discharge switch.
Back to top
View user's profile Send private message
robynm



Joined: May 30, 2013
Posts: 10
Location: Melbourne

PostPosted: Tue Jun 11, 2013 11:00 pm    Post subject: Re: Integrator / Schmitt VCO
Subject description: Designing a VCO
Reply with quote  Mark this post and the followings unread

Thanks for your answer.

elektrouwe wrote:

R4( references from AOE book) must be exactly 1/2 of R1 to get a symmetrical triangle. I always use 2 pcs.R1 in parallel for R4, or 2 pcs. R4 in series for R1, because then you can choose any standard R value (47k...220k). The same value can be used for R2 and R3 and also for R5,6,7 - then it's simply 1 value for all Rs to get the best precision.

Get it.

elektrouwe wrote:

for small currents like here , the CE saturation voltage is only some ten mV, which does not do much concerning symmetry. The circuit can be improved by swapping C and E of the discharge trans. and tweaking the 10k base resistor until you get <2mV Vce-sat. I don't see a reason to use a a second transistor to buffer the comparator because the 3160 can easily drive >1.5 mA, which is required here. A discrete MOSFET can be used instead of the 4007 or a 4066/4053/.... analog switch if you prefer ICs.
The circuit would even work with a diode as discharge switch ( symmetry/linearity not so nice then ...) or use a true comparator with OC like LM339 to get rid of the extra discharge switch.

This is still pretty obscure for me.

1. I did a simulation of the circuit with C and E swapped and the triangle's amplitude increases. Why is that? I thought that C always had to be the positive side and E the negative.

2. Also, in the Art of Electronics, there is no resistor between the 1/2 V+ and the non inverting input of the schmitt trigger. If I don't put this resistor in my simulation I get a very fast / unstable oscillation. If I put it the oscillation works but at only half the frequency indicated on the schematics (f= 150 x (Vin / V+)).

3. I am trying to learn circuit analysis because there is no way around it. Kirchoff is still causing me trouble but I'll get there. Is it out of reach for me to understand how they come up with this equation to calculate the frequency?

Edit: Link to the simulation:
Simulation

_________________
I make music

Last edited by robynm on Fri Oct 18, 2013 2:01 am; edited 1 time in total
Back to top
View user's profile Send private message
elektrouwe



Joined: May 27, 2012
Posts: 45
Location: Germany

PostPosted: Wed Jun 12, 2013 7:24 am    Post subject: Re: Integrator / Schmitt VCO
Subject description: Designing a VCO
Reply with quote  Mark this post and the followings unread

robynm wrote:

1. I did a simulation of the circuit with C and E swapped and the triangle's amplitude increases. Why is that? I thought that C always had to be the positive side and E the negative.

this should not be and I didn't see it when swapping C and E in your linked example !?? In fact you will see nothing in these tiny simulation windows, because we talk about some mV difference in a some-volts signal.
You can swap C and E with any transistor and it will still work with the disatvantage of a very low (reverse-) gain and the advantage of a very low saturation voltage.

robynm wrote:

2. Also, in the Art of Electronics, there is no resistor between the 1/2 V+ and the non inverting input of the schmitt trigger. ..

there is one : it is R5 parallel R6 . When you replace the voltage divider R5,R6 connected to V+ by R5 parallel R6 connected to V+/2 you will have an equivalent circuit with the same internal resistance.

robynm wrote:

3. I am trying to learn circuit analysis because there is no way around it. Kirchoff is still causing me trouble but I'll get there. Is it out of reach for me to understand how they come up with this equation to calculate the frequency?

don't worry:
1. calculate the upper and lower switching thresholds of the comparator:
if comp. Vout is v+ then R7 is parallel to R6 and the voltage over R5 is 2/3 V+
if comp. Vout is 0V, then R7 is parallel to R5 and the voltage over them is 1/3 v+

2. calculate the output voltage range of the integrator :
amplitude of the triangle is upper minus lower threshold = 2/3V+ - 1/3V+ = V+/3

3. calculate the current that fills C1 :
let comp. Vout = 0 => Q1 is OFF => integrator is ramping down
constant current flowing into C1 == current flowing through R1
noninverting input is held @ Vin/2 so opamp keeps inverting output also @ Vin/2
Ic1 = Ir1 = Vr1/R1 = ( Vin - Vin/2)/R1 = (Vin/2)/R1

4. calculate output voltage ramp (absolute value, sign changes for up/down ramp) of the integrator:
down from 2/3V+ to 1/3V+. Lets calculate the time for this ramp:
voltage change in a capacitor is high when the charging time is high, the charging current is
high and the capacitor is small. here:
deltaV = (Ir1 * Tramp) / C1
because deltaV is the ramp amplitude and Ir1 = (Vin/2)/R1 we can write :
deltaV = V+/3 = (Vin/2)/R1 * T / C1

5. calculate the ramp time T :
T = ( 2 * V+ * C1 * R1) / ( 3 * Vin )
because 1 periode is 2 ramps (up&down) frequency can be calculated as:
f = 1/(2T) = 3 * Vin / ( 2*2 * R1 * C1 * V+)
with R1 = 0.1e6 and C1 = 50e-9 you end up with the formula in the schematics:
f = 150 * Vin / V+
Back to top
View user's profile Send private message
robynm



Joined: May 30, 2013
Posts: 10
Location: Melbourne

PostPosted: Wed Oct 16, 2013 10:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Electrouwe I am sorry I never thanked you for your advice. I breadboarded the VCO, it didn't work, I got upset and decided to start learning drums...

I have recently printed out your answer though and carefully read it while inspecting the circuit and things make more sense now.

This VCO is back on my to-do list so I'll probably revive this thread pretty soon.

Thank you again, sorry it took so long for me to say it Embarassed

_________________
I make music
Back to top
View user's profile Send private message
elektrouwe



Joined: May 27, 2012
Posts: 45
Location: Germany

PostPosted: Thu Oct 17, 2013 2:16 am    Post subject: Reply with quote  Mark this post and the followings unread

You're welcome and good luck with your next try Smile
Back to top
View user's profile Send private message
robynm



Joined: May 30, 2013
Posts: 10
Location: Melbourne

PostPosted: Fri Dec 06, 2013 12:35 am    Post subject: Reply with quote  Mark this post and the followings unread

OK So I have finally finished the core of this VCO and soldered it to stripboard. It works a charm and I am really happy. I've even breadboarded a Baby 8 sequencer to make it sing. I felt like a dad hearing his kid say his first word Smile

Now I would like to give this thing a bit of range because so far I can only go from about 333Hz to 666Hz corresponding to a 12V range in the control voltage.

From what I've gathered looking at other VCOs and reading numerous articles, what I need is to convert this voltage into current with a transconductance device. That would allow me to control the amount of current that charges C1 and get the maximum range?

I want to keep things dead simple and avoid using an OTA for the moment because I want to learn how things work (otherwise I would just build Thomas Heny's VCO-1 right away).

It seems that FETs are voltage driven and control a current. Can I just implement some sort of FET amplifier at the input of my existing VCO?


VCO-0.1.jpg
 Description:
 Filesize:  33.87 KB
 Viewed:  50 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

VCO-0.1.jpg



20131205_015745.jpg
 Description:
 Filesize:  252.58 KB
 Viewed:  35 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

20131205_015745.jpg



_________________
I make music
Back to top
View user's profile Send private message
robynm



Joined: May 30, 2013
Posts: 10
Location: Melbourne

PostPosted: Tue Dec 10, 2013 2:36 am    Post subject: Reply with quote  Mark this post and the followings unread

Bump please!
_________________
I make music
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use