I am mainly concerned with gray rectangle area - other part works fine so far.
MCU is Attiny85. I've measured current at RP2 when running servo at full speed (by voltmeter only) and it was 0.9 mA max. Optocoupler should bypass RP2, when fully open. R1 is for diode protection. R3+C1 should smooth PWM to somehow-steady analog voltage.
I've used lot of internet to put it together, but I am still a noob ... so could as well missunderstood some parts all together.
I didn't tested it yet (I expertly killed my only opto at hand, so waiting for replacement).
I want to ask if my thinking is right and if this can be done with transistor-based opto (photodiode ones are a bit pricey)?