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 Does Arduino have a Dead Man switch?
  • 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
  • State Not Answered
  • Replies 23 replies
  • Subscribers 386 subscribers
  • Views 3977 views
  • Users 0 members are here
  • arduino coding
  • arduino
Related

Does Arduino have a Dead Man switch?

colporteur
colporteur over 2 years ago

A dead man's switch is a device used as a fail-safe. These switches are usually used as a form of fail-safe where they stop a machine with no operator from a potentially dangerous action or incapacitate a device as a result of accident, malfunction, or misuse. 

I'm looking for some method to stop an Arduino to prevent harm. Is there an Arduino code sequence that will stop an Arduino and the only way to recover is to restart the device?

  • Sign in to reply
  • Cancel

Top Replies

  • dougw
    dougw over 2 years ago +10
    Watchdog circuits are the most common way to respond to serious system failure or software issues but there are a bunch of similar but subtly different concepts to clarify before a full answer... Fail…
  • robogary
    robogary over 2 years ago +5
    An ESTOP switch is a fail safe electro-mechanical device to provide fail-safe whether a machine is operating or not. A deadman switch is used when a machine is in operation to ensure the operator is…
  • javagoza
    javagoza over 2 years ago +5
    I recently faced a similar issue with the Arduino Nano 33 IoT. The Arduino Nano 33 IoT uses the 32-bit SAMD21 Arm Cortex-M0 processor so the solution would not work for all Arduino models. I had to activate…
Parents
  • colporteur
    0 colporteur over 2 years ago

    While researching the reset pin I stumbled across sleep_mode();

    For idle (slight reduction in power): SLEEP_MODE_IDLE
    For standby (more reduction in power): SLEEP_MODE_STANDBY
    For power-down (most reduction in power): SLEEP_MODE_PWR_DOWN

    In developing a model railroad Arduino animation project from theoretical to physical, I discovered a scenario, that in theory should not happen. Well add human interaction to the mix and anything can happen. In my case two relays start to chatter by oscillating back and forth. My deadman switch idea is to stop this scenario and force the operator to reset the layout.

    There are some great suggestion provided. Responses sometime contain a solution but if it they don't the ideas provided create paths I never thought about. I long for the days when I worked with a crew of people each with different experience diversity and level. Coffee breaks where we just sat and chatted was a wonderful melting pot of ideas.

    Are there any downsides to sleep_mode? I'm hoping to take it to the lab this afternoon and do some testing. I still am not confident I have the ideal solution.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 2 years ago in reply to colporteur

    If you have enough control to be able to detect the issue and programmatically place the microcontroller into a sleep state, then it sounds as if you would also have enough control to take a slightly less drastic approach. Just stop all activity and if necessary, reinitialise back to the start-up state.

    If it requires physical intervention on the track, then stop all activity under program control, turn on a 'check engine light' and wait for an 'all clear' button press before continuing operation.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • colporteur
    0 colporteur over 2 years ago in reply to beacon_dave

    To be honest, I don't have enough information at the moment to know whether my *** is punched or bored:) My deadman switch request was a lifeline to see if I could get the code to behave.

    I have some sensor reading reliability issues that are causing problems. I now know halogen floods lights are not good when you are working with IR sensors:( 

    I need to do some additional troubleshooting to isolate the issue or issues. I threw the sleep_mode in the code today as a hail mary and it did nothing. The relays still chattered like my teeth on a November Manitoba morning.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robogary
    0 robogary over 2 years ago in reply to colporteur

    Some cold maple syrup ought to muffle or even eliminate the chatter :-) 

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • robogary
    0 robogary over 2 years ago in reply to colporteur

    Some cold maple syrup ought to muffle or even eliminate the chatter :-) 

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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