# Is it possible to get an exponential capacitance curve from coded dip switch

I have a capacitor that controls frequency for a specialty IC with the relationship

$F \propto 1/C$

I want to be able to get a number of frequencies in evenly spaced intervals. Currently I have a string of series capacitors some of which I short out with regular dip switches in a binary code to give 16 steps. simulate this circuit – Schematic created using CircuitLab

This works as adding capacitors in series follows the relationship below giving linear steps.

$F \propto \frac{1}{C} = \frac{1}{C} + \frac{1}{2C} + \frac{1}{4C} +\frac{1}{8C}$

To make it more intuitive to set the frequency for people who are not used to binary code I would like to use a coded rotary dip switch such as this

This means the switches are not all separate and have a common pin. simulate this circuit

Because of this the relationship is exponential and it is not possible to get even steps based on this circuit

$F \propto \frac{1}{C} = \frac{1}{C + 2C + 3C+ 4C}$

TLDR

Is there a simple way to get evenly spaced frequency steps using a coded rotary dip switch, without needing too many more components.

• Ummm - use different value capacitors? – WhatRoughBeast Dec 3 '15 at 2:34
• Different values will still have the same problem of changing step size – Hugoagogo Dec 3 '15 at 2:59
• Does your IC also have a resistor that controls current ? – jp314 Dec 3 '15 at 3:56
• I have two pins that it expects me to apply capacitance across – Hugoagogo Dec 3 '15 at 4:05
• Four relays? Connect each output of the rotary switch to the coil of an SPST relay. – Tom Carpenter Dec 3 '15 at 4:54

Edited:

The 4 relay idea from Tom C is one option.

Other then that, if using a group of relays is not practical, then an old fashion 16 position rotary switch could do the trick too.

You could create a similar capacitor string as in your first diagram using 16 equal value capacitors, (much easier then finding several specific values) then use the 16 position switch to connect to each of the 16 intersections within the string. That would give you the "division" format you seem to need.

Low cost 12 position switches can be had from surplus dealers.

• Yes they add together in a linear way giving linear capacitance steps, this gives non linear frequency steps – Hugoagogo Dec 4 '15 at 6:44
• Where is the non-linear part? Your equation says "proportional to" doesn't it? – Nedd Dec 4 '15 at 6:47
• Not really, it is proportionate to the inverse. – Chris Stratton Dec 4 '15 at 6:49
• Made very clear tinyurl.com/n9og6tq – Hugoagogo Dec 4 '15 at 6:56
• It could also be claimed that your Frequency intervals (per the list) are not "evenly" spaced, they are divisions (ratios), each step is a divide by n. – Nedd Dec 4 '15 at 8:51