I'm working with a 24V NPN sensor, and I’m using a voltage divider to drop the output to 5V for my Arduino. When the sensor is active, the output should be 0V, but I'm seeing a fluctuation around 1V instead. Would adding a pull-down resistor help suppress this fluctuation, or is there a better solution? Also, any recommendations on optimal resistor values for the divider would be appreciated. Thanks!"
It will not. It will be the voltage between the NPN collector and ground. 1V is very possible and will depend on the values of you resistors but will probably never go less than 0.5V
What values are you using?
Please adjust yourself to follow forum rules. You posted this in a forum section that clearly says that you should not post in that section. I will move your post for you, but please read the forum guide in the sticky post at the top of the new forum section.
I have the same problem. When the NPN NO sensor is active, it still gives variable outputs between 0-1.5 at its output. My stepper motors stop without going to the sensor for home.
Both of you need to (a) stop making multiple posts about the same thing and (b) draw a schematic of how you have the thing connected. There should be absolutely no need for any kind of voltage divider or additional components. These sensors are about the easiest thing to use that exist!
[edit]
Assuming that this is something like an NPN-output proximity sensor, all you should need to do is define the arduino pin as INPUT_PULLUP (or possibly use an external pullup resistor), then you can read the pin as a digitalRead().