I have CNY70 connected this way:
And I need to determine the value of R2 for OUT to be from 0V to 3.3V. I don't know how to calculate it, please help.
EDIT: Input is the 5V and output goes to microcontroller similar to Arduino, but its inputs can't take Voltage higher than 3.3V. So I need to get the output to 0V - 3.3V. I am sorry for being misleading.
EDIT 2: It goes into one of the microcontroller's analog inputs. Not the power supply.
Thank You!