Author Topic: How do IR remotes wake up on key press?  (Read 3479 times)

0 Members and 1 Guest are viewing this topic.

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13124
Re: How do IR remotes wake up on key press?
« Reply #25 on: September 10, 2019, 08:34:12 am »
No worries - just different approaches to the same problem.  However a Pi is a cheap and easy introduction to running a Linux box, which with the way Microsoft is heading is good to have some knowhow about in case you need to 'jump ship'.  The fact you can do cool stuff with its I/O pins is just the cherry on top.   That really puts you back to the early PC days under DOS when you could hook any hardware you liked to a printer port or pop in a 24 line GPIPO card and talk to it direct from BASIC without  installing any drivers.

If you take away ONE thing from this discussion, I hope its the idea that if you need a WiFi Roku controller, its worth separating the power-hungry WiFi device from the remote you hold, using it as a base-station and giving it its own wallwart supply.  Then the handheld end can be run for years on cheap alkalines, just like commercial remotes.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2156
  • Country: us
Re: How do IR remotes wake up on key press?
« Reply #26 on: September 10, 2019, 04:53:26 pm »
I take your point about the wifi power issue.  But it remains a puzzle how the Roku RF remotes deal with that.  They require pairing, but I don't know if that means they stay on all the time.  I read somewhere, but can't find it now, that these modern Roku RF remotes can do straight RF, Bluetooth, or wifi network access.  But I don't see complaints about batteries wearing out early.  So it's a mystery.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2156
  • Country: us
Re: How do IR remotes wake up on key press?
« Reply #27 on: September 19, 2019, 06:39:23 pm »
I wanted to report where I ended up with this.  I used an Arduino Pro Mini, 3.3V, 8MHz, with the regulator and power LED removed.  It's powered directly by an 18650 Li-Ion battery.  Pictures attached.

The remote sleeps in Power_Down mode, with any keypress waking it up via a pin change interrupt.  Apparently it awakens pretty quickly because I have yet to experience an instance when it wakes up but the keyboard.h library fails to detect the first keypress.  And I'm doing a bunch of pin resetting stuff before I actually read the keypress.

As best I can tell, when sleeping, the current draw is a bit below 0.5µA.  So there's no ON/OFF switch.

I have the following functions enabled:

1.  If I am already watching a Sling channel, entering a new channel  causes the Arduino to issue two Back commands to get back to the My Channels line, then Left or Right commands to get to the new channel, and finally an OK command to start the channel playing.

2.  If the Arduino loses its place for some reason, entering the actual current playing channel number followed by the "#" key causes the Arduino to reset its currentChannel variable to that channel.

3.  If I enter the "*" key without a channel number, the Arduino will send the power toggle command to the TV, and issue a Home command to the Roku, which also terminates all streaming.  So that's effectively a single-key shut-down of the TV and the Roku.

4.  If I enter the "#" key without a channel number, the Arduino issues commands to toggle the TV's input between antenna and HDMI.

5.  If I enter the desired channel number followed by the "*" key, from any state, the Arduino will issue the needed commands to:

   a. Home the Roku
   b. Go Right to the Sling icon
   c. OK on the Sling icon to select it
   d. Wait for Sling to begin
   e. Move Down to the My Channels line
   f.  Move Left or Right as needed to get to the desired channel
   g. OK on that channel to begin watching it

So far it seems to be working quite well.

Thanks for everyone's help on this.  I may put the Arduino sketch on Github at some point, although I "presented" this to my local OSH group meeting last evening, and got the same comments I got here - basically why didn't you do it through the network.  So it appears unlikley anyone else would be interested in this IR version for this use, but someone may have a use for the keypad and sleeping stuff.

 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2156
  • Country: us
Re: How do IR remotes wake up on key press?
« Reply #28 on: September 25, 2019, 06:43:45 pm »
I've put everything in a Github repo in case anyone  may be interested down the line.

https://github.com/gbhug5a/Roku-Sling-IR-Channel-Number-Remote-for-Arduino

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf