Jump to content
Flirc Forums
Sign in to follow this  
raspiguy

how to get raspberry pi to boot with flirc se?

Recommended Posts

First, I want to say, I have covered the issue of no power to the flirc to be able to boot...

 

I have a media pi+ case (http://sb-components.co.uk/mediapi.html or https://www.amazon.com/Limited-Raspberry-MEDIAPI-integrated-Remote/dp/B00SEGYY7C) I am not using the onboard IR that came with it, as there's no power to it when the raspberry pi shutsdown. So I bought a flirc SE, and I have a couple adapter cables plugged in that allowed me to have the flirc se powered off of the incoming power, and it also splits to power raspbery pi (internal usb cable that came with FLIRC SE going to adapter cable that gives me standard usb plug, going into female usb plug that splits into 1 male, 1 female micro usb) so I have power going to everything, My question is, how do I set the IR remote to "boot" or wake from sleep or wake from hibernate?

also, I am assuming I will need to connect one of the power switch pin pairs up to the raspberry pi for the actual boot command to work, Can I connect it to the run pin holes as that does a reset?

sorry for the rather noobish question, I am trying to teach myself this stuff as much as possible, I have searched first, and did not see anything that covered this, so if it is covered elsewhere, could you please direct me to it? thanks in advance for any information or guidance anyone is able to give.

Share this post


Link to post
Share on other sites

Hi,

First of all, Raspberry Pi (any version that is available up to this date) does not have any power management by itself at all. So as long as you have power connected directly to the RPi it will draw it no matter if the OS is running or not. There's also no power button support on the board, so it's not directly compatible with Flirc SE - as RPi doesn't support power states you can't control them with Flirc SE.

To actually use Flirc SE with RPi you'd need additional hardware. The hardware should have its own power supply port (which should be used to power whole set instead of RPi's Micro USB one) and probably should also connect to RPi's GPIO pins. It would also probably need additional software running on the Pi which would communicate with extra hardware over GPIO (for example to notify it that the OS has been properly closed and the power can be cut). The hardware should support power button by itself.

I've read the manual for MEDIAPI+ and the board inside of it doesn't support any of the requirements I've described. It looks like it connects the external power supply port directly to RPi, with just a simple hardware power switch in between. This is not enough for properly interfacing RPi with Flirc SE (actually it doesn't add anything helpful in this topic).

There are some extension boards which add power management functionality to RPi. Some examples:

I don't know if these boards can be adapted to properly work with Flirc SE though. I don't have any of them as there's really no need to do that. My RPi 3 is always on behind my TV. I've been doing some calculations on the power consumption and cost when RPi 3 is running constantly and it was only a few dollars per year (I don't remember exactly how much, the calculation is somewhere on the forum). Of course the cost is also dependent on the cost of electricity in your area (mine is around $0.13 per kWh).

Share this post


Link to post
Share on other sites

 Yawor,

Thank you for the information, and taking the time to look up the schematics of the case I mentioned, and actually looking into what I am trying to accomplish. I do have a few clarifications/questions. As I said in my original post, I am relatively new to some of this stuff, so I don't mean to sound like I am questioning your knowledge, but rather trying to gain more perspective from it.

 

Hi,

First of all, Raspberry Pi (any version that is available up to this date) does not have any power management by itself at all. So as long as you have power connected directly to the RPi it will draw it no matter if the OS is running or not. There's also no power button support on the board, so it's not directly compatible with Flirc SE - as RPi doesn't support power states you can't control them with Flirc SE.

I suppose "Boot" is a loaded and incorrect word in this sense, I should have said "wake" or "bring out of hibernation" or something to that effect. Also, you said there isn't a power button, but there is a place to put a reset switch (it's labeled as RUN on the board). My though is (and my thoughts very well may be wrong) If I could get the RUN pins to connect, this would cause the PI to reset, and reload the operating system, essentially "booting" the pi, but as stated before, "boot" is not really the correct term.

To actually use Flirc SE with RPi you'd need additional hardware. The hardware should have its own power supply port (which should be used to power whole set instead of RPi's Micro USB one) and probably should also connect to RPi's GPIO pins. It would also probably need additional software running on the Pi which would communicate with extra hardware over GPIO (for example to notify it that the OS has been properly closed and the power can be cut). The hardware should support power button by itself.

The adapter cables that I added to the media pi case accomplishes the part where you said "The hardware should have its own power supply port (which should be used to power whole set instead of RPi's Micro USB one)". Just past the power switch, there is a micro usb cable that plugs into the pi. Well instead of plugging directly into the pi, I plugged it into a micro usb y cable that has a male plug on the other side going to the Pi, and the 3rd side is a USB port (so power is coming from a source outside of the pi) so I have the flirc powered, independently of the raspberry pi, as well as connected to a usb port on the pi. Would this not be enough to get the Flirc to be able to reset the pi? (I'm assuming not, from your post, but curious as to what is lacking or needed to make this work theoretically)

I've read the manual for MEDIAPI+ and the board inside of it doesn't support any of the requirements I've described. It looks like it connects the external power supply port directly to RPi, with just a simple hardware power switch in between. This is not enough for properly interfacing RPi with Flirc SE (actually it doesn't add anything helpful in this topic).

There are some extension boards which add power management functionality to RPi. Some examples:

I don't know if these boards can be adapted to properly work with Flirc SE though. I don't have any of them as there's really no need to do that. My RPi 3 is always on behind my TV. I've been doing some calculations on the power consumption and cost when RPi 3 is running constantly and it was only a few dollars per year (I don't remember exactly how much, the calculation is somewhere on the forum). Of course the cost is also dependent on the cost of electricity in your area (mine is around $0.13 per kWh).

Thank you for linking some of the power management boards.

My reasoning for wanting to do this is not energy/money based, but rather making a set top box that could be powered on, much like a cable box, DVD player, cable box etc.. Also, it's set up to dual boot between Kodi, and RetroPie, and would need to be restarted/power cycled in some form or fashion to switch over to the other OS.

 

Again, I don't mean for any of my comments to sound like I am saying "I know better" or "you don't know what you are talking about"  as I have only just recently began tinkering with single board computers, and very recently got a hold of a FLIRC, so my line of questions and comments is to give clarification and gain a better understanding of what you are saying, and not to question/disagree/argue about it.

 

Share this post


Link to post
Share on other sites

 Yawor,

Thank you for the information, and taking the time to look up the schematics of the case I mentioned, and actually looking into what I am trying to accomplish. I do have a few clarifications/questions. As I said in my original post, I am relatively new to some of this stuff, so I don't mean to sound like I am questioning your knowledge, but rather trying to gain more perspective from it.

No problem :). We all learn something all the time and I'm certainly not a person who knows everything.

I suppose "Boot" is a loaded and incorrect word in this sense, I should have said "wake" or "bring out of hibernation" or something to that effect. Also, you said there isn't a power button, but there is a place to put a reset switch (it's labeled as RUN on the board). My though is (and my thoughts very well may be wrong) If I could get the RUN pins to connect, this would cause the PI to reset, and reload the operating system, essentially "booting" the pi, but as stated before, "boot" is not really the correct term.

Yes, you probably should be able to use output from Flirc SE (the one which is normally connected to motherboard's power switch pins) to the reset and it should work just like you expect. But remember that closing or suspending the OS on RPi doesn't really do anything besides closing the OS :). The CPU and other peripherals are still drawing power. But as you later mention, saving power is not your main concern, so this may be an OK solution for you,

The adapter cables that I added to the media pi case accomplishes the part where you said "The hardware should have its own power supply port (which should be used to power whole set instead of RPi's Micro USB one)". Just past the power switch, there is a micro usb cable that plugs into the pi. Well instead of plugging directly into the pi, I plugged it into a micro usb y cable that has a male plug on the other side going to the Pi, and the 3rd side is a USB port (so power is coming from a source outside of the pi) so I have the flirc powered, independently of the raspberry pi, as well as connected to a usb port on the pi. Would this not be enough to get the Flirc to be able to reset the pi? (I'm assuming not, from your post, but curious as to what is lacking or needed to make this work theoretically)

Thank you for linking some of the power management boards.

That's not exactly what I've meant. The Y cable just splits the power. What I've meant and what the boards I've linked to do, is a circuit which is able to control power delivery to the Pi. These boards communicate with Pi over GPIO. It's something like this: when power button on the board is pressed, one of the GPIO pins changes state, which is detected by a script or software running in the OS, which in turn executes system halt. Just before system closes some other GPIO pin changes state by software, which is in turn detected by the power management board. This is a signal that system is about to finish shutdown and power can be cut in a moment. Of course every board can use their own technique for this, it's just a simplified description of how this works. The power is delivered to RPi through some kind of relay (mechanic or solid state).

My reasoning for wanting to do this is not energy/money based, but rather making a set top box that could be powered on, much like a cable box, DVD player, cable box etc.. Also, it's set up to dual boot between Kodi, and RetroPie, and would need to be restarted/power cycled in some form or fashion to switch over to the other OS.

Wouldn't the reboot function in Kodi be enough? I don't know RetroPie, so I don't know what power options are available in it, but it also probably have a reboot option. This should reboot the hardware so it starts right from the bootloader.

Of course having a hardware reset option just in case isn't that bad at all. Even if you won't use it as a "wake" function. But it can be nice option if OS freezes and the only other way to bring it back to live is to pull the power plug.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...