bschwind / ir-slinger

A small C library for sending infrared packets on the Raspberry Pi
The Unlicense
99 stars 30 forks source link

Max reachable data rate? #17

Closed sergio-gimenez closed 2 years ago

sergio-gimenez commented 4 years ago

Hi! I am currently working on a project using the raspberry pi as a transmitter and one arduino as receiver.

So far, using the test.c code, I have achieved to properly send IR signals at a 40bps by running test.c code in a loop .

Since I am interested in performance measurements, I was wondering what could be the maximum sending data rate? Is it possible to be higher than 40bps?

bschwind commented 4 years ago

I might be wrong, but given the carrier frequency of 38Khz and the typical protocols used (such as NEC), I don't think you can go any faster. The protocol dictates specific timings for representing a 0 vs. a 1.

But if you're not following a protocol and just want to send bits out as fast as possible, I'm sure you could go faster. If you look at the pigpio library, it seems you can be accurate down to a few microseconds. But nothing you try to communicate with will work properly in this case unless you design the receiving hardware yourself.

sergio-gimenez commented 4 years ago

Hey @bschwind , thanks for answering. I think what you suggest makes a lot of sense

But nothing you try to communicate with will work properly in this case unless you design the receiving hardware yourself.

Indeed, the success of comunications depends also on the receiving hardware. I think the TSDP series from Vishay could be a good commercial receiver to start working on with.

Screenshot from 2020-05-28 19-58-45 (Source).

I will look into pigpio library and try to improve that data rate. I will work on it and if I come with a solution for achieve higher data rates, I will let you know and maybe I can make a PR and add a new funcionality it to the ir-slinger wrapper.