Electrical Issue: PIC input false triggering, Signal Noise suspected.


Closed Thread
Results 1 to 36 of 36

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: Electrical Issue: PIC input false triggering, Signal Noise suspected.

    How much current can the reed switch sink (datasheet link?) and what value do you have on the pullup resistor?
    It might suffice to simply put in a stronger pullup.

    Another thing to think thru is to what the various signals are referenced and how the signal currents flow, do the signal current share paths with any high current signals etc.

    A cheap, easy and good way to interface stuff to the "real world" is to use opto-isolators. That way the controller is isolated from the "real world" and the reed-switch (in this case) would be driving a LED which takes quite a bit of current, not likely that noise is going to turn it on.

    I'd try with a stiff pullup to begin with.

    /Henrik.

  2. #2
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Electrical Issue: PIC input false triggering, Signal Noise suspected.

    I'm not a professional; I'm a hobbyist. My only qualification is a lack of expertise that has lead to many similar issues - odd, inconsistent behavior that seemingly comes from nowhere. For me, it seems always to be a power issue - sagging voltage, poor connection somewhere, two wires touching... I'm careful, I worked twenty years soldering under a microscope, but somehow...

    So, I'd first say, "I feel your pain!" For me, better it doesn't work at all - those kinds of problems I can isolate.

    I'd first try isolating your power - run it from batteries or a second supply to be sure your power is good. Be sure you have a healthy smattering of filter caps around your inputs. Henrik's idea is good, good solid power at decisive levels!

    Presuming you're "light" on equipment as I am, maybe you could hook up your inputs (reed switch lines) to ADC and take a look at voltage that way... see what kind of jitter you've got...

    The other thing is, perhaps you've got some debounce issues - comes to mind as you say, "The PIC jumps to the next event."

    It's hard to say anything for sure as I cannot see the program, track, or wiring. Just some ideas and moral support...

    Let us know how it works out (and I think it would be ok to post a picture of the layout - I know I'd like to see it).

  3. #3
    Join Date
    Jun 2015
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: Electrical Issue: PIC input false triggering, Signal Noise suspected.

    Amoque,

    Thanks for your thoughts and empathy from a fellow "enthusiast."

    I have read some related posts that the forum software provided presumably due to the tags I defined. There were also some good insights though most of the users there had sensors which were much more sophisticated devices than my lowly reed switches. One person recommended double sampling and rejecting the highs to short to be legitimate by delaying some micro seconds between the samples. I had thought that perhaps using the "Button" command in PBP3 would help de-bounce the input.

    I will try running with battery power. Presently I have a 5vDC wall type supply with no ground. I am also going to heavily shield the wires from the reed switches and attempt to use best practices in grounding the shields. I also read elsewhere on the net that I might have to reference my main control board ground plane to the same "earth" ground if I am going to shield/ground all devices.

    I have the project fully drawn and documented but I thought due to its size, I would submit that as a last resort.

  4. #4
    Join Date
    Jun 2015
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: Electrical Issue: PIC input false triggering, Signal Noise suspected.

    Henrik,

    I don't have a spec sheet for the reed switch so I can't verify the current capacity but it is rather small (~5mm l. reeds) in glass tube. The pullups are 47k ohm and on the control board about 8mm away from the pic Ports C4-C6 and connect with a ground trace which incidentally shares the same trace with Vss two pins away. I have the usual bypass cap (100nf) soldered across the Vss & Vdd pins directly below the PIC.

    I understand what you suggest about too weak a pullup, I had wondered about that myself, but I am unsure of how high a pullup current the pin should see, in other words how "stiff" the pullup should be. The spec sheet says the source current max on any port pin is 25mA. My gut tells me the reed switch should be able to handle that at 5vDC but I would hope that it would not be necessary to max out the current to mask the noise.

    Any thoughts?

Similar Threads

  1. Intermittent reset of 16C6440 - possible noise issue
    By Christopher4187 in forum General
    Replies: 4
    Last Post: - 16th May 2012, 12:43
  2. Noise on input signal
    By fanman in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 28th February 2012, 02:55
  3. Electrical noise problem with PIC 16f84
    By Snap in forum General
    Replies: 11
    Last Post: - 26th September 2007, 09:36
  4. Input Noise
    By PJALM in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 28th February 2006, 19:26
  5. False Triggering I/O
    By pdegior in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th July 2005, 09:02

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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