Trigger 12v Solenoid Valve from a PIC


Closed Thread
Results 1 to 7 of 7
  1. #1

    Smile Trigger 12v Solenoid Valve from a PIC

    I'm playing with PICs for a long time, but still a beginner.

    I want to build a hobby project that must switch a 12v Solenoid Valve on and off from a PIC running on a single battery.
    How would I do this without complicating the circuit?

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Trigger 12v Solenoid Valve from a PIC

    Hi,
    The easiest way is to use a NPN transistor or a N-channel MOSFET and switch the lowside of the solenoid. Ie +12V -> Solenoid -> Switch -> GND.
    Drive the transistor with an output of the PIC. Don't forget to put a diode in reverse across the solenoid to clamp the inductive kickback when it's turned off.

    Google low side transistor switch and you should find plenty of information.

    /Henrik.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Trigger 12v Solenoid Valve from a PIC

    Thank you Henrik!!!
    Will the PIC then also be able to run on the 12V?

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Trigger 12v Solenoid Valve from a PIC

    No, not directly on 12V it won't.
    You'll need a voltage regulator to bring down the battery voltage to a range that the PIC can operate on, what that range is is stated in the datasheet but usually 2.5V to 5V.

    /Henrik.

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: Trigger 12v Solenoid Valve from a PIC

    will a 7805 do?

  6. #6
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    159


    Did you find this post helpful? Yes | No

    Default Re: Trigger 12v Solenoid Valve from a PIC

    Quote Originally Posted by koossa View Post
    will a 7805 do?
    It certainly will, as long as your PIC is designed for 5V
    "I have noticed that even those who assert that everything is predestined and that
    we can change nothing about it still look both ways before they cross the street"


    -Stephen Hawking

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: Trigger 12v Solenoid Valve from a PIC

    Thank you very much for your help!!!

Similar Threads

  1. Replies: 8
    Last Post: - 19th August 2012, 03:43
  2. Schematic for Proportional Control of Hydraulic Valve?
    By Kirk Fraser in forum Schematics
    Replies: 3
    Last Post: - 12th March 2011, 06:53
  3. Solenoid Vavle
    By koossa in forum Off Topic
    Replies: 8
    Last Post: - 4th November 2008, 12:35
  4. Electric water valve
    By Christopher4187 in forum Off Topic
    Replies: 2
    Last Post: - 6th April 2008, 21:41
  5. Controlling a DC solenoid
    By The Master in forum Off Topic
    Replies: 2
    Last Post: - 23rd December 2007, 01:26

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts