0
\$\begingroup\$

In a lot of circuits (especially with the 555 timer), I see capacitors used to set the duration/frequency of something.

Now mostly the value of a capacitor can be calculated, however, what if I want it to be variable, and controllable from a microcontroller.

I know there exists varcaps/var. diodes etc, but if I look at the data sheets they only mention they are for radio/TV tuning. For resistors there exist variable resistors ICs, and I would expect something similar for variable capacitor ICs.

Do I miss/oversee something here?

(update) Example:

See link Example circuit

Using for C: 100 nF Using for R1 and R2: MCP42010 (100 kOhm version, see Datasheet

Slight problem is that the wiper resistance is 125 ohm, resulting in a minimum frequency (using the calculations in the circuit link) when using 100 kohm is 48 Hz, and maximum frequency (when using 125 ohm) is 48 Hz.

\$\endgroup\$
  • 1
    \$\begingroup\$ If you plan to use an MCU, why do you not integrate the timer function in it's program, saving yourself the hassle with the 555? \$\endgroup\$ – Bart Jun 13 '17 at 9:43
  • \$\begingroup\$ @Bart ... maybe that's best indeed, for me it's just a 'learning' question ... I can imagine there are many examples, not only the 555 timer. Like some high frequency IC where involving an MCU will be too performance costly to use as 'timer'. \$\endgroup\$ – Michel Keijzers Jun 13 '17 at 9:45
1
\$\begingroup\$

Do I miss/oversee something here?

Varicap diodes vary the capacitance by varying the DC voltage on reverse biased PN junction. PN junctions don't have a massive amount of capacitance hence you only get several tens of pF for something like a BB171 made by NXP: -

enter image description here

The data sheet refers to it as a VHF device but I use it at frequencies from 1 MHz to 15 MHz.

For resistors there exist variable resistors ICs, and I would expect something similar for variable capacitor ICs

There is one digitally controlled capacitor that i have come across but, like the varicap diode, this was for applications that required a capacitance in the tens of pF range. I guess there is no massive reason why bigger value digitally controlled capacitance chips couldn't be available other than market demands.

I mean, you can make a low-speed to medium-speed oscillator by varying the resistance and if you wanted a high-speed LC oscillator most varicap diodes are in the right capacitance range to suit the higher frequencies.

\$\endgroup\$
  • 2
    \$\begingroup\$ What's wrong with using a variable resistor - nobody would consider using a variable capacitor at this low frequency. \$\endgroup\$ – Andy aka Jun 13 '17 at 10:08
  • 1
    \$\begingroup\$ If you want a 20Hz frequency, you start with a larger cap like 100uF, then you get practical resistor values. \$\endgroup\$ – Neil_UK Jun 13 '17 at 10:20
  • 2
    \$\begingroup\$ @MichelKeijzers it seems to me that you want something that doesn't exist within the constraints of using a 555 timer. If you want an oscillator that can smoothly run from 20 Hz to 4800 Hz this requires specialist design over and above what a simple 555 can permit. It doesn't work with a programmable variable resistor and it doesn't work with a variable capacitor. \$\endgroup\$ – Andy aka Jun 13 '17 at 10:37
  • 1
    \$\begingroup\$ You'll never get a digipot with a temperature stable range of 800:1. I use digipots in circuits that process signals and I won't go higher than 16:1. Using a real pot will be somewhat similar but if you are prepared for temperature induced frequency instability then that's OK. \$\endgroup\$ – Andy aka Jun 13 '17 at 13:32
  • 1
    \$\begingroup\$ Look at the temperature coefficient graph for potentiometer mode on page 7 (fig 2-3). At 16:1 ratio the TempCo is about 20 ppm/degC. At 32:1 it's about 40 ppm/degC and getting close to be off the scale if you went to 64:1. In other words, you cannot rely on a digipot for having a big range (256:1 for the one you listed) whilst producing frequency stability. It's the same with varicaps - they have a temperature coefficient that isn't bad but aint that great either. Those who know, know that stable variable oscillators are gold-dust. \$\endgroup\$ – Andy aka Jun 13 '17 at 13:36
1
\$\begingroup\$

For a variable-frequency oscillator using resistor*capacitor time constants, it might seem natural to change the oscillator frequency by either changing the resistance and/or the capacitance. Variable resistors have limitations as you have noted. Voltage-variable capacitors have a limited capacitance range that is non-linear...mostly useful for high-frequency oscillators using a resonating inductor.
Other approaches allow frequency to be varied over a wide range. Some versions have impressive linearity. These circuits use a fixed capacitor that doesn't change value. What changes the frequency is a voltage or current that is variable. Many simple function generators use this technique. A 555-type oscillator does not - it has fixed threshold voltages (at Vcc/3 and at Vcc*2/3).
It is possible to modify the standard 555 relaxation-type oscillator by charging its fixed capacitor with a current source rather than a resistor. A variable current-source results in a variable frequency:
http://www.electroschematics.com/7170/wide-frequency-range-555-vco/

Output frequency varies between 180 Hz to 10kHz. While a variable resistor is used to provide a control voltage, any variable input voltage source performs the same function.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the answer! Looks like it's much more complicated than I thought (but learnt something) \$\endgroup\$ – Michel Keijzers Jun 14 '17 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.