Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IR Receiver Module? #434

Closed
BrianGenisio opened this issue Aug 21, 2014 · 23 comments
Closed

IR Receiver Module? #434

BrianGenisio opened this issue Aug 21, 2014 · 23 comments

Comments

@BrianGenisio
Copy link
Collaborator

Is anyone working on an IR Receiver module? I see the IR proximity and distance sensors, but I don't see anything about IR Receivers. As far as I can tell, they work completely differently (proximity sensors work with I2C where IR Receivers use pulse-distance modulation protocols).

If nobody is working on it, I am curious enough to start playing with it. Any known resources out there? There is the IRRemote Arduino library that I can likely get some guidance from. Has anyone tried this in the past but hit a wall? Any thoughts on how it should behave?

I was thinking an event with data is probably the primary interface, but likely a mapping interface would be nice, so I can get commands mapped to a specific remote.

I may never get anywhere with it, I am really just curious right now.

Thoughts?

@rwaldron
Copy link
Owner

Yes, I've tried this in the past but StandardFirmata doesn't support pulseIn/Out (there is a Ping version of Firmata but that's it's specifically for Ping). The problem is that pulse protocols require delays and delays are process blocking.

@BrianGenisio
Copy link
Collaborator Author

Understood. Thanks for the explanation.

@rwaldron
Copy link
Owner

@BrianGenisio one thing that is frequently on my mind: can these IR receiver devices be modified in such a way that they work like an analog sensor, ie. produce a voltage that corresponds to the data?

@BrianGenisio
Copy link
Collaborator Author

Perhaps. Here is someone who used a PIC to translate the IR codes to serial. Perhaps a similar technique for analog? As long as the Digital-to-Analog-to-Digital conversion isn't too lossy?

@rwaldron
Copy link
Owner

I say it's worth investigating :)

@soundanalogous
Copy link

Another approach although a bit more challenging on the firmware side (but really not all that bad) would be to create a custom I2C device. You could get a small board like an Arduino pro mini and write an Arduino sketch for that board that reads the IR values and makes them available to your main board via I2C (in slave more). See the slave_reader and slave_sender examples for the Arduino Wire library (File -> Examples -> Wire).

@BrianGenisio
Copy link
Collaborator Author

And here is a decoder chip. It has a lot of output pins, and it requires an oscillator... seems like more circuitry than we'd want, but it is another approach.

http://www.nxp.com/documents/data_sheet/SAA3049A_2.pdf

@BrianGenisio
Copy link
Collaborator Author

This looks pretty cool, although it appears to be discontinued and I was only able to find it on Ebay for $20. It is an IR decoder that can do serial or I2C.

http://www.byvac.com/downloads/datasheets/BV4615%20DataSheet.pdf

@rwaldron
Copy link
Owner

Whoa, that is cool :)

Did you see this? http://www.seeedstudio.com/wish/grove-i2c-ir-receiver-p1873

@BrianGenisio
Copy link
Collaborator Author

No, I hadn't seen that.

Unfortunately, that Groove picture is for an I2C color sensor, not an IR receiver. They don't seem to have an IR to I2C board. The post is someone saying that they want the component (like us) like the color sensor.

@rwaldron
Copy link
Owner

Haha what the... I should've read more before posting that: I copied the link from google images search results. Sorry for the weird noise.

@robtarr
Copy link

robtarr commented Feb 7, 2015

Has anyone looked into a solution for this? I would be willing to help with whatever I can. I have an IR LED & receiver that I would love to hook up to a Johnny-Five project.

@sergionader
Copy link

Hello,

I need some help to put some pieces together.

  1. I can run https://github.com/shirriff/Arduino-IRremote with no problems in my Arduino Uno, so I can send raw data to remote control my TV.
  2. I can make my beaglebone black blink leds in my Arduino Uno using johnny-five (thank you!!!!)
  3. What I need is a way to allow node to send those raw codes to arduino in order to let arduino send the IR signal to my TV. Using a web interface, user clicks on volume up button, for instance, and node sends the related raw code to arduino that sends it to the IRRemote library.

Is that possible? Basically I need node to send parameters to an Arduino sketch.

Any help will be appreciated.

Thanks in advance and have you all a nice week.

Sergio

@BrianGenisio
Copy link
Collaborator Author

The problem is that the IR receiver module sends pulse-length modulated digital signals. These are the hardest kinds of digital signals for a Firmata-based system to work with because it requires blocking in order to accurately measure the pulses.

It is possible to write a custom Firmata extension to do this, but I'm not aware of anyone who has done this yet.

Instead, we're looking at a hardware solution. @ajfisher is working on a pulse-width to I2C adapter that he thinks can be produced around $3 each! How's that going @ajfisher ? Once that exists, it should be (crossing fingers) pretty easy to write J5 drivers for things like the IR Receiver, FM Receivers, Ping sensors, Digital Reflectance Arrays, and other modules which emit time-based digital signals.

@BrianGenisio BrianGenisio reopened this Feb 9, 2015
@sergionader
Copy link

Thanks for your reply, Brian.

I'm not sure if got properly what you said, once using Arduino I can send the IR "microseconds array" to the receptor. I don´t need to receive IR codes.

My project is all based on Beagle Bone Black, but I could not find a library to send the IR codes. So, I'm trying to use the Arduino to do so, still using BBB as the "central command".

Thus, splitting the questions:

  1. my real need is to send IR raw codes from BBB
  2. As I could not get it done, I want to use BBB to make Arduino to do so.

Regards and have a nice week!

Sergio

@rwaldron
Copy link
Owner

rwaldron commented Feb 9, 2015

You could use the Arduino as an I2C slave (with some custom firmware) and connect it to the Beagle Bone (I2C master). Then use board.i2cWrite and board.i2cRead to to interact with the I2C slave

@sergionader
Copy link

Thanks, Rick.

In this case (board.I2cWrite) can I send a sketch name and parameters? If yes, is there any example?

Regards!

@rwaldron
Copy link
Owner

rwaldron commented Feb 9, 2015

can I send a sketch name and parameters?

I don't understand this question. The sketch would already be on the Arduino, it would look something like this:

#include <IRremote.h>
#include <Wire.h>

// connect your IR thing to pin 11
IRrecv irrecv(11);

decode_results results;

int address = 4;
int value = 0;

void setup() {
  Wire.begin(address);
  Wire.onRequest(onRequest);

  irrecv.enableIRIn();
}

void loop() {
  if (irrecv.decode(&results)) {
    value = results.value;
    irrecv.resume();
  }
}

void onRequest() {
  Wire.write(value);
}

The Arduino's SDA and SCL are connected to the BeagleBone's SDA and SCL.

In Johnny-Five code, running on the BeagleBone:

var five = require("johnny-five");
var Bone = require("beaglebone-io");
var board = new five.Board({
  io: new Bone()
});

board.on("ready", function() {
  this.io.i2cConfig();
  this.io.i2cRead(4, 1, function(data) {
    // This is the value from irrecv in the sketch above.
    console.log(data);
  });
});

Note: none of this is actually tested, I've done other i2c master<->slave projects that are similar and they all work very well.

@sergionader
Copy link

Looks like this is exactaly what I need. Will test and make the proper adjustment if needed.
As soon as I do it, will post the results.
Thanks a lot!

@rwaldron
Copy link
Owner

I will try to do any actual test today as well, that way we can compare results. I'll try these:

Arduino <=> Arduino
Edison <=> Arduino

Will report back when I know more

@sergionader
Copy link

Hello, Rick.

The only way I found to make it to work was using node module serialport.
I2C didnt't work, unfortunately.

Have you got any better result?

Regards

@curlyz
Copy link

curlyz commented Jul 28, 2017

A littl bit late for the party but I have made a hugh effort in IR signal I2C interface, i promimsed a simplest i2c code for the main cpu.
A little bit how this work, this module is pro mini based with ability to receive, decode, send, and store both raw and protocol data. For raw data , i design a simple code and led interface to make it at ease for user, just press a button, or send learn command from master i2c device and it will store it . Everytime you need to send or recognise , just use a simple i2c command.
So only 3 i2c command needed for this module.
At first I was thinking about closed source this, but avr lock bits are so screw up so i guess this is my contribution to the community.
Anyway, if anyone have interest in this, email me. curly.saigonese@gmail.com
Note. With flash chip, this module can store more than 256 command, max raw length is 240 or 120bit message. I have tried this with my air conditioner, work like charm :))
And it will be open source only after someone helped me upgrade the code a little bit.

@dtex
Copy link
Collaborator

dtex commented Jan 11, 2018

Hi @BrianGenisio,

I'm working on cleaning up the J5 issues list (it was getting kind of hairy). I've identified a subset of issues that are requests for new classes, devices or features and have added them to an index of requested features. Hopefully it will be a place where motivated contributors can find cool things to work on.

This request is listed under the new "Receiver" class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants