Author Topic: Help diagnosing a water level sensor  (Read 998 times)

0 Members and 1 Guest are viewing this topic.

Offline robzyTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: au
Help diagnosing a water level sensor
« on: January 21, 2022, 11:21:55 pm »
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.
 

Offline AlcidePiR2

  • Regular Contributor
  • *
  • Posts: 95
  • Country: fr
Re: Help diagnosing a water level sensor
« Reply #1 on: January 22, 2022, 03:45:29 am »
Check that the transistors are not inverted.
 

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 1884
  • Country: us
Re: Help diagnosing a water level sensor
« Reply #2 on: January 22, 2022, 05:20:04 am »
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.
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7014
  • Country: ca
Re: Help diagnosing a water level sensor
« Reply #3 on: January 22, 2022, 05:21:16 am »
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: The Jaycar B192 kit seems to be by Kemo Electronic but assembly instructions are missing component values. Pics here to check the parts are in properly.
« Last Edit: January 22, 2022, 06:43:44 am by floobydust »
 

Offline robzyTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: au
Re: Help diagnosing a water level sensor
« Reply #4 on: January 22, 2022, 08:03:31 am »
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.
Drat! 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.

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.
Interesting. 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...

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.
That 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?

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.
Thanks for the heads up. Thankfuly this is just a fun silly project, it won't actually be used 'in anger'.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7014
  • Country: ca
Re: Help diagnosing a water level sensor
« Reply #5 on: January 22, 2022, 06:17:21 pm »
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).
 

Offline robzyTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: au
Re: Help diagnosing a water level sensor
« Reply #6 on: January 23, 2022, 05:20:30 am »
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).
Thanks floobydust, that makes perfect sense, and I'm a tad embarassed that my BJT knowledge was too rusty to recognise that.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf