I' m not electronic or electricity specialist , i'm a developer who tries to make fun stuff on raspberry pi , and this is why i burned two rpi 3 . i'm using my rpi with many electronic stuff , pir sensors , relays etc. All those components are externally powered , and to communicate with my rpi i m connecting the rpi ground to the power source ground , and on any output or input wire i put resistors to avoid any over current going to or from the gpio pins what i m doing is similar to what is schematized here :
Powering a sensor using an external power supply board
the only difference that with data wires coming from sensor i have only one resistance between the sensor data pin and the gpio input pin, i do not add any other resistance connected to the ground between them (like the 2k resistor in the schema ) My question is : is the 2k resistor wired to ground is necessary ? why is it added , how dc current flows in this case . my question may appear stupid , but as i sad i m no electronic/electricity man , an i don't want to burn any rpi in the future.