Powering RPi2 using ATmega328p I/O


First of all, this is my first post on this forum, and I am happy to join the Arduino/Makers community.

I am working on a small project using the ATMega328p and I was wondering if it's possible to power the RPi with the ATMega328p's I/O pins.
I want to use a simple 5V/2A (microusb) to supply the ATMega328p, and I was wondering if I will be able to supply the RPi2 with 5V/1.8A (as recommended in specs) using it's I/O.


you cant , but if you want to use the arduino to turn it off and on, i recommend using a transistor or a MOSFET

Thanks for the quick reply.

Just to make sure, by using a MOSFET you say that I can just connect the Gate to the ATMega's I/O and Source/Drain to the RPi2 and my 5V/2A supply?

Is it ok to use a 5V relay as well? what would be better?


You need a common ground and you must not put arduino signals into a raspberry Pi when it is powered off.
Any signals you do put into the Pi have to be level shifted down to 3V3 with either a voltage divider or a buffer of some sorts.

You can switch the positive line with a p-channel FET or the negitave line with an n-channel FET.