how to turn the switch from low voltage

Discussion in 'General Electronics Chat' started by mohsen, Feb 21, 2011.

  1. mohsen

    Thread Starter Active Member

    Oct 24, 2008
    37
    0
    i want to turn on a pump that uses 12v,
    is there a switch that have two inputs whenever the first input is on which is 5v, then the second input 12v will turn the output on and take the voltage of 12v.
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    That is hard to follow. Have you considered a relay to control the pump? Why is there a first input and then a second?
     
  3. mohsen

    Thread Starter Active Member

    Oct 24, 2008
    37
    0
    what i wanted to say is i will have 12v input and another input from the circuit. if the circuit which is 5v in On then the pump will turn On, using the 12v power supply.
     
  4. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    What is the source of the 5V input...logic?...microcontroller?...? What is the current or wattage rating of the 12V pump? Depending on your circuits, you might be able to use a resistor and transistor...or a relay.

    Ken
     
  5. mohsen

    Thread Starter Active Member

    Oct 24, 2008
    37
    0
    i will use a circuit that uses logic gates. Also i will use microcontroller. the pump uses 12v and 3 amps.
     
    Last edited: Feb 21, 2011
  6. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    In that case I would use a relay to isolate the 12V motor supply from the 5V logic/microcontroller supply. Use a 1K resistor and a 2N3904 transistor as a common emitter amplifier to drive a 5V relay. Place a 1N4001 diode across the relay coil, with the cathode to the +5V and the anode to the transistor's collector.

    Ken
     
  7. mohsen

    Thread Starter Active Member

    Oct 24, 2008
    37
    0
    here is the drawing of the circuit!
    the sensor will send a voltage signal and compare it with a specific voltage if the voltage signal from the sensor is lower then the circuit will turn on the pump(which is the lamp in this case)
    but i couldn't get it work.
     
    Last edited: Feb 22, 2011
  8. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    The switching circuit beyond the 331 is OK.

    Ken
     
  9. mohsen

    Thread Starter Active Member

    Oct 24, 2008
    37
    0
    but is there anything wrong in the design!! because it doesn't work!!
     
  10. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,348
    Hello,

    Make a voltage divider on the Vcc at the + input of the 331.
    That way there is a switching point.

    Now you are comparing Vcc with Vcc wich is not working.

    Bertus
     
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    You need to power the relay coil from +5V. You can't switch an AC load with a transistor.
    What kind of sensor do you have?
     
  12. nomurphy

    AAC Fanatic!

    Aug 8, 2005
    567
    12
    See attached:
     
  13. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    The input circuitry still won't work. First, we don't know his sensor characteristics, and second, the input voltage range of the LMV331 does not extend to the positive supply voltage. Even if it did, a comparator output is indeterminate when the inputs are equal.
     
  14. nomurphy

    AAC Fanatic!

    Aug 8, 2005
    567
    12
    I didn't look up the part, I thought he was literally using a switch with a low-power opamp that could go close to GND.

    For a comparator, check the datasheet (or other) application circuits and use hysteresis.
     
  15. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Close to GND isn't the problem. LMV331 inputs can go 0.1V below GND, but it will only work when the inputs are more than 0.8V below the positive rail.
     
  16. mohsen

    Thread Starter Active Member

    Oct 24, 2008
    37
    0
    the sensor i'm going to use is for soil moisture, when the voltage comes from the sensor less than the v+ which i don't know what is the right moisture in other word the right voltage range to set for the circuit to send High signal.
    ok, here what i have done so far!
    i did a voltage divider, and connected the power supply to 5v instead of 12v.
    and it still doesn't work!! am i using the right relay!!
     
    • 2.png
      2.png
      File size:
      17.5 KB
      Views:
      16
  17. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Look at the datasheet of the comparator. It has an open collector output. You need a pullup resistor.
     
  18. mohsen

    Thread Starter Active Member

    Oct 24, 2008
    37
    0
    How to construct the pull-up resistor!
     
  19. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    This is how you do it if you don't need any hysteresis. I suspect you will need hysteresis if you build hardware, which means you will need some changes.
     
  20. mohsen

    Thread Starter Active Member

    Oct 24, 2008
    37
    0
    :) i'm building this project, it's just one part of the project! ^_^, if i do this part correct i will know how to do the rest of it.
     
Loading...