Question about opamps

Started by egasimus, October 05, 2011, 04:30:36 PM

Previous topic - Next topic

egasimus

Since new threads seem to be answered more quickly than just shifting the subject in older threads, and I desperately need the help, here's a question.
I have a potentiometer wired between V+ (5V regulated) and GND. It's in an expression pedal, so it isn't guaranteed to fully reach either end. I want to control a voltage with it - namely a voltage between ~1.6V and 2.3V, for driving a red LED/LDR combo.
The actual minimum voltage should be set with a trimmer, as well as the steepness of the slope over which the voltage increases (opamp gain?). As a result, I would be able to tune the LDR to go from 1M at the heel-down position of the pedal, to 1k at toe-down by controlling the LED voltages at those two positions.

I've tried a few things on the breadboard and played around in the Falstad simulator, but I'm not really sure where to go next. I know a microcontroller could save me some of my worries, but it would introduce other problems, and I'm too inexperienced with those to actually attempt this. Please help me solve this problem in the analog domain. :)

Taylor

If you wire a trimmer in between lug 1 and ground, and another trimmer between lug 3 and 5v (or whichever way you have it hooked up) then you can easily trim the max and min voltage.

As far as the slope, doing that with just an opamp in a simple arrangement would only work if you want a linear slope that clips to max voltage earlier or later. The simplest way to get different pot curves is to add parallel tapering resistors. See Geofex, Secret Life of Pots.

There was also a really informative thread here at one point, where a member with a name with lots of zzzz and xxx in it did plots of more exotic curves that you can get, like S-shaped curves, but I can't seem to find it.

Another angle: you're trying to change the voltage across (really current through) the LED. Consider that you can also put series and parallel resistors on the LDR to more directly define its min and max resistances.

egasimus

Just trimmers around the pot? Now, I never would've thought of that. But I think it'll do ;D Brilliantly simple solution!
I've read most of the stuff on tapering, gotta digest it for the wiki sooner or later :) But not really what I needed here ;)
As for resistors around the LDR, I'm doing that, too: 2M LDR in parallel with a 680K resistor or something, to get a 500kC taper variable resistor, lol.

egasimus

Damn, just remembered I'm trying not to depend on the actual pot value. So I'm still taking suggestions...

Taylor

#4
Quote from: egasimus on October 05, 2011, 05:04:52 PM
Damn, just remembered I'm trying not to depend on the actual pot value. So I'm still taking suggestions...

What do you mean by that? You want to be able to plug different expression pedals in?

If so, that's still no problem. Put your trimmers in between the expression jack ring and 5v, sleeve and ground, etc.

Or is this a commercial thing where you can't expect the end user to tweak the trimmers? I can understand sometimes you don't want to reveal your hand, but if you could give a little more info about what you're trying to do it would help us not have to guess too much.  :)

But, here's another way that will work better in a commercial context but is still simple:

You can take your 0-5v CV from your expression pedal, add a trimmer that's also doing 0-5v and connect these two CVs through series resistors to a common node. The trimmer can now set the min voltage. Then you can put a voltage divider after this which can lower the max voltage. You'll still want to send this CV to an opamp buffer, then a series resistor and then the LED. Should o the trick and doesn't rely on the end user to adjust anything or the pot to be a particular value.

egasimus

I didn't know that I was hiding something :) It's just an expression pedal input for an Univibe clone, namely a Tri-Vibe. But it's gonna do a good job at replacing C pots in a variety of circuits, I can think of a few which require one...
Anyway, yes, I want to be able to plug different pedals in. But if I have an additional 10k at each end of a 220k pot, it influences the output voltage much less than if the pot was 10k. While, if I only get a voltage from the pot, buffer it, and only then process it in some way or other, the circuit operation would depend on the actual pedal to a much lesser extent.

And this is my most recent design. (68k resistor is trimmer). Just gotta figure out how to mix in a bias voltage from another trimmer, and we're good to go.

Also, has anyone tried tapering an audio to become linear? Maybe add a resistor in the same way that a linear pot is made reverse logarithmic? I want to have a "taper" switch so that I can also plug volume pedals with an audio taper pot.

blueduck577

This should do the trick.  Output goes from 1.59 to 2.27V.  Simpler then the last suggestion, no trimmers required.  Simulate and see if it suits your needs.




edit: you posted right before I did, this doesn't address tapering

slacker

I think this will do what you want, it's not effected by the value of the expression pedal pot.



Range sets the output range Ie: the difference between the minimum and maximum voltage
Offset set the centre voltage, so with the 2 of them you should be able to get what you want. The output is inverted so you can either connect the LED as shown to get the response the right way round, or chuck another inverting stage on the end and run the LED off that.

EDIT: blueduck577 beat me to it :)

egasimus

#8
Great idea, guys. I think that's what I was looking for the whole time. Thanks :)

Here's some Bulgarian music to express my thanks :D


blueduck577

#9
Some additional notes: if you wire up the circuit as I showed, you want the LED and series resistor to go from the output of the op-amp towards ground.  If you find the sweep is "backwards", switch the 15k and 10k resistors and wire the LED and series resistor from 5V to the op-amp output as slacker showed.  The range of voltage across the LED will be the same, but the sweep is reversed.

The circuit was designed assuming the expression pedal can get reasonably close to either rail.  If the range isn't wide enough, again take slacker's advice and make the feedback resistor a trimmer, try 50k as a start.  This won't affect the circuit's insensitivity to expression pot value, fyi

egasimus

Yeah, I figured that much out :) Thanks again :)