Dead mans switch Arduino

Hello,

I have a RFID Reader Project with,

  1. one ESP32 Controller with a MFRC522 RFID Reader and
  2. one ESP32 Controller with a 4-Channel Relay.

The current situation is this:

A user is holding his rfid tag to the reader and if the tag is authorized it opens one channel on the relay and the user can use the machine. The communication is via MQTT. The RFID Reader sends the message to the MQTT Channel Topic and the 4-Channel Relay is listening to this Channel Topic and if he gets a "allowed" it turns on the channel, if he gets "not allowed" it shuts the channel off.

But I would like to build in a timer that:

  1. If the user is holding his rfid tag a timer start for 5 minutes and than he uses the machine.
  2. After 4 minutes a red light should blink (I've build in green and red light) and should warn the user to hold his card again to let the machine know you are still using it.
  3. If there comes no reaction after 5 minutes it should shut everything off, if he hold s his card again the timer should reset and should start the 5 minutes again.
  4. If he wants to turn off the machine while using it, the user holds his card to the terminal and the timer gets a reset and if he holds within 10 seconds his card again it shuts off the machine.
  5. And while using the machine, no one should be allowed to hold the card.

I'm a newbie in C++ and I could do all by myself to this point but now I don't know how I can integrate this. I've read into "millis" a bit and I think to use this method.

Thanks :slight_smile:

We can't see your code.

Interesting project. Start by posting a block diagram of how the modules interact. A schematic would be even better but I do not think you are at that point. Start with your code and post it we will help you but we will not write it for you. There is a section where you can hire somebody to do it. Post links to the technical information on each of the hardware devices. What Arduino are you planning on using? Is this a commercial application, if so the Arduino is not designed for such usage.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.