Go Down

Topic: Using Arduino as an IR receiver and transmitter. (Read 128 times) previous topic - next topic

danirockdude2

Hello Arduino community :D
I'm doing a project for my practical electronics engineer degree that is basically a voice controlled TV remote.

I'm using the Arduino just as an IR receiver (partly,to get the codes needed) and transmitter (mainly because this is what the project mostly does).
I've managed to turn on TVs for no problem (they were all based on the NEC protocol).

The problem occurred when I wanted to expend beyond TVs and try to control Air Conditioners, Heaters and basically other electrical products that are controlled with an IR remote.
the problem was that the protocols were different and for some reason the sending back the raw codes that the Arduino produced ended up in no luck :(

The question is how could I overcome this problem,any suggestions and help are more than welcomed and appreciated!
Thanks in advance,
Daniel.

DrDiettrich

Look for a sample sketch that displays received IR codes. Then use the dedicated remote controls and write down their command codes. Finally make the Arduino send these codes on demand.

A scope, transient recorder or logic analyser also can help in finding out the codes and carrier frequencies of the various controls and commands.

I wonder how you want to make an Arduino recognize speech - which board and modules do you want to use?

6v6gt

This may help in getting a feel for the variety of IR protocols in use for home entertainment devices
, if you have not reached that stage yet.
http://www.vishay.com/docs/80071/dataform.pdf

danirockdude2

Look for a sample sketch that displays received IR codes. Then use the dedicated remote controls and write down their command codes. Finally make the Arduino send these codes on demand.

A scope, transient recorder or logic analyser also can help in finding out the codes and carrier frequencies of the various controls and commands.

I wonder how you want to make an Arduino recognize speech - which board and modules do you want to use?
Well I kinda knew that already, thought there might be a quicker solution.. Maybe a better library.
As for the voice recognition, I personally use the EasyVR 3.0 shield.
But for the project I'm using the Elechouse Voice Recognition V3 as the is what they want me to use.

OldSteve

#4
Feb 02, 2016, 01:23 am Last Edit: Feb 02, 2016, 01:23 am by OldSteve
I often read of people having a problem with the (long) IR codes for air conditioners. (Although mine worked like a charm just using the "IRremote" library's "IRrecv" example.)

A search should turn up some threads on the subject. Also look here:- Air Conditioners: Recording long Infrared Remote control signals with Arduino

Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

danirockdude2

Here's the most code I'm having most problems with.
It's an unknown protocol code sent from my heater's remote.
*I also notice I get multiple results with the same button pressed..strange :S
Quote
1
For IR Scope:
+1400 -250 +1400 -300 +550 -1150 +1350 -300 +1400 -250 +550 -1150 +550 -1100 +550 -1150 +550 -1150 +500 -1150 +550 -1100 +1400
For Arduino sketch:
unsigned int raw[24] = {1400,250,1400,300,550,1150,1350,300,1400,250,550,1150,550,1100,550,1150,550,1150,500,1150,550,1100,1400,};
irsend.sendRaw(raw,24,38);

2
For IR Scope:
+1250 -450 +1200 -450 +400 -1300 +1250 -400 +1250 -450 +400 -1250 +400 -1300 +400 -1300 +350 -1250 +450 -1250 +400 -1250 +1300
For Arduino sketch:
unsigned int raw[24] = {1250,450,1200,450,400,1300,1250,400,1250,450,400,1250,400,1300,400,1300,350,1250,450,1250,400,1250,1300,};
irsend.sendRaw(raw,24,38);

3
For IR Scope:
+1300 -400 +1250 -400 +450 -1200 +1300 -400 +1300 -350 +500 -1200 +450 -1200 +1300 -400 +450 -1200 +500 -1200 +450 -1250 +400
For Arduino sketch:
unsigned int raw[24] = {1300,400,1250,400,450,1200,1300,400,1300,350,500,1200,450,1200,1300,400,450,1200,500,1200,450,1250,400,};
irsend.sendRaw(raw,24,38);

4
For IR Scope:
+1250 -400 +1300 -400 +400 -1250 +1300 -350 +1300 -400 +450 -1200 +450 -1250 +1300 -350 +450 -1250 +450 -1250 +400 -1250 +450
For Arduino sketch:
unsigned int raw[24] = {1250,400,1300,400,400,1250,1300,350,1300,400,450,1200,450,1250,1300,350,450,1250,450,1250,400,1250,450,};
irsend.sendRaw(raw,24,38);
 

DrDiettrich

You seem to ignore the '-' signs in the IR Scope data.

danirockdude2

I'll try that..
The funny part is that if I'm doing this :
IRsend irsend;
unsigned int raw[] ={1400,250,1400,300,550,1150,1350,300,1400,250,550,1150,550,1100,550,1150,550,1150,500,1150,550,1100,1400,};

Void setup ()
{
Serial.begin(9600);
}

Void loop () {
if (Serial.read() ! = - 1){

irsend.sendRaw(raw,24,38);
}
And I continously hold the enter button pressed in the serial monitor, it turns it on after holding the enter button pressed after approximately 1 and a little bit seconds.

OldSteve

Not sure if it's relevant, but with my TV and 'SendSony()', I have to send the codes 3 times, with 40mS in between:-
Code: [Select]
for (int i = 0; i < 3; i++)
{
    irsend.sendSony(MUTE_CODE, 12);             // Send the TV 'Mute' code (3 times).
    delay(40);
}
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy