Help Wanted - Low Water Alarm

The circuit I am working on (https://www.circuitlab.com/circuit/qpgdun/help-wanted-low-water-alarm/) is a Low Water Alarm for double water tanks on a Caravan. Each tank circuit has a seperate LED triggered when the water level drops below the sensors (2 bare wires) - the idea being that once the water level drops below the level of the bare wires, the resistance will increase to greater than the 100 ohm resistor and trigger the BC547 transistor to complete the circuit for the LED and trigger the 2nd transistor to complete the circuit for the Buzzer. The Buzzer is shared between the 2 circuits - not sure if this will work? I'm wondering if I need to fit diodes to prevent any stray voltage working "backwards" into the circuit and stuffing things up (apologies for my lack of correct terminology) . These circuits also have connections to a solenoid on each water tank to shut the water flow off when switch is off and open when switch is on. Everything designed to run off 12V, so some of the components shown on the diagram may not be compatible - but the parts purchased are all correct for 12V, so should work fine.

I am completely new to circuit design (this is my first), so have no idea if this will work, or what I need to do to make it work? All comments welcome.

by anwamiller
October 22, 2012

https://www.circuitlab.com/circuit/5p87wu/low-water-alarm-rev-2/ Untested - you may have to tweak some values. If this is a hobby project have fun - if you want the easiest solution grab 2 float switches and a relay.

by chuckious
October 24, 2012

@chuckious,

One little gotcha.

In practice it is not a good plan to connect the bases of Q9 & Q12 and Q13 & Q15 directly together.

In a simulation their Vbe's may be identical (or very close as you have 2 different npn's on one side) so they share base currents exactly 50% or nearly 50% each.

In a real circuit, unless they are carefully - or deliberately as in MAT-02 or LM394 etc. - matched, one device may hog base current so the other doesn't turn on properly.

A solution is to double up on R13 & R20 so that each of Q9 & Q12 and Q13 & Q15 have their own base drive resistor.

by signality
October 24, 2012

True, but that's why they invented breadboards...

by chuckious
October 24, 2012

Not in my world ...

Get it right by design.

Design it properly in a simulator.

Build a prototype.

If the proto doesn't work as the sims show then work out what you haven't modelled correctly in the sims (not always possible because vendor models are often far from perfect).

Resimulate.

Respin proto as production.

You cannot put 0402 and 0201 parts, fast switchers, Class D amps, RF & uWave, low noise, high precision etc., etc., onto a breadboard and expect a prototype on a PCB to behave anything like the breadboard.

A breadboard will not show you how a circuit will behave under extremes of supply, device spreads and temperature (although CL doesn't deal with that yet).

You can do all of that and far, far more in a simulator.

Plus you cannot destroy a simulation.

It takes a few hours to source, buy and assemble all the bits to make a project.

It takes about 10us to completely destroy it with no second chance of seeing what might have gone wrong.

That's why they invented simulators.

:)

by signality
October 25, 2012

Thanks Guys for your input .............. much appreciated. I've posted another version incorporating your designs, but expanded out to accommodate 4 tanks. The sim's look to work OK, but I would appreciate your comments.

Link: https://www.circuitlab.com/circuit/4r5nyh/low-water-alarm-vers-3/

Cheers - anwamiller

by anwamiller
October 25, 2012

Anwamiller, your quite welcome, don't forget a fuse!!!!! - it will definitely ruin your day if anything goes wrong. The LED's need current limiting resistors, otherwise they will destruct. Diodes for inductive kick-back should also be considered (I used relays instead of solenoids - same concept look at the diodes).

People have different approaches, I personally have learnt more from a breadboard and actually trying things than a simulator, don't be afraid to burn out your $0.08 BC547... your definitely not spin'ing an RF design on a pro made pcb here. Lets keep things in perspective. Try changing resistor values - watch what happens. Try both ways see if it still works. When your ready to take this thing to a couple of MHz get signality to help you with the simulation then ; )

by chuckious
October 25, 2012

Anwamiller, by the way nice job, I remember my first circuit and it wasn't as well thought out as yours.

by chuckious
October 25, 2012

@chuckious,

:)

It's been a while since I had anything as cheap as a BC547 to squeeze the smoke out of!

by signality
October 25, 2012

Hi Chuckious - thanks for the feedback............... agree on the fuse and am just wondering if you have any suggestions on a recommended ampage (bearing in mind that it needs to be capable of powering 4 x 12V Solenoids - possibly all at the same time)? Thanks - anwamiller

by anwamiller
October 25, 2012

Try a 4A fuse, I wouldn't expect the circuit to draw that much but it gives you some headroom.

by chuckious
October 25, 2012

I have fine tuned this and am happy that I have the design as good as I am going to get it (next step is to lay out on a breadboard). One final comment - I took Signality's advice and seperated the transistor bases so that each has it's own feed resistor (made sense to my untrained mind), however when seperated I get quite big variances in V between the bases (up to 100mv under various combinations of pre/post switching options)??? When tied together - the simulation always has them equal? I guess that this is probably a pecularity of the CL simulation?

by anwamiller
November 01, 2012

Whats the latest?

by chuckious
November 01, 2012

"when seperated I get quite big variances in V between the bases (up to 100mv under various combinations of pre/post switching options)??? When tied together - the simulation always has them equal? "

If you short them together of course they will be the same.

:)

"I guess that this is probably a pecularity of the CL simulation?"

Unless CL has got it's sums very wrong, with separate base resistors your are seeing the Vbe differences as a result of the different conditions under which each transistor is operating.

When I talked about:

"In a simulation their Vbe's may be identical (or very close as you have 2 different npn's on one side) so they share base currents exactly 50% or nearly 50% each."

I don't mean the Vbe that you measure in your particular circuit, I mean the Vbe you measure for every individual real transistor when you drive a fixed current through it (whatever that may be, say 100uA).

If you put two real diodes in parallel and feed 100uA through them you will not see 50uA through each because the diode drop (roughly the same thing as the Vbe in a bjt) for a given current will be different for each diode. You may see 60uA in one and 40uA in the other or whatever.

Now apply that to a bjt that may be dissipating some power as a result of the base current turning it on or partly on.

It heats up. As it heats up, Vbe changes at roughly -2mV/degC, i.e. it drops as temperature rises.

The drop across a diode is proportional to the log of the current through it. That's the same as saying that the current through it is proportional to the exponential of the voltage across it. A small change in diode voltage causes an exponential change in diode current.

If the diode (base) currents are supplied from a low impedance source then as bjt heats up, it will draw more base current which may make it get hotter and so on.

That's thermal runaway.

BANG.

If the bases are tied together and fed from a high impedance source then the one with the lowest Vbe for a given base current will set the voltage applied to the bases of both bjts and so will starve the one with a higher Vbe for a given current of base current. Instead of both bjts pulling the same collector current (Ic = Ib*hfe), the one with the lower Vbe for a given base current will draw the biggest base current and so the biggest collector current. Hence it is likely to get hotter and so it's Vbe drops lower and so exponentially hogs even more base current.

This is current hogging.

Difficult to illustrate properly in CL because it has no user accessible global temperature parameter:

https://www.circuitlab.com/docs/circuit-elements/

Remember that unless you tweak their individual instance parameters, all bjts of the same type in a simulator are identical. In real life they're not.

You can connect bjt base-emitter and even base-emitter and collector connections directly in parallel but only in ICs and some special bjts pairs and arrays (which are basically tiny ICs anyway). This is because devices on the same chip are much more nearly identical.

Here's an example:

You can also connect the bases of real discrete bjts directly together in common emitter configurations but only if you use emitter resistors or other current sharing and balancing techniques.

by signality
November 02, 2012

Thanks Signality - as a "newbie" I understand about half of what you are endeavouring to tell me - but at least I am now 50% better off.

Chuckious - here is the link to my latest version: https://www.circuitlab.com/circuit/fh8x5k/low-water-alarm-3_3_1/

Through trial and error - I found that placing a diode prior to the 10K Ohm resistor, made things run (simulate) a lot better (faster) - not sure if this is the right thing to do, or what benefit the diode is having - so comments appreciated.

Just waiting for a breadboard jumper kit to turn up in the post and I can put the theory to test?

Regards - Anwamiller

by anwamiller
November 04, 2012

@anwamiller, Here is a better circuit, I've tried it, with roughly the resistor values listed (not critical). When I tried it I did it with a 1k resistor not a buzzer - shouldn't matter. Don't remove any diodes, or resistors.

by chuckious
November 08, 2012

Thanks Chuckious - just one query - I ran a simulation on this and see that there is 10.43V running to the Water Sensor (switch in the diagram). I'm concerned that at that voltage I will see electrolosis on the sensor?

by anwamiller
November 08, 2012

Its not really 10V, when the probes are out of the water the switch is open, when water covers the probe the switch is closed - so the only figure your interested in, is closed. I changed the switch so its closed (on) resistance resembled the resistance of the water I tested with. So you end up with about 0.5V between the probes with 0.000024A flowing beween the probes.

I don't know anything about chemistry - but it seems pretty low to me?

by chuckious
November 08, 2012

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.