Maixium voltage on a input pin


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi,

    There's the other way ...

    use what's inside the Pic ... the clamp diodes !!! just use a series resistor to limit input current to 10-20µA ( 500µA max continuous ... )

    see AN521c for direct mains ( ! ) to Pic interfacing. That's OFFICIAL !

    and if you want ... add 2x 1N4148 diodes parallelled to the clamping diodes !!!

    no need regulators or complex circuitry !!!

    Alain


    Merci Alain.

    Ok:

    - 2 parallel 5M resistors on the input pin (AN521 suggested a backup just in case).
    - a pair of backup diodes on the input pin as well.

    And now the noob question, the PIC will be powered by a 5V circuit, the signal from the sensor is powered on a 12V circuit, where do the backup diodes go to? The 12V cicuit or the 5V circuit?

    The clamping diodes within the PIC go the the 5V circuit, I would assume the backup would go to the same place, just want to be sure.

    This would greatly simplify my life 'cause it gets real complicated real quick trying to use op amps like the LM239, I got that idea from another tutorial.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by Demon View Post
    Merci Alain.

    Ok:

    - 2 parallel 5M resistors on the input pin (AN521 suggested a backup just in case).
    - a pair of backup diodes on the input pin as well.

    And now the noob question, the PIC will be powered by a 5V circuit, the signal from the sensor is powered on a 12V circuit, where do the backup diodes go to? The 12V cicuit or the 5V circuit?

    The clamping diodes within the PIC go the the 5V circuit, I would assume the backup would go to the same place, just want to be sure.

    This would greatly simplify my life 'cause it gets real complicated real quick trying to use op amps like the LM239, I got that idea from another tutorial.
    Hi, Robert

    No need for 5M if 12v signal ... just (say 45v ... automobile std. "power clamping" )

    40v / 50µA .... 1M in series

    diodes are - of course- between PIC input and power rails ( 5v and gnd )

    IF using external clamp diodes, series resistor can be somewhat lowered :

    using Schottky diodes ( Vf ~ .3v ) will easily allow 1 mA, (the internal clamping diodes won't have to conduct, then ... )

    so, the resistor could be as low as 47k ... limiting input noise capture !!!

    Alain
    Last edited by Demon; - 4th October 2016 at 16:54.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    I'm reading the app note again and the part about alternating voltage bugs me. It says that "a 115 VAC 60 cycle sine wave will traverse from 0 to 2V in 32ms", what about 12VDC? Wouldn't that be on instantly so to speak? The car alternator may work with AC but it distributes DC to the car electrical system.

    The other thing is the clamping diodes, they shut off over VDD and below VSS. That's fine to protect the PIC but that would interfere with my application. The car sensor works on 12V, I can't just stop measuring at 5V, I need "see" the remaining 7 volts or else I will get only a partial reading?

    Let's use the fuel gauge as an example, the fuel tank would read from empty up to 40% full or so and then the meter would top out, no?

    The only thing I can think of it to divide the car voltage by 4 and do the same thing with the signal voltage. That way I won't be comparing apples and oranges and I will be able to use the PIC ADC properly. My car battery is about 12.? charged and 14.? with the alternator charging. Let's use 16V as a maximum in case of a surge, divide by 4, that brings it down to 4V, well within the 5V limit of the PIC. I can still place a safety diode on top of that to protect at 5V too.

    EDIT: Oh, and that spare 1V translates into another 4V buffer, that means it would be safe up to an absolute maximum 20VDC.
    Last edited by Demon; - 21st April 2008 at 09:45.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Robert

    I think we mixed DIGITAL and ANALOG inputs ...

    here you want 0 > 12 v to be 0 > 5 v !!!

    so, you need a voltage DIVIDER ...

    see Darrel's site for such an application :

    http://www.pbpgroup.com/modules/wfse...p?articleid=25

    Everything explained ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Robert

    I think we mixed DIGITAL and ANALOG inputs ...

    here you want 0 > 12 v to be 0 > 5 v !!!

    so, you need a voltage DIVIDER ...

    see Darrel's site for such an application :

    http://www.pbpgroup.com/modules/wfse...p?articleid=25

    Everything explained ...

    Alain

    Yup, the signals from the sensors will be analog. Interesting tool, I added it to my favourites. There is a comment at the bottom of that page that puzzles me though:

    "Do not use the Zener diode (D1) for analog circuits. It will adversely affect the readings.
    It can be useful for protection of Digital Inputs though."

    So, since I've lowered the voltage to an acceptable level for the PIC, then there should not be any need for extra clamping diodes, no?
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Lightbulb

    Quote Originally Posted by Demon View Post

    So, since I've lowered the voltage to an acceptable level for the PIC, then there should not be any need for extra clamping diodes, no?
    It's an automotive environment ( remember the 45v ??? ) ... use clamping diodes instead of the Zener ... they won't disturb the divider.

    Alain
    Last edited by Demon; - 4th October 2016 at 16:54.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    In post #19 and #28 of this thread http://www.picbasic.co.uk/forum/show...ighlight=zener
    Melanie talks about the zener.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  2. make a low voltage output from a PIC pin
    By emptyset in forum General
    Replies: 1
    Last Post: - 8th February 2008, 19:20
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  4. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 20:35
  5. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07

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