Notifications
Clear all

My P-trap water sensor

42 Posts
6 Users
20 Reactions
2,673 Views
 Biny
(@binaryrhyme)
Member
Joined: 2 years ago
Posts: 269
Topic starter  

@davee Here's the working v04, non-comparator version.

image

I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.


   
DaveE reacted
ReplyQuote
Inst-Tech
(@inst-tech)
Member
Joined: 2 years ago
Posts: 554
 

@binaryrhyme Hi, Was just looking at the Schematic that @DaveE proposed..Looks great, but i did a little research myself on my Tinkercad simulator and found you can do the same thing with 1 less transister, 2 diodes, and 1 less resistor.. I used 2n3904 npn, 2n3906 pnp BJT transistors, 2 leds, any 5mm 2 v forward voltage will do, and 6 resistor. less parts, means less to go wrong, and less work!.. lol

A schematic is attached below..

 

Anyway, hope your project works for you, I'm going to use it as a rain gauge to keep my sprinkler system from coming on when it's raining..lol

kind regards,

LouisR

LouisR


   
Biny reacted
ReplyQuote
 Biny
(@binaryrhyme)
Member
Joined: 2 years ago
Posts: 269
Topic starter  

@inst-tech Awesome. I love an elegant design!

I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.


   
ReplyQuote
 Biny
(@binaryrhyme)
Member
Joined: 2 years ago
Posts: 269
Topic starter  

@inst-tech I had thought I might use a soil moisture sensor build to drive my watering system, lol.

I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1721
 

Hi @inst-tech and @binaryrhyme,

  I agree that less parts means less to go wrong ... and if the circuit works, great. Obviously it is fundamentally the same as the original with the PNP and NPN roles swapped, and the resistor bias & current control improved.

Binaryrhyme suggested a circuit, but said it had a couple of problems .. water present LED not bright enough and the other LED wasn't being extinguished.

I obviously can't test the original prototype, but my simple simulation suggested the first LED problem might be a combination of LED series resistor too high and current gain from 1 transistor could be too low, especially at the higher impedance end. The latter might be due to the simulation model being inappropriate -- I only used the generic model.

My suggestions were only meant as ideas to explore ..

As I pointed out, the transistor models were 'generic', so it is quite possible that a 'real' device would have higher gain, and merely reducing the LED series resistor would be enough. I suggested the Darlington Pair as a backup strategy.

And assuming Darlington Pair was used, then clearly two collector-emitter voltage drops were likely to be too much to turn off the complementary transistor without 'help' ... hence the diodes.

My aim was to promote some thoughts ... not provide the perfect solution ... I hope I achieved that!

Best wishes, Dave


   
Biny reacted
ReplyQuote
 Biny
(@binaryrhyme)
Member
Joined: 2 years ago
Posts: 269
Topic starter  

@davee You did indeed, and I valued your contribution highly. The series of successive designs proved invaluable in unlocking ideas and providing insights. Go team, I say!

My smarter half has cast a spanner into things by pointing out that the system has five states: 1) off, 2) dry, 3) water present, 4) shorted lead and 5) something, but not water (probe resistance > 50K and less than infinite). It is likely overkill to solve displaying all 5 (current design detects and shows three), but I'm having too much fun to let the gauntlet drop now, lol. I think the design is essentially a 2 bit ADC, with tunable ranges on the analog side. 

Fly? I have a hammer!

Thanks for everything. Loving this community thus far. 😉

I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2537
 

@binaryrhyme FYI @davee @inst-tech et al ...

i've been watching this thread for a while and it really seems to me that you're just inventing a warning system instead of a solution to the problem. Somebody will need to monitor the lights on a frequent basis and, if needed, go and run some water into the tub.

Why not just put a bucket of water beside the tub, cut a hole in the lid, put a USB aquarium pump in it and have your sensor turn on a MOSFET to start the pump when it senses no water and stop the MOSFET when the sensor indicates there's water present.

That would eliminate the need for frequent (or constant) monitoring of the lights with occasionally checking and re-filling the bucket.

PS - the bucket needs a lid to slow down evaporation 🙂

Anything seems possible when you don't know what you're talking about.


   
Biny and huckOhio reacted
ReplyQuote
 Biny
(@binaryrhyme)
Member
Joined: 2 years ago
Posts: 269
Topic starter  

@will Oh, I think once I bring an arduino into the mix, there will be a servo with a 3d printed grip turning the tap for 30 seconds. 😉

I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2537
 

@binaryrhyme 

OK, sounds like you have a handle on it 🙂

Anything seems possible when you don't know what you're talking about.


   
Biny reacted
ReplyQuote
 Biny
(@binaryrhyme)
Member
Joined: 2 years ago
Posts: 269
Topic starter  

@will Well, we have similar ideas. Having a handle on it is overstating things, a tad. 😉

I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.


   
ReplyQuote
Inst-Tech
(@inst-tech)
Member
Joined: 2 years ago
Posts: 554
 

@binaryrhyme , At DaveE, & @Will...

I'm sitting here reading this post with my morning coffee, and thinking about what we in the Industrial process controls industry call the "creeping elegance ".. lol

@DaveE, Indeed, your ideas are worth a million..and I did prototype it to see if it would actually work, and it does!  The R2 resistor in your schematic would be replaced with the probes, and as long as the open resistance is greater than 2 megs, it will turn on the green led (D2), and turns off the Red led, (D1). Shorting the leads together is the same as the probe leads contacting water.. of course the conductivity of the water must > .1 mMhos , so it probably wouldn't detect ionized water, but any liquid that is alkaline or acidic (pH >7.2 or <6.9 would surely trigger it...lol 

The one thing I learned in my 40 + years in working in instrumentation and electrical was, the more complex things were, the more that could, (and would) go wrong. lol

@Will, love your creative thinking.. but of course Dave and I were just problem solving the problem at hand, namely, circuit design inefficiencies to just get the circuit to work correctly..mission accomplished!..

Now as far as the next step , well, I say let the creative juices flow..and watch out for the "creeping elegance"..

I'm enjoying this banter very much, as an old guy of 75, It makes my day..

Good luck to you @Binaryrhyme.. looking forward to what you come up with!

Kind regards,

     LouisR

 

 

LouisR


   
Biny reacted
ReplyQuote
 Biny
(@binaryrhyme)
Member
Joined: 2 years ago
Posts: 269
Topic starter  

@inst-tech Heh. Talking with my smarter half, she suggested the "automatic top up" of the trap could be accomplished using Will's "bucket" and a solenoid valve. No robotics required, so some complexity reduction.

I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2537
 

@binaryrhyme 

Awwww, but that would ruin the bucket 🙂

Anything seems possible when you don't know what you're talking about.


   
Biny reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1721
 

Hi @binaryrhyme,

  Congratulations on starting an inventive thread.

  As for the real problem, I am NOT a plumber. Don't forget to check what the local water regulations are in your part or the World, but I think I would be tempted to try fitting/getting a plumber to fit an 'air admittance valve' or similar, and see if it helps ... I am guessing you already have the links.

Good luck with both that and your electronics projects.

Dave


   
Biny reacted
ReplyQuote
 Biny
(@binaryrhyme)
Member
Joined: 2 years ago
Posts: 269
Topic starter  

@davee Yeh, the smarter half is darn near certain it's an air pressure venting issue - but she will make sure she has solid data before calling in a plumber, as too often in the past, she's had workfolk jump to the wrong conclusion and do work that wasn't needed. I think we're taking the wall off on our next trip. 😉

I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.


   
ReplyQuote
Page 2 / 3