Recently I have asked a question, why my sensors do not work on external power supply (link). I have found out, that I was limiting the current too much with the resistors. I have tried using two sensors:

My logic is, if they are rated at that current, I should put a resistor in the Vin, to restrict the current to given value. But it turned out that I was wrong, because they started working only after I removed my resistors.

My questions is - should I put a resistor in there? If yes, then how do I know what resistance should I have, if the data sheet values are misleading?

And I was wondering, why every electrical component had clearly specified the operating voltage, but the current was somewhere below in the details section. That would explain things. Thank you!
– ojekOct 21 '17 at 22:26

1

99% of components and devices require a specific voltage to operate, and the current varies depending on what it is doing at the time. The main exception is LEDs which have to have a specific current instead of a specific voltage.
– Majenko♦Oct 21 '17 at 22:33