Fluctuating digital inputs


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Fluctuating digital inputs

    Hi,
    Thanks for doing the schematic pedja089 - that's exactly what I'm talking about. The 15k, 2k will give a low level of 0.39V. I looked at a 18F2420 datasheet and it states max voltage for a logic low on a schmitt trigger input to be 0.2Vdd or 0.66V with a 3.3V supply so you're below that by some margin - but not much. Definitely worth a try. Double check against correct datasheet!

    but since that's in series it's position shouldn't matter.
    Yes, I'd say it matters. You want the cap close to the PIC and the resistor close to the cap - not at the switch.
    If you're trying to filter noise generated from the switch itself bouncing etc then it wouldn't matter but in this case you're trying to filter out noise being coupled into the wires. If you put the resistor far away from the capacitor (which you want close the actual input pin) the noise can be coupled into the part of the wire between the resistor and capacitor basically negating the resistor.

    A simple software based low pass filter will most likely work as well but a little bit of hardware filtering is "the right way" and will provide some protection for the input.

    /Henrik.

  2. #2
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default Re: Fluctuating digital inputs

    I will have to put the resistor inside the plug which is on the circuit end of the wire then. That's as close as I can get it without cutting through traces on the PCB. It still puts the resistor within 3 inches of the PIC though.

    The PIC I'm using is a PIC24FJ64GA002. I'm pretty sure the datasheet said VSS-0.2V is low and 0.8-VDD is high.

  3. #3
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Fluctuating digital inputs

    That is just print scr, from my schematic.
    My Vdd is 2.8V, so lower threshold is 0.56V. With 2K and 15K combination low level is 0.32V.
    That is almost half of threshold, it works fine for me.

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Fluctuating digital inputs

    Bandaids,Bandaids,Bandaids, Just put an optoisolator and a couple of resistors on a small piece of Vectorboard and be done with it. If you are going to use the circuit in post #382 you might as well do it right with anh opto.
    Dave Purola,
    N8NTA
    EN82fn

  5. #5
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Fluctuating digital inputs

    If you referring to my post #14...
    My circuit use only 10uA with all inputs shorted to GND.
    Vdd for inputs is controlled by PIC. So just give me opto that uses less than 1uA and I'll be happy to use it.
    By the way device passed ESD and RF immunity test without false triggering or any damage
    Last edited by pedja089; - 7th October 2014 at 20:37.

  6. #6
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Fluctuating digital inputs

    Double post. Bad internet connection...

  7. #7
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default Re: Fluctuating digital inputs

    Current usage isn't really a problem for me so I'm happy to use optos. They will be in a V2 of the PCB for next year though.

    The existing PCB is running with a few minor modifications and debouce code and so far I've not had a single problem.

    Thanks everyone for your help. This thread will be invaluable when I'm designing V2 and other similar PCBs. I'll also be paying more attention to noise from now on.

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


    Did you find this post helpful? Yes | No

    Default Re: Fluctuating digital inputs

    Good stuff. I'm in the planning stages on a residential alarm system and long runs of wire are a fact of life.

    I'm using 4 strand telephone twisted pairs, don't remember if shielded. But I'll be sure to keep an eye on interference.

    Robert

Similar Threads

  1. How to Measure 2 or more digital inputs a the same time
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 29th April 2013, 03:23
  2. PIC 18f4680 DIGITAL INPUTS
    By MegaADY in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th July 2008, 08:34
  3. Digital inputs are some pin NOT working (PIC18F458)
    By san6302 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th July 2008, 07:50
  4. Setting up digital inputs
    By quester in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd March 2008, 23:14
  5. Digital inputs
    By Christopher4187 in forum General
    Replies: 5
    Last Post: - 2nd August 2007, 00:14

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