How to stabilize voltage output from NPN sensor with a voltage divider?

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!"

Let me know if you’d like any adjustments!

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.

What is an 'NPN Sensor' ?

Assuming you mean a sensor with an NPN (open-collector) output. 1V should be fine. What's the problem?

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().

But a schematic would be helpful!

1 Like

@yashwa01
You seem to know how to solve @yunus58 problem which is exactly the same as your own but you can't solve your own problem.
https://forum.arduino.cc/t/getting-rid-of-ripple-in-npn-sensor/1315107/3?u=jim-p

I suspect that you have created two accounts with different names, which is against forum rules.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.