Share My Creation IR Frame Visualizer

The IR-Frame-Visualizer is an open-source application to visualize an Infra-Red frame and provide detailed IR protocol information.

1748171395807.png


Overview
This Make project visualizes an Infra-Red frame and provides detailed IR protocol information for supported protocols from data received send by an Arduino (or other MCU).
The example setup uses an Arduino UNO with IR receiver.
The Arduino runs an application developed in B4R using the rIRRemote library.
The rIRRemote library is based on the IRremote library with enhancements.
Following protocols are supported:
B4X:
UNKNOWN,PULSE_WIDTH,PULSE_DISTANCE,APPLE,DENON,JVC,LG,LG2,NEC,NECEXT,ONKYO,PANASONIC,KASEIKYO,KASEIKYO_DENON,KASEIKYO_SHARP,KASEIKYO_JVC,KASEIKYO_MITSUBISHI,RC5,RC6,RC6A,SAMSUNG,SAMSUNGLG,SAMSUNG48,SHARP,SONY,BANG_OLUFSEN,BOSEWAVE,LEGO_PF,MAGIQUEST,WHYNTER,FAST
The Arduino sends received IR data as a Json message (function DumpToSerial) over the serial line to the connected device running the B4J application:
Example JSON message for Protocol NEC by pressing Key 9 on the Remote Control
JSON:
{"protocol":"NEC","address":"0","command":"5A","repeatperiod":48925,"repeatcount":0,"repeat":0,"bits":32,"flags":0,"rawdata":2774204160,"pulses":[{"level":1,"duration":8850},{"level":0,"duration":4500},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":1650},{"level":1,"duration":550},{"level":0,"duration":1700},{"level":1,"duration":550},{"level":0,"duration":1650},{"level":1,"duration":550},{"level":0,"duration":1700},{"level":1,"duration":550},{"level":0,"duration":1650},{"level":1,"duration":550},{"level":0,"duration":1700},{"level":1,"duration":550},{"level":0,"duration":1650},{"level":1,"duration":550},{"level":0,"duration":1700},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":1650},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":1700},{"level":1,"duration":550},{"level":0,"duration":1650},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":1700},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":1650},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":1700},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":550},{"level":1,"duration":600},{"level":0,"duration":1650},{"level":1,"duration":550},{"level":0,"duration":600},{"level":1,"duration":550},{"level":0,"duration":1650},{"level":1,"duration":600}],"pulsecount":67,"frameduration":67900,"rawticks":[177,90,11,12,11,12,11,12,11,12,11,12,11,12,11,12,11,12,11,33,11,34,11,33,11,34,11,33,11,34,11,33,11,34,11,12,11,33,11,12,11,34,11,33,11,12,11,34,11,12,11,33,11,12,11,34,11,12,11,11,12,33,11,12,11,33,12],"rawtickcount":67,"headermark":0,"headerspace":8850,"len":68}
The application is developed with B4J as a B4XPages application with XUI Views.

Features
  • Parse received JSON message containing IR protocol data.
  • Clear pulse visualizer at top (green+blue bar = helpful for timing visual cues).
  • Frame Sequence table with duration, level, label.
  • Protocol-specific decoded fields (address, command, raw data, etc.) table.
  • Protocol detection e.g., NEC.
  • List of received protocol data, select-able to show the data.
Hardware
  • Arduino UNO
  • Keyes KY-022 Infrared Receiver Module, Carrier Frequency 38KHz, Reception Distance 18m, Reception Angle +/-45°, Ambient Light Filter up to 500LUX.
  • Remote Controls tested: KEYES (NEC), TEDi (NECEXT), SONY (SONY), LEGO-PF (LEGO-PF, Pulse Distance), Philips (RC6), SAMSUNG (SAMSUNG).
Software
  • Arduino: B4R 10.0, additional libraries rIRRemote 1.00 (based on IRremote 4.4.1
  • PC: B4J 10.60 (64 bit), B4XPages, additional libraries jSerial, Json, jRandomAccessFile, ByteConverter, XUI Views, DesignerUtils
1748171458338.png


Files

The archive make-ir-frame-visualizer-NNN.zip contains the sub-folders source B4J & B4R and libraries B4R.
From the zip archive, copy the content to a folder of choice.
The additional B4R libraries to be copied to the B4R additional libraries folder.

Notes
  • Check Unknown to show not recognized, i.e. UNKNOWN protocols.
  • If after clicking once on a Remote Control no data is displayed, then try again else check Unknown and see what happens.
  • Clicking too long on a Remote Control shows the pulse(s) as repeats, which have f.e. a frame with 3 pulses (tested with NEC).
  • Serial line disconnect is handled by the asyncstream (library jRandomAccessFile).
  • The frame sequence table field Label is not showing all info yet.
  • The frame pulse duration's are set by the IRremote library and adopted by the rIRRemote library.
  • To learn more about IR protocols recommend to read IRremote library readme.
  • Published on GitHub.
To-Do
  • Property Pulse list with chart coordinates which can be used to show pulse info when clicked on the pulse in the chart.
  • Address & Command bits (protocol depended) in the tableview Frame Sequence.
  • Rework the frame patterns to properly show as label in the frame sequence table.
Credits
  • Developer(s) of the IRremote library (License up to the version 2.7.0 GPLv2. From version 2.8.0 MIT).
  • Anywhere Software for providing the B4X suite of development tools plus the B4X community for sharing solutions&hints.
  • Anywhere Software Forum member @klaus for providing the base xZigZagChart custom view.
License
GNU General Public License v3.0.
 

Attachments

  • make-ir-frame-visualizer-100.zip
    45.1 KB · Views: 110
Last edited:

thetrueman

Active Member
Brilliant job to solve protocol problem. I have worked with some Philips and Sony Remotes with PIC MCU and now with your effort, I could try even more complicated remotes with even advanced ESP MCUs. BIG Thanks for sharing.
 
Last edited:

Similar Threads

Top