User avatar
RiccardoMoretti
Posts: 65
Joined: Fri May 25, 2012 5:33 am

IR Receiver TSOP 31238

Wed Dec 19, 2012 1:32 pm

Hi, firstly I'm a complete beginner and would like to learn,
I'm posting in this forum in an attempt to understand how to interface the Pi with a IR receiver,
I know there are how to;s elsewhere but many of them don't explain the basics.

I'd like to connect a TSOP31238 Photo Module to the GPIO of the pi,

Firstly looking at the data sheet we have 3 pins (TSOP31238 )
1 = GND, 2 = VS, 3 = OUT
and the data sheet states

R1 and C1 are recommended for protection against EOS.
Components should be in the range of 33 Ω < R1 < 1 kΩ,
C1 > 0.1 μF.

R1 lies between the +Vs and Vs since the rough maximum mA the module uses is 4.5 mA
using Ohms law R = E/I and since I'll be using pin 1 3.3 V i get R= 3.3/0.0045 = ~733 Ω
So I should use a 733 Ohm resistor to protect my Pi.

Now the Capacitor (which is where I'm stuck)
it states the Cap should be > 0.1 μF but what voltage should it be? Must it be exactly 3.3 Volts?

Pihkal
Posts: 52
Joined: Sun Sep 04, 2011 9:50 am

Re: IR Receiver TSOP 31238

Thu Dec 20, 2012 5:55 pm

The voltage of the cap doesn't matter as long as it's higher than vcc,3,3V in your case.
So any cap above 0,1µF and over 3,3V will do.

Dilligaf
Posts: 283
Joined: Wed May 23, 2012 6:48 pm

Re: IR Receiver TSOP 31238

Thu Dec 20, 2012 6:10 pm

The data sheet also says that circuitry is optional. In my experience connecting the receiver directly to the gpio pins works fine

Pihkal
Posts: 52
Joined: Sun Sep 04, 2011 9:50 am

Re: IR Receiver TSOP 31238

Fri Dec 21, 2012 2:35 pm

It might be optinional but i would consider it good practice to use them anyway.
Buffering the powerrail and limiting the current are just good design rules.

Return to “Interfacing (DSI, CSI, I2C, etc.)”