Inductive sensors signal confusion

Hello everyone;
I control 7 stepper motors with Arduino unoile.I use an inductive sensor to reset the position of 5 of them.omron npn no contact. I reduce 5v with a 24v voltage divider. I cannot read healthy data from the sensors, 1 or 2 of them are working very stable while others are deviating. Since there is no digital input on the card, I read the sensors as digitalRead from analog pins. How can I read the signal on the sensor very cleanly. I need to install a low pass filter circuit. As I said, while 1 or 2 sensors are stable, when the number increases to 5, there is confusion.

I drop the 24v sensor to 5v with a voltage divider.it should be 0v when the npn sensor is active.but my sensor fluctuates around 1v.does the pullup resistor suppress this fluctuation? Or what needs to be done.
Thank you

Is it open collector?
Post specs or link to your sensor.

@yunus58
Yes, adding a pull-down resistor could help stabilize the output and reduce fluctuations. Try placing a pull-down resistor between the sensor output and ground; this may bring the voltage closer to 0V when active.

What resistor values are you using in your voltage divider? Ensuring they’re appropriately sized might also help minimize any ripple.

Omron NPN NO 24v

If the sensor was pnp, the pull down resistor would do the job.but the sensors are npn no.The resistors I use are 20k and 5k I get about 4.8v output.I can activate pullup on pnp sensors.Is this enough or do I need to do something additional to reduce or reset the noise?

Omron products many of them, probably hundreds. They have some model number.

Is this your other post? How to stabilize voltage output from NPN sensor with a voltage divider?

Your topic has been moved !! Please do not post in "Uncategorized"; see the sticky topics in Uncategorized - Arduino Forum.

no.similar problem

yes , this is model E2B-M12KS04-M1-C1

Ok, connect brown to +24 and blue to - (GND) of your power source (without any dividers or arduino connected). Measure voltage between blue and black both in proximity and not. Then same between brown and black. Post results.

I have merged your topics due to them having too much overlap on the same subject matter @yunus58 .

In the future, please only create one topic for each distinct subject matter and be careful not to cause them to converge into parallel discussions.

The reason is that generating multiple threads on the same subject matter can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.

Thanks in advance for your cooperation.

An NPN sensor is basically acting as a switch to ground.

Connect sensor output directly to the Arduino input (and ground), with internal pull up on the pin. Or external stronger pull up if the wiring is relatively long. That could be a 1k resistor to VCC of the Arduino. A small capacitor (10-100n) from Arduino pin to ground might also be needed in noisy environments.

Post a diagram and code if you want to solve this quickly.
Leo..

Here's the diagram, connect according to @Wawa , brown (pin 1) to 24V+, blue (pin3)to 24V- and Arduino GND, black (pin 4) to Arduino input.
!

That's the way to go if it is original Omron sensor. If doubts, I would still measure voltage to make sure it really is open collector (and not having pullup built in).

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