I have an [encoder][2], the circuit is in the image below:

[![Datasheet][3]][3]


The one that i m interested in is the PNP one, i want to use a 0-5V digital voltage, the datasheet says this 

 1. Applied voltage: 30 VDC max.
 2. Source current: 35 mA max
 3. Residual voltage: 0.4 V max. (at source current of 35 mA)


By my calculations with basic kirchhoff law i cannot obtain 5Volts because the 35mA max, the pulldown resistor should be very low, because the emitter resistor is very low, am i missing something, how can i dimensionate the correct resistor ?

[![enter image description here][1]][1]

This was the calculations that i made, what was wrong im very tired

  [1]: https://i.sstatic.net/c6P29.jpg
  [2]: https://files.valinonline.com/userfiles/documents/omron-e6b2-c-series-rotary-encoder-datasheet.pdf
  [3]: https://i.sstatic.net/x0M82.png