I used @kerem‘s recommendation and used a TSOP1738 as receiver. As sender I have a generic IR LED. Here are some notes in case anyone else wants to use IR with their TinyLab.
- Library: Use IRemote. By the way, if anyone needs the keycodes for use with IRemote for a Humax PVR remote control contact me. I have made a note of them all.
- Receive: Use the TSOP1738 (I used a cheap generic which seemed to be the same). The pinout on the one I used is (when the receiver lens is facing you) right pin goes to 5V, centre pin goes to 0V, left pin goes to the arduino. You can use any digital input (you tell IRemote which one you are using). I connected it to pin D11 (labelled 11 on the connectors top right of the tinylab board, near the reset button). Turn off switch 7 on the adjacent DIP block to disconnect the pin from LED3, its normal use on tinylab.
- Transmit: I used a generic IR LED, in series with a 150 ohm resistor. The cathode goes to 0V, the anode goes through the resistor to pin 13 on the same block. Note that you must use that particular pin for transmit (with this particular arduino CPU). This is the normal pin for LED1 so you need to turn off the DIP switch number 5 to disconnect that.
This then works well with IRemote for both transmit and receive (you can only do one at a time). I got a transmit range of a few inches, which is fine for prototyping. A real application which needs longer range could use optics (lens and reflector), add more leds, and/or maybe increase the current (if necessary using a transistor to apply higher current from Vcc instead of taking it from the arduino pin).
- This reply was modified 1 year, 7 months ago by İsmet Ergin.