IR on GrovePi + RaspberryPi [Python]

grovepi
noteworthy-answer
ir

#1

Hi,

I recently purchased the IR receiver and transmitter from Seeed studio [Linked below]

And have been looking for python code in order for the IR receiver to work. I came across an article (linked below) regarding the example code in the github repo using a Keyes Remote. I tried to use the code out of the box, but unfortunately it was not able to pick up any of the signals. Further following the advice, I started to use the instructables link starting with step 8

In the tutorial it mentions to “connect the data pin of IR sensor to Pin-18 of Raspberry Pi.”. I’m unsure as to which pin this is relating to in regards to the GrovePi board

I’m a complete novice at raspberry pi and circuitry, and that has probably contributed to not understanding this response well. I have done some research regarding the ports, and trying to figure out which GPIO ports then corresponds to the GrovePi ports but have not been able to find anything of use. – hence my question:

As adviced, I have the IR receiver plugged in to the RPISER port on the grovepi that is connected to the raspberry pi. Following step 8 in the instructables tutorial, what gpio_in_pin number should i put in to allow it to connect?



#2

Hi @gweennnnn,

Can you confirm us that you had run the installer script for the Grove IR Receiver from our GrovePi repository?
Instructions on how to install the dependencies for the Grove IR Receiver can be found right here at this link:

Thank you!


#3

Hi Robert

Yes I have! I have also tried to run the example code with no avail.


#4

Hi @gweennnnn,

Okay. I’m going to test it and then reach back at you and give you a feedback about it.
While I’m doing this, are there any screenshots you might share, logs you’ve got, anything that might be of any help for us?

Thank you!


#5

Hi @RobertLucian,

That would be great, thanks!

I have attached a picture of my current hardware configuration and its connections (rPi 3 + GrovePi Board + Infrared Receiver V1.2) as well as the remotes I have been testing with (Samsung AA59-00823A TV Remote, Iclebo Remote).

Unfortunately I have no logs to show, as I have not been able to get any response from either remotes. Hope this helps?

22384894_10156042767632494_371110088_n


#6

Hi @gweennnnn,

I’ve been doing tests with the Grove IR Receiver for a while and it doesn’t seem to work with the GrovePi.

Weird enough, it no longer works on a GoPiGo board with the same image on the micro SD Card.
We are going to do more tests and come up with a diagnostic for it.

Thank you!


#7

Hi @gweennnnn,

I have come back to you as I have figured what is the problem. I have a solution for your problem, though I’m not sure if you’re going to like it.

The symptoms

It has been seen that the Raspberry Pi doesn’t receive any signal on the serial port whilst the Grove IR Receiver is connected to the GrovePi and the remote control’s buttons are pressed.

Here’s a screenshot of what I would get when the remote control’s buttons are present: nothing. This has been done with a logic analyzer and what you see is the actual signal I get on the Raspberry Pi's RX serial port - the timeframe is 30 ms and the voltage of the signal is somewhere around 0.25V.

The issue

The problem was that there aren’t paired any pullup resistors - in our case we only need a single pullup resistor, and that’s for the RX pin of the Grove IR Receiver.
Since there aren’t pull-up resistors on the GrovePi, then the sensor should have had them, but it doesn’t appear to be the situation.
I’ve been experimenting with multiple pullup resistors (10kOhm, 4.7kOhm, 2.2kOhm) and I’ve seen that the Grove IR Receiver starts working with <= 1kOhm resistors.

The solution

Should you feel a bit adventurous, I have a solution for you. It involves a bit of soldering and a bit of time from you.

All you have to do is solder a 1kOhm resistor between the VCC and RX pins of the Grove IR Receiver sensor.
Here’s a photo of what I did - you can also find visual cues in the photo so that it can help you identify/understand what you have to do. (Apropo, there’s a small typo in the photo - instead of 0.25kw it should have been 0.25w).

After soldering the 1kOhm resistor between the VCC and RX pins of the Grove IR Receiver, I got the signal to show up on my logic analyzer.

Software considerations

I might also suggest you use the library that’s found on our GoPiGo repository.
It’s a lot more polished and I know for sure it works - it’s the one I’ve been playing with and it’s easier to use.

Conclusion

This looks like an incompatibility between Seeed's sensor and our products and I’m not sure if we can do more than guiding you on how to hack it and make it work, given these conditions.
If there are any more questions or if it still doesn’t work for you, please tell us.

Thank you!