I have connected an Arduino MEGA2560 with the Raspberry Pi B+ V1.2 via USB
The idea is to use the Raspberry Pi as gateway to remote flash the Arduino.
So I switch on the Arduino and the Arduino switches on a relay, which switches on the Raspberry Pi power (USB micro) if I need the Raspberry Pi to flash the Arduino
It works. But when I switch off the relay, the Raspberry Pi keeps on working, because of back powering from the USB-A port connected with Arduino USB-B port.
Question 1: How can I prevent this?
Question 2: What happens, if I use an different raspberry? https://forums.raspberrypi.com/viewtopic.php?t=14059
and
https://forums.raspberrypi.com/viewtopic.php?t=203729
and others
the (poly)fuses can be blown up.
I don't like my Raspberry Pi to be damaged regardless which version I use. And I need the possibility to power off the Raspberry Pi via relay (not only via ssh: shutdown -P).
What do you think about these?