Split voltage in half - Page 1
Forum section: electronics / projects

author: m98
author_rank: Frequent Contributor
timestamp: July 18, 2016, 06:57:43 pm
content: Hi,I need a circuit that has one input Vinand two outputs V0and V1. The input voltage can be between -3 - 3V. V0should be between 0 - 3V when Vinis between 0 - -3V, and V1should be between 0 - 3V when Vinis between 0 - 3V.This is for a kind of an analog computer, so there shouldn't be any offsets.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: July 18, 2016, 07:03:09 pm
content: You only defined half of the circuit. What is V0 supposed to do when Vin isnotbetween -3 and 0? How about V1 when Vin isnotbetween 0-3?

author: kfitch42
author_rank: Frequent Contributor
timestamp: July 18, 2016, 07:11:58 pm
content: We are going to need more details.What exactly is being split in half? Your title doesn't seem to match the description in the body of your post.What should V0 be when Vin is above 0?What should V1 be when Vin is less than 0?You have just given ranges, does it matter where those ranges the outputs are? e.g. if Vin==-0.1V could V0 be 1V, 3V, or 0V?In fact, given your description, tying V0 and V1 to ground would suffice.It sounds like you want to use an inverting OpAmp configuration (https://en.wikipedia.org/wiki/Operational_amplifier_applications#Inverting_amplifier) for V0 and a non-inverting OpAmp configuration (https://en.wikipedia.org/wiki/Operational_amplifier_applications#Non-inverting_amplifier)for V1. But that is just a guess based on what I assume you meant to say.

author: m98
author_rank: Frequent Contributor
timestamp: July 18, 2016, 07:17:42 pm
content: Sorry to be unclear on that, the output should then stay at 0V when the input is not in the appropriate range.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: July 18, 2016, 08:03:11 pm
content: Thanks for the clarification. How about kfitch42's comments? For example, what does "V1 should be between 0 - 3V when Vin is between 0 - 3V" mean? Can V1 beanyvoltage between 0-3 when Vin isanyvoltage between 0-3, or should there be some relationship between them? As he said in his post, as described, you could tie V0 and V1 to ground and it would satisfy all of your stated requirements, but I assume that's not what you actually want the circuit to do.I'm assuming you mean that V0 should be equal to -Vin, and V1 should be equal to Vin, with both V0 and V1 having a lower bound of 0V (neither should go negative)? If that's the case, you'd want an inverting amp for V0, non-inverting buffer for V1, and some kind of comparator circuit to cut them both off at 0.

author: m98
author_rank: Frequent Contributor
timestamp: July 18, 2016, 09:14:18 pm
content: Quote from: suicidaleggroll on July 18, 2016, 08:03:11 pmExactly like you explained. Isn't there maybe a smaller solution? Because a circuit like that would use up 4 op-amps.

author: rstofer
author_rank: Super Contributor
timestamp: July 19, 2016, 01:02:56 am
content: There's a very specific notation for piecewise functions (which is what I assume this is).See:https://en.wikipedia.org/wiki/PiecewiseUsing the bracket notation makes it very clear what happens where along the number line.Actually, the input/output table is probably the most useful because we can see where inversion is required. 0V in produces 3V out, 3V I produces 0V out, that kind of thing.

author: Dave
author_rank: Super Contributor
timestamp: July 19, 2016, 03:01:40 am
content: There you go, 2 opamps.Bear in mind that I added an offset to the green waveform to make the graph a bit clearer. I also attached the .asc file to this message, in case you want to play around with it.

author: m98
author_rank: Frequent Contributor
timestamp: July 19, 2016, 07:00:14 pm
content: Perfect, thank you, Dave!Quote from: rstofer on July 19, 2016, 01:02:56 amYes, I know this notation. Maybe that would've been better than failing to describe the desired behaviour in a sentence...