So i have an encoder, the circuit is in the photo[![Datasheet][1]][1] [1]: https://i.sstatic.net/x0M82.png 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 ?