electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
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 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Digitally controllable resistors and capacitors
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [6 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
synaesthesia



Joined: May 27, 2014
Posts: 291
Location: Germany
Audio files: 85

PostPosted: Sat Jul 19, 2014 8:40 am    Post subject: Digitally controllable resistors and capacitors
Subject description: Poor man's digipot
Reply with quote  Mark this post and the followings unread

Yesterday I was trying to create a simple circuit to control the frequency of the 4060 oscillator, and I just couldn't get it right. All my attempts at using a transistor as a variable resistor failed miserably. (Can anybody show me how this is properly done? I am sure that this must be possible. The problem seems to be that both ends need to be floating for the 4060. I found schematics using a FET, but all assume that one end must be at a constant voltage level. This is not the case in the 4060 oscillator.)

Finally I decided to try something completely different and came up with a simple schematic for a digitally controllable resistor. It is not continuous, but changes resistance in steps. Kind of a poor man's digipot. The idea is to use resistors from a series of 1x, 2x 4x of a base value and an analog switch to combine them to the desired value. I am using the 4053 for that and it gives you 8 different values. I could have used the 4066 and get 16 values, but I also wanted to be able to have a low resistance for a low control input (000) and a high resistance for a high input (111). This can simply be done by using the low-active switch inputs for the 4053 to short individual resistors from the series. With a 4066 I would need another four inverters to do that.

The analog switches have a small resistance of 500 Ohms even if closed, which introduces a small error. However, this doesn't hurt much, because I also chose resistor values that are not exactly at R, 2R, 4R. To keep it simple, I am using values from the 1, 2.2, 4.7 series, so for example 10K, 22K and 47K. This gives me 8 steps and is good enough for controlling the oscillator. With two 4053s you could get 64 steps controlled by 6 bits. Not too bad.

The idea is simple and versatile (and of course has been invented before). If you switch resistors in series, you get a switchable network with a linear response. You can also put them in parallel to a fixed value, which gives you a logarithmic response. And here comes the best part: you can do that with capacitors as well. In that case you want to put them in parallel, and that means the 4066 is an option again.


DigiPot.PNG
 Description:
 Filesize:  30.16 KB
 Viewed:  482 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

DigiPot.PNG



Last edited by synaesthesia on Sat Jul 19, 2014 12:15 pm; edited 2 times in total
Back to top
View user's profile Send private message
synaesthesia



Joined: May 27, 2014
Posts: 291
Location: Germany
Audio files: 85

PostPosted: Sat Jul 19, 2014 8:45 am    Post subject: Reply with quote  Mark this post and the followings unread

With the digitally controllable resistor network I finished the circuit idea I had. It's a simple melody/tone generator using a 4060 counter. The counter outputs are patched to the three control inputs of a 4053, which varies the resistance for the 4060 oscillator in turn. Patching the three lines to the counter outputs gives you a range of nice, warbling, stepped tone sequences. The sound file starts with the default wiring from the schematic. After a few seconds into the recording I started to alter the patches to change the tones.

One thing annoyed me when putting this together on a breadboard. The RS resistor for the 4060 at pin11 seems to be quite "hot". It is extremely sensitive to the touch and initially I got lots of unwanted noise in the output because of it. No idea why, but a condensator with 1nF in parallel to it fixed that.


DigipotMelody.PNG
 Description:
 Filesize:  30.82 KB
 Viewed:  410 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

DigipotMelody.PNG



DigiPotMelody.wav
 Description:

Download
 Filename:  DigiPotMelody.wav
 Filesize:  6.25 MB
 Downloaded:  804 Time(s)

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



Joined: Feb 18, 2013
Posts: 150
Location: south Germaica (schwabilon)

PostPosted: Mon Jul 21, 2014 12:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

thats cool! stored to my personal circuit store... Ty for sharing!!!
Back to top
View user's profile Send private message Visit poster's website
commathe



Joined: Jul 26, 2013
Posts: 153
Location: Beijing
Audio files: 5

PostPosted: Mon Jul 21, 2014 6:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

For a JFET to act as a resistor Vgs > Vth & Vds < (Vgs - Vth)

So, the voltage difference between the gate and source has to be above the threshold AND the voltage between drain and source has to be lower than Vgs minus the threshold.

Calculating the actual resistance is very tricky because there is a huge variation in Idss for JFETs. However, one thing that is cool is that JFETs are reversible so drain and source are interchangeable.

You can do the same with MOSFETs (and I think the requirements are the same) but you can only use them in one direction because there is a built in diode.

As for using a BJT, it's kind of tougher. You can also use them reversibly, but you need to figure out and calculate how much current it is going to be drawing to figure out what kind of resistance it "looks" like. Check out the Weird Sound Generator on the MFOS site though. It uses transistors for FM of some 40106 oscillators.
Back to top
View user's profile Send private message
synaesthesia



Joined: May 27, 2014
Posts: 291
Location: Germany
Audio files: 85

PostPosted: Tue Jul 22, 2014 10:08 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks a lot commathe. Will have a closer look at how it is done in the WSG. By the way, looking forward to see your article about 40106 oscillators.
Back to top
View user's profile Send private message
commathe



Joined: Jul 26, 2013
Posts: 153
Location: Beijing
Audio files: 5

PostPosted: Tue Jul 22, 2014 6:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

synaesthesia wrote:
Thanks a lot commathe. Will have a closer look at how it is done in the WSG. By the way, looking forward to see your article about 40106 oscillators.
Thanks! I almost scrapped it but I'm going to go through with it again. It's turning out to be a lot longer and more time consuming than I thought it would because I'm trying to make it as beginner friendly as possible. Hopefully I'll do an article per module as I build my modular
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [6 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 » Lunettas - circuits inspired by Stanley Lunetta
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


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