Education Electronic Circuit Help

Discussion in 'General' started by longweight, 20 Feb 2012.

  1. longweight

    longweight Possibly Longbeard.

    Joined:
    7 May 2011
    Posts:
    10,517
    Likes Received:
    217
    Hi all,

    I am currently starting a project for my HNC in Electrical Engineering and I need a bit of advice. My project is going to be a water level alarm for houseboats. I want to use 2 comparator circuits (going to add 2 when I know whether this works) to turn LED's on when the water level reaches certain points in the tank. I will be controlling the LEDs via AND gates as shown in the diagram below.

    I am really not certain about which op amp to use! Would this one be suitable?

    http://uk.rs-online.com/web/p/op-amp/7099186/

    The lighting circuits that display the water level will be worked up later this week but I just want to check that my detection circuit works!

    Here it is:

    [​IMG]

    Please could someone have a look at this and let me know where I have gone wrong?

    Thanks

    Long (Dan)
     
  2. Beasteh

    Beasteh What's a Dremel?

    Joined:
    18 Feb 2012
    Posts:
    278
    Likes Received:
    10
    You're wanting to turn the red LED on when the water is above the low level, and the green when the water is above the high level? If so, it's basically right.

    Using comparators seems a bit overkill mind you!
     
  3. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    You need to find one that:
    1. Works with a 5V power supply (some require a bit more)
    2. Has a DIL package. The one you link to is SOT-23 which would be really hard to solder!

    Just pick the cheapest one that does the above!

    Good luck :thumb:
     
  4. longweight

    longweight Possibly Longbeard.

    Joined:
    7 May 2011
    Posts:
    10,517
    Likes Received:
    217
  5. DXR_13KE

    DXR_13KE BananaModder

    Joined:
    14 Sep 2005
    Posts:
    9,136
    Likes Received:
    381
    741 is bread and butter.

    edit: You could get a TI launchpad and do the circuit a little better and cheaper.
     
  6. longweight

    longweight Possibly Longbeard.

    Joined:
    7 May 2011
    Posts:
    10,517
    Likes Received:
    217
    I am annoyed at the lack of knowledge I have from my course! I can work out all of the voltages etc but when I have to select components and tell you why they are there I fall down!

    Ok so I have developed it a bit more:

    [​IMG]

    Now let me see if I understand what the 741 is doing....

    No water in the tank means that the - pin is seeing less than 12V due to the resistor (havent worked out the volt drop yet as I don't know the current of my supply), the + pin is seeing 0V so the output is low.

    Water in the tank means that the - pin is seeing less than 12V as above but the + pin is seeing ¬12V so the output goes high?

    If I have this right will it output 12V?
     
    Last edited: 20 Feb 2012
  7. DXR_13KE

    DXR_13KE BananaModder

    Joined:
    14 Sep 2005
    Posts:
    9,136
    Likes Received:
    381
    If the water level is higher than the sensor then the voltage at the + pin is given by the voltage divider given by the resistance of the water and the R3 resistor, if this is higher than the voltage at pin - then it outputs 12V, if it is lower then it outputs 0V.

    The water works as a resistor, when there is no water touching the sensor then R3 works as a pull down resistor and makes + go to 0V, this makes the opamp output 0V.

    edit: again with 4.30$ + $0.52 for each micro controller you use you can get a TI lauchpad and make your life a little more simple with some simple C code...

    http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_(MSP-EXP430G2)

    edit2: be careful not to fry the AND gates, see if they accept 12V of input.
     
    longweight likes this.
  8. thehippoz

    thehippoz What's a Dremel?

    Joined:
    19 Dec 2008
    Posts:
    5,780
    Likes Received:
    174
    being it's in a houseboat.. you could stick a big capacitor in line along with another resistor to add around a 2 second+ delay to the relay.. then when the boat starts rockin the led won't go on and off
     
  9. longweight

    longweight Possibly Longbeard.

    Joined:
    7 May 2011
    Posts:
    10,517
    Likes Received:
    217
    You sir are a star! + rep!

    Any ideas about the resistance of water? :S
     
  10. Mongoose132

    Mongoose132 Duckmad

    Joined:
    23 Aug 2007
    Posts:
    783
    Likes Received:
    22
    The average conductivity of sea water at 20C and a salinity of 35g/kg is:
    4.788 S/m (Siemens/meter)

    The resistance is the reciprocal of the conductance, so:
    R = 1/(4.788 S/m) = 0.2089 ohm/m
    at 20C and a salinity of 35g salt per kg water.
    So just adapt it to whatever distance and salinity level and you're good

    (The grams per kilo of water is equivalent to ppt in this case)

    That's the calculation for Seawater, freshwater salinity is usually less than 0.5 ppt. Water between 0.5 ppt and 17 ppt is called brackish. Estuaries (where fresh river water meets salty ocean water) are examples of brackish waters.
    :D

    Citations:
    http://answers.yahoo.com/question/index?qid=20101214192859AAc4eE3
    http://www.onr.navy.mil/focus/ocean/water/salinity1.htm
    :p
     
    longweight likes this.
  11. DXR_13KE

    DXR_13KE BananaModder

    Joined:
    14 Sep 2005
    Posts:
    9,136
    Likes Received:
    381
    Depends on what kind of water you are talking about and the distance of the sensors.
     
  12. longweight

    longweight Possibly Longbeard.

    Joined:
    7 May 2011
    Posts:
    10,517
    Likes Received:
    217
    Well I guess you get rep too! Thanks for such a succinct response!
     
  13. Mongoose132

    Mongoose132 Duckmad

    Joined:
    23 Aug 2007
    Posts:
    783
    Likes Received:
    22
    Glad to help, distracts me from my uni work :blush:
     
  14. longweight

    longweight Possibly Longbeard.

    Joined:
    7 May 2011
    Posts:
    10,517
    Likes Received:
    217
    Do you think my circuit will work? Once I have this bit working I can move on to the outputs :D
     
  15. Mongoose132

    Mongoose132 Duckmad

    Joined:
    23 Aug 2007
    Posts:
    783
    Likes Received:
    22
  16. longweight

    longweight Possibly Longbeard.

    Joined:
    7 May 2011
    Posts:
    10,517
    Likes Received:
    217
    Thanks that is excellent!
     
  17. DXR_13KE

    DXR_13KE BananaModder

    Joined:
    14 Sep 2005
    Posts:
    9,136
    Likes Received:
    381
    Instead of using sensors like that, that will galvanize or rust with time, you could use optic systems. Something like a smoke detector uses.

    Or you could use plastic optic fibbers to do that. You want me to make a sketch of what i am talking about?
     
  18. longweight

    longweight Possibly Longbeard.

    Joined:
    7 May 2011
    Posts:
    10,517
    Likes Received:
    217
    Thank you for the offer but this is just a small project and won't be installed long term :)
     
  19. DXR_13KE

    DXR_13KE BananaModder

    Joined:
    14 Sep 2005
    Posts:
    9,136
    Likes Received:
    381
    You should also install the sensors at the same relative distance from eachother, this removes some of the guesswork, just put them side by side horizontally on the top and bottom level of the water.

    Replace the R1 and R2 with a potentiometer, this way you can quickly adjust the trigger voltage.
     
  20. longweight

    longweight Possibly Longbeard.

    Joined:
    7 May 2011
    Posts:
    10,517
    Likes Received:
    217
    Will do, I think I will have 3 sensors, and hopefully an LCD display for 0%, 25%, 50% & 100%.

    The potentiometer is really good idea, once I know what trigger point I want I guess I could then swap them out for resistors.
     

Share This Page