1
\$\begingroup\$

what i am trying to achieve to be able to duplicate/recreate the infrared signal of my remote control using my arduino.

The arduino has a already a library for this, unfortunately it doesn't seem to support the board that i am going to use the arduino mkr1000. The library has a recieve that makes me able to see the data, but the function for transmitting it back is not working.

So this makes me resort to creating a function for sending myself. I know that the remote i am using uses and NEC infrared transmission protocol. So i looked at its specs.

according to it:

  • a 9ms leading pulse burst (16 times the pulse burst length used for a logical data bit)
  • a 4.5ms space
  • the 8-bit address for the receiving device
  • the 8-bit logical inverse of the address
  • the 8-bit command
  • the 8-bit logical inverse of the command
  • a final 562.5µs pulse burst to signify the end of message transmission.

What i dont understand is, what is this address and command.

unfortunaly i do not have an oscilloscope inorder to probe my remote to confirm some hypothesis. What i have though is the output of the serial monitor the arduino upon recieving the signal.

Encoding  : NEC
Code      : 2FD807F (32 bits)
Timing[67]: 
    +9200, -4500     + 600, - 550     + 600, - 550     + 600, - 550
    + 600, - 550     + 550, - 600     + 550, - 550     + 600, -1700
    + 600, - 550     + 600, -1700     + 550, -1700     + 600, -1700
    + 600, -1700     + 550, -1700     + 600, -1700     + 550, - 600
    + 550, -1700     + 600, -1700     + 550, - 550     + 600, - 550
    + 600, - 550     + 600, - 550     + 600, - 550     + 550, - 600
    + 550, - 550     + 600, - 550     + 600, -1700     + 600, -1700
    + 550, -1700     + 600, -1700     + 600, -1700     + 550, -1700
    + 600, -1700     + 600

unsigned int  rawData[67] = {9200,4500, 600,550, 600,550, 600,550, 600,550, 550,600, 550,550, 600,1700, 600,550, 600,1700, 550,1700, 600,1700, 600,1700, 550,1700, 600,1700, 550,600, 550,1700, 600,1700, 550,550, 600,550, 600,550, 600,550, 600,550, 550,600, 550,550, 600,550, 600,1700, 600,1700, 550,1700, 600,1700, 600,1700, 550,1700, 600,1700, 600};  // NEC 2FD807F
unsigned int  data = 0x2FD807F;

From the output can we point out which is the address and which is the command? so that i will be able to create a code for it

\$\endgroup\$
1
\$\begingroup\$

In the sample capture you have the data right there => 0x02FD807F. The address is 0x02. The logical inverse of the address is the 0xFD. The command is the 0x80. And the logical inverse of the command is the 0x7F value.

\$\endgroup\$
  • \$\begingroup\$ A follow up question. in the specification it is saying "pulse burst" does this have to be followed? can i just turn the led on for 9us or does it have to be bursted at 38khz \$\endgroup\$ – Jake quin Jul 17 at 14:17
  • 1
    \$\begingroup\$ @Jack - Bursted at 38kHz. \$\endgroup\$ – Michael Karas Jul 17 at 14:26
  • \$\begingroup\$ Now that will add some challenges in the coding. Thank you very much i will try to tackle the challenge now. \$\endgroup\$ – Jake quin Jul 17 at 14:31
  • \$\begingroup\$ I deleted my first comment because it contains error that might confuse someone else, I will say my thank you again here , I was not critical enough to notice that there are inverse pair in the data. \$\endgroup\$ – Jake quin Jul 17 at 15:06
  • 1
    \$\begingroup\$ @Jack - Really glad it worked out for you. \$\endgroup\$ – Michael Karas Jul 17 at 22:31

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.