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
  • dougw
    0 dougw over 2 years ago in reply to colporteur

    Relays can chatter if their coils aren't getting enough voltage or current. Is it possible when both coils get energized, it loads the power supply enough to cause a local voltage drop?

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

    The condition is two relays cycling one on the other off then flip. The relay control turnouts on the layout. Something in my code is owly causing the problem. I'm working on the problem hoping to uncover the cause.

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

    The condition is two relays cycling one on the other off then flip. The relay control turnouts on the layout. Something in my code is owly causing the problem. I'm working on the problem hoping to uncover the cause.

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

    In that case, your sleep mode code may not be working entirely as expected either, if the code is still toggling the relay outputs.

    • 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

    The troubleshooting session today was a disaster. I reversed the DC power input to the controller board and it no longer winky-blinky:(

    I failed to notice the two power wires had reversed themselves while I was doing some changes. My mind failed to register the labels and the colour coding of the wires. I hook them up and JASUS!

    Two hours later the buck-boost board has been replaced and a diode was installed to prevent the problem in the future. Fortunately, I installed a protection diode for the Arduino Mega so it wasn't taken out. Why I didn't install the diode for the other section on the board escapes me.

    Maybe tomorrow will be a better day.

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

    Ouch!

    On a more philosophical note though, I guess it finally silenced those chattering relays?

    Perhaps more of a crowbar approach than a dead man's switch though...  

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

    These are growth moments. Personally, and hardware-design-wise.

    also: Hugging

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