user53040: I want to read an RFID tag using an Arduino, which controls some relais. This is easy.
For me the more complex part is to build it fault-tolerant. So I thought I could use the watchdog. The tricky part is, my relais module should keep a certain state (change of state is rare), no matter what happens to the Arduino.
My first thought was to put some condensators to the relais. Calculate the RC component so it can last the watchdog timeout plus booting up.
Now there is the problem, that the relais module is keeping its state while booting. I guess I can't use a pull up/down resistor, since the state of the relais can be low or high at random.
My second thought was using a latch relay. But this has the disadvantage, that it probably can hide problems. For example if the arduino died, and the latch relay holds a certain state, it masks the problem. In that case it's not possible to notice a faulty Arduino.

Those are the reasons I tend to think condensators are better?
Are those ideas feasible? Are there easier ways to accomplish this?
Are there more problems to think about?

(I was already reading about millis at gammon's page. Apparently it's not a problem after all.)

user20245: Consider constraining your design with clear requirements.  As it is highly unlikely any design can protect its self for all situations.  

my relais module should keep a certain state (change of state is rare), no matter what happens to the arduino

Consider latching relays where there is a set coil and a reset coil.  Such as  this one.  Such a device does not need to be continuously powered.  Only pulsed to set and a pulsed to reset.

So I thought I could use the watchdog. 

Watchdog timers are fine if your program can get stuck waiting for an event that may never happen.  Like waiting to read the data from and RFID chip.  If you think this might happen, then add the watchdog timer to your design.

Now there is the problem, that the relais module is keeping its state while booting.

Most embedded processors with bi-directional GPIO pins force those pins to be inputs when booting up.  This appears as high impedance to the outside world.  Consider using pull ups or pull downs on these pins to prevent them from floating to a state which may change the relays during booting of the processor.

53040: <p>I want to read an RFID tag using an Arduino, which controls some relais. This is easy.</p>

<p>For me the more complex part is to build it fault-tolerant. So I thought I could use the watchdog. The tricky part is, my relais module should keep a certain state (change of state is rare), no matter what happens to the Arduino.</p>

<p>My first thought was to put some condensators to the relais. Calculate the RC component so it can last the watchdog timeout plus booting up.</p>

<p>Now there is the problem, that the relais module is keeping its state while booting. I guess I can't use a pull up/down resistor, since the state of the relais can be low or high at random.</p>

<p>My second thought was using a latch relay. But this has the disadvantage, that it probably can hide problems. For example if the arduino died, and the latch relay holds a certain state, it masks the problem. In that case it's not possible to notice a faulty Arduino.</p>

<ol>
<li><p>Those are the reasons I tend to think condensators are better?</p></li>
<li><p>Are those ideas feasible? Are there easier ways to accomplish this?</p></li>
<li><p>Are there more problems to think about?</p></li>
</ol>

<p>(I was already reading about millis at <a href="http://gammon.com.au/millis" rel="nofollow noreferrer">gammon's page</a>. Apparently it's not a problem after all.)</p>
 20245: <p>Consider constraining your design with clear requirements.  As it is highly unlikely any design can protect its self for all situations.  </p>

<blockquote>
  <p>my relais module should keep a certain state (change of state is rare), no matter what happens to the arduino</p>
</blockquote>

<p>Consider latching relays where there is a set coil and a reset coil.  Such as  <a href="http://wiki.seeedstudio.com/Grove-2-Coil_Latching_Relay/" rel="nofollow noreferrer">this one</a>.  Such a device does not need to be continuously powered.  Only pulsed to set and a pulsed to reset.</p>

<blockquote>
  <p>So I thought I could use the watchdog. </p>
</blockquote>

<p>Watchdog timers are fine if your program can get stuck waiting for an event that may never happen.  Like waiting to read the data from and RFID chip.  If you think this might happen, then add the watchdog timer to your design.</p>

<blockquote>
  <p>Now there is the problem, that the relais module is keeping its state while booting.</p>
</blockquote>

<p>Most embedded processors with bi-directional GPIO pins force those pins to be inputs when booting up.  This appears as high impedance to the outside world.  Consider using pull ups or pull downs on these pins to prevent them from floating to a state which may change the relays during booting of the processor.</p>
