LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Decoding signals from IR remote controls with LabVIEW

Hello everybody,
I would like to create a little system using LabVIEW to decode the signals from the IR remote controls that we usually have for TVs and air conditioners.

What I have is:
- TSOP38238 IR receiver https://www.vishay.com/docs/82491/tsop382.pdf 
- NI PCI-6220 I/O card https://www.ni.com/docs/en-US/bundle/pci-pxi-6220-specs/page/specs.html?srsltid=AfmBOoqlwlyOpdytlN1X... 
- LabVIEW 2022 Q3 Professional Development System

The cable from the card is going to a perfboard, so it would be easy to connect the IR receiver to the PCI-6220.
The first thing that I need to know is if the TSOP38238 can be connected directly to the card, and if yes to which pins.
Then I would need to know which LabVIEW function would be best to use, assuming there is already something ready for this purpose.

Thanks in advance
Max

0 Kudos
Message 1 of 9
(290 Views)

The question must be either too dumb or too difficult, can't tell which of the two.

0 Kudos
Message 2 of 9
(161 Views)

Hi Max,

 


@Max_67 wrote:

The question must be either too dumb or too difficult, can't tell which of the two.


It's weekend and it's our spare time we use to write answers...

 

Yes you can connect the sensor to your DAQ card.

  • Use it's 5V output for supply.
  • Use a digital input, the sensor outputs digital data...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 9
(145 Views)

Sorry, my doubt was because I'm just a software developer without any electronic knowledge, that's what I meant. 

No hurry here.

Good to know that it is possible.

So if I understood correctly.

Pin3 TSOP -> Pin8 NI Card (5V)

Pin1 TSOP -> Pin52 NI Card (P0.0 DI input)

Pin2 TSOP -> Pin18 NI Card (D GND)

 

My main doubt was about the use of Port 0 (P0.<0..7>) or PFI/Port 1/Port 2 Functionality.

The transmission should be very fast, I thought the latter had more chances to get the job done.

But again, I’m no expert, so I might be talking a load of rubbish.

0 Kudos
Message 4 of 9
(128 Views)

Hi Max,

 


@Max_67 wrote:

My main doubt was about the use of Port 0 (P0.<0..7>) or PFI/Port 1/Port 2 Functionality.

The transmission should be very fast, I thought the latter had more chances to get the job done.


You should use the "waveform characteristics" (aka Port0) to read digital waveforms with higher sample rates.

(I don't think you want to use the PFI for "timing input".)

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 9
(91 Views)

Thank you very much!

If port0 is suitable for the purpose, that's great!

 

Any hint about an example VI, if any, nearly ready for this job?

 

Thanks again

Max

0 Kudos
Message 6 of 9
(64 Views)

Hi Max,

 


@Max_67 wrote:

Any hint about an example VI, if any, nearly ready for this job?


LabVIEW/DAQmx comes with a huge library of example VIs: just open the example finder!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(61 Views)

As an alternative to rolling your own completely from scratch and using a PXI DIO module with timing support (sounds expensive as a solution), have you looked into some of the third-party specialty hardware in the IR communications space?  There was a poster on here years ago who was experimenting with a device from RedRat that may be considerably less expensive and offer support via .NET. They've already done the non-trivial design work of integrating both an IR detector and emitter, with biasing/driving circuitry.  The emitter could be handy if you should decide you want to send commands as well.

 

Best regards,

Dave

David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer
0 Kudos
Message 8 of 9
(39 Views)

Yes, I looked into third-party solutions... but since I already have the PCI card and the IR receiver mine would be a cost-free solution.

But it's not only a matter of cost.

Being myself a LabVIEW developer it's also the thrill of the challenge!

 

Max

0 Kudos
Message 9 of 9
(18 Views)