I got a water sensor called XKC-Y25-NPN. It came with no data sheet, no instructions, nothing (!).
I know it comes in different flavours, "NPN" being one of them. This is the link:
How do I plug this into my Arduino?
I am a little worried because Dr Robot sells the same sensor, but with an attached board which seems to be doing some magic:
That is exactly how the link says it works. If you supply the device with 5 volts you will get a 5 volt signal. Try it and see. You don't need an Arduino to test it. Use a LED with a 220 Ohm resistor in series with one leg and connect between ground and the signal connections.
So... why do they provide such a filter? As in, what's the difference between hooking it up straight to a digital pin, and through this filtering circuit?
This is a very basic circuit principle that is covered in the first semester of a university level class on analog circuit design, any textbook on the topic, and many introductory web pages. If you are interested in this hobby, it would be a great idea to take some time and study the material.
But really, back to my question... normally, we need a sensor, we get a sensor, we use a sensor. The CFRobot guys have gone out of their way to put a power supply filter on the sensor.
Is such a filtering circuit something that any sensor should have/use? Or is that just a way for DFRobot to add value to the sensor they sell?
Ask the DFRobot people why they added those parts. It is possible that they discovered problems and are attempting to fix design errors in the sensor module.
As DF have no control over what their sensor is connected to or powered by, they include these extra components to ensure the protection of their device and predictability of its output.
Nothing sneaky, just plain common practice in analog circuit design to ensure stability.
Tom...
PS. Unfortunately we do not live in a perfect theoretical world.
Should It be ok for me to run this sensor without the extra circuit?
Or, would it make sense to put such a filter anyway? And if so, are there already made ones out there? (I am especially asking since I don't think DFRobot will sell just that bit)
Finally somebody in this thread mentioned that I really should know about this stuff and study it. I tried looking it up but I get all sorts of "filtering" articles. Tom, do you have a good textbook I could use to get to know the basics?