how to drive SPDT relay in combination of NPN and PNP transistor

Discussion in 'The Projects Forum' started by Shantanuonline, Aug 12, 2015.

  1. Shantanuonline

    Thread Starter New Member

    Aug 12, 2015
    Hello All,

    I was looking for some advice on a small electronic circuit and found this forum and this is my first thread.
    I have a working water level indicator circuit based on 4049 IC and is working fine but i want to add 2 more functionality.

    I have a circuit in mind but i am not sure if this will work, see the link below.

    I want to achieve 2 things here,

    1. When there is water in supply line the on sensor B and ground, relay should trigger on.
    2. when the water reach at sensor A and ground, the relay should be switched off regardless of the status of sensor A.

    I am not sure if this will work but i was thinking about join one NPN and one PNP transistor in such a way that the NPN will send signal to PNP transistor. The PNP transistor have no signal from sensor A so it will be in ON position and it will trigger the real.
    Now when there is a signal on sensor A, it will cut off the relay regardless of sensor B still have signal.

    sorry for my understanding i am new into making circuits.
    Based on my requirement mentioned in point 1 and 2, please let me know what will be the best option or if the circuit i have shared can work after some modification, if required.
    If you can share the suitable diagram then it will really help me.

    Thank you
  2. Reloadron

    Well-Known Member

    Jan 15, 2015
    OK, what are the sensor outputs for the above conditions? For example, when water is in the supply line (sensor B and GND what is your output, is it a high logic level or a low logic level? Same for sensor A? There are several circuits for sensing water level using a 4049, can you post the circuit you are using?

    I also suggest you look at TTL (Transistor, Transistor Logic) and think about the truth tables for the different gates as that is what I believe you want.

    Images for ttl logic circuits

  3. Shantanuonline

    Thread Starter New Member

    Aug 12, 2015
    Hi Ron,

    Thanks for your response. Please see below link of the water level circuit i am talking about.
    My sincere thanks to Swagatam who shared the circuit on his blog. Please see the 2nd circuit which is with dry run protector.
    In the said water level controller it triggers the relay when water reach between sensor F and ground.
    But when the water level reach it max position, it just give a indication through light but did not switch off the relay.

    I want to switch off the relay when water level reach it max position , regardless of sensor F is still sensing water.

    Sorry but i am not good in logic and new into such electronic circuit and not sure if ttl logic will work.
    Is it possible if you can advice or modify the circuit in such a way that both my requirement can be fulfilled?

  4. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    Stacking two transistors in series to act as a logic gate works just fine. However, in your schematic the PNP transistor is installed backwards. Reverse the collector and emitter connections, so that the emitter is going to the relay coil.

    The schematic for the water sensor is very poorly drawn. Some connections are dotted, some are not, some crossed signals are joined with a dot and some are not when they should be. Sloppy work, and it makes it very difficult to determine if the circuit is correct. But the circuit is based on running a small direct current through the water, and this will lead to corrosion around the electrodes in the water over time.

    With the PNP transistor connected correctly, this is how your relay driver works:
    If A is low and B is high, the relay contacts will close.
    For all other combinations of A and B, the relay contacts are open.

  5. Shantanuonline

    Thread Starter New Member

    Aug 12, 2015
    Hi AK

    Thanks for your response.
    it looks like there is some confusion created when i shared the water level diag url.

    for better understanding i have attached the link of the correct picture, the same picture can bee seen in the URL given by me in my previous post.

    Please see the picture and let me know if you have any different view.

  6. Shantanuonline

    Thread Starter New Member

    Aug 12, 2015

    Yes, two transistors in series to act as a logic gate works as per my requirment.

    Thanks Ron for giving me a new option of TTl for my future projects.