As it turns out, the sketch I was basing my work off had the input pins 1 and 2 of the optocoupler backwards. I found a couple of other examples that mentioned the pins the opposite way I had them. I changed it and it worked.
I may have overlooked your previous diagram, but
that was the reason I asked for full detail.