Re: Liquid level indicator



MarkMc wrote:
> Hi Chris
>
>
> Thanks very much for taking the time to explain this for me, and offer
> improvements.
>
>
> I've printed off your message and ccts from notepad for a thorough
> read.
>
>
> If you can suggest a good electronics book which explains transisters
> very well for beginners/noddy's, that would be great.
>
>
> You may be right about the foam, but I'm hoping to build the U/back and
> hop back in such a way that I get minimal foaming - hopefully I can
> achieve this.??
>
>
> For my cct, I need to drive the relay from two sensors - a high and low
> water mark, and I'd like to provide both a reset and an override ("just
> turn the pump on") feature. Furthermore, I'd like to be able to use
> the same cct and switch between the underback sensors and the hop back
> sensors (DPDT switch?). It may be that I'll need two separate sensor
> ccts for this, as each may need to be calibrated separately. Dunno.
>
>
> Any suggestions you have here would be very welcome! I did draw up a
> truth table for the kind of logic I think I need, here
> http://www.mcgee-family.com/pr­ojects/BreweryDesign/brewery_o­verview..htm
> (go to the bottom of the page for the table).
>
>
> This means that I need an assortment of AND, OR and INVERTER gates. I
> know each of these can be built from NAND gates (IIRC OR gate made from
> 3 NAND's), but this is a bit messy. Any suggested improvements here
> would be very welcome too!
>
>
> I forgot to include schmitt triggers on some of the switched inputs, so
> I guess a schmitt NAND like the cct above or a dedicated schmitt
> trigger is in order here?
>
>
> Cheers,
> Mark
>
>
>
> Oh, btw Chris, the relay I was planning on using was model YX97F from
> Maplin electronics. Technical info for this is very thin on the ground
> indeed, but IIRC, the coil has an impedence of about 330 ohms.
>
> I calculate this to mean 36mA through collector of transistor, and
> using your 10th rule for base current, this gives 3.6mA.
>
> Would this mean I can just use a single NPN (I have BC107B's at home)
> or is this still too much for the poor blighter? (sorry, I don't have
> the spec sheets in front of me to check, but it still sounds high for a
> signal transistor).
>
> Perhaps a Darlington pair would be better for driving the relay here?
>
> Cheers,
> Mark

Hi, Mark. Sorry about the delay in response. Busy with other things
over the weekend.

Your project looks like it's well though out, with a lot of time and
sufficient money having been invested. Boy, you're serious about beer.
Good job.

Your truth table seems to describe the function of a drain pump. Turn
on when H and L are ON, and don't turn off until H and L are OFF. This
action is described as a SET-RESET (SR) latch, which is a type of
flip-flop (FF). Again, you can see how using one of the Gems floats
with hysteresis would make things much simpler here. Many of their
sensors can be set so the microswitch or hall effect switch will not go
on until the float reaches a higher position, and then will stay on
until the float reaches the lower position. This hysteresis would
simplify things quite a bit. And I would personally really recommend
you use something that's made for the application. If you asked me to
do the electronics for this, I'd select a Gems switch (actually two --
you'll want one for overflow check, too), and see if I could do what
you needed with the float switch contacts and another switch or two.
But there it is. Let's see what we can do with logic gates,
transistors and relays.

Before anything else, you should know your transistor should be OK for
switching a 12VDC 36mA relay coil. Your BC107B is a small signal
amplifier transistor with a Vceo of 50V (how high a voltage it can
handle), an Ic(max) of 100mA (maximum collector current) and a minimum
Hfe (DC current gain) of 200. This is good news, because the "rule of
10" actually says that if you're switching a given collector current
load, you should inject 10X the current suggested by the DC current
gain. Or, if you like, the equation:

Ib = Ic / (Hfe /10)

That would mean you need a base current of 36 mA / (200 / 10) = 1.8 mA.
That's good news because a 4000-series CMOS gate won't have a problem
sourcing or sinking 1.8 mA with a power supply of 12VDC.

Now let's take a look at the circuit requirements. You've gone beyond
what you can do with a "one chip solution", unless you were to use a
PIC or BASIC Stamp. So let's splurge and use a 555 for your oscillator
signal (you're going to need those gates for other things).

`Beer Oscillator
`
` VCC VCC VCC
` + + + Osc Out
` | | | ^
` .-. .---o-----o---. |
` | |68K | 8 4 | |
` | | | | ---
` '-' | | ---
` | | | |
` o-------o7 | |
` | | 3o---------'
` .-. | |
` | |10K | 555 |
` | | .---o6 |
` '-' | | |
` | | | |
` o---o---o2 |
` | | |
` --- | |
` --- | 1 5 |
` |.01uF '---o-----o---'
` | |
` === ===
` GND GND
`
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

This oscillator should be good for driving almost an infinite number of
your 4093 sensors at somewhere near the same frequency as your 4093
oscillator. Just remember that you have to keep both the oscillator
signal and the sensors disconnected from earth ground or any other
potential. This is called a "floating" signal. ;-)

Let's review the bidding on these sensors. Now, both the high and the
low stainless probes are going to have one of these on the receiving
side like you talked about before:

` Beer Sensor
` H (or L) Probe`
`
` ^
` |
` ---
` --- __
` C | .---| |
` o---->|-o----o--o |&H|o---> H (or L)
` | D | | '---|__|
` - --- .-. 1/4 4093
` D ^ --- | |
` | C| | |15 Meg
` | | '-'
` | | |
` === === ===
` GND GND GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

OK. Now, we have two 12V logic signals that go active low when they
sense liquid level. We're getting there. Let's be creative and call
these signals H and L.

Time for a little diversion here. Look at this little trick:

` The Dreaded NOR RS Flip Flop
` __
` R o-------|>=| .-------------------.
` |1 |o-o----o Q | S | R | Q | Q' |
` .----|__| | | | | | |
` | | | 0 | 0 | No Change |
` | | | | | | |
` | .--------' | 0 | 1 | 0 | 1 |
` | | | | | | |
` '----------. | 1 | 0 | 1 | 0 |
` | __ | | | | | |
` '--|>=| | | 1 | 1 | 0 | 0 | (disallowed)
` |1 |o-o----o Q' | | | | |
` S o--------|__| '-------------------'
`created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

You can hook up a couple of NOR gates (CD4001) and feed their outputs
back into their inputs to do this trick. We can use this to get your
flip flop action, because you want the RS FF to SET when H is low and L
is low, and you want the RS FF to RESET when H is high and L is high.
Here's how:

` Beer Flip Flop VCCVCC
` + +
` | |
` __ - C|
` .--| | ^ C|
` H >--o-o |& |o--. | C|
` | '--|__| | | |
` | | '--o
` | | __ |
` | '---|>=| "R" __ |
` | |1o|o-----|>=| ___ |/
` | .---|__| |1 |o-o--|___|- -| BC107B
` | | .----|__| | 6.8K | |>
` | | | | .-. |
` | | | | | | |
` | | | .--------' 10K| | |
` | | | | '-' |
` | | '----------. | |
` | | | __ | === ===
` | | __ '--|>=| | GND GND
` '-----------|---|>=| |1 |o-o
` | |1 |o-----|__|
` .-----------|---|__| "S"
` | __ |
` | .--| | |
` L >--o-o |& |o--'
` '--|__|
`created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

You can see from the diagram that the "S" input only goes high when H
and L are low, and the "R" input to the FF only goes high when H and L
are high. (Note: logic ICs have power connections which were not
included here. Pin 14 is +12V and pin 7 is GND for both the 4001 and
4093.)

You can get your Override/Reset action by putting a switch in with the
relay above like this:


` VCC VCC
` + +
` | |
` | |
` - C|
` ^ C|
` | C|
` | | Override
` | | _/
` '----o---o/ o--.
` | |
` | |
` | |
` |/ |
` >-| |
` |> |
` | |
` | |
` === ===
` GND GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

There's a lot more you can do with this stuff, but it's a little
tedious in ASCII art. This should give you a start. Feel free to
email me if you have any questions. And you might want to wait a day
or so before building -- there are several really good electronics
people in this ng who may spot an error in the above or have a better
idea.

By the way, also feel free to let us know how you're doing.

Good luck
Chris

.



Relevant Pages

  • RE: ID sensors on a Cisco Catalyst 6509 switch
    ... ID sensors on a Cisco Catalyst 6509 switch ... the 4 VLANs with 4 sensors are on two ... > and up to 4 span ports with tx directions. ...
    (Focus-IDS)
  • Re: Fucking, fucking, *fucking* ABS
    ... The ABS fault light has come back on the Pan. ... You're supposed to switch the ignition on whilst holding ... I've checked and cleaned the sensors, ... Performance Bikes and Fast Bikes ...
    (uk.rec.motorcycles)
  • RE: ID sensors on a Cisco Catalyst 6509 switch
    ... ID sensors on a Cisco Catalyst 6509 switch ... to different destinations from different sources on a Cat 6509? ...
    (Focus-IDS)
  • Re: High output 4066?
    ... > I can use a microcontroller output to switch a higher voltage output ... CMOS gates already? ... If you need advice for small complementary MOSFETs, ...
    (sci.electronics.design)
  • Re: Doubled up connections to security sensors? was Re: Z-WAVE question
    ... You would either have to install another switch adjacent to the first ... using Napco relays to follow the sensors but this was also too slow. ... now I plan to use a different faster controller to create the lighting path ...
    (comp.home.automation)