Op-amp sensor circuit - Need a Little Input

Discussion in 'The Projects Forum' started by Oclaf, Mar 26, 2011.

  1. Oclaf

    Thread Starter New Member

    Mar 26, 2011
    16
    1
    Hi All,
    This place has been a great resource to me and now I find myself in need of a little 1-1 help.
    I've designed this level sensing circuit in Multi-sim and every-time I try simulate it throws all kinds of convergence issues at me. This is my first time playing with op-amps so just need a little help figuring out if I've made a fundamental error or if Multi-sims just being difficult before I start making a PCB.
    I've got most (ran out of board space) of the circuit laid out on a bread board and it seems to be working as I want it.
    This circuit is designed to control my 3ph water pump and give feedback on the level in my tanks.
    A quick idea of what I'm going for.
    I plan on running CAT5 network cable out to the tanks.
    R16 and R41 will connect to common probes in each tank.
    The 5V output relay will switch a 3ph contactor.
    The switches on the Op-amps Correspond to various level Probes - 6 levels per tank.
    U2C and U5C are on a loop in the probe cable to shut things down when someone mows over the cable.
    When U2A is low the latching circuit should trigger and hold the output high starting the pump. When the header rises and U1A turns high Q3 should trigger, dropping the output low and resetting the latch. Once enough waters drained out of the tank U2A turns low and starts things off again.
    If the level in the feed tank drops too low and U5B goes low the NAND U6A will become true and hold Q5 high which will hold the output low until water is added to the feed tank.
    If either cable is disconnected U2C or U5C become Low, this has the same effect as low level in the feed tank.
    The 555 is probably unnecessary - it's wired as a schmitt trigger because for some reason I was having issues getting transistors to work there.

    Hope that all makes sense. if someone could take a glance and let me know anything I've messed up. I'm pretty sure Its ok but I haven't got breadboard space to test the entire circuit and Multi-sims making me doubtful.

    Thanks.

    <snip>

    [​IMG]
     
    Last edited by a moderator: Mar 26, 2011
  2. Oclaf

    Thread Starter New Member

    Mar 26, 2011
    16
    1
    the moderator removed link was the .ms10 multi-sim file. Is that not allowed?
     
  3. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    It offered to install software on my computer. Plus Multi-Sim is not an app everybody has.

    If you are certain that was only the circuit file, go ahead and repost it.
     
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Without totally understanding your circuit, my only comment is that your output relay will have more drive voltage if you put it in the collector circuit (along with the diode), rather than the emitter. If for some reason you wish to keep it in the emitter circuit, change R24 to zero ohms, or some other small value. You don't need a base current limiting resistor on an emitter follower. It will just reduce your output voltage even further. If you put the relay in the collector circuit, make the value of R24 such that it limits base current to 1/10 the relay coil current.
     
  5. Oclaf

    Thread Starter New Member

    Mar 26, 2011
    16
    1
    Thanks for pointing that out Ron. Makes alot of sense. I'll change that.
    Is there away I can clarify the circuit operation?


    I've attached the multisim drawing for anyone interested.
     
  6. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Do your probes depend on water conductivity?
     
  7. Oclaf

    Thread Starter New Member

    Mar 26, 2011
    16
    1
    Yes, the switches in the drawing are just there for ease of simulation.
    My "probe" will probably consist of of a PVC pipe with 7x 316 Stainless plates the bottom most being the common supply and 6 more placed equidistant along the pipe to detect various water levels.
    The small current flow from the lower common plate to the various upper plates as they become submerged will bring the op-amps outputs high.
     
  8. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    U2c and U5c will have their inputs left floating if the cables are cut. LM324 inputs float high. Don't you need resistors from the inputs to GND?
     
  9. Oclaf

    Thread Starter New Member

    Mar 26, 2011
    16
    1
    Yup your right. I should have noticed that. Feeling a little silly about that one. I'll run 3M to GND same as the rest.
     
  10. ifixit

    Distinguished Member

    Nov 20, 2008
    638
    108
    Hi Oclaf,

    I suggest that R16 and R41 be changed to 10K. Seven 3 Meg resistors are connected in parallel if all sensors were submerged. The total R value would be 428KΩ. The resistor divider of 330K and 428K yealds an input voltage to the opamps of only 2.8V. The LED brightness will vary depending on how many sensors are on. Also, 2.8 volts goes to the logic since the opamps are wired as buffers. 2.8 V is in the grey area of CMOS logic input.

    Regards,
    Ifixit
     
  11. Adjuster

    Well-Known Member

    Dec 26, 2010
    2,147
    300
    Would it not be better to apply a small reference voltage to the inverting inputs of the input buffers U1A...U1D and U2A...U2C, and operate them open-loop as comparators, rather than voltage followers?
     
    Oclaf likes this.
  12. Oclaf

    Thread Starter New Member

    Mar 26, 2011
    16
    1
    OK Thanks for your input everyone.

    Adjuster, I used them as buffers because thats what I knew would work.
    I'm not familiar with the comparator circuit but looked into them as you suggested and your right, it seems a much better way of doing it.

    Here's the new schematic. I've tried to lay it out in an easier too follow manner but I'm not sure that it came out to well.

    The op-amps are now wired as voltage comparators or at least my understanding of them.

    The 6 level probes are now conducting to a Ground probe. This sits much better with the electrician in me liking everything grounded.

    I've got two 1V dividers supplying the reference for the op-amps.

    The inputs are held at 5V with a 2MΩ resistor. If my maths is right and often its not, 450kΩ to ground should drop the input voltage to around 0.9V and comfortably trigger the output.
    The distance from the ground probe to the upper level Probe will be around 2.5m so that should give me around ~180kΩ per m of water which I hear is the general resistivity of regular filtered water. So if that information is correct, that should (I hope) be ok for roof collected rain water.
    I want 2MΩ feeding the probes to limit current flow through the water.
    I'm thinking about putting pots on the voltage dividers to raise the voltage incase my tank water is cleaner then I think and 1V turns out to be too low.

    The rest of the Circuit operates in the same way as the original.

    Thanks again.
     
  13. Oclaf

    Thread Starter New Member

    Mar 26, 2011
    16
    1
    Ok so I've had the circuit mocked up and pumping with buckets for a few days and everything seems to be good except I seem to be getting small amounts of corrosion forming on the positive probes.

    I'm using copper wire for my mock probes. In practice I was intending to use stainless but copper is cheaper and easier to get and hey my water pipes are copper anyway.

    So at the risk of sounding totally ignorant why are my probes corroding and what can I do to prevent it?
     
  14. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    The probes corrode because of electrolysis. The positive probe will corrode, the negative one won't - at least, that's the theory. You have to use AC on your probes to prevent this.
    I believe that even stainless steel probes will eventually corrode with DC on them.
     
  15. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    It's not so much corrosion as having crud plate out on them. Conduction in water depends on ions carrying the current. This builds up a layer of whatever is in the water on the anode.
     
  16. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I've been using electrolysis to clean old US pennies ("wheaties") and old rusty tools. Trust me, a metal anode will corrode. I once used a stainless steel pan as the anode, and it started to leak through corrosion pinholes after a few days. Keep in mind that I was running around an amp of current, but I believe the corrosion rate is proportional to current.
    The cathode will have corrosion removed, but the base metal (in theory) will not be removed. Crud (and anode material) will plate onto the cathode, as you said, but in my experience it is easily removed. This may be of little comfort for our OP, who won't want to clean the cathode probes.
     
  17. Oclaf

    Thread Starter New Member

    Mar 26, 2011
    16
    1
    Thanks. So AC wont have such a corrosion problem?. What about pulsed DC? send out a quick pulse every 2 or 3 seconds? Could probably go as high as every 30s.
    I hoped limiting the current with 2MΩ would be enough to stop this happening.
     
Loading...