Electronics > Projects, Designs, and Technical Stuff

Help diagnosing a water level sensor

(1/2) > >>

robzy:
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.

AlcidePiR2:
Check that the transistors are not inverted.

fourfathom:
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.

floobydust:
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.

robzy:

--- Quote from: fourfathom 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.
--- End quote ---
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.


--- Quote from: floobydust on January 22, 2022, 05:21:16 am ---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.
--- End quote ---
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...


--- Quote from: floobydust on January 22, 2022, 05:21:16 am ---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.
--- End quote ---
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?


--- Quote from: floobydust on January 22, 2022, 05:21:16 am ---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.
--- End quote ---
Thanks for the heads up. Thankfuly this is just a fun silly project, it won't actually be used 'in anger'.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod