500K or less triggering of a pin.


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511

    Default 500K or less triggering of a pin.

    Yo folks...

    Long time no see... Been busy, and trying to hold on to job. Anyhow...
    What I am looking for, and would like some input involves the best way to trigger a pin when the resistance becomes 500K or less Anything more than 500K, the pin remains open (I guess closed would be ok too, for I will be checking for a change in the bit, and turning on a motor).

    I want the fewest parts possible. It doesn't have to be exactly 500K. I have about a 10% tolerance or so.

    My thoughts and ideas are as follows:

    1. Pull up resister on a pin...Since I can use a chip with a pull up resistor, I am thinking that it may be possible to use some kind of grounding resistor, and when that pin is shorted to ground with a 500K (or less) resister (in parallel , it will trigger the pin to fall).

    2. Some kind of Ladder situation in which voltage could be measured and compared to a value.... 5 V being open, 2.5 volts being 500K, 0 volts being 500K or less. This could be done on a A/D converter or comparator of some kind, but this will involve more material. (Hey , if I can do it with just one resistor, I will <smile>)

    I would prefer #1, but I have not set up anything to experiment with it yet. I was wondering if any of you had played with this kind of toy?


    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  2. #2
    Join Date
    Nov 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    myself i would use rctime, resistor to earth to help with static discharge. Depends if you need an instantaneous response or not.
    all the best

  3. #3
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Instant Response is not necessary... delays of 1 second is fine.

    It seems the only thing I can think of, is a 500K resistor in series with the trigger resistance, and when the voltage gets to be about 2.5 volts or less, flip my motor on.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  4. #4
    Join Date
    Nov 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    even with a resistor in series with the 500k, a pic pin seeing it in parallel is way above the recommended 10k or 5k impedance depending on the chosen chip. Myself using thermistors via resistor capacitor timing (choice dependant on environmental conditions) have had results well within the necesarry parameters.
    all the best

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Oh Guys, stop struggling....

    10K between the PIC pin and 0v. Your 500K between the pic in and +5v. Use an ADC pin. If your device is subject to noise pick-up, then put a 100nF across the 10K. That's it.

    Calibration. Take an ADC reading with a Resistor at 500k. This is your minimum 'threshold'. Take another ADC reading with a Resistor at say 450k. This is your max threshold.

    You now have two values... at which point you decide to signal your 'event' condition between thos two points is up to you. You may have to use 10-bit ADC as the values will be pretty tight and 8-bit won't give you much leeway.

  6. #6
    Join Date
    Nov 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    Oh Guys, stop struggling....

    10K between the PIC pin and 0v. Your 500K between the pic in and +5v. Use an ADC pin. If your device is subject to noise pick-up, then put a 100nF across the 10K. That's it.

    Calibration. Take an ADC reading with a Resistor at 500k. This is your minimum 'threshold'. Take another ADC reading with a Resistor at say 450k. This is your max threshold.

    You now have two values... at which point you decide to signal your 'event' condition between thos two points is up to you. You may have to use 10-bit ADC as the values will be pretty tight and 8-bit won't give you much leeway.
    5/vref * 500, my apologies, teach me to post after visiting boozer

  7. #7
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    Oh Guys, stop struggling....

    10K between the PIC pin and 0v. Your 500K between the pic in and +5v. Use an ADC pin. If your device is subject to noise pick-up, then put a 100nF across the 10K. That's it.

    Calibration. Take an ADC reading with a Resistor at 500k. This is your minimum 'threshold'. Take another ADC reading with a Resistor at say 450k. This is your max threshold.

    You now have two values... at which point you decide to signal your 'event' condition between thos two points is up to you. You may have to use 10-bit ADC as the values will be pretty tight and 8-bit won't give you much leeway.
    I was going to suggest using a PIC with ADC, but I thought that the ADC's needed a fairly low source impedance to drive them...
    From the 16F727 data, 9.3 A/D Acquisition Requirements,
    "The maximum recommended impedance for analog sources is 10 kΩ."

    Is this not true for most of the PICs?


    Some of the PICs have analog voltage comparators don't they? Perhaps they'd be better suited to the voltage divider with 500K resistor? I guess I don't know what the input impedance is on those voltage comparator inputs.
    Last edited by Byte_Butcher; - 12th March 2009 at 16:03.

  8. #8
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I was going to suggest using a PIC with ADC, but I thought that the ADC's needed a fairly low source impedance to drive them...
    From the 16F727 data, 9.3 A/D Acquisition Requirements,
    "The maximum recommended impedance for analog sources is 10 kΩ."

    Is this not true for most of the PICs?
    That's why I put the 10K Resistor across the PICs input! The 500k feeds it... you end up having a 50:1 potential divider.

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. DS1820 with 16f688
    By jessey in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd May 2009, 05:07
  3. Advice-scrutiny for my serial controller
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th December 2008, 17:11
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  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 : 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