I am planning to use an arduino to totally switch off my Raspberry PI ambilight project if my receiver is off. My receiver has a 12V Trigger (DC out 12V, 150mA max.) to directly connect a relay. As my Raspberry has to stop before that and I like to use an arduino for a controlled delay. For this it has to use the Receiver and also the PSU of the ambilights as a source. This because of the following procedure:
Receiver goes on:
Arduino boots with 12V trigger
Close relay to activate 5V PSU (Raspberry PI, Ambilights)
Receiver goes off:
12V source goes off (arduino is still sourced via 5V PSU
Arduino triggers halt command in Raspberry
Raspberry halts and send back a trigger to arduino to switch off after some seconds
Arduino opens relay and everything including arduino is off
For this I like to connect both grounds and connect 12V to Vin and 5V to 5V input as there is still a diode between the inputs. Is this possible without any problems to connects the two grounds of the both sources or should I go another way like some capacitors to keep the arduino running without power source for a while.
Grounds can be safely connected, what matters more is what else is connected. Complete schematic is needed, what you attached is useless.
I don't see any obvious issues in this description except that I don't get the need of connecting both 12V and 5V power to the Arduino. The first is redundant.
I cannot restart it then because the relay cannot be controlled by the PI anymore and the PI cannot be powered by the receiver DC out. Also I need a relay with a delay then. There will be a period of time after setting the GPIO and the total shutdown of the PI. Because of this two topics I like to use an arduino in addition of the PI.
Spend some thoughts about it. I would then get a problem if I switch off the receiver (-> trigger to shut down) and switch it on again during shut down. Then the raspberry would not get that it has to boot again. But will test it. Found a very good description how to handle this here:
So perhaps a simple 12V relay with delay (available at eBay with 555) is fine for my purpose. Mhhh.
12V trigger -> 5V converter -> GPIO shutdown/restart trigger
-> 12V relay with delay -> power supply