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.

?? How to MAKE 36.0 khz RC-5 IR remote to operate PIC ??

Status
Not open for further replies.

hawk2eye

New Member
?? How can I adjust a home made 36.0 kHz RC-5 Infra_Red remote so that it will operate a IR receiver + PIC 16F84 ??

1. NO oscilloscope is available !

2. Can an LM555 oscillator be built using 1% Resistors and Capacitor ,
so that with less than 5%error ?

hawk2eye
 
nigel goodwin,
Thanks for your input !

But, I don't understand your comment about calculating the timing.

Question:
Do you mean to calculate the timing for using a PIC as an oscillator
to provide the RC-5 circuitry:

both the Manchester (bi-phase) commands +36 khz IR carrier?

I think an LM555 is simpler to build. but less far less stable with temperature and aging.
hawk2eye
 
hawk2eye said:
?? How can I adjust a home made 36.0 kHz RC-5 Infra_Red remote so that it will operate a IR receiver + PIC 16F84 ??

1. NO oscilloscope is available !

2. Can an LM555 oscillator be built using 1% Resistors and Capacitor ,
so that with less than 5%error ?

hawk2eye

Say what?? Let me guess what you're trying to say. You have a 555 timer circuit and you need to get 36.0Khz from it so that it will be received by an IR receiver connected to the PIC16F84.

Here are my comments:

1. IR receivers I know operate mostly at 38Khz.
2. Unless you're only after a remote controller that functions like an ON/OFF clapper, you can't do anything much without sending a coded IR signal.
3. Since you're already working with PICs why not use one on the transmitting end to send the 36khz or 38Khz coded signal. There are PICs priced so cheaply they compete against the 555 timer in cost. A common technique is to use a 455Khz resonator (same one used on the radio IF stage) as the oscillator for the PIC. You can generate an accurate 38Khz signal with this.
 
hawk2eye said:
Question:
Do you mean to calculate the timing for using a PIC as an oscillator
to provide the RC-5 circuitry:

both the Manchester (bi-phase) commands +36 khz IR carrier?

Yes, you can do it all easily with a PIC - to generate 36KHz it's as simple as:

1) Set output pin HIGH.
2) Delay 14uS
3) Set output pin LOW
4) delay 14uS
5) Repeat as needed.

Bear in mind you need to compensate for the call and return instructions, but with a 4MHz clock you can get 36KHz accurate to within 1uS.
 
I noticed a lot of IR devices and IR receiver modules also have a fairly wide passband centered somewhere around 36kHz, so your timing doesn't have to be perfect. If your PIC has an internal timer/counter with a wide variety of prescales, that really helps.
 
DigiTan said:
I noticed a lot of IR devices and IR receiver modules also have a fairly wide passband centered somewhere around 36kHz, so your timing doesn't have to be perfect. If your PIC has an internal timer/counter with a wide variety of prescales, that really helps.

I usually aim for 38KHz, that seems centre frequency for most of the IR receivers I see - but you can get them centered on other frequencies. As you say it's not critical, but if you get too far away range will drop.

I don't see any relevence in the counter/timers for generating 38KHz?, at 4MHz you only need a handful of NOP's, or even better "GOTO $+1's", which gives a 2uS NOP.
 
I guess it all depends on the throughput. Having it interrupt-controlled on a fast µcontroller could let you squeeze in a few outside instructions in between IR carrier edges. Otherwise, nop works just as well.
 
DigiTan said:
I guess it all depends on the throughput. Having it interrupt-controlled on a fast µcontroller could let you squeeze in a few outside instructions in between IR carrier edges. Otherwise, nop works just as well.

It would be just a 'few' though, the interrupt latency, the call and return, saving and restoring the required registers - you're not going to have much time left out of 14uS.
 
Yeah, it's not so practical at 4.00MHz. I was running something like this on AVR at 10.00MHz, and after optimising things there just a little time left over for outside activities. If nothing else, you can use them for the 88ms of deadtime between frames.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top