Author |
Message |
CHRISKELLY
Joined: Apr 08, 2018 Posts: 103 Location: England
Audio files: 3
|
Posted: Wed Sep 04, 2019 3:31 pm Post subject:
Inverting an LFO - single supply |
 |
|
I was reading this thread about summing CV's
http://electro-music.com/forum/topic-71213.html
And although it was a bit over my head, it got me thinking about something on a circuit of mine:
I'm using a vactrol to control the decay of a sound. The decay increases as the resistance to ground increases. So as the CV lowers, the decay increases.
I want to use a 5V simple R2R LFO as a CV, but I'll need to invert the LFO voltage before I use it to control the vactrol. (So that a rising CV gives a rising decay etc)
If I use the inverting input on an op amp (single supply) then the non-inv input should be biased to half the supply voltage.
So is this the correct strategy:
- offset and scale the CV to change from between 0V - 5V to between 2.5V - 5V
- input this new range at the inverting input of the op amp to get between 0V - 2.5V but with the signal inverted
-adjust the gain of the op amp to a gain of 2, to get back to between 0V and 5V but with the signal inverted.
Thanks
Chris
P.s - i know I could just make a new R2R for this but I'm trying to use the same one  |
|
Back to top
|
|
 |
PHOBoS

Joined: Jan 14, 2010 Posts: 5856 Location: Moon Base
Audio files: 709
|
Posted: Wed Sep 04, 2019 7:59 pm Post subject:
Re: Inverting an LFO - single supply |
 |
|
That would work but there is no need for the scaling or at least it depends on your supply voltage and the used opamp but that's for later.
I am probably going to repeat myself a bit from the other thread but let's see if I can make it a bit more clear to you.
The output signal of an inverting opamp (with a gain of 1) is the difference between the input and a reference voltage inverted/mirrored across said
reference voltage. (you might have to read it a couple of times)
With a bipolar supply this reference voltage is usually 0V (GND) so if you input +7V the difference between 0V and +7V is of course just 7V. If you
mirror this across 0V you get -7V (a positive* input voltage gets subtracted from the reference voltage). If you input +2V the difference is 2V which
mirrored across 0V gives -2V. If you input -3V the difference is 3V which will result in +3V (a negative* input voltage gets added to the reference
voltage). you'll get the idea. So if the reference voltage is 0V is pretty straight forward.
[+7V][0V][-7V]
[+2V][0V][-2V]
[-3V][0V][+3V]
* positive and negative in relation to the reference voltage!
now let's say we put this reference voltage at +4V. If you input +7V the difference is 3V. +7V is higher (so positive) compared +4V so you have to
subtract the difference. +4V - 3V = +1V. If you input +2V the difference is 2V. However!... although an input of +2V might be a positive voltage
compared to GND it is a negative voltage (lower) compared to +4V so you have to add the difference. +4V + 2V = +6V. If you input -3V the
difference is 7V. -3V is of course also negative compared to +4V so you add the difference. +4V + 7V = +11V.
[+7V][+4V][+1V]
[+2V][+4V][+6V]
[-3V][+4V][+11V]
as you can see +4V is centered between in/output voltages.
if you would use a reference voltage of -1V the results would be:
[+7V][-1V][-9V]
[+2V][-1V][-4V]
[-3V][-1V][+1V]
I'll let you try the next one with a reference voltage of +2.5V
[0V][+2.5V][?]
[+1V][+2.5V][?]
[+2V][+2.5V][?]
[+2.5V][+2.5V][?]
[+4V][+2.5V][?]
[+5V][+2.5V][?]
if you get that part correct we can continue,.  _________________ "My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube |
|
Back to top
|
|
 |
CHRISKELLY
Joined: Apr 08, 2018 Posts: 103 Location: England
Audio files: 3
|
Posted: Thu Sep 05, 2019 1:03 am Post subject:
|
 |
|
[0V] --> 5V
[1V] --> 4V
[2V] --> 3V
[3V] --> 2V
[4V] --> 1V
[5V] --> 0V
!!!!!
Thank you Phobos!!
I wish there was an emoji that was both facepalm and having a light bulb moment because I totally get it now and when you explained it, it was so obvious! (I guess it would be an LED moment in our case)
Thanks for your help as usual
Chris |
|
Back to top
|
|
 |
PHOBoS

Joined: Jan 14, 2010 Posts: 5856 Location: Moon Base
Audio files: 709
|
Posted: Thu Sep 05, 2019 5:56 am Post subject:
|
 |
|
excellent!
That's just the theory though. You can try it out and it might work but I'd like to know what the supply voltage is.
Also is the R2R LFO just one complete circuit ? Otherwise you could just invert the signals before the R2R and if you'd
use XOR gates to do that you can change the direction with a switch or another signal. _________________ "My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube |
|
Back to top
|
|
 |
CHRISKELLY
Joined: Apr 08, 2018 Posts: 103 Location: England
Audio files: 3
|
Posted: Thu Sep 05, 2019 10:16 am Post subject:
|
 |
|
This LFO is from a 4017 running at 5V power.
Set for an 8 step cycle and goes:
0V
1V
2V
3V
4V
5V
4V
3V
2V
1V
[Repeat]
(Well near enough - they all lose volts through the diodes tying them together at the voltage divider)
I'm building a bank of them all running at different clock speeds. |
|
Back to top
|
|
 |
CHRISKELLY
Joined: Apr 08, 2018 Posts: 103 Location: England
Audio files: 3
|
Posted: Thu Sep 05, 2019 10:18 am Post subject:
|
 |
|
Hang on - I meant
0.5V
1.5V
2.5V
3.5V
4.5V
3.5V
2.5V
1.5V
 |
|
Back to top
|
|
 |
CHRISKELLY
Joined: Apr 08, 2018 Posts: 103 Location: England
Audio files: 3
|
Posted: Thu Sep 05, 2019 11:19 am Post subject:
|
 |
|
Tested and it works! Just needed a non-inverting buffer first, for some reason.
Cheers Phobos  |
|
Back to top
|
|
 |
PHOBoS

Joined: Jan 14, 2010 Posts: 5856 Location: Moon Base
Audio files: 709
|
|
Back to top
|
|
 |
CHRISKELLY
Joined: Apr 08, 2018 Posts: 103 Location: England
Audio files: 3
|
Posted: Thu Sep 05, 2019 3:41 pm Post subject:
|
 |
|
It's a weird setup with some parts running at 9V but the drums in the circuit are based on the korg monotribe which i built at 5V, so the logic controllers got built at 5V. The vactrols have a sweet spot / useful range between 1.5 - 2.5V so LFO's at 0V - 5V made sense.
Today i used a TL072 at 9V and just sent the 0 - 5V into it to get buffered/inverted. Will probably swap for rail to rail opamps eventually but tbh the vactrols don't notice if I lose some voltage at the top/bottom! |
|
Back to top
|
|
 |
PHOBoS

Joined: Jan 14, 2010 Posts: 5856 Location: Moon Base
Audio files: 709
|
|
Back to top
|
|
 |
|