arduino and Raspberrypi gpio communication with different(?) power supplies

I have a project that I would like to turn on when it is dark, and off when its bright. to achieve this I have a trinket m0 that will run all the time, directly off the battery (3.7-4.2v). Then to power the raspberry pi I have a voltage booster (adafruit's powerboost 1000) to bring it up to 5.2

To facilitate control between the two, I want a running signal coming from the raspberry pi, to let the trinket know whether or not it's on. And a shut down request from the trinket back to the raspberry pi to get it to do a polite shutdown to avoid corruption from killing the power.

So my question is, with the power set up like that, can I tell my trinket to write a pin to LOW or HIGH and expect the rpi to pick up on that? I know complete circuits are necessary if you want electricity to flow, but I don't understand it well enough to know if it can detect a voltage without a complete circuit. Or maybe I still have a complete circuit because the grounds might still be shared despite the voltage booster in between?

Do I need to get a couple transistors involved and then the trinket just controls the gate on a complete circuit from the RPI's power out back to an input pin and vice versa?

I believe that the GPIO pins of both the Adafruit Trinket M0 (ATSAMD21E18 based) and the Raspberry Pi are 3.3 volt so you can interconnect them without any level shifting, providing these share the same ground.

There may be more efficient ways of powering the two devices.From your description it appears that you are stepping up a battery voltage to 5.2 volts, then powering devices which regulate that down to 3.3 volts. This could incur significant power loss.

6v6gt:
There may be more efficient ways of powering the two devices.From your description it appears that you are stepping up a battery voltage to 5.2 volts, then powering devices which regulate that down to 3.3 volts. This could incur significant power loss.

Raspberry Pi uses multiple voltages (3.3V and 1.8V at least) derived from the 5V input, so there probably isn't a trivial way to power it from anything but 5V.

MrMark:
Raspberry Pi uses multiple voltages (3.3V and 1.8V at least) derived from the 5V input, so there probably isn't a trivial way to power it from anything but 5V.

Oh yes. Thanks for pointing that out, as supported by the first answer here: pi 2 - Can I power Raspberry Pi (newer models) from 3.3v Supply Alone? - Raspberry Pi Stack Exchange

Have the RPI, energize and de-energize a relay that powers the device. When you want a reading energize the relay, give a few moment for power on, read the device, shut it off.


Corruption? Like the corruption one could get when the computer has a delayed write for HDD info and the power is lost before the data is actually written to the drive? Not happening with the uController you are using.

Idahowalker:
Have the RPI, energize and de-energize a relay that powers the device. When you want a reading energize the relay, give a few moment for power on, read the device, shut it off.


This seems to suggest having the RPI shut down the arduino, which is the opposite of what I am doing. I was advised that the trinket can run on extremely low power, so the idea is for it to be on, reading the relevant inputs, and turning the rpi on and off.

Corruption? Like the corruption one could get when the computer has a delayed write for HDD info and the power is lost before the data is actually written to the drive? Not happening with the uController you are using.

I don't know what "uController" is. But going by the same miscommunication discussed above, I am guessing you are saying the trinket will not suffer from corruption, which I would agree with, but I am turning the raspberry pi on and off. I have had many sources tell me that killing power to your raspberry pi, without a polite shutdown, is a good way to end up reformatting your sd card.

6v6gt:
I believe that the GPIO pins of both the Adafruit Trinket M0 (ATSAMD21E18 based) and the Raspberry Pi are 3.3 volt so you can interconnect them without any level shifting, providing these share the same ground.

Thanks for the reply. That's what I am wondering about. If one is attached to the ground on the battery/input side of the voltage booster, and the other is attached to the ground on the output side of the voltage booster, can they be said to share a ground?

There are ways to cause the RPi to go through a proper shutdown/boot up that can be found on Raspberry Pi Forums - Index page by way of GPIO pins and others.
I own several RPI's myself, all running SETI, 24/7.

Callipygous:
Thanks for the reply. That's what I am wondering about. If one is attached to the ground on the battery/input side of the voltage booster, and the other is attached to the ground on the output side of the voltage booster, can they be said to share a ground?

Connect all the grounds together. You'll be fine.

I have had many sources tell me that killing power to your raspberry pi, without a polite shutdown, is a good way to end up reformatting your sd card.

Not quite, it is good way of destroying your SD card. What happens is that the card will appear to work but it will not retain any changes after power shut down. You will not even be able to reformat your SD card.