Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

modify resistance with PicMicro

Status
Not open for further replies.

liquias

Newbie level 5
Joined
Aug 26, 2007
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,377
Hi,
I'm looking for the easiest way to modify the resistance between two points in my circuit using a picmicro.
I need to build a power supply and frequency generator, and these two circuits are based on a potentiometer originally. I cannot change the circuit and I don't need voltage output but a resistance output.

using a digital potentiometer is also out of the question, since I need to be able to sink about 50 mA in the resistor.

How would you go about it ?
 

Sinking 50mA in the original potentiometer sounds like a bad idea, however, the only way you can do it is to use a photo-mosfet. Varying the LED current will change the effective resistance across the FET drain and source pins. I think it would be better to analyze what the original potentiometers do and modify the circuit to accommodate a new control signal.

Brian.
 
Thank you betwixt.

I have tried fiddling with a few LDR led and optocouplers yesterday as you suggested. i still have a few problems.

1) I can't bring the resistance low enough. (stays at around 1k ohm). I need it to go lower.
2) Resistance doesn't seem to behave very linearly.

I did love the idea though.

Any suggestions as to how to correct these attributes ?
Is there really no other way a micro controller can modify a resistance across two points in the circuit ?
 

With a MOSFET you should be able to get the resistance down to a few tens of Ohms or lower and being fully enclosed you don't need to worry about ambient light conditions.

It's rare to see a circuit where a potentiometer can't be replaced with a different component or a voltage source, can you show how the potentiometers are connected at the moment. Generating a variable DC voltage from a PIC is very easy and is probably a more suitable solution. If you have to stay with the LED/MOSFET concept, you can use a calculation or look-up table to set the LED current and hence straighten out the non-linearity.

Brian.
 

Using a mosfet as a voltage controlled resistor...

again, thank you.
I've tried using a Mosfet before posting my first post.
It seems a Mosfet is even less linear than the LED/LDR combination (this is why I liked the solution).

I'm trying to control an XR2206 function generator using a picmicro.
datasheet :

a typical example would be figure 11 on page 8.

I don't know to what "DC resolution" I can get with the PWM function of the picmicro, but I hope I can use it.

I might use a lookup table, but I think I will just measure to see if a got the right result from the output and thus gain much more accurate control.

So, I am still looking for any suggestions anyone might have.
thanks in advance !
Liquias.
 
Last edited:

Re: Using a mosfet as a voltage controlled resistor...

you can use something like a MCP41100 which is a digital controlled pot
ww1.microchip.com/downloads/en/devicedoc/11195c.pdf

It has a resolution of 256 steps but you can combine one 100k with a 10k and use both of them to get more resolution
Is that what you are looking for?

Alex

P.S. there is no "figure 8 on page 11" but there is a figure 11 in page 8
 
Last edited:

Thanks again betwixt,

In it, alexan_e suggests using a digital pot.
Do you, (or anyone else for that matter), know of a digital pot that can sink anything in the vicinity of tens of milliamps ?
 

They are normally rated to a few micro-amps, really they are intended as digitally controlled attenuators. Most are actually just DACs with the input signal used as the voltage reference.

I'm still mystified why you need such high current, there is an inherent problem with variable resistors carrying high current - as less of the physical track passes the current, it gets hotter and can easily burn out.

Brian.
 

Generally I'm trying to achieve three goals:
1) Using Voltage control resistor for micro controlled power supply
2) Using it to control the xr2206 function generator chip. (referenced in the "broken" post...)
3) Using it to control volume in an audio amp.
 

For the volume control i would go with a dedicated volume control solution like
PGA2311 (dual channel **broken link removed** )
PGA4311 (four channel http://www.datasheetcatalog.org/datasheet/texasinstruments/pga4311.pdf)

Where does the 50mA requirement come from?
The XR2206 uses high value pots that are impossible to give that much current anyway, even with 1K you would need 50v power supply for 50mA.

A pot is used to feed circuits that have an input impedance higher than the pot itself so that the pot resistance is not effected from the next stage, you can't use a 100k pot and provide the output to a 1k resistor.

Also the power supply control, what king of power supply did you find that needs 50mA from the pot that controls the voltage,
i would be very interested the see that schematic.

Alex
 
Last edited:
Thanks!
The PGA2311/4311 look like a nice solution. I'm not familiar with these. I wonder if these could solve my other requirements also. I did not find any current limit specification in the datasheets, but these ICs have short circuit protection (@50 mA) so I wonder if this will cover my other needs. I'll give it a more through look.

The xr2206 will get a supply of around 25V so I'm thinking that worse case might leave me in the vicinity of 25mA, still allot more than a digital pot might handle.

Power supply probably won't need so much current but is still resistor dependent and I need to control it with a PIC.

From what I gather (using alexan_e's and betwixt's help) this is probably not a simple request. I am surprised there aren't simple ready made solutions for this kind of need in the industry. I was sure easy solutions are available that I didn't know of...
 

Generation of true variable resistors is necessary in some cases, but they are limited in several regards, e.g. resistance range, accuracy and linearity of control characteristic, achievable variation ratio, control speed etc. A designer will always try to use alternative like direct voltage control.

Did you notice, that two of the three applications addressed in your post can be achived by voltage control? Obviously, it's the case with DC supply control and it's also the case with the XR2206 output voltage setting, as the datasheet reveals. Audio level control is the only application, that requires a special means like a VGA mentioned by Alex, another analog multiplier technique or e.g. a LDR or linearized FET as variable resistor.
 

There are 4 types of PGA chips for volume control, they are listed here
**broken link removed**

As you can see the two i have proposed have the best THD and crosstalk of the four but the other two (2310/2320)
are capable of a wider p-p output (if this is needed) because they can work with power supply up to +-15v

Also about the XR2206, having a power supply of 25v doesn't mean that the pot will provide 25mA, the pot is connected to an internal circuit that has an impedance (probably high) so it doesn't require much current.
Also a quick look at the power supply requirements of the chip shows that the total max current requirement is 20mA for all the internal circuits of the chip so you can't expect any of the pots to have to provide current anywhere close to that.

Alex

---------- Post added at 12:53 ---------- Previous post was at 12:18 ----------

As an additional comment

Thanks!
The PGA2311/4311 look like a nice solution. I'm not familiar with these. I wonder if these could solve my other requirements also.

The PGA is not a variable resistor it is
"...a resistor network, an analog switch array, and a high−performance op amp stage.
The switches are used to select taps in the resistor network that, in turn, determine the gain of the amplifier stage."

Alex
 

Could you perhaps mechanically couple a cheap RC servo to an actual potentiometer?

Regards,

Anand Dhuru
 
Last edited:

@ard: I think I need a solid state solution.
@alexan_e: PGA is a nice way to go. i'll give it a look. I hope I'll find these chips around where I live.
@FvM: I am not sure (it does say current switches) but i'll look into it. It's still funny no "simple" solution to such a trivial request exists.


I think this kind of concludes it for now.
Guys, thank you (all).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top