How would you do this?


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Posts
    88

    Default How would you do this?

    Hi Guys,

    I am trying to trigger an input on a PIC16F687 using an external 12 volt source. The circuit will be using this same supply. Would you have the 12 volt source control a transistor which the transistor will be connected to the input of the pin (either pull up or down, haven't decided yet) or have the 12 volt source go to the input pin via resistors?

    I thought about doing it via directly to the pin using resistors, such as in a voltage divider setup, but wasn't sure if that was the best way. Your thoughts?

    Thanks,
    Tony

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: How would you do this?

    A voltage divider on the input will work fine. How about 5K from the input pin to GND and 7.5K from the input pin to your 12V source. If you need a little noise
    immunity, you can add a .1uF cap across the 5K resistor.
    Charles Linquist

  3. #3
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: How would you do this?

    I would suggest optocoupler as TLP504 or similar.

    Al.
    All progress began with an idea

  4. #4
    Join Date
    Jan 2010
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: How would you do this?

    Quote Originally Posted by aratti View Post
    I would suggest optocoupler as TLP504 or similar.

    Al.
    Hi Al,

    Just out of curiosity, why would you use the optocoupler?

    Tony

  5. #5
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: How would you do this?

    With optocoupler you will obtain Total isolation from the 5 volts rail and total immunity to noise.

    Cheers

    Al.
    All progress began with an idea

  6. #6
    Join Date
    Feb 2011
    Location
    Michigan, USA
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: How would you do this?

    Actually the picbasic pro manual shows under the serin command, you
    can input 12 volts directly through a current limiting resistor. (22k in example)

    But if you truly need a reliable trigger, without false triggers, I agree with aratti
    and use optocoupler and caps.

Members who have read this thread : 0

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