cyborg5 / IRLib

An Arduino library for encoding and decoding infrared remote signals
Other
213 stars 76 forks source link

Receiving "ghost" signals #21

Closed lhk closed 8 years ago

lhk commented 8 years ago

I have a setup where one arduino is both responsible for sending and receiving. It is connected to an IR-LED and an IR-decoder.

I am aware of the restrictions of the software- e.g. it is unable to send/receive at the same time. I re-enable receiving after each transmission. There are multiple of these arduinos, they send to each other.

There is a strange problem. If I send an IR-signal, the decoder immediately receives a huge amount of "ghost data". lots of samples with m -50 and s 750 please note the negative sign for the mark.

This seems to be software side. Even if all receivers are completely covered, the signal is still received.

Do you have any idea what could be happening ?

Here is a serial dump of the received signal:

Decoded Unknown(0): Value:0 (0 bits) Raw samples(100): Gap:26428 Head: m65486 s800 0:m-50 s750 1:m-50 s750 2:m-50 s750 3:m-50 s800 4:m-50 s750 5:m-50 s750 6:m-50 s750 7:m-50 s750 8:m-50 s800 9:m-50 s750 10:m-50 s750 11:m-50 s750 12:m-50 s750 13:m-50 s800 14:m-50 s750 15:m-50 s750

16:m-50 s750 17:m-50 s750 18:m-50 s800 19:m-50 s750 20:m-50 s750 21:m-50 s750 22:m-50 s750 23:m-50 s800 24:m-50 s750 25:m-50 s750 26:m-50 s750 27:m-50 s750 28:m-50 s750 29:m-50 s800 30:m-50 s750 31:m-50 s750

32:m-50 s750 33:m-50 s800 34:m-50 s750 35:m-50 s750 36:m-50 s750 37:m-50 s750 38:m-50 s750 39:m-50 s800 40:m-50 s750 41:m-50 s750 42:m-50 s750 43:m-50 s800 44:m-50 s750 45:m-50 s750 46:m-50 s750 47:m-50 s750

48:m-50 Extent=34750 Mark min:-50 max:0 Space min:750 max:800

While the actual transmission is:

Decoded Unknown(0): Value:3 (3 bits) Raw samples(10): Gap:30114 Head: m1150 s750 0:m450 s700 1:m500 s1300 2:m500 s1350 3:m450 Extent=7150 Mark min:450 max:500 Space min:700 max:1350

ElectricRCAircraftGuy commented 8 years ago

What recv object are you using?

bengtmartensson commented 8 years ago

I suspect a hardware problem, namely that the board fails to keep the supply voltage to the receiver constant while sending, which introduces the spooky signals. Things to try:

ElectricRCAircraftGuy commented 8 years ago

If you're using IRrecvPCI it's a known bug in the code. I have a fork which fixes it. Chris, the author of this library, is working on fixing it here. Again, if you're using this receive object.

lhk commented 8 years ago

@bengtmartensson Your tip to add a capacitor to the circuit fixed the problem. Thank you very much.