I'm using an optocoupler to sense when a couple of signals in my car are high. I'm struggling though to understand how big a resistor I should put on the input to drive the LED.
I have a couple of working voltages, one at car running voltage ~14.4v and one at 5v. Looking at this datasheet, there are a number of versions of the PC817: https://www.farnell.com/datasheets/73758.pdf
It seems only the X1 is currently available on component sites, so assuming this version of the component, what amount of power should I need to drive it for each voltage case?