-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Comments
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. |
Understood. Thanks for the explanation. |
@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? |
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? |
I say it's worth investigating :) |
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). |
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. |
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 |
Whoa, that is cool :) Did you see this? http://www.seeedstudio.com/wish/grove-i2c-ir-receiver-p1873 |
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. |
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. |
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. |
Hello, I need some help to put some pieces together.
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 |
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. |
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:
Regards and have a nice week! Sergio |
You could use the Arduino as an I2C slave (with some custom firmware) and connect it to the Beagle Bone (I2C master). Then use |
Thanks, Rick. In this case (board.I2cWrite) can I send a sketch name and parameters? If yes, is there any example? Regards! |
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. |
Looks like this is exactaly what I need. Will test and make the proper adjustment if needed. |
I will try to do any actual test today as well, that way we can compare results. I'll try these: Arduino <=> Arduino Will report back when I know more |
Hello, Rick. The only way I found to make it to work was using node module serialport. Have you got any better result? Regards |
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. |
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. |
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?
The text was updated successfully, but these errors were encountered: