Car radio on until door opens or time runs out....

I've been intrigued over a feature in my parents vehicles, where the radio stays on when the engine is shut down until a certain time elapses or a door is opened. I have scoured the Internet and found how to use a pair of relays to create a latching function, but there is no automatic timer in case of a door sense failure. So, I thought; what a great job for an Arduino!!

Okay, bear with me. I understand simple electronics and can build my own custom PCB's, but am in no way a programmer. So my plan is thus:
*Build a double relay system that acts like a latching relay until it senses a door opening.
*design an Arduino that senses Igniton Off, and begins a countown. It allows the relays to continue working, but when the countdown finishes, it grounds the door trigger switch

relaywiring1.jpg

So my plan is thus:

And the problem is?

hotrodder247:
design an Arduino that senses Ignition Off, and begins a countdown. It allows the relays to continue working, but when the countdown finishes, it grounds the door trigger switch

And turns the roof light on?

We get this sort of query from time to time. You do not want an Arduino - you want an NE555. There should be a module on eBay to do this.