Basic question about pins

Hey, hello everyone, I just bought an Arduino Leonardo along with a tsop 1738 (basic 3 pins infrared receiver/demodulator), I suppose I have to place its data pin on pin 2 of the leonardo, but I want to be sure not to kill the card (and I'd prefer not to kill the tsop too, even if I still got one more) when placing other pins. Where should I put them ? 3.3V and GND?

PS: I don't have any resistor. Tell me if I need one ! :slight_smile:

Can post a datasheet or a link to one for the thing you want to connect?

Sure ! :slight_smile:

You would take the Vout pin and connect to an Arduino pin configured as:

pinMode (dataPin, INPUT_PULLUP);

The input pin will sit at a high level, and the devices open collector output will pull the pin low when it is active.

This is shown on the bottom of page 2; the optional >10K resistor will be the Atmega internal pullup resistor.

Thank you very much for your fast answer ! :slight_smile:
But does the Vs pin of the TSOP goes to 3.3V or 5V?
And I suppose GND of the TSOP goes to GND of the arduino, right? I really don't want to kill the card and I'm not so good with this :wink:

5V. Just like the data sheet shows.
Gnd to Gnd.

Have a look at Ken Shirriff's Blog

I am using a TSOP 4838 and I power it from one of the data pins - it draws only 5mA. This allows my program to switch it off to save power. I'm using it with an Attiny powered from a single cell LiPo battery (3.8v).


It works, thank you very much :slight_smile: