Connecting a 2.5mm female jack into Uno PWN pin to Receive IR commands

Hey!

I want to make an IR repeater style device for an existing control system product I own. Basically the product I own has a few 2.5mm IR Output jacks (mono im pretty sure) which you can connect IR blasters up to which you then attach directly to your IR controlled devices such as TVs and DVD players.

Do you think I could connect a 2.5mm mono female jack up to a GRN and PWN Pins (any) on my Uno and then connect my existing IR control system's IR output port straight into my Uno and receive the IR commands straight into my Uno via a mono 2.5mm cable connecting the 2 devices?

If I can receive the IR signals straight into my Uno I could then theoretically output them on another PWN pin with an IR LED connected right?

Thanks in advance for feedback you can provide relating to this project!

I think so. It would be very easy to read the IR commands into your analog pins. There is a handy library you can download that can control IR stuff. I don't know much about it, but it's by Ken Shirriff, and you can download it from arcfn.com/2009/08/multi-protocol-infrared-remote-library.html. Hope this helps you.

Any idea how the IR signal would look coming into the Uno's PWN port? :|

Would I need to temporarily store the incoming signal as a large array of bits or bytes before I then output the array/signal from another pin on he Uno or would you suggest a another method would be more suited?

You probably want to look at the IRremote library (which I see somebody else already posted). It has support for most IR devices, both sending and receiving. It also has a record example, where you can train your Arduino to act as most remotes: http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html. Note, if you are sending IR signals, you have to use the one pin that IRremote uses (which is tied in with a particular timer in the hardware). On the Uno, this is pin 3. On the Due it is pin 9.

If you go to the page, you will see Ken has links describing most of the IR protocols, as well as secrets of using PWM.

I would be careful in hooking up a random device to an Arduino, unless you know the device's current is within that of the Arduino's limit (and vice versa). Be sure to connect all of the grounds together. If it was a slower device, I would suggest hooking it up through an opto-coupler, but I don't know if the opto-coupler is fast enough for the normal IR signals. It may be better to hook up an IR LED and do the signal yourself.

In terms of the jack itself, you can get panel mount 2.5mm jacks made for soldering, that you would solder the two wires and hook up to your system. If you want system that hooks directly to a breadboard, that is harder to find. However, you can readily find 3.5mm breakout boards that connect to the breadboard (sparkfun for instance sells them https://www.sparkfun.com/products/11570), and use a 2.5mm to 3.5mm converter you can get at places like Radio Shack.

Unfortunately, the output of your existing device will be the modulated IR signal, which you could use but I believe its not worth the (much bigger) effort. This will not feed directly into IRremote for decoding.

If you already have one of the small blasters that plug into your existing device - they are just IR transmitters (IR Leds). Your best approach would be to set up the Arduino as mentioned already using IRremote (or IRLib) as an IR receiver & using the blaster as the IR transmitter.

Also, search for 'sb project IR' to see how IR signals are made up.

Also, search for 'sb project IR' to see how IR signals are made up.

Thanks for the good read! Im still struggling with though

Can you read my statement bellow and point out which parts are flawed/not possible/plain wrong?

I would like to receive the "modulated" IR signal into a PWN pin on the Arduino and output it (via serial?) over a cheap NR24 connection to another Arduino where it just outputs that same signal to an IR Emitter using the IR library you mentioned.

:relaxed:

Horendus:
I would like to receive the “modulated” IR signal into a PWN pin on the Arduino and output it (via serial?) over a cheap NR24 connection to another Arduino where it just outputs that same signal to an IR Emitter using the IR library you mentioned.

Umm, a PWM pin is an output pin (it is turned on/off rapidly to simulate putting out a lower current). Transmitting the IR signal would use a PWM pin to send it, but you don’t use a PWM pin to read it. To read an IR signal, you would need to poll the input (or attach it as an interrupt), and see how long the signal is on and off.

So, if I understand what you are asking, you would have a normal input that sees the pulses, and using the library it figures out what is being pressed. Presumably you would then write a character or more on the serial line to the other Arduino, which in turn generates the signal. There is likely some small delay for the encoding and decoding. I imagine if the distance isn’t too large, it might be simpler to eliminate the second Arduino, and just run a long wire from the sensor. It depends on the distance and the electrical noise in the area. Another thought would be to run a fiber optic cable carrying the IR signal, instead of a sensor on an electrical wire.

If you only have two different buttons that are being pressed, you can use this chip from Sparkfun. According to the documentation, you can program it with two different signals, and it will raise two different input signals, depending on which button was pressed. This saves you from having to have the Arduino trying to decode the signal, and the chip does it in the background: https://www.sparkfun.com/products/8753

The Simrec SIS-7C is the big brother chip, where it allows you to recognize 7 different IR buttons: http://www.simerec.com/chips.html

If the control you are trying to read uses the NEC protocol, this chip would be similar to the SIS-7C: http://www.ebay.com/itm/350608682887?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

(it is turned on/off rapidly to simulate putting out a lower current).

Simulating a lower voltage, isn't it? That's the way I always understood: "apparent" voltage is average of values of off / on, weighted by on time.

JimboZA:

(it is turned on/off rapidly to simulate putting out a lower current).

Simulating a lower voltage, isn't it? That's the way I always understood: "apparent" voltage is average of values of off / on, weighted by on time.

Yes, whoops. Sorry about that.

The whole idea of this setup is to be able to received an IR signal into one 1 arduino and then have it spit the IR code out of another arduino via a wireless link.

Does anyone have a practicable solution to this?

Im now thinking instead of having the first Arduino receive the IR signal into an Input Pin I could instead have it receive the code via an IR Receiver module. I need to then be able to transmit what it has received to the second arduino via an RF link, and output it via an IR Emitter.

What would be the bets method to transfer the received IR command from 1 arduino to the next via the RF link?

Thanks for you help guys !

You are getting a few things confused here.

The IR signal fed to the IR LED is indeed, modulated at 38 kHz or about.

It is hardly worthwhile using an Arduino simply to remove the 38 kHz modulation (nothing more than chopping it up actually). You could use an IR receiver module - readily available - to do that and feed the output of this directly into your RF transmitter module, as the pulses of the order of 1 kHZ are the sort of thing for which these modules are intended.

Then again, all you really have to do is to remove the 38 kHz chopping from the initial signal by feeding it through a diode into a parallel capacitor and resistor, and use that to key your transmitter module directly.

At the other end, you take the output from the receiver module and re-modulate it at 38 kHz. A NE555 will do that for you perfectly well.

Let me assure you that the commercially available units which you are attempting to imitate almost certainly do not use a MCU (though they may use rather sophisticated RF modules).