Testing a circuit systematically and efficiently
Generally it is preferable to use intuition and basic calculations rather than blindly swapping components in and out.

For your example, you have an optocoupler, and you want to take a voltage on one side and transfer it to another.  As I mentioned in the comments, this is not the greatest tool for this (a linear optocoupler would be much better), and the part to part variations make this likely not work.

Here is the FOD852 optocoupler.  It was the first datasheet the popped up when I searched for optocoupler.  On the 4th page is a number of figures that show the characteristics of a particular device.

Figure 8 shows a plot of collector to emitter voltage as a function of collector current, for a number of different forward currents of the diode.  We know that we want some range of currents through the diode to equal some range of currents (or voltage) through the transistor:



We can kind of squint and see that a current of ~3-10 mA will lead to a collector current of ~80-100 mA.

So, we want to generate a 3-10mA current through the diode, and we want a 80-100mA current through a resistor to give us a Vce of ~1V.

The 3-10mA is accomplished with a resistor of (Avg(V_ana1) - V_f)/6mA,  The 80-100mA is accomplished with a resistor with a value of (Vcc2 - 1V)/90mA.

By thinking a little, and using the data available to us, we can make a pretty good guess.