Help diagnosing a water level sensor - Page 1
Forum section: electronics / projects

author: robzy
author_rank: Regular Contributor
timestamp: January 21, 2022, 11:21:55 pm
content: Hey there! So my friend built a water level sensor kit from Jaycar, and its not quite working, but I'm having a bit of trouble diagnosing it.I've attached a schematic, along with voltage measurements (and implied currents) across each of the resistors when SENSOR1/SENSOR2 is open.Expected behaviour:When SENSOR1/SENSOR2 is open the LED will be off. When SENSOR1/SENSOR2 is closed, the LED will be on.Actual behaviour:When SENSOR1/SENSOR2 is open, the LED is on (with 3.2mA as per the schematic). When SENSOR1/SENSOR2 is closed the LED gets ever-so-slightly brighter.To diagnose the problem I've been trying to work out why the LED is on when SENSOR1/SENSOR2 is open. But I am struggling because I'm not terribly familiar with this circuit topology (R4 in particular confuses me).It seems to me to make sense that 12uA going into the base of T2 causes 3.2mA to go through the collector, because thats a gain of roughly 200, but I don't understand why 12uA is going into the base of T2 when SENSOR1/SENSOR2 is open.The currents in seeing in the circuit don't quite make sense. Would anyone have any suggestions about 'next debugging steps'?Fyi I've visually inspected the board and couldn't see any shorts/bridges.

author: AlcidePiR2
author_rank: Regular Contributor
timestamp: January 22, 2022, 03:45:29 am
content: Check that the transistors are not inverted.

author: fourfathom
author_rank: Super Contributor
timestamp: January 22, 2022, 05:20:04 am
content: In the schematic, T2 has collector and emitter reversed. Emitter should go to positive supply rail. It looks like T2 (PNP) is supposed to provide on/off hysteresis but I haven't done the math.

author: floobydust
author_rank: Super Contributor
timestamp: January 22, 2022, 05:21:16 am
content: T1 and T2 are CBE pinout but the kit might have different transistors with different pinouts.T2 is drawn flipped, swap pin 1 and pin 3.You should not have 4V across R1. That means T1 E-B junction is not there, so T1 is likely installed wrong which could make T2 stay on all the time like you are seeing.R4 adds hysteresis to the circuit, when T2 is turned on due to water present R4 helps provide a tiny extra base-drive to turn on T1 harder for sharper switching action.I kinda don't like these circuits because they have DC at the electrodes which causes corrosion, and it is sensitive if the water tank is at earth-ground potential compared to the 9V power source. It makes them malfunction when powered off a wall-wart vs 9V battery.edit: TheJaycar B192 kitseems to be byKemo Electronicbut assembly instructions are missing component values. Pics here to check the parts are in properly.

author: robzy
author_rank: Regular Contributor
timestamp: January 22, 2022, 08:03:31 am
content: Quote from: fourfathom on January 22, 2022, 05:20:04 amDrat! The error in my attached schematic is totally my fault. Floobydust is correct to say that its the B192 kit, and the scehamtic there is correct, but doesn't have component values. I created my own schematic to make it easier to debug and discuss here.Both transistors are connected the correct way on the actual PCB, the same as the PCB markings and the photos on the URLs that floobydust posted.Quote from: floobydust on January 22, 2022, 05:21:16 amInteresting. If T1 was working correctly what would the expected voltage by across R4? The transistor is currently installed the right way around, but I believe there were some issues with the transistor installation to begin with, and they were removed and redone. It's possible they were either killed with heat from the removal process, or perhaps blown when they were installed the wrong way...Quote from: floobydust on January 22, 2022, 05:21:16 amThat makes sense. It's almost like adding a bit of positive feedback, right? I imagine that the value of R4 has to be chosen correctly to prevent T1 from being turned on permanently?Quote from: floobydust on January 22, 2022, 05:21:16 amThanks for the heads up. Thankfuly this is just a fun silly project, it won't actually be used 'in anger'.

author: floobydust
author_rank: Super Contributor
timestamp: January 22, 2022, 06:17:21 pm
content: A transistor's E-B junction basically behaves as a diode and would see at most ~0.7V across it, if there was a path (water) for current to flow from sensor 2 to sensor 1. This turns on T1.But you are seeing 4V there, so T1 is either damaged, or the wrong part (pinout or not NPN).There's two things wrong- T1's base is up to 4V and the 4V is coming from somewhere when no water is present. Which means high leakage or a short from C-B on T1. I would remove T1 and test it or check part number/pinout etc. Or R4 is way low value.Yes if R4 was too low in value the circuit would get "stuck" from too much +ve feedback (hysteresis).

author: robzy
author_rank: Regular Contributor
timestamp: January 23, 2022, 05:20:30 am
content: Quote from: floobydust on January 22, 2022, 06:17:21 pmThanks floobydust, that makes perfect sense, and I'm a tad embarassed that my BJT knowledge was too rusty to recognise that.