tofubl

joined 1 year ago
[–] tofubl@discuss.tchncs.de 2 points 1 month ago

Good job troubleshooting.

[–] tofubl@discuss.tchncs.de 2 points 1 month ago

5V or 4.68V input isn't meaningful. The sensor has some input range and 4.68V most definitely falls into that. Could be a design choice that has no real implications.

On the other hand, if the device normally supplies 5V, just yours doesn't, then that's further evidence you have a faulty controller.

[–] tofubl@discuss.tchncs.de 1 points 1 month ago* (last edited 1 month ago) (2 children)

My money is on faulty controller at this point, but I think you'll need to find someone with electronics chops if you want to avoid just buying parts until it works again.

For what it's worth, I didn't mean take the sensor out of the wall, but just electrically unplug it from the controller to see what it does on its own when you turn on the water.

A frequency counter won't really help you here, I think. You already know to expect ~VCC/2 when water is running, and either VCC or 0V if it isn't. The speed of the square wave isn't very relevant.

[–] tofubl@discuss.tchncs.de 1 points 1 month ago

Oh and be careful if you do end up trying it.

There's no safety risk in what I described, but reversing the power supply might very well fry the device.

[–] tofubl@discuss.tchncs.de 2 points 1 month ago (7 children)

With better tools, it would be easier to troubleshoot more precisely. An oscilloscope would help you understand what's going on, for example.

From what you describe, I'm actually starting to suspect the other end (the controller?) to be the problem.

One idea you could try before buying anything is to disconnect the sensor, supply it with 5V and ground (double check with data sheet!) and see what's happening on the output when there is flow. If you don't measure anything, as I would expect since the pin alternates between a floating state and ground, you then add a 10k or 50k ohms pullup resistor between 5v and output and measure again, and should get the levels you expected to see in the first place.

Don't know if you're comfortable doing this, but maybe you can find somebody to help you out?

[–] tofubl@discuss.tchncs.de 2 points 1 month ago (9 children)

Read your post again, and your readings are of course not in line with what I laid out. Are you measuring the sensor in-system?

If you are, the sensor might indeed be faulty. If you aren't, you probably need a pullup resistor on the output pin.

[–] tofubl@discuss.tchncs.de 2 points 1 month ago* (last edited 1 month ago) (10 children)

These flow sensors are usually hall effect sensors, with two or four magnets attached to a rotor with a little water wheel. When water flows, the magnets turn and create something like a PWM signal at the output (actually it's high level when magnet is there and low level when magnet is not there or vice versa). Measuring the pin with a slow multimeter, this would indeed give you approximately half the supply voltage when water is flowing, depending on a few other factors. So- readings sound sensible to me. To note that if the rotor stops with a magnet close to the hall effect sensor, you will read 5V (or VCC) at the output, but always VCC/2 when flowing.

Most of these sensors employ an open collector output stage, but that doesn't need to bother you with the readings you're getting, I think.

[–] tofubl@discuss.tchncs.de 4 points 2 months ago

Love the Sensorwatch project and I've been wearing the lite for half a year now, but I wonder what's going on with the Github project. There seems to be really high community engagement and interest, with over 50 open PRs, but not much happening at all. There are good improvements and fixes in the PRs, too.

[–] tofubl@discuss.tchncs.de 2 points 3 months ago

That actually makes a lot of sense. I never even second guessed how tedious all the parsing is. But then, as others have said here, as soon as the task at hand reaches a level of complexity beyond grepping, piping and so on I just very naturally move to Python.

On a different note, there are ways to teach bash json. I recall seeing a hacker conference talk on it some time ago, but didn't pay close attention.

[–] tofubl@discuss.tchncs.de 1 points 3 months ago* (last edited 3 months ago) (2 children)

Mh, it probably depends a lot where you're coming from. I don't need Powershell or have a reason to learn it in my daily work, and I mostly use WSL to access Linux shells everywhere else. And on top of that, I don't understand why Powershell needs a completely different command set to basically every other shell. It's a biased take, but I have not had an interaction with Powershell that I liked, nor have I seen a feature that made me want to look into it more.

What's the killer feature, would you say? Care giving me the fanboy-pitch?

edit. Oh and I forgot, the tab completion in Powershell is so incredibly dumb. I never ever in my life want to cycle through all items in a path, and much less have it be case insensitive. Come to think of it, this might be the origin of most of my disdain. ;)

[–] tofubl@discuss.tchncs.de 7 points 3 months ago (12 children)

WSL has changed the game pretty significantly, don't you agree? It's not perfect, but allows me to stay firm in my resolve never to learn powershell.

view more: next ›