PIC Lesson: IR Sensor

November 30th, 2010  Posted at   Lesson PIC
arrow   |   36 Commentsarrow

Cahaya Infrared ataupun dikenali IR, cahaya yang mempunyai panjang gelombang 0.7um hingga 300um (micro meter). Cahaya infrared tidak dapat dilihat oleh mata kasar.

Gambar di atas adalah set lapan IR Sensor. Setiap IR Sensor terdiri daripada IR Transmitter dan IR Receiver. IR Transmitter seperti LED yang berwarna putih manakala IR Receiver seperti LED yang berwarna hitam. Schematic IR Sensor adalah di bawah.

Berikut adalah videonya.

PIC Source Code

36 Responses to “PIC Lesson: IR Sensor”

  1. Hello picpicpikapika, (apo namo panjang naw),
    i think you should switch the IR receiver foot. The longer foot should be connected to ground and the pull up resistor 4.7 must be connect to the short leg of the receiver.By doing this, you should solve the problems.

  2. yatie says:

    salam, shahrul saya nk tanye, saya ade masalah nak combine kan circuit sensor saya dengan pic, saya gune pic18f452, saya cube untuk buat kalau sensor detect, led nyala, saya punye circuit sensor working,tp dekat pic xde keluar output seperti yang saya nak, boleh tolong bantu saya

  3. pipicpikapika says:

    Hi, so you mean my connection should be correct right?

  4. picpicpikapika says:

    Hi shahrul, I am using a infrared sensor which is similar to the one you used in this site…the emitter and receiver have already attached together when I bought it…

    For the circuit connection, I connect a 330 Ohms resistor to the longer leg of the emitter and another side of the resistor I pull to 5 volts, the shorter leg of the emitter I connect to ground.

    For the receiver, I connect a 4.7k Ohms resistor to the longer leg of the receiver and another side of the resistor I pull to 5 volts, the shorter leg of the receiver I connect to ground.

    But when I try to approach a pure white paper to the sensor, why the sensor output only decrease insignificantly?
    Initially it is 4.5V, but when I put a pure white paper on top of the sensor the sensor output only decrease to 4.4V??? Is my circuit connection wrong??? Thanks a lot.

  5. Luqman says:

    Salam.
    En Shahrul, saya ada satu soalan.
    Kalau ir sensor ni digunakan pada keadaan suhu persekitaran yang tinggi spt pada “head” enjin motosikal, akan ada ape2 kesan tak pada sensor tu?
    Sensor tu akan berfungsi spt biasa ke?

  6. halimzainuddin says:

    Salam..
    Terima kasih kerana sudi berkongsi ilmu di blog ini..
    Moga2 imlu yg dikongsi dapat menambahkan ilmu saudara(shahrul)

  7. mancai says:

    mana nak dapat sparepart ni lagi? atau masih di jalan pasar, kuala lumpur?

  8. mancai says:

    ada proposal ciptaan sendiri ke bro? kalau ada harap akan sentiasa akan terlaksana amin….

  9. AKMAL says:

    SALAM..
    ABG SHAHRUL BOLEH TNJUKKN X CM MNE NAK DISPLAY GUNA 7 SEGMENT..KITOWANG DH CUBE..X DPT LAH..HARAP2 ABG SHAHUL BLEH TLG SYE..SAYA NAK JADKAN IR 2 SEBAGAI UP AND DOWN COUNTER..P NAK PKAI 7 SEGMENT

  10. ELEKTRONEZ Hakimi says:

    Bagus lh Abg Shahrul ni, buat alat yg hebat2. teruskanlah teruskanlah oooooooooo begitu

Leave a Reply

What is 14 + 8 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)