element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum False triggering interrupts in Arduino Mega2560
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 19 replies
  • Subscribers 395 subscribers
  • Views 4232 views
  • Users 0 members are here
  • interrupt
  • interrupt problem
  • Design
  • interr
  • interru
  • product design
  • arduino
  • arduino avr
Related

False triggering interrupts in Arduino Mega2560

shwetankv007
shwetankv007 over 7 years ago

Hello everyone,

Greetings of the day, i have been working with embedded systems for quite a while now, currently i am working on a project that dispenses water depending upon the balance from rfid card, however the system has start stop and recharge buttons connected to interrupts of microcontroller Atmega2560 with internal pull-ups driven from falling edge. The system works fine mostly however in some cases false interrupts are detected that causes functions to be activated for respective buttons i.e. start stop or recharge. I tried adding a coupling capacitor and a schmitt trigger circuit to stabilize the input but it still detects the false signals of noise.

 

Moreover a small touch on the interrupt terminals(buttons not connected ) also causes the interrupt to be triggered, any suggestions are appreciated.

 

I am using arduino for declaring and defining the interrupt pins and their respective routines. The function just hosts a flag which is then checked in the main loop.

 

Thank you in advance.

 

EDIT:-

As suggested I tried:-

1. Adding an external pullup of values ranging from 1.5k-10k but the issue persists

2. Adding the decoupling capacitor

3. Power supply is fixed and using a bench supply of 24volt stepped down by a MORNSUN buck converter.

4. Not tried the debouncing test since the problem is not related to button press. Even if the button is not pressed, if I touch the open end of wire connecting the interrupt terminal then also it triggers the interrupt.

5. the pin is not routed near a power rail or a high frequency coil/trace.

 

interrupt problem  interrupt arduino avr product design

 

Message was edited by: shwetank vishnu

  • Sign in to reply
  • Cancel

Top Replies

  • jc2048
    jc2048 over 7 years ago +4
    Perhaps try an external pull-up and see if that helps.
  • Jan Cumps
    Jan Cumps over 7 years ago in reply to shwetankv007 +4
    even when it’s not related to the button and debouncing, there has to be something electrical going on. If it happens when you pat the terminal, an oscilloscope with single shot trigger would help to catch…
  • jw0752
    jw0752 over 7 years ago +3
    Hi Shwetank, Here are some ideas. Have you checked to make sure there is adequate decoupling on the power supply to your unit? Poor power quality can make the Arduino glitchy. Another thing to check is…
Parents
  • jc2048
    jc2048 over 7 years ago

    Perhaps try an external pull-up and see if that helps.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • shwetankv007
    shwetankv007 over 7 years ago in reply to jc2048

    I tried with an external pull up with different values ranging from 1.5k-10k with a parellel capacitor followed by a schmitt trigger as well, however the immunity was improved but the interrupt got triggered with external noise without hitting the button. The problem is that if i touch the terminal let alone pat it with something, the interrupt gets triggered.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • shwetankv007
    shwetankv007 over 7 years ago in reply to jc2048

    I tried with an external pull up with different values ranging from 1.5k-10k with a parellel capacitor followed by a schmitt trigger as well, however the immunity was improved but the interrupt got triggered with external noise without hitting the button. The problem is that if i touch the terminal let alone pat it with something, the interrupt gets triggered.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Children
  • jc2048
    jc2048 over 7 years ago in reply to shwetankv007

    Do you have an oscilloscope that you can look at the signal on the pin with? That would give you an idea of what the signal is that's coupling into the wiring.

     

    If not, does the switch wiring go alongside a mains cable or anywhere close to or under the rfid coil?

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube