Moisture circuit for Senior Design Project

Discussion in 'The Projects Forum' started by leedemo, Dec 4, 2011.

  1. leedemo

    Thread Starter New Member

    Apr 26, 2011
    17
    0
    Hello All,

    I am working on my Senior Design Project in College, and i have a bit of a quandry. I would like to make a circuit that will be either on or off, and respond to the changes in a rag's conductivity. I tried doing this with an H-Bridge, along with an LM319 op amp. I am trying to get the output of this circuit to power a 12 Volt ANCO windshield wiper fluid pump, which will put more moisture into the rag, thus decreasing the rag's resistance and shutting off the pump. the picture of my circuit is below.

    I used an old 12V relay after all of this to send the full positive 12V through the motor, which works sometimes. I am not sure why it is so finnicky. does anyone have any improvements to this idea, or maybe different ideas altogether? thanks!

    http://www.imgur.com/iBrYS
     
    Last edited: Dec 4, 2011
  2. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    So this is all in respect to a windshield wiper gadget for a car?
     
  3. leedemo

    Thread Starter New Member

    Apr 26, 2011
    17
    0
    actually we are just using the pump cause its a cheap, basic pump. The goal is to keep a rag at a consistent dampness for cleaning testing purposes.
     
  4. Adjuster

    Well-Known Member

    Dec 26, 2010
    2,147
    300
    It will be far easier for others to comment if you would show a full schematic, with the comparator shown conventionally, not as a package outline. Details of the relay would also be helpful - including coil resistance.

    http://www.fairchildsemi.com/ds/LM/LM319.pdf

    Note however that the input voltages for the LM319 should not get too close to the supplies (see data-sheet), with the differential input voltage between the two inputs never exceeding ±5V. It may therefore be better to set the reference voltage on Pin 4 at half the supply voltage, with resistances in series and parallel with the rag connection such that the inputs cannot get more than 5V apart.

    The relay current also cannot be more than 25mA: if your relay needs more than this an additional driver transistor may be needed.
     
  5. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    Your pull-up resistor at 100Ω is maybe a bit low? I don't think the comparator can sink that much current and probably isn't pulling the output low.

    You didn't really say what's going wrong.
     
  6. leedemo

    Thread Starter New Member

    Apr 26, 2011
    17
    0
    Hey guys,

    Thanks for the replies. adjuster, rhanks for the tip on the supply voltage, i am using an old computer power supply so i have a 5 volt output i can use. Sorry about the schematic, but im a mechanical engineer and not totally comfortable with circuits.

    Waneh, ill try my best to describe whats going on, but bear with me please as im not an electrical engineer. When i turn on the power supply with the rag leads not touching, the relay clicks like it should. Once i short the rag connection, it switches back to ground like expected. Then the voltage never really makes it back up, but goes slowly back, and never trips the relay again. I will try reduxing the supply voltage to five volts and upping that last resistor. Thanks for the advice everyone
     
  7. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Without seeing how you connected the relay coil then we don't know why you are shorting the output of the LM319 with a resistor that has the extremely low value of only 100 ohms.

    With a 12V supply, the output of an LM319 can drive a load as low as 460 ohms (25mA and a saturation voltage loss of 0.5V).
    The relay coil replaces the 100 ohms resistor in your circuit. A reverse-connected diode must be connected across the relay coil to clamp the high voltage spike produced by the coil when it turns off.
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The LM319 only has specifications when it is sinking a maximum of 3.5mA. [eta] Whoops - 25mA. [/eta]

    If you try to exceed a load of 25mA, you will overload the output of the comparator.

    See the attached for an example schematic and simulation. I've replaced your 100 Ohms with a 510 Ohm resistor, as 12v / 25mA ~=480 Ohms, and 510 Ohms is the next higher E24 value of resistance.

    You need a transistor or MOSFET to drive your relay.

    A power MOSFET could drive the motor directly. With a MOSFET, you can use a much larger value for R4. Use R4 >= Vsupply/5mA (2.4k for 12v) instead of 25ma

    An N-ch MOSFET could be used to sink current from the motor. Connect +12v to one side, and ground the motor using the MOSFET's drain.

    The gate terminal goes to the 319's output, and the source gets connected to the power supply return (ground).
     
    Last edited: Dec 5, 2011
  9. leedemo

    Thread Starter New Member

    Apr 26, 2011
    17
    0
    I have uploaded a complete drawing of the circuit. I do not yet know what the coil resistances are, so i will check when i get back to school. Audioguru, is it alright to run the LM319 on 12 volts? I had a hard time understanding the specs sheet. I will try replacing the 100 ohm with the relay coil. thats an interesting idea.

    http://imgur.com/JvzEV
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Here is a version using a common N-ch MOSFET, showing your motor as an inductor.

    I swapped the inverting (-) and noninverting (+) inputs so that the MOSFET would turn ON when the resistance of Rrag caused V(rag) to exceed V(ref).

    To make the reference voltage easily adjustable, you could replace R1/R2 with a potentiometer; say 100k Ohms - wiper connected to REF, and the "ends" connected to +V and GND. That way you can set the motor to turn on when your desired conductivity has been reached, rather than having to try numerous resistors to get them correct.

    [eta] R4 should be >= Vsupply / 25mA; 12v/25mA = 480 Ohms; the closest standard value is 510 Ohms.

    If the coil is > 480 Ohms, you could control it directly instead of using R4 (you would need a diode across the coil). However, I would personally prefer to use a driver like a MOSFET, and be able to use a lower value pull-up resistor.

    [eta]
    The output saturation voltage will remain below 0.3v over temperature if you limit the sink current to 5mA.
     
    Last edited: Dec 5, 2011
  11. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    That might work with a specialized relay, but Sarge's solution is a more general, should-always-work approach. I'd go with that unless you KNOW your relay has a very low current coil. That 100Ω pull-up is still too low.
     
  12. leedemo

    Thread Starter New Member

    Apr 26, 2011
    17
    0
    Sgtwookie, thanks for the reply, good idea with the potentiometer. In laymens terms, what is a mosfet? Sorry but im pretty new to the circuits game.
     
  13. Adjuster

    Well-Known Member

    Dec 26, 2010
    2,147
    300
  14. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    A MOSFET is a transistor, in this case it is being operated as a switch. You can really think of it as doing the same thing as a relay, except it needs no coil current. Compared to a normal bipolar junction transistor (BJT), a MOSFET is a nice choice because it requires virtually no current to hold on - just a voltage on its gate - and gives a lower resistance when on. This translates to less power dissipation in the transistor itself, so a MOSFET can generally handle higher currents, all else equal.
     
  15. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The output current of an LM319 depends on its supply voltage. When the total supply is 30V then it saturates well with a 25mA load.

    What wets the rag?
    I made a detector to show when a plant needs to be watered.
    Distilled water is an insulator that does not pass current. My tap water was very conductive like salt water and the salts in the soil mix with water to conduct a lot of current. I did not test the conductvity of rain since it varies.

    Usually an AC signal is used in the detector, not DC.
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I didn't realize the topic had gone to a 2nd page and several more replies - I updated my last two replies & schematics when I re-checked the specs on the LM319; I don't know where I got 3.5mA from. :confused:

    bjt's (bipolar junction transistors) have a base, a collector, and an emitter. You control a large current on the collector by a relatively small current on the base.

    Enhancement mode power MOSFETs are somewhat similar, in that they generally have three terminals:
    the gate (rough equivalent of a bjt base);
    the source (rough equivalent of a bjt emitter) and
    the drain (rough equivalent of a bjt collector).

    and that they both use one input terminal to control current flow via the other two terminals.

    But, where bjt's are controlled using current, MOSFETs are controlled by Vgs; which is the voltage on the gate, using the source terminal as the reference (0v point).

    The gate of a MOSFET acts more or less like a small capacitor. You charge it up, and discharge it. Standard MOSFETs require Vgs to be below the threshold voltage (specified in the datasheet as Vth) in order to be considered turned off, and at or above the voltage specified for Rds(on) [the resistance between the drain and source terminals]. A standard level MOSFET requires Vgs to be 10v. Logic level MOSFETs are becoming quite common now; the are usually rated for Rds(on) when Vgs=4.5v or Vgs=5v.

    To keep a long story short (whoops, too late!) use N-ch MOSFETs instead of P-ch MOSFETs wherever possible; as electrons flow much more easily than holes.
     
  17. leedemo

    Thread Starter New Member

    Apr 26, 2011
    17
    0
    Hey sarge, how would the irf 510 work in your circuit, i noticed i can get that at radioshack :) cause i need one quick
     
  18. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    It'll be fine. Go for it.
     
  19. leedemo

    Thread Starter New Member

    Apr 26, 2011
    17
    0
    also should i change my supply voltage to five volts? Or is twelve fine?
     
  20. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Most Mosfets do not work when the supply is as low as 5V. Use 12V.
    The LM319 has a max allowed supply of 18V or 30V.
     
Loading...