IR Receiver Transmitter

Hello,

I’m currently doing a project and I am a need of some help.My project is based on NetGadgeteer and the goal is to control various devices thru a webpage (using a webserver of course) the devices are also the ones that have IR In them.

I came across a problem.I have a IR Receiver from Gadgeteer and various devices at home that have IR built in. For example I have Philips MCM 166/12 and the thing is that if I connect the module (IR Receiver) to Gadgeteer and add some code if a button is pressed debug the button.toString() and for example if I press PowerON/OFF button in Debug I get the number 12,if I press different keys I get different numbers.

The same goes If I use a Phillips original remote control for the device , the same number comes up. - 12. I also have the Devhammers IR Transmitter.

What I want to do is try and for example Power ON or Power OFF any devices (it can be the same phillips music set) What should I do ? Why do I get the number 12 ,or not some binnary code or hex or something? Can some of the people here on this forum explain to me what should I do ? because my hands are tied up over here I don’t know what to do…

I know that but i try to send the code to the device and i have also seen that (I use a smartphone camera) that my IR Transmitter does not blink reputedly the LED light just stays purple all the time,it does not blink at all.

What is the cause of this ? The code that I’m using to send the command is

uint[] send = new uint[] { 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1 };

iRLEDArray.SendCommand(send);

Visual inspection doesn’t tell you much, with respect to IR communications, because the actual flashing pattern of the IR LED is far too fast for the human eye to perceive. IR signals travel over a carrier frequency, and different IR protocols may require different carrier frequencies. If you’re not using the correct carrier frequency, your receiver won’t “see” the signal at all.

While the code in this tutorial is focused on Arduino, it’s still the best tutorial I’ve read in terms of teaching the fundamentals of how IR communications work:

Pay particular attention to the section on IR Remote Signals:

as it explains the reason IR comms use a carrier frequency (PWM, in the tutorial…in my IR LED Array driver I use SignalGenerator).

In order to command a given device via IR, you need two things, then. First, you need to know the carrier frequency that the device requires. My driver was written specifically for use with Syma S107 IR helicopters, so it uses a carrier frequency of approximately 38khz, and timings based on the research of a user in an RC forum I came across:

http://www.rcgroups.com/forums/showthread.php?t=1231421

In addition to the carrier frequency, you also need to understand what the timings are for a “high” or “low” as far as the receiver is concerned. How close you have to be on the timing is probably dependent on the receiver, but if you’re too far off, it won’t work.

Not sure which mainboard you’re using, but if it’s one that supports GHI’s premium libraries (for example, FEZ Spider), you can use the SignalCapture(https://www.ghielectronics.com/docs/106/signal-capture) and SignalGenerator(https://www.ghielectronics.com/docs/24/signal-generator) classes to capture and replay the IR signals. The SignalGenerator class is particularly useful, since it has a method overload that accepts an additional argument specifying the carrier frequency for the signal you’re sending.

You may also want to have a look at this thread, which discusses a scenario that’s pretty much what you’re trying to do:

https://www.ghielectronics.com/community/forum/topic?id=9007

Hope that helps!

3 Likes

Hello,

I have just realized that I used the wrong LED’s i soldered the blue ones just like you suggested but now I realized that I need different LED’s in order to use Signal Capture class. Am I correct?

What LED’s would you recomend?

Exact model number would be awesome with a link if possible

@ geduxadmin - SignalCapture is an input, not an output, so no, you don’t need different LEDs to use SignalCapture.

You need an IR sensor to capture IR signals. Again, I’ll refer you to the Adafruit tutorial on IR:

Connect your IR sensor to an IO pin, and use the SignalCapture class to get the values from the signal:

https://www.ghielectronics.com/docs/106/signal-capture

I have managed to read the signals from my 38 kHz Phillips remote control (The remote control is from my Audio set

The question is how should i send the signal using devhammer module?

Here is the signal that I have managed to read using Arduino

OFF ON
37668 usec, 2680 usec
840 usec, 460 usec
840 usec, 460 usec
420 usec, 460 usec
400 usec, 480 usec
840 usec, 900 usec
400 usec, 460 usec
420 usec, 460 usec
420 usec, 900 usec
840 usec, 900 usec
840 usec, 900 usec
860 usec, 460 usec
420 usec, 460 usec
400 usec, 480 usec
400 usec, 900 usec
420 usec, 460 usec
840 usec, 460 usec
400 usec, 480 usec
int IRsignal[] = {
// ON, OFF
pulseIR(2680);
delayMicroseconds(840);
pulseIR(460);
delayMicroseconds(840);
pulseIR(460);
delayMicroseconds(420);
pulseIR(460);
delayMicroseconds(400);
pulseIR(480);
delayMicroseconds(840);
pulseIR(900);
delayMicroseconds(400);
pulseIR(460);
delayMicroseconds(420);
pulseIR(460);
delayMicroseconds(420);
pulseIR(900);
delayMicroseconds(840);
pulseIR(900);
delayMicroseconds(840);
pulseIR(900);
delayMicroseconds(860);
pulseIR(460);
delayMicroseconds(420);
pulseIR(460);
delayMicroseconds(400);
pulseIR(480);
delayMicroseconds(400);
pulseIR(900);
delayMicroseconds(420);
pulseIR(460);
delayMicroseconds(840);
pulseIR(460);
delayMicroseconds(400);
pulseIR(480);
############################################################################