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.

infrared modulation...

Status
Not open for further replies.

raedbenz

New Member
hi..
i have created a 38KHz pulses using the LM555 for the IR transmitter.
Now how can i modulate a serial data from Microcontroller (PIC) to the 38 KHz signal...?
thanks
 
Why use a 555?, the PIC can easily generate the 39KHz itself, and do a better job of it - check my PIC tutorials for details.

But you can't just use normal serial, the IR link doesn't maintain the pulse widths - you need some kind of coding, such as Manchester, or the SIRC's scheme my tutorial uses.
 
ok i have read about SIRC's code..
but i am asking about the hardware that will modulate the IR 38KHz beam with data?? what is the design technique?
 
raedbenz said:
ok i have read about SIRC's code..
but i am asking about the hardware that will modulate the IR 38KHz beam with data?? what is the design technique?

You simply turn the IR LED ON for 13uS, then OFF for 13uS - this gives you a 38KHz carrier, it's VERY simply to do with a PIC running at 4MHz (just use NOP's for the timing), at 20MHz use a loop.

To modulate all you do is send bursts of 38KHz, or not, simple AM modulation.
 
As a conclusion:
if a want send a binary string (101) for example..using the Manchester code,
i send:

13uS high,13uS low --> 13uS low,13 uS high --> 13uS high,13uS low

is that right???
thanks
 
Yes that looks OK, it's the transitions that are important, not the actual width of the pulses - it's also an NRZ system, which means it can be AC coupled.

If you want to use Manchester?, you can either combine my IR and RF tutorials, or go to the original site of the Manchester routines, which has IR examples as well.
 
ok..!
what about receving data ?? do i connect the output of IR receiver to any I/O pin of PIC and decode the binary string..??
 
For receiving it's probably easier to buy an IR receiver module at the carrier frequency you're using, it's a WHOLE lot easier than trying to decode it yourself, and you can feed it directly in a PIC's UART.
 
Sceadwian said:
For receiving it's probably easier to buy an IR receiver module at the carrier frequency you're using, it's a WHOLE lot easier than trying to decode it yourself, and you can feed it directly in a PIC's UART.

Sorry, but you're talking rubbish, we are already talking about using an IR receiver IC, which provides a logic level demodulated output. You can't just send standard serial information over an IR (or RF) serial link, there are limitations in the path that cause problems. Hence the use of Manchester coding, or similar.

By using VERY low baud rates you can get IR to work as serial, but it's got to be low enough for the varying pulse widths to fall within the RS232 spec (300 baud perhaps?) - but it's not recomended!.
 
raedbenz said:
does the RF signals work the with same concept...if i use a FSK or ASK IC??

Yes, you still need to code the data - you can buy radio modules with it built-in, but these are more expensive - essentially they have a PIC on-board. RF Solutions even sell pre-programmed PIC's to do it!.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top