Connect with us

Liquid level indicator

Discussion in 'Electronic Basics' started by MarkMc, May 25, 2005.

Scroll to continue with content
  1. MarkMc

    MarkMc Guest

    For my home brewery I need to know if a container has liquid past a
    certain level, and if it is, turn on a pump.

    Can anybody suggest a way of doing this? I don't really want to use
    anything which floats in the liquid, I just need to know if the liquid
    is past a certain point/level.

    If there's anything "off the shelf" which I can screw in to the
    container, then that would be fantastic.

  2. You might Google "capacitive proximity". These are devices that
    switch an output signal when conductive material gets close to their
    face. Some can operate through glass or plastic container walls.
  3. Chris

    Chris Guest

    Home brew electronics for home brew beer -- it's s.e.b. synergy!

    Mr. Popelish's suggestion is a great choice. But you might want to
    reconsider the float concept. Many small floats are made for food
    service (i.e. they can be washed down, scrubbed and sterilized), and
    the built-in hysteresis of a magnetic float can make this the easiest
    solution. If you can't do that for one reason or another, you still
    have a number of options, besides the capacitive sensor. They''re all
    going to be more expensive and more difficult, though.

    By placing the vat on a scale or load cells, you can weigh the vat and
    its contents. But if you're going to use the information for anything,
    you need some kind of output from the scale. You can get one with
    serial communication output and interface to a PC. Scales are also
    made with analog outputs, which might allow you to do this without a
    PC. In fact, many of the simplest scales have an analog front end
    feeding either an A-to-D converter with LED/LCD display, or a uC analog
    input. If you're crafty, you might be able to pick that off and use it
    for your control circuit. Downside, of course, is that you have to be
    careful about movement (kind of hard if you've got an agitator). Also,
    any motor or other equipment may have to be weighed along with the vat.

    Some ultrasonic sensors are made for this and have discrimination
    circuitry built in which can ignore the foam and output the result from
    the strongest signal rather than the first. However, these are fairly
    expensive, especially for a home brew setup. You would also have to
    have the sensor face inside the tank, and cleaning/sterilization limits
    your choices.

    If you can live with something which goes through the wall, but is
    fairly flush and also has food service rating, you might want to try
    some of the retroreflective sensors made by Gems and other
    manufacturers. They send out a light beam to a prism which extends
    into the vat. Air and foam on the face of the prism will force almost
    all of the light to reflect off the prism and back to the sensor. When
    the beer comes in contact with the prism, though, most of the light
    just goes straight through the glass into the liquid. Less expensive
    than the ultrasonics, but you still have to pierce the vat. In
    addition, there's no hysteresis, which may mean you'll have to install
    two sensors.

    If your vat is white Nalgene or another translucent material, you might
    be able to get away with using a couple of photoresistors to sense
    light through the vat itself. This might be a bit of a touchy
    adjustment, though, and might be very dependent on ambient light.

    There are several other much more expensive methods to level sense beer
    or other foaming liquid, but I would guess they're beyond your budget.

    The float is the least expensive and most efficient solution. If I
    were in your shoes, I would get a Gems catalog or check out their
    website and take a good look at what they have for food service floats.
    IMHO, that would be your best bet if you're on a budget. And by the
    way, they have live phone help from 8 to 4:30 EST M-F. If you're in a
    hurry, just call them up and ask for help. They don't mind onesie
    applications. You can get much of their product line sent direct from
    Newark and have your solution tomorrow.

    Good luck
  4. John Fields

    John Fields Guest

    I'd use a self-heated thermistor.

    Since the heat capacity of beer is greater than that of air, when the
    beer hits the thermistor it will suck heat out of it, causing its
    temperature to fall, causing its resistance to rise. You can buy
    thermistors in threaded mounts from Omega Engineering (pricey) which
    will screw right into the container, and then with a couple of
    resistors, a pot, a comparator, and an LED, you can put together a
    circuit to do exactly what you want. Would you like a schematic?
  5. Warren Weber

    Warren Weber Guest

    Mark. Check out the "motor home" dealers. They use something to detect water
    level in potable water tanks. W W
  6. Si Ballenger

    Si Ballenger Guest

    You cold attach some aquarium tubing to the bottom of the
    container so the beer could flow in. Run the tubing up wards and
    attach to a micro switch above the top of the container. At the
    level where you want to activate the micro switch to run the
    pump, make horozontal coils of the tubing so it will get heavier
    as the coils fill and pull down on the micro switch to activate
    the pump. There are other setups, but I like this one.
  7. ----------------
    Automatic washing machine's depth sensor. Works with a pressure
    switch up top and a clear vinyl tube down into the basin. Any
    appliance supply store. Adjust by moving the tube up and down.

  8. siliconmike

    siliconmike Guest

    Get one of those "touch to on" lamps.

    Take two insulated copper wires, say 18 SWG and attach them to your
    vessel in such a way that when your liquid reaches the desired level,
    the two copper wires touch the liquid.

    Connect the other end of one of the copper wire to earth
    Connect the other end of the second copper wire to the touch lamp's

    Connect your pump to the AC output of the touch lamp (where you're
    supposed to fix a light bulb)

    Connect a relay to the AC output of the touch lamp, in such a manner
    that when energised, it shorts the lamp's body to earth.

  9. siliconmike

    siliconmike Guest

    I meant connect energizing coil of relay to AC output of touch lamp..
    (of course the relay should have an AC mains driven coil)..

    This is to clamp the pump on (even after the liquid level goes down or
    there are waves in the vessel).

  10. MarkMc

    MarkMc Guest

    Thanks for all the suggestions everybody.

    I'll explore each of them individually.

    I spotted these in RS #354-290. The seems to be quite a pro sort of
    thing. They have a relay control unit, but I need to add a few of my
    own other features, to I'd have to interface to them myself. I'm not
    sure how to create an alternating voltage (flip-flop?), and evern more
    so, I don't know how to measure the resistance via AC voltage/current.

  11. MarkMc

    MarkMc Guest

    Somebody on my brewing forum suggests this cct, which seems good.

    I am abit of a newbie, can anybody explain to me what's going on here?
    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?

  12. Chris

    Chris Guest

    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

    ` 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

    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

    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.
  13. MarkMc

    MarkMc Guest

    Hi Chris

    Thanks very much for taking the time to explain this for me, and offer

    I've printed off your message and ccts from notepad for a thorough

    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
    (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?

  14. MarkMc

    MarkMc Guest

    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?

  15. Chris

    Chris Guest

    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
    ` + + + 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

    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
    ` | | '-'
    ` | | |
    ` === === ===
    created by Andy´s ASCII-Circuit v1.24.140803 Beta

    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

    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

    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

    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

    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

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

    Good luck
  16. MarkMc

    MarkMc Guest

    Hi Chris

    Yes, I do seem to take beer very seriously! The quality of it at

    Thanks very much for such a detailed response. I really appreciate you
    taking the time to explain this stuff to me. All that you say makes

    I may have missed this, but I assume I need to have a 'common' probe,
    and then the H & L probes?

    Hey, the ovverride switch is very neat - so simple, why didn't I think
    of that! :) - got carried away with the logic gates I guess! No need
    for a resistor here at all?

    I actually need to control/pump/empty two seperate vessels (not at once
    - they share the pump). How would you suggest I switch between one set
    of sensors and another? Two identical circuits, but switch the final
    pump drive from an OR gate or switch between one cct or another in to
    the relay coil?

    btw, I did look at the commercial float switches and considered them a
    bit pricey (maybe you have a good diy source?). Not sure what's
    involved with using these things - are they just simple switches?

    It's not likely I'll get to build the cct in the next few days anyway -
    work is rather busy at the moment - working weekends etc. :(

    Thanks again
  17. Chris

    Chris Guest

    Yes, Mark, you will actually need three electrical connections for each
    tank -- H, L, and common. The current flows through the OSC. output
    into the H and L inputs, charging up the caps to change the logic
    state. If you've got a metal tank or have a metal drain, it may be
    easier to attach the oscillator output to that rather than have a third
    probe for each tank.

    The bypass/override switch acts in the exact same way as the transistor
    switch in parallel with it -- they both provide a very low impedance
    path to GND when ON. It won't hurt the transistor at all to wire a
    switch in parallel with it, because of the protection diode across the
    relay coil. The inductive kick caused by the relay turning off will be
    recirculated by the diode, whether the switch or transistor turned off.

    If you had two pumps as well as two vessels, you might want to just use
    a 4P3T switch to transfer control from one to another. But you only
    have one pump for two vessels. If the one you're not using is always
    empty, you can just run the two sets of sensors in parallel (H or L
    will go active if either one of the sensors is making continuity). But
    if you're using both vats at once, make the oscillator common go to
    both vats, and just use a DPDT switch to switch between H and L sensor
    inputs. This is very low frequency stuff (2KHz signal) so you don't
    have to worry about frequency effects at all.

    ` Vat 1
    ` .---------------o-------> Upper Probe
    ` |
    ` o---'
    ` H o----o--__ .------------o-------> Lower Probe
    ` o------|---.
    ` | |
    ` | | .----o-------> Common
    ` | | |
    ` | | |
    ` o------' | |
    ` L o----o--__ | |
    ` o------. | |
    ` | | | Vat 2
    ` | | |
    ` | '---|----o-------> Upper Probe
    ` | |
    ` Osc o--------. | |
    ` | '-------|----o-------> Lower Probe
    ` | |
    ` | |
    ` '--------------o----o-------> Common
    created by Andy´s ASCII-Circuit v1.24.140803 Beta

    If you go with this, you may want to figure out some way to ensure that
    the pump valve and the switch are going in the right direction. Either
    that or you can rely on your Bavarian sense of Teutonic thoroughness to
    make sure every time. ;-)

    Float switches are a bit pricey. But "in for a penny, in for a pound".
    When I contract test or automation jobs, I try to reach an
    accomodation with the customer. The goal, as always, is to provide the
    right balance between function, reliability and total customer cost.
    It's the customer's business, money and goals, so the decision about
    how to proceed and what to spend is always the customer's decision.

    Looking at the great job you've done on the rest of the project, and
    the obvious investment in money, time, and intelligence, I would assume
    the most reliable solution would be more important to the customer than
    lowest cost. I believe that would be float level sensors, even though
    they're more expensive. But this resistive probe option seems like
    fun, and if you construct it well, it should be reliable (especially if
    you have an external safety in case of electronics failure). This is a
    hobby, and it's about the journey as well as the destination, right? I
    think this modification to the circuit you found on the net is fairly
    straightforward, and should work well if constructed properly.

    Be sure to put the electronics in an enclosure which will resist
    splashing. Take the time to label everything, especially connectors
    and switches. Also, make sure you document your circuit and keep the
    documentation with your equipment. You'll be able to get help if
    you've got a problem then, and you won't have to remember what you did
    several months or years later if there's a glitch.

    Good luck and Cheers,
  18. MarkMc

    MarkMc Guest

    Hi Chris

    I'm planning on using some small stainless steel vessels for the
    'tanks' - only about 1-2 litres capacity required for each. The Will
    have a metal drain, so I'll try to find a way of attaching the OSC to

    I was thinking about using two switches - one for manual/automatic and
    another for on/off for the pump in manual mode. I assume I can just
    interject these in to the collector of the relay driver transistor? I
    assume switch noise isn't an issue when energising the relay?

    With regards to the re-use of the pump: The brewery setup is going to
    have quite a few plumbing valves, so these will be set to the required
    settings before firing up the electronics. Of course, with so many
    valves to worry about (see, I am a bit
    concerned that I'll get them wrong sometimes, so what I plan to do is
    print off a couple of lookup sheets and laminate them to keep them nice
    and dry, which tells me what setting each valve should be in for each
    stage of my process. Brewing is a fairly timeconsuming and slow-moving
    process, so it shoouldn't be difficult to make sure everything is setup
    ok, especially with a checklist. It's when things start going wrong
    that it gets a bit lively!

    Re "in for a penny" - given no wife/family, I'd agree, but I've spent
    "most of the budget" on the actual brewing equipment, so the luxury
    stuff (like this control stuff), needs to be done on a budget, but hey
    it's fun to do this stuff, and it's much more to talk about and show
    off to your friends!

    If I find I have problems with the sensors 'sensing' foam and such
    like, then I'll have to re-think (the time delay will help with
    spending more, I'm sure! :) )

    Actually, I'll be needing to update this hardware to include a heater
    in one of the vessels (the underback). I was thinking I could use a
    temperature controller (FE33L - Maplin, has LCD display etc - cool),
    but I only want the heater to come on when the temp controller says
    "too cool" (fine, theres a signal from FE33L for this @1.5v), *AND*
    when the pump is on. This part I'm not 100% sure about, because the
    auto/manual + on/off switching complicates things a bit.

    Any suggestion on how to do this? (obviously another relay+transistor
    etc) I assume some kind of AND gate with pump signal and temp ctrl?

  19. Fred Stevens

    Fred Stevens Guest

    I seem to remember that there are optical level sensors that work for
    liquids that are not transparent. They give an electrical signal as an
    output which you can trigger on.

  20. Chris

    Chris Guest

    Hi, Mark. Apart from just turning off the power, you can use a 3-way
    SPDT switch (ON-OFF-ON) to give you both the pump OFF and pump OVERRIDE
    functions like this:

    ` VCCVCC
    ` + +
    ` | |
    ` - C|
    ` ^ C|
    ` | C|
    ` | |
    ` '--o
    ` |
    ` Logic | Override
    ` o | o
    ` | |
    ` ___ |/ Pump |
    ` -|___|-o-| Off ===
    ` | |> GND
    ` .-. |
    ` | | |
    ` | | ===
    ` '-' GND
    ` |
    ` |
    ` ===
    ` GND
    created by Andy´s ASCII-Circuit v1.24.140803 Beta

    The switch actually has three positions -- up, middle, and down. In
    the middle position the switch pole isn't connected to either throw.
    That makes it an ideal, relatively easy hardware solution.

    When you have any kind of low voltage high input impedance sequential
    logic, static from machine operators and moving parts and electrical
    noise can be a PITA, changing logic states and damaging ICs. Actually,
    as the prices of PLCs (Programmable Logic Controllers) came down to
    reality in the early 1990s, I basically stopped doing any factory
    industrial control circuits with 4000-series CMOS just for that reason.
    PLCs generally have optoisolated inputs and RC filters on the inputs
    to reduce the chance of electrical noise or ESD getting through. And
    again, this is another good reason for using a float. It's not
    affected by any of this stuff. But there are ways to deal with EMI/RFI
    in CMOS circuits...

    First, you obviously wouldn't have any chance at all if the FF inputs
    were just hanging out in the breeze. But the caps and the schmitt
    trigger inputs condition the "real world" inputs and will effectively
    prevent electrical noise from affecting them (assuming you're using
    good caps and your circuit layout has a good low impedance ground
    path). Noise might affect the FF itself, though.

    In order to minimize the risk of that occurring, you can do several
    things. The first and most important thing is to try to prevent the
    inductive kick of the pump switching off from creating a big spark that
    will cause EMI. To do that, you should place a snubber across the
    load. For AC loads (you are using an AC pump, right?), you should use
    an R-C snubber across the load.

    ` ||
    ` .-------||----o------o------.
    ` | || | | |
    ` | RY | | .-. |
    ` | .-./ R| | |Pump
    `240VAC _ | / | | C|
    ` / \ MOV |/| '-' C|
    ` ( ~ ) / | | C|
    ` \_/ /'-' C | |
    ` | | | --- |
    ` | | --- |
    ` | | | |
    ` '-------------o------o------'
    created by Andy´s ASCII-Circuit v1.24.140803 Beta

    You want to choose an R based on the maximum switching current of your
    relay. Let's say you've got 240VAC, a 5 amp relay contact, and a 1/2
    amp pump. You then want a value for R which will bring the current
    fairly close to the rated current. If you use 100 ohms, that will get
    you to about 3 A switching current. You can then choose a value for C
    (line-rated cap, of course) which will just keep the relay contacts
    from arcing. For relays with clear cases, you can actually watch the
    arc disappear as you increase the value of C. For enclosed relays, you
    should remove the cover to check. You didn't mention pump current, but
    I'll guess it's rated for less than half an amp. For that sized pump,
    I would start with 0.1uF and see what happens. Among my trove of
    delightful stuff I've got a small box of different sized Quencharcs to
    just plug in and see what works. But it seems ITW/Paktron is having
    difficulty with getting distributors for their product these days, so
    you'll have to use discrete parts. Try the Cornell-Dubilier MMP6P1K
    (0.1uF, 600V, self-healing polyester film, you can get this from
    Farnell if you reference Newark P/N 95F7892) and a 100 ohm 1 watt or
    greater resistor.

    Unless you've got a particularly large pump, this should do the job.
    To make it just about the perfect snubber, put a 280VAC rated MOV
    across the R-C snubber (the bigger the better - physical size on MOVs
    is proportional to joule rating). That will prevent the voltage across
    the cap from exceeding the rated voltage on the inductive kick, which
    will basically mean the snubber will last forever. It's preferrable to
    put the snubber/MOV across the load, but if that's not practical, you
    can put it across the relay contacts.

    Having reduced or eliminated the relay spark, it's still better to put
    the relay physically as far away from the logic circuit as practical.
    The worst thing you can do is use a PC mount relay, and put the relay
    right next to the FF IC (don't laugh -- I did it once long ago). To
    quote from the wisdom of '70s vintage Sesame Street, "The Solution...
    To Pollution... Is Dilution". If you've got a source of EMI/RFI
    pollution, the farther away it is, the lesser effect, the better. It
    might even help to mount the relays for the control logic in another
    enclosure next to the pump, and have low voltage control lines going
    from the controller box to the relay box.

    On the IC side, there's a few things you can do. Bypass the Vcc pin of
    each IC with an 0.1uF ceramic cap to GND. Keep the wires of the FF as
    short as possible, by using two NORs on one side of the IC and using
    direct wiring there.

    Between working on the relay (EMI source) and the IC (EMI target), you
    should be in pretty good shape. Experiment around a little here once
    you've constructed this. Try switching two pumps if you have them, and
    see if this affects things. If you don't have two pumps, try putting a
    greater load on the pump (momentarily lock the rotor or put a friction
    load on) and see if the increased noise causes the logic circuit to
    upset. This isn't a proof that your solution works, but it helps to
    give confidence in the work you've done. The fact is, a hobbyist
    doesn't have the tools to really solve this kind of problem, so the
    best you can do is build up a lot of protection, test it as best you
    can under real world conditions, and then hope for the best. But with
    only one FF on one IC with no inputs extending from the immediate area,
    you shouldn't have much to worry about after you do the above stuff.

    Your little controller board (amazingly, only 10 pounds!) seems to have
    a logic level output for heating. Again, you can use relay logic to
    make sure the heater is on only when the pump is on like this:

    ` || ||
    ` .-------||----o------o------o------||------.
    ` | || | | | || |
    ` | CRY1 | | .-. | CRY2 |
    ` | .-./ R| | |Pump |
    `240VAC _ | / | | C| .-.
    ` / \ MOV |/| '-' C| Heater| |
    ` ( ~ ) / | | C| | |
    ` \_/ /'-' C | | '-'
    ` | | | --- | |
    ` | | --- | |
    ` | | | | |
    ` '-------------o------o------o--------------'
    ` VCC VCC
    ` + +
    ` | |
    ` - C|
    ` ^ C| RY2
    ` | C|
    ` | |
    ` '---o
    ` |
    ` LO from ___ |/
    ` FE33L >-|___|-o-|
    ` | |>
    ` .-. |
    ` | | |
    ` | | ===
    ` '-' GND
    ` |
    ` ===
    ` GND
    created by Andy´s ASCII-Circuit v1.24.140803 Beta

    The .pdf file referenced on the Maplin page doesn't say much about the
    sensor itself. You have to be careful about installing it in a food
    service environment, though. This requires some looking into. Another
    issue might be that the module will have a "bang-bang" output, which
    means that it turns on the heater when the temp is too high, and turns
    off when it's too low. There's no proportioning of the output, which
    might cause pretty major oscillation in liquid temperature -- in fact,
    it might make it worse than not having any controller at all. If you
    adjust so the water starts at a certain initial temperature, it may be
    better to control the temperature of the liquid by just using a lamp
    dimmer in series with the heater, replacing CRY2 directly in the
    circuit above, and keeping it at a setting that will keep the
    temperature fairly stable. You can then use the FE33L as a temp
    display only. Don't know. Could use some more information here. Or
    even better, one or two good experiments with tap water before you brew

    Hmmn. Home brewry vs. wife -- a difficult choice. I'd have to think
    'er over a while. ;-)

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day