Maker Pro
Maker Pro

40kHz Infrared Serial Modulation?

R

redbrickhat

I'm trying to transmit serial messages at 1200 bps to an IR receiver
such as a GP1U52X.
The datasheet says that the 40kHz signal must be further modulated by a
100 to 1000 Hz signal, I think because after several cycles are
received the AGC in the receiver reduces gain.


I was wondering if this second modulation is necessary when sending
serial information (since the 1200 bps signal itself is like a
modulation), and what would be the ideal frequency for such a signal. I
suppose one problem would be if the UART were to send several "1" bits
in a row since the GP1U52X might only detect the first ones before the
AGC reduces gain.


I was also wondering if the duty cycle of the 40kHz signal has to be
50%. I want to try a much lower duty cycle to pump more current into
the IR LED.

Any feedback will be appreciated.

Thank you.
 
H

Henry Kiefer

I don't know if this helps, but I think the quality factor of the receiver
will prohibit such high modulation frequency.
Look at irDA spec for higher bitrates.

cheers -
Henry
 
N

Norm Dresner

redbrickhat said:
I'm trying to transmit serial messages at 1200 bps to an IR receiver
such as a GP1U52X.
The datasheet says that the 40kHz signal must be further modulated by a
100 to 1000 Hz signal, I think because after several cycles are
received the AGC in the receiver reduces gain.


I was wondering if this second modulation is necessary when sending
serial information (since the 1200 bps signal itself is like a
modulation), and what would be the ideal frequency for such a signal. I
suppose one problem would be if the UART were to send several "1" bits
in a row since the GP1U52X might only detect the first ones before the
AGC reduces gain.


I was also wondering if the duty cycle of the 40kHz signal has to be
50%. I want to try a much lower duty cycle to pump more current into
the IR LED.

Any feedback will be appreciated.

Thank you.

The use of a 40+kHz carrier for IR commands is AFAIK solely to reduce the
possibility of interference or false triggering from the ambient background
and to allow several IR systems to co-exist in one place. It's much the
same as the carrier in any AM radio which allows you to receive many
different broadcasts.

Norm
 
R

Rich Grise

I'm trying to transmit serial messages at 1200 bps to an IR receiver
such as a GP1U52X.
The datasheet says that the 40kHz signal must be further modulated by a
100 to 1000 Hz signal, I think because after several cycles are
received the AGC in the receiver reduces gain.

I was wondering if this second modulation is necessary when sending
serial information (since the 1200 bps signal itself is like a
modulation), and what would be the ideal frequency for such a signal. I
suppose one problem would be if the UART were to send several "1" bits
in a row since the GP1U52X might only detect the first ones before the
AGC reduces gain.

I was also wondering if the duty cycle of the 40kHz signal has to be
50%. I want to try a much lower duty cycle to pump more current into
the IR LED.

Any feedback will be appreciated.

Well, TV remotes send some kind of data stream for the different
buttons, but I don't recall how fast - the point being, the receiver
can be made to respond reliably, in a reasonable amount of time -
try just turning the 40 KHz on and off at your 1200 BPS rate, and
see what you get!

Good Luck!
Rich
 
T

Terry Given

redbrickhat said:
I'm trying to transmit serial messages at 1200 bps to an IR receiver
such as a GP1U52X.
The datasheet says that the 40kHz signal must be further modulated by a
100 to 1000 Hz signal, I think because after several cycles are
received the AGC in the receiver reduces gain.

it attempts to block a continuous carrier-only signal
I was wondering if this second modulation is necessary when sending
serial information (since the 1200 bps signal itself is like a
modulation), and what would be the ideal frequency for such a signal. I
suppose one problem would be if the UART were to send several "1" bits
in a row since the GP1U52X might only detect the first ones before the
AGC reduces gain.

look at the codes the receiver supports, then compare with say the
vishay part mentioned below.
I was also wondering if the duty cycle of the 40kHz signal has to be
50%. I want to try a much lower duty cycle to pump more current into
the IR LED.

exhume monsieur Fourier, he'll tell you what will happen. there will be
a bandpass filter after the AGC, centered on the carrier. as you reduce
the duty cycle below 50%, the amplitude of the fundamental decreases, so
your range reduces. reductio ad absurdum - at 0% duty cycle it
definitely wont work.
Any feedback will be appreciated.

Thank you.

I'm not familiar with that particular detector but most IR receiver
chips have circuitry to block CW (continuous wave) modulation. I
recently designed a vishay TSOP32138.

their constraints are:

- burst length should be 6 cycles per burst or longer - >= 158us
- after each burst which is between 6 cycles and 70 cycles, a gap time
of at least 10 cycles (263us) is necessary
- For each burst which is longer than 1.8ms, a corresponding gap time is
necessary at some time in the data stream. This gap time should have at
least the same length as the burst.

HTH

cheers
Terry
 
R

redbrickhat

In the Vishay TSOP32138 datasheet the Data Formats are for IR remote
controls. Do you think that such an IR receiver could also handle
RS-232 data?

For example, in the link below, the TX pin of a PIC's UART is NANDed
directly to a 38kHz signal:

http://www.rentron.com/Infrared_Communication.htm

Wouldn't there be some problems with timing if the RS-232 data had a
long line of "1" bits?



Thanks.
 
R

Rich Grise

In the Vishay TSOP32138 datasheet the Data Formats are for IR remote
controls. Do you think that such an IR receiver could also handle
RS-232 data?

For example, in the link below, the TX pin of a PIC's UART is NANDed
directly to a 38kHz signal:

http://www.rentron.com/Infrared_Communication.htm

Wouldn't there be some problems with timing if the RS-232 data had a
long line of "1" bits?

"RS-232 data" can't have "a long line of '1' bits". An asynchronous
data stream has start bits and stop bits, which if the thing isn't
terribly out of tolerance, will resynchronize on every character.

And, technically, "RS-232" defines signal levels and connectors,
and doesn't say much, if anything, IIRC, about the data format.

Here's a lucky google hit:
http://www.anotherurl.com/library/rs232.htm

Hope This Helps!
Rich
 
T

Terry Given

Rich said:
"RS-232 data" can't have "a long line of '1' bits". An asynchronous
data stream has start bits and stop bits, which if the thing isn't
terribly out of tolerance, will resynchronize on every character.

And, technically, "RS-232" defines signal levels and connectors,
and doesn't say much, if anything, IIRC, about the data format.

Here's a lucky google hit:
http://www.anotherurl.com/library/rs232.htm

Hope This Helps!
Rich

wot Rich said.

Hi Rich.

Cheers
Terry
 
R

Rich Grise

wot Rich said.

Hi Rich.

Cheers
Terry

Hi!

How was your holiday? Mine was wonderful - I sat at home and didn't have
to talk to any relatives. ;-P

Cheers!
Rich
 
D

David

If you are using a UART on a micro controller, you can use software
Manchester encoding of the packet to ensure no long runs of "1" occur.

I used the PWM output to produce a square wave (38kHz) sent continuously
to a 4066 input. The TX data then enabled the switch each time a "1"
occurred.

To ensure you receiving UART locks on to the signal send a header that
ensures synchronization. Some preamble (0x55, 0x55 ...) followed by a
sequence that ensures UART sync (0x33,0xcc,0x33,0xcc,0x33) then your
data and checksum. (data and checksum are in Manchester format).

If you check out the 0x33,0xcc combination, you will find that the Uart
will always be in synch before the last byte .

Your receiver algorithm then waits for either 33 or CC to be received.
It then waits for a none CC or 33 to be received (this is first byte of
data).

You send each byte a nibble at a time by taking each bit in your data
word and transforming it to a "10: if the original bit was a "1" and a
"01" if it was a "0". The maximum length of "1" or "0" you can now have
is 2 bit periods.

--

Kind Regards

David Huisman
General Manager
-----------------------------------------------------------------------
ORBIT COMMUNICATIONS Pty Ltd - Wireless Solutions that Work
(Telemetry, Control, Monitoring, Security, HVAC ...)
A.C.N. 107 441 869


Website : http://www.orbitcoms.com
PO Box 4474 Lakehaven
NSW 2263, AUSTRALIA
Phone: 61-2-4393-3627
Fax : 61-2-4393-3685
Mobile: 61-413-715-986
 
T

Terry Given

Rich said:
Hi!

How was your holiday? Mine was wonderful - I sat at home and didn't have
to talk to any relatives. ;-P

Cheers!
Rich

Gidday Mate,

glad to hear it. my hols were pretty good. spent xmas day with family,
but luckily had the rest of the time just with Ruthy. Nice and relaxing.
Its pretty hot though. I think I need a trip to the beach.

just got back from a long road trip to pick up my daughter; had an
excellent time in Wellington, much great (and spicy) food was consumed,
and saturday was a very big night (sunday was a very bad day :). First
time I've drunk more than one beer in at least 6 months (I am always
driving....)

Alas, my latest pcb just turned up, so the next few days will be hunched
over the binocular microscope :(

charging by the hour :)

Kia Kaha,
Terry
 
V

Volker Nitsche

I'm trying to transmit serial messages at 1200 bps to an IR receiver
such as a GP1U52X.
The datasheet says that the 40kHz signal must be further modulated by a
100 to 1000 Hz signal, I think because after several cycles are
received the AGC in the receiver reduces gain.

Can you use a different protocol aside ASK?

It might be worthwhile to look for an IRDA transceiver like

http://www.sharpsma.com/productgroup.php?ProductGroupID=55
&SubProductGroupID=34
or
http://www.vishay.com/ir-transceivers/

A standard SIR (serial infrared = RS232) transceiver should easily be
able to handle 1200 bit/s.

Regards
Volker
 
Top