I was looking at a BeagleBone Black Cape and became curious on an input circuit to the BeagleBone GPIO (used for a NPN proximity sensor). Upon further reverse designing, I notice a // 220Ω shunt resistor (R1) with the LED. I have a basic understanding on diodes/LEDs (current limiting series Rs for LEDs) but I cannot understand the purpose for R1. So I cal'd the currents thru R1, R2 and the LED but after looking at the datasheet (PS2802) at the "forward current vs. forward voltage I am not sure if my cal'd currents are correct.
In short, the series current limiting R2 (1.2kΩ) I understand it's main purpose and how to calculate it's value but the shunt R1 (220Ω) purpose is confusing me.
My original question was just going to ask. What is the purpose for R1?
But now, my secondary question is (in general). Are my current values correct?
I hope I can become enlightened;-)
simulate this circuit – Schematic created using CircuitLab