Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Stop all actions if radio failed

Stop all actions if radio failed

Scheduled Pinned Locked Moved Troubleshooting
2 Posts 2 Posters 755 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CJ CassarinoC Offline
    CJ CassarinoC Offline
    CJ Cassarino
    wrote on last edited by
    #1

    Anyway to stop the Arduino from doing anything when the radio fails? I am using an actuator and the problem is if radio fails whatever command was sent to the actuator will continue. This is a problem as I have set a value for it to stop, if it doesn't stop it will break my window or the actuator. But when the radio fails it stops running the code, is there a way to stop the Arduino or just send a stop command to my relay when the radio fails?

    mfalkviddM 1 Reply Last reply
    1
    • CJ CassarinoC CJ Cassarino

      Anyway to stop the Arduino from doing anything when the radio fails? I am using an actuator and the problem is if radio fails whatever command was sent to the actuator will continue. This is a problem as I have set a value for it to stop, if it doesn't stop it will break my window or the actuator. But when the radio fails it stops running the code, is there a way to stop the Arduino or just send a stop command to my relay when the radio fails?

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      Doing what you want requires to predict what will fail - which is extremely hard. Does the radio fail because of a software bug? If so, if it was possible to predict the bug and handle that case, it would be easier to fix the bug. Does the radio fail because the power supply is insufficient? if so, the Arduino might be running outside the specifications as well. And when something is run outside the specifications, the result is, well, unspecified...

      Sure, NASA does a pretty good job, but their electronics costs millions and their software development costs more.

      However, there are some things that can be done.

      • Make sure you have selected actuators that behave the "right way" when unpowered. For a water valve, this means normally closed (if the failsafe thing to do is to stop the flow) or normally open (if the safe thing is to keep the flow going). For your motor the safe thing is probably to stop the motor, which will happen automatically if power is lost so this case isn't as applicable to your situation.
      • have pull-ups or pull-downs on the io pins, so the actuator returns to the "correct" state if the Arduino stops driving its outputs
      • In setup(), make sure you initialize all output to safe values in case the Arduino is reset for whatever reason.
      • use the watchdog functionality of the Arduino. The internet has lots of resources on how to do this. A good start might be http://playground.arduino.cc/Main/ArduinoReset
      • External watchdogs might be a solution as well - something that resets the Arduino if it doesn't receive a pulse every second or something like that

      For your specific case, I would look at power problems. Are you using a reliable power source? Do you have the recommended decoupling capacitors in place? If you get rid of the root problem, you might not need to add any additional safety features.

      You could also create a hardware solution that automatically stops the relay when the actuator hits an endpoint.

      1 Reply Last reply
      1
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      17

      Online

      11.7k

      Users

      11.2k

      Topics

      113.1k

      Posts


      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular