Arduino Pins

Hi there!

I have arduino duemilanove board and I want it to receive codes from two wires from remote control. I know that it transmits NEC codes, the only thing is how should I connect these two wires to arduino?

I'll explain a bit: these two wires are from multimedia adapter that controls various types of multimedia devices like dvds, dvb-t tuners etc. These wires should be connected to IR receiver (so there's no IR LED, instead only two wires: I suppose ground and out).

Please, if anyone knows who to connect it correctly to arduino as to receive and decode codes (I have IR library for arduino, also I have a scheme but it uses IR leds, not wires)

Thanks

These wires should be connected to IR receiver

Shouldn't that be IR transmitter?

Can you measure the voltage out of these wires on an oscilloscope, if so it could be there is enough voltage to drive the arduino directly. If not then you have two choices.

1) Connect the output to the base of a transistor through a 1K resistor and have the emitter to ground and collector to the arduino input. Enable the internal pull ups and get a common ground between the arduino and your device.

2) Use an opto isolator http://en.wikipedia.org/wiki/Opto-isolator and wire the transistor part just like above (except no base connection). Wire the two wires from your device through a 220R resistor to the LED side. There is no need for a common ground using an opto.

You should then be able to use IR software directly on the input pin. It could be you have to invert the input (in software) but it depends on the library you use.

Quote:

1) Connect the output to the base of a transistor through a 1K resistor and have the emitter to ground and collector to the arduino input. Enable the internal pull ups and get a common ground between the arduino and your device.

Thanks for your reply. Could you pls explain it in details if it doesn't bother you, I'm very new to arduino :)

Here's a link to library: http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html

Thanks a lot

P.s. I checked the wires with tester there was no voltage output

1) Get a transistor a BC183 or some other small signal NPN transistor. Identify the three wires coming from it. These are called:- collector, base & emitter.

2) Connect the collector to the arduino input pin you want to use and the emitter to the arduino base. 3) In the setup() section of you sketch enable the internal pull up resistors with the line of code digitalWrite(pin,HIGH); where pin is the pin number of the input you use. 4) Connect one end of a 1K resistor to the transistor's base. 5) Connect the other end of the resistor to the output wire from your device. 6) Connect the ground of your device to the ground of the arduino. 7) Run the code in the link you gave.

If this does not work it might be because your device is trying to modulate the IR transmitter at 38KHz and that is being fed back directly into the arduino. If this is the case then you could try putting a capacitor across the emitter and collector of the transistor, start with 10nF.

P.s. I checked the wires with tester there was no voltage output

You will not see anything with a meter, these are rapidly changing pulses, you need an oscilloscope to see them.

I have a BC547B transistor and 100nF capacitor, will these do the thing?

The transistor is OK. Th capacitor is a bit big and might end up removing your actual signal as well as the modulation but try it. 10nF is on the large side and you migh have to go down to 1nF.

Big Thanks for explanations. I have two questions left:

  1. What is arduino base?
  2. These two wires have labels X 1.1 and X 1.2 - is it possible to find out where's ground and where's output?

What is arduino base?

I don’t know do you mean

  1. Connect one end of a 1K resistor to the transistor’s base.

is it possible to find out where’s ground and where’s output

It is tricky without an oscilloscope but you could try wiring up a visible LED and 220R resistor (or so) and seeing which way round you have to have it to make it light or flicker when you send a command. When it lights the cathode will be pointing at the ground and the anode at the signal.

2) Connect the collector to the arduino input pin you want to use and the emitter to the "arduino base."

I marked it with quotes

Btw, if I mistake the ground and output when I test the whole scheme can it be burned? Or the voltage is too low for that :)

Grumpy_Mike, waiting for you :) Thanks

Sorry that should read:- 2) Connect the collector to the arduino input pin you want to use and the emitter to the "arduino ground."

Thanks

Btw, is it possible to trigger a relay when arduino receives the code from these wires? I mean to program arduino board for doing that.

Yes you can do anything you want with the information, it's jus a matter of the software. Relay, LEDs, motor etc... can all be made to do things.

Great!

IF it doesn't bother you, could I ask you some questions when I succeed with codes first? I'd appreciate that.

Yes just post it here and me or someone else will be happy to advise.

I have an example of how to use an infrared remote and my IR library to control a relay; it's at http://arcfn.com/2009/11/ir-bubbles-controlling-relay-with.html. I use the remote to control a bubble maker.

Thanks for the link, very useful info

I think I need more help on this.

Everything work flawlessly when I tested with remote control I have from tv card. But when I tried to make it with those two wires from multimedia device - nothing.

Downloaded an oscilloscope software and tested the output from multimedia device - it’s signal strength is much much lower that comes from tv remote control but there are vibrations when I press a knob, maybe I just need to amplify it more? If yes, how should I do that?

Thanks again for your help

maybe I just need to amplify it more? If yes, how should I do that?

It sounds like it. Things to try:- 1) Try a pull up resistor from the output of your device to +5V, 1K should do. It could be that you have an open collector output on your device. 2) Is is going through a transistor? If not put it through one. 3) If all the above fail you might have to use an operational amplifier.

Grumpy_Mike, I made it like you said through transistor. TV remote works perfectly, but not the multimedia.

Could you tell me where to put resistor and what my new scheme should be now? (pull up resistor from the output of your device to +5V) Thanks