0
\$\begingroup\$

I've just ordered this generic logic analyzer (didn't get it yet).

Does the specs (channels/speed/accuracy) of such a cheap analyzer can be used to analyze IR remote control code sequences so I'll be able to send them later from a device I'll build?

If such an analyzer it enough to achieve this mission, can one guide me please what a circuit I have to build to be able to catch the signals from the IR RC led?

(I have an TL1838 38Khz IR sensor, but don't really know how to include it in a circuit).

The best way for me, I think, will be to see the signal using the logic analyzer (it it capable of it) from a simple electronics circuit, without the need of Arduino connection and programming.

So (and this is an Edit after reading some of the great and informative answers and comments) - A receiver circuit should be simple to build and connect the analyzer into it? What about software to 'understand' the IR codes?

\$\endgroup\$
5
  • \$\begingroup\$ You have the IR sensor but you're not going to tell us what the part number is? Please edit your question to include the datasheet link. There are usually some sample circuits in the datasheet so check those out and if there is a point you don't understand then that's what should be in your question. \$\endgroup\$
    – Transistor
    Dec 31 '19 at 19:04
  • \$\begingroup\$ Does this answer your question? Sequence multiple IR remote commands (button presses) \$\endgroup\$ Dec 31 '19 at 19:12
  • \$\begingroup\$ That should work with sigrok software and maybe some custom python. Build whatever circuit from the receiver data sheet produces a logic output, it may show a pull up resistor needed. You are most likely to find an actual tutorial for doing this with an Arduino instead. \$\endgroup\$ Dec 31 '19 at 19:31
  • \$\begingroup\$ sbprojects.com/knowledge/ir ir is pretty easy. an ir receiver like that removes the carrier and leaves you with the high and low periods that are filled by the carrier. your first interest is measuring the pulses to determine ones from zeros then decode that. the codes that have sync patterns up front are easier. If all you want to do is blast out ir, then you dont necessarily need to receive although you wont know what codes/numbers your specific device is looking for (although I have seen tables elsewhere on this). \$\endgroup\$
    – old_timer
    Jan 1 '20 at 11:54
  • \$\begingroup\$ receivers like that are also trivial, vcc, gnd and signal the signal is an input into an mcu or cpld or fpga. \$\endgroup\$
    – old_timer
    Jan 1 '20 at 11:57
0
\$\begingroup\$

I did this as a class project in college. The remote LED frequency is very low, and codes are only a few bytes, so almost any analyzer will work.

If such an analyzer it enough to achieve this mission, can one guide me please what a circuit I have to build to be able to catch the signals from the IR RC led?

You don't need to build anything. Just open the remote and put the analyzer leads on the LED pins directly. Start the analyzer and then push each button. Once you have a few button traces you can look up which protocol your remote uses or just keep going until you have the entire list of command codes.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Putting the logic analyzer on the transmitter LED makes it harder because you will then see the modulated IR, that is with the 38kHz carrier, which uses up more state transitions/memory in the LA. Better to build the receiver circuit because TL1838 provides a demodulated output so you don’t see the 38kHz, just the logical bitstream. \$\endgroup\$
    – Martin
    Dec 31 '19 at 20:33
  • 1
    \$\begingroup\$ That is a Saleae Logic clone. It can sample up to 24 MHz, the IR carrier is of no concern here. But still I'd prefer connecting to the receiver module, the transmitter IR LED voltage may not be enough to sense with logic analyzer. \$\endgroup\$
    – Justme
    Dec 31 '19 at 20:39
0
\$\begingroup\$

So (and this is an Edit after reading some of the great and informative answers and comments) - A receiver circuit should be simple to build and connect the analyzer into it? What about software to 'understand' the IR codes?

https://www.sbprojects.net/knowledge/ir/

My preference is to burn an mcu for this rather than try to use interrupts but either way you need to find the pattern and decode it and there will be noise in the room other remote commands, etc.

Once you get this powered and are examining the signal with a scope or your logic analyzer, is your receiver inverted or not. The signal is AM radio like but square. Ones lets say are a burst of the carrier frequency, receivers like this will just give you a pulse roughly the duration of that burst, but if inverted that might be at gnd level not vcc. so figure that out. Then look at the NEC protocol for example a number of them are similar with different sized sync patterns. For NEC this says that the sync pattern is 9ms followed by 4.5ms, then it goes into 32 bit patterns. The signal level that is the same as the 9ms (lets assume high or vcc) is a fixed length, the space between is what varies and that tells you a zero from a one. this pattern ends with a short pulse, very clean pattern. If you have a programmable remote you can cycle through till you find one that matches or is similar. Sony SIRC is similar, has a sync pattern you can search for but the gaps are fixed and the pulses vary. Also very easy to decode for a first time project.

The software or logic if you use a cpld/fpga, would in these cases look for that long sync pulse, if you made a program to only do that, and blink an led or output something on the uart whatever to indicate you found that pulse it should line up with pressing the button on the remote. understand as you hold the button it repeats (and the repeat pattern is sometimes not just the same pattern over and over again some schemes have a separate repeat pattern from the initial code). then you look for the gap after the sync pattern and so on.

If you look at philips recs80 there might not be a simple sync pattern to search for out of the noise, but instead you have to go right into decoding and hope you received the whole thing. Some patterns have a way to confirm you got the pattern (the second half is the code inverted for example) some dont other than it matches one of the values you were looking for. Worse look at philips rc5, that is good and bad that encoding is biphase-L sometimes just called biphase sometimes called manchester, you are insured that the data is either a half bit cell or a whole bit cell. so you are looking for pulses and gaps of those two lengths, and then you have to sort out the code. If rc5 always starts with a one, then you are either looking for half bit cell or whole bit cell length pulse depending on whether the code starts with 11... or 10... with pencil and paper you can figure out if this gap/pulse was long and the prior was blah then this bit was X (one or zero). or perhaps better save the data as half bit cells starting with a 01 for the leading one. then look at ever other the second half bit cell is the data value 011001... x1x0x1 is 101.

someone or several dozen folks in the Arduino world will have code out there to deal with various protocols and you can just use it. if that were your goal you wouldnt have needed to buy any equipment. It makes a difference what frequency your led uses (as well as the receiver) as to how well it is going to work but clearly universal remotes dont have more than a couple leds and I doubt they are different frequencies. You will need to generate the right carrier frequency which is shown in the link above, I hate putting links in answers it is very bad form but you can google/find these on your own. If you get it wrong then it will still work you just cant walk around the whole room and get the TV to work you have to be within a certain distance plus or minus. a carrier frequency and an and gate you can in theory take the signal you are seeing from your receiver and drive this carrier and gate thing and feed that to the led. With a cpld or some mcus you can do the work in that device and drive the led directly. Might want to drive it through a transistor to get more power, but do your system engineering and the math that would go with it based on the specs for the leds that are available. Some mcus I know of a family of them from ST (some of the STM32s) that have an IR timer, which basically has the and gate in the chip, you use one timer to generate the carrier and another the data pattern. I have been able at times to "count out" so many timer ticks and change the gpio/led state to generate the carrier, then dont do that for a while to generate the gap, repeat. very hard to get it right with many mcus having non-predictable execution times of instructions but something like an old pic16, hand tuned code you can get it exact even with the if-then-elses needed to deliver the code.

\$\endgroup\$

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.