image-20230306180513131

What is in the above circuit the single complete formula to calculate the voltage across R3? No idea!

I hoped to use it to calculate to determine the proper ratio of resistors in a circuit where V1 would be 5V, V2 a sine wave between -2.5 and 2.5V and the desired output (which is the voltage across R3) to be within 0-5V.

Instead of doing math I resort to LTSpice:

image-20230308151715988

UPDATE: Error! The sinewave is from -2.5 to +5V! in this schematic!*

This shows 3x3x3=27 lines in the resulting chart. After filtering a bit, the purple line here looks like the best candidate:

image-20230308151936825

With R1=1k, R2=2.7k and R3=8.2k the output should be between 1.5V and 4V.

image-20230308152743648

The grey line here is even better with a voltage range of about 0-3.5V.

image-20230308152917534

And after some more detailed figures, the best seems to be R1=1.4k, R2=2.1k and R3=8.8k

What I did not account for is that I have no resistors with these exact values.

image-20230308164710179

There it is: R1=1.2k, R2=1.8k and R3=10k

image-20230308173339762

What's also nice is the .meas function in LTSpice. Executing a simulation with that shows the output in the Error Log, which is handy for copying the numbers to Excel for instance.

Finally, I find out these values are optimal, with a min voltage of 0,00458347 and max of 3,7689:

.step x=1000 y=1500 z=10000 .step x=1200 y=1800 z=12000

image-20230308182041221

Strange...on the breadboard the results are very different. Where I expected the yellow waveform to be 0-3.7V I got 0.5-2.5V, and also the 10k resistor does not seem to make any difference. Removing it and nothing changes.

DS1Z_QuickPrint1

I try the same in Falstad and get yet another different result, with the output voltage between ~1.5 and ~3.9V.

image-20230308182559686

Conclusion: I have no idea what is happening, and wil continue on a new page by finding out what a standard voltage adder looks like 'clamping circuit'.