IR Direct To Distribution Amplifer

Hi all,

I'm looking for a bit of help as I'm OK with the Arduino but cr@p at the electronics! I'm building a home automation system with the help of a couple of Arduinos. One of the key tasks is to out put IR directly into a distribution amplifier but I'm getting stuck.

At the moment I have an IR LED with the anode connected to a PWM pin on an Arduino micro and the cathode to the ground pin.If I put this close to an IR receiver connected to my IR distribution amplifier all works perfectly with the signal being emitted by the Arduino, picked up by the receiver and distributed to all devices.

However what I really want to do is do away with the IR LED and wire the Arduino straight in to the input of the amplifier.nI've tried the obvious by just wiring it straight in, but I don't get anything back out the amplifier.

Any ideas on what I could try?

The amplifier I'm using is this one http://www.calradstore.com/92-160.html

Thanks in advance :slight_smile:

Are you trying to send a PWM-modulated signal to the amp? That would probably be incorrect, assuming the IR receiver demodulates the signal and sends only the pulses. You might try that.

Also, your IR receiver may be open-drain. The bus would have a pull-up resistor, and the receiver pulls it to ground for signalling. See if your amp input has an idle voltage on its input with nothing connected.

Thanks SitNickity, great response!

SirNickity:
Are you trying to send a PWM-modulated signal to the amp?

Ummm I think so, I'm using Ken Sherriffs example set up A Multi-Protocol Infrared Remote Library for the Arduino
However I have a lack of understanding here...

SirNickity:
That would probably be incorrect, assuming the IR receiver demodulates the signal and sends only the pulses. You might try that.

From the tiny bit of information I have managed to understand Googl'ing around this seems to line up although I have no idea how to change the signal accordingly. Do you have any info or ideas where/what to search for?

SirNickity:
See if your amp input has an idle voltage on its input with nothing connected.

Will check this tomorrow when I have my multimeter back.

Thanks again :slight_smile:

I have managed to track down this...

Is this what I would need and is it likely to be as simple as it looks? (Apart from it being a bugger to solder...)

OK, here's a quick run-down on what you need to know...

In a typical IR scenario, there's optical transmission (from IR LED to to IR receiver), and then the wired transmission (through a distribution network, or into devices that have a 3.5mm IR control input jack for instance).

Optical transmission uses a 38kHz (depending on the standard, but this is common) square wave that is pulsed on and off to send the data. In other words, when the LED is "on", it's actually flashing at 38kHz. When it's off, it's completely off. This is called the 38kHz "carrier", and is used by the receiver to tune its reception to a specific frequency, rather than accepting the random presence and absence of infrared light as a potential signal. This avoids false triggering from sunlight or other sources of IR.

To replicate this, you would use a 38kHz PWM output that is turned on and off according to the bits you need to send. That's what IR LED transmit libraries do. Clear on that so far?

When the signal is received, it can be done either through a photo-receptive component that is capable of sensing infrared, or an IR decoder. With the former, you get an analog signal that is an electrical equivalent of whatever IR energy exists. But the latter is a photo-receptive component plus just enough smarts to detect the 38kHz carrier and only respond when the carrier is present. Flash an IR LED at it with random time periods, you get nothing on the output. PWM at 38kHz and pulse that on and off, you get output which mirrors the on/off pulses (without the 38kHz carrier superimposed).

The IR decoder should have three legs -- Gnd, Vcc, and Out. When it detects a 38kHz signal, it will pull its output to ground on the low periods of the signal, and let the output float on high periods. So, the device reading the decoder's output (e.g., your distro amp) has to set the "high" voltage through a pull-up resistor for there to be both high and low states. Make sense?

If you try to drive the amp (wired protocol) via a sketch intended to drive an LED (optical protocol), then you end up throwing a 38kHz signal at the amp, which it will not know what to do with. Depending on the intelligence of the amp, it may just broadcast it (modulated again by a 38kHz carrier on the outputs, leading to pulses of light corresponding to the intersection of the two 38kHz oscillators), or reject it (if the signal is received, buffered, and re-transmitted), or who-knows-what. Also, since the Arduino output will likely drive the line both low andhigh, you'll impose the Arduino's Vcc (likely 5v) upon the amp input as the idle condition. This is likely to cause problems. Probably not fatal problems, since it will probably be current-limited enough to shunt away overvoltage (if the amp idles higher than 5v) at the pin's input protection diode, but it will likely interfere with normal signal distribution regardless.

Amazing response, thank you so much. I've read so many pages on IR but none have been anywhere near as easy to understand as that.

So if I understood correctly;
Try to rewrite the sketch to remove the 38kHz modulation.
Or
Use the previously mentioned chip to demodulate the input
Or
Super glue the transmitter LED to an IR receiver as a bodge!

Your completely right as well about it currently just refuses the input, there's no output at all. Also correct about when its connected it stop handling it inputs from elsewhere. This bit I still don't fully understand, surely if the arduino isn't transmitting from the PWM pin then it should have no affect? If I resolve by rewriting the sketch how would I overcome this?

Thank you again

Yep, that makes perfect sense. Think of it this way... The Arduino will have two states:

  1. Transmitting high (let's ignore the 38kHz carrier for this), which will hold the distribution amp's input at 5v.
  2. Transmitting low, which grounds the distro amp's input.

The amp is most likely a dumb bus -- no signal regeneration happening, just echoing the inputs to the output. Since the IR inputs float when high, they don't impose any voltage on the bus during idle periods. (The bus would have a single pull-up resistor somewhere.) All they do is pull the bus low when they're sending. This means, while one input is doing nothing, all other inputs can take control of the bus at any time. They don't interfere with each other while idle. (Multiple sending inputs will trample on each other, which usually mangles the signal to be incomprehensible to the intended recipients, but is otherwise harmless.)

When you hold the input high by driving the Arduino output pin high, you override the idle pull-up (no change if the pull-up is 5v, but you drag the bus down if it idles higher). However you also override other receivers trying to pull the bus low. The resulting bus state will be some intermediate value, depending on the impedance of the IR receivers trying to ground the line, and that of the Arduino trying to pull it high.

To avoid this, you need to change the first state above (transmit high) to turn the pin into an input, and therefore high-impedance. And, as you said, modify the library to no longer use PWM, but just to toggle between high-Z / low to transmit.

If that got confusing, you can picture it kind of like a bus (as in public transportation) with one of those pull-cords to signal your request to exit at the next stop.

The pull-cord will have a spring at one end to hold it taut (like a pull-up resistor). To request a stop, you pull the line "low". If something else is forcefully pulling the line "high" (keeping it taut), it may look the same as the pull-up when no-one's using it, but you won't be able to tug it down anymore.

That's the difference between floating high (all driving pins set as high-impedance, like an input pin would be), and forced high (like an output pin driven high).