3

The IR Transmitter and Receiver module has both receiver and transmitter in same board. I tried Arduino IR Remote library example to decode Remote signal using below connection, but its not working.

  • IR MODULE: ARDUINO
  • Ground -> Ground
  • 5V -> 5V
  • RXD -> PIN 11
  • TXD -> PIN 10

The board also has 3 pin connector (Gnd, 5v, S). How to connect pins to Arduino to receive/decode and send IR signals? (Can't able to find any tutorial for this type of board)

IR Transmitter and Receiver Front IR Transmitter and Receiver Back

Example Code:

#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
  delay(100);
}
  • That is not the sort of IR circuit one would normally use with an Arduino, rather it looks like it has some sort of on-board modulator or something. Your question will not be answerable until you find full data on the module. For ordinary arduino projects, you just want a loose receiver module and a loose IR LED, resistor and NPN transistor. – Chris Stratton Oct 3 '16 at 19:29
  • 1
    This particular question would be more easily answered if a link to the device was provided. I'm interested in the product, as it appears to answer a question I have not posted. This device appears to be suited for reflecting the IR signal from a distant surface, but it would be necessary to physically isolate the emitter diode and the receiver in order to prevent false signals. You say you are unable to make this item work with the code provided. Please clarify what portion does not work as expected and also what steps you have taken to narrow down the problem. – fred_dot_u Oct 3 '16 at 19:45
  • The given code doesn't seem to make any attempt to transmit or enable a transmitter on the module, which has both transmit and receive pins. This seems unlikely to work. – Chris Stratton Oct 3 '16 at 20:51
  • @fred_dot_u I just connected this device to Ardunio and uploaded above sample code. Then given IR signal from my remote...But it now showing in serial monitor – Kalaivanan Oct 4 '16 at 16:01
  • 2
    Google the part number: YS-IRTM. I found a post on the Arduino Forum for example which describes using this device. There is also a YouTube Video. – Nick Gammon Oct 4 '16 at 20:55
2

The device in the question is commonly sold on aliexpress.com and the likes of ebay.com. As you might guess there is little in the way of documentation. Without documentation we can only speculate. As such, I expect that the module handles all the modulation and demodulation. It is likely all you need to do is use the Arduino serial library and connect the TX and RX to the Arduino's RX and TX pins. However, if you would like to preserve the function of these pins for use with the Arduino Uno's USB port, you can use the Arduino software serial library which will "emulate" a serial port an an unused (alternate) set of pins.

(This is an example of a similar well documented device with access to the schematic and source code. Armed with this type of knowledge you can turn this device into what ever you want. In other words, you probably don't even need an Arduino. You can just program this device and be done with your project.)

  • 1
    Connecting additional devices to the hardware UART RX and TX of a classic ATmega328p type arduino is possible but will interfere with the usual connection to the computer. People usually use a software serial implementation or a chip with more hardware UARTs. – Chris Stratton Oct 4 '16 at 21:50
  • True. Was just using an ARM based Arduino which, I'm hoping, doesn't have that problem. I'll change the answer around to accommodate the difference. – st2000 Oct 5 '16 at 11:35
1

I think you need to switch RX and TX in your code. Looking at the video that @nick-gammon reffered to. TX on audrion is RX on device.

  • Thanks. I have similar module and i just switched up rx/tx and all works fine – funivan Jan 25 '17 at 6:16
0

it use UART protocol so your code is wrong.

Here link with code

-1

For that module you dont need library for easy example for sample for send HIGH and LOW status but. it doesnt work for control IR protocol. for that you need the basic conection Just (data-gnd-Positive) in that example data is for pin = 11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.