PDA

View Full Version : Need advise on PIC controlling a variable resistor



baldwics
- 6th February 2006, 21:58
Hi All,

I am working on a project that needs a variable resistor, and a really want to digitally control this from a PIC. I am investigating Digital Potentiometers but they are limited to only 256 wiper steps. Also considering a D/A converter, but the sticker shock for a good 16-bit converter is quite high!

Has anyone faced this challenge and how did you solve it without spending $20 for a fancy D/A 16bit converter?

Ioannis
- 7th February 2006, 08:47
More details?

What are you trying to control?

Why is needed more than 256 step?

Remember that Digital Pot's have a minimum resistance at 0 level, usually around 100 ohms or less.

Ioannis

baldwics
- 10th February 2006, 00:27
I am trying to control an audio oscillator from 20Hz to 20KHz. The individual note pitch values are not linear but rather a log function. The manual pot that I am using is 100K Audio Log "LAW" pot that can sweep from 20Hz to 20KHz.

Trying to find a programmable/PIC'able solution to the Log Pot.

Thanks,
Scott

Ioannis
- 10th February 2006, 08:06
You mean that a 100K pot is controling by means of a DC voltage an oscillator? If this is the case, what voltage range is your DC control?

Ioannis

MikeTamu
- 11th February 2006, 04:28
Look into using Pulse Width Modulation if your voltage range is 0 to 5 Volts. Or you could even modulate a transistor with a higher voltage at the collector. Your PIC might have a built in PWM generator and if so, you can easily control the duty cycle to give you changeable output analog voltage abilities.

Acetronics2
- 11th February 2006, 08:43
Hi, Baldwicks

if your tone steps are not too short in time ... you could use an ALPS motorized pot ( see i.e. www.selectronic.fr ref 50.6278 as an example ) and a PIC to control the output freq and then correct the pot as desired. A kind of servo motor ... driven to give freq instead of position.

you could then also keep manual drive of the freq ...

Alain

sougata
- 15th February 2006, 10:55
Hi,

If you are using a VCO then you might use a few more pins on the PIC to shift the voltage level on both ends of the POT. Your options are high = 5 volts, low = 0 volts and input = HighZ.

In this way you would increase the resolution of the whole thing.So your software would control the voltage ranges between say,

0v to 1v
1v to 2v
3v to 4v
4v to 5v

and you get 256 steps on each. Since it is a self oscillator you can feed the osillator signal back to the PIC and make a dynamic calibration routine for drifts in your ladder DA circuit + POT.


Wishing a speedy recovery to our forum member steve who is hurt in a car accident.

Best Regards
Sougata

suded
- 16th February 2006, 20:35
Hello Baldwics,
Find attached .pdf file on how to improve DPP resolution.
suded.