Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

IR to PIC

Status
Not open for further replies.
This probably doesn't matter but what value is your capacitor from Ground to V+ of the PIC, normally it's supposed to be a 100nF ceramic. Try the circuit without that capacitor you probably don't need it because the PIC is very close to the power supply.
 
Your diagram is contradicting itself, the picture shows Out as on the far right, whereas in the schematic it shows itself in the middle? It looks like is hooked up right though, just might confuse somebody :)
 
TSOP IR detectors have several pinouts, you have to check your datasheet. Most have built in pull ups (again it's in the datasheet and so is the resistor & capacitor).
 
it seems a simple enough circuit. but this problem is following me around from bread board to bread broad. Could it be possible that the pic is damaged? Or does this kind of this happen often in electronics?
 
Thanks Nigel. But what does the above even mean? :eek:

Change the
__config 0x3D18 ;sets the configuration settings (oscillator type etc.)

to 0x2118

or add that line in?

Change it, it's different for the A version.

Built on a bread board (why is that bad?)

Yes, breadboards aren't very reliable, and people commonly make mistakes on them.
 
Excellent. Now download and install the PK2 2.61 software and run the logic analyzer. Connect PK2 GND to GND & PGC to the OUT of the TSOP. The logic analyzer can capture the Sony SIRCs data and display it. An excellent way to test your TSOP is working and as a bonus examine the data (it'll be stripped of the 38kHz carrier).
**broken link removed**
 
Last edited:
TSOP IR detectors have several pinouts, you have to check your datasheet. Most have built in pull ups (again it's in the datasheet and so is the resistor & capacitor).

As was said I need 100ohms and 4.7u. I'll change them now and use the logic tool.
 

Attachments

  • tsop4838.gif
    tsop4838.gif
    25.6 KB · Views: 499
47uf should be fine. Try the Logic tool first. Set the trigger to falling edge \ .
Note you need to use channel 3 as it doesn't have 4.7K pull down resistors.
 
blueroom: is that the same as using an oscilloscope? or can the logic tool do more things?

As my scope was already attached here are buttons 1 and 2 I just took now. So it seems my tsop is fine (I think). Need to change the 100ohm and 4.7u though.

(the device ID is for CD not TV. I have made that change in the code using 0x11)
 

Attachments

  • button 1.jpeg
    button 1.jpeg
    122.7 KB · Views: 217
  • button2.png
    button2.png
    14.9 KB · Views: 208
This probably doesn't matter but what value is your capacitor from Ground to V+ of the PIC, normally it's supposed to be a 100nF ceramic. Try the circuit without that capacitor you probably don't need it because the PIC is very close to the power supply.

1. OK, I tried to remove it. No change. It was a 1.0uF. Tried the 100nF (aka 0.1uF right?) still no change.

2. Changed the PIC for a new one. Re-programmed it. No change.

3. Changed my 7805. No change.

4. Used 100ohm and the 4.7uF for I.R receiver part.

Why does the circuit work when I touch it? Sometimes I don’t even have to physically touch it – just be mm away and it will work. What is my body doing? Drawing away noise?

What is most peculiar is that I don’t have to touch the circuit right away. I can press off and when I touch it, it goes off. Press on and it goes on just after I touch it. The signals are going trough but don't get sent to the LED until I touch something.

Im wondering if it’s anything to do with the LCD code – it probably sending signals out to a non existent LCD, could that cause a problem? I try to remove all parts of the LCD code.

Or is it the damn bread boards? I don’t have the energy to solder, only to end up with something that might not work.

Any other ideas?
 
Last edited:
1) Did you do the modification Nigel suggested?
2) Are you sure the battery your using is ok?
3) The capacitors are supposed to be non-polar ceramic ones, you are using electrolytic. Do you have any non-polar?
 
If you're not using an LCD, why are you using the LCD IR tutorial?.

There are 3 parts to your code. The LCD out, the LED Out and the IR IN.

Im interested in the IR IN and LED OUT. (And another tutorial of yours, the IR OUT) In fact I bought some dedicated IC's (HT12A and HT12D) to deal with this kind of thing - sadly to get them to do what I want and interface them with switches I need to use a pic. Modifying your code means I only have to use just 1 pic each end, no need for HT12A/HT12D.
This code is exactly what I have been searching for. Unfortunately I’m getting this very annoying problem holding me back.
 
1) Did you do the modification Nigel suggested?
2) Are you sure the battery your using is ok?
3) The capacitors are supposed to be non-polar ceramic ones, you are using electrolytic. Do you have any non-polar?

1. Yes I have changed the line to __config 0x2118
2. Yes I think so. It a rechargeable one. I try it with another.
3. No I don’t think I have ceramic non polar. Do you think that could cause this problem?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top