Re: Liquid level indicator





MarkMc wrote:
> Somebody on my brewing forum suggests this cct, which seems good.
>
> http://www.uoguelph.ca/~antoon/circ/sensor3.htm
>
> I am abit of a newbie, can anybody explain to me what's going on here?
>
> >From what I understand, a small a/c voltage is sent out, and taken back
> on another probe, which is then rectified and 'compared' to a reference
> level which energises the relay. Which bits of the cct do what
> parts/how they do it, I'm not sure about.
>
> I need to be able to alter this circuit by taking the logical state(0
> or 1) of the sensor output, and combining it with a few other gates
> before then driving the output relay.
>
> I'm always bad at understanding transistors, and CMOS outputs. Why
> does he use PNP rather than NPN here? Does it matter? Can I use say
> BC107's (which I have at home) instead?
>
> Regards,
> Mark

Hi, Mark. Tony Van Roon's circuit uses 2/4ths of a 4093, which is a
quad 2-input NAND gate with Schmitt trigger. The gate shown as N1 is
set up as a cheapie oscillator, and outputs a square wave (0V - 12V) at
a frequency of a couple of KHz. This signal is AC coupled through the
caps C1, C2 and the liquid (which is assumed to have a relatively low
resistance) to the second part of the circuit. It's then half-wave
rectified and level-shifted by diodes D2 and D3 so as to charge up
capacitor C4. If the cap goes up to more than 60% or so of the power
supply (that would be around 7.5 to 8V in the diagram), that will send
N2 low. According to the diagram that will turn on the transistor T1,
which will turn on the relay.

First off, there's a conceptual problem here, which you'd find out as
soon as you tried to use this thing. I'm assuming your beer vat is
going to have foam. If the liquid is conductive (I believe beer is),
then the foam will be, too. Your basic idea, I believe, was sensing
fluid level, not foam level. Also, foam sticking on the electrodes may
cause the resistive path to remain unless you have them far enough
apart. Something to think about, but depending on the electrodes you
use and their spacing, it might be OK.

Second, the circuit shown is somewhat deficient in a couple of areas.
A transistor is a current-driven device. When you try to drive the
base of a transistor with a voltage, the bulk resistance of the
transistor plus the output impedance of the logic gate _may_ be enough
to save the transistor, but you should never depend on it. While
you're at it, you should know that the relay load really should be
connected to the collector rather than the emitter. Second, resetting
the logic gate by opening up the GND connection is an invitation for
all sorts of bad things to happen, as the cap tries to discharge
through other pins of the IC.

Here's another try that avoids these problems (view in fixed font or
Notepad):

` VCC VCC
` + +
` | |
` | C|
` Sensor 1N4002 - C|RY1
` ^ C|
` ^ ^ | |
` | | | |
` C| C| '----o
` --- --- |
` --- --- __ __ |
` ___ | | .--| | .--| | ___ |/
` .-----|___|--o o->|-o---o---o---| |&H|o-| |&H|o-|___|-o-| Q
` | | | C| | | '--|__| '--|__| R | |>
` | __ | - --- .-. .-. .-. |
` | .--| | | ^ --- | | | | R| | |
` o--| |&H|o--o | | | | | | | | |
` | '--|__| | | '-' '-' '-' |
` | === === | |22 ohm | |
` C| GND GND === | === ===
` --- GND o | GND GND
` --- |=|
` | o |
` === |Reset
` GND |
` ===
` GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

Everything above is the same as Tony's circuit, except as shown. The
cheesy reset was replaced with a 22 ohm resistor in series with a
switch to discharge the cap. That should take care of resetting the
relay circuit if you need it. Second, Tony's circuit has an active low
logic output driving a PNP transistor. By using one of the spare
inverters, you've got an active high signal which drives an NPN. The
last change is that you've got the relay load at the collector of the
transistor, and there's a series resistor R to the base of the
transistor along with a base ballasting resistor to make sure it's
really off.

You haven't mentioned what relay you're using, but I'll assume it's one
with a coil power of about 3/4 watt. For a 12V coil, that would mean
about 60 mA. It's customary, when using a small signal transistor as a
switch, to drive the base with a current of about 1/10th of the
collector current. If you set R so that the 4093 output is pushing
6mA, you'll be in the Groan Zone. That's too much current to pull from
a regular 4000-series CMOS output at 12V. But, it should be OK for two
CMOS outputs. So, you might want to try replacing the third gate with
this (view in fixed font or Notepad):

`
` VCC VCC
` + +
` | |
` 1N4002| C|
` - C|RY1
` ^ C|
` | |
` __ | |
` .--| | ___ '----o
` | |& |o-|___|--. |
` o--|__| 3.9K | |
` | | |/
`---o o---o-| Q
` | | | |>
` | __ | .-. |
` o--| | ___ | | | |
` | |& |o-|___|--' | | |
` '--|__| 3.9K '-' |
` 10K| |
` === ===
` GND GND
`
`
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

This way, you've also finished all the 4093 gates on your IC, and found
a good use for each of them.

Good luck, and feel free to ask if you have any further questions.
Chris

.



Relevant Pages

  • Re: 12v relay on 3v ??
    ... That's what confuses me. ... >>> i need to make this output drive a 12v relay, ... >>>not in the original circuit. ... >>>a one transistor circuit, apparently overlooking the 3 ...
    (sci.electronics.basics)
  • Re: 12v relay on 3v ??
    ... The single transistor circuit is no good for what you want. ... He correctly identified a comparator circuit, and anticipated you wanting to adjust the voltage. ... the load (relay) is connected ...
    (sci.electronics.basics)
  • Re: Resistors getting hot
    ... This portion of the circuit was being boarded up and ... I found the relay datasheet. ... driving this via my BC107B transistor? ... Ice, I need about 1.8mA Ibe, giving a base resistor of 6.8k. ...
    (sci.electronics.basics)
  • Re: Simple mosfet question
    ... describe the simple circuit and I think it will be clear: ... There is a 2N7000 N-ch mosfet transistor, ... The gate is tied directly to the input. ... to protect the transistor. ...
    (sci.electronics.design)
  • Re: 12v relay on 3v ??
    ... >>>The single transistor circuit is no good for what you want. ... >>>identified a comparator circuit, and anticipated you wanting ... the load (relay) is connected ...
    (sci.electronics.basics)