PWM command driving an IR LED

Maleny

New Member
Using the circuits from the manuals I’m trying to get an 08M to drive an IR LED using the command pwmout 2, 25, 53. When I use infraout 1, 55 the receiver works perfectly and triggers another Picaxe (later I want to get a single 08M to do both jobs). When I use the PWM command the receiver only sees the periphery of the LED output field and it’s output signal while still 5 volts is scrambled, any ideas anyone?
 

Buzby

Senior Member
The IR Receiver repsonds to the modulated 38KHz generated by 'infraout', but will not respond to any continuous signal, such as from 'pwm'.

Please post your circuits.
 

Maleny

New Member
The IR Receiver repsonds to the modulated 38KHz generated by 'infraout', but will not respond to any continuous signal, such as from 'pwm'.

Please post your circuits.
The transmitter is a 330R resistor in series with an IR LED. The receiver is the standard cct, a TSOP4838 with pin 1 on the receiver to pin 3 on the 08M with a 4K7 pullup resistor, pin 2 to eth and pin 3 with a 330R to 5v and a 4.7uF electro to earth. The infraout signal appears to be a 38K square wave with a 40% duty cycle and I have tried altering the PWM command to match it with no luck. Do you think I may need a loop turning the PWM on and off?
 

Buzby

Senior Member
Devices such as the PICAXE 'infraout' command and real TV remotes send a modulated 38KHz, with different modulation patterns for each function, such as 'volume', 'channel#, etc.

Bit-banging can be used to replicate IR codes, but it's hard work !.
The forum has a few threads where people have generated Panasonic or NEC IR codes, because PICAXE only does Sony codes.

Why are you trying to replicate the Sony code, when the PICAXE already has Sony IR support built in ?
 

Maleny

New Member
As PWM gives a continuous output in the background I am trying to get away with only using one 08M Picaxe for both transmitter and receiver . I have found several references on the net to other people doing this.
 

westaust55

Moderator
I take it that you are looking to build an Infrared door monitor with the transmitter and receiver on one side and a reflector/mirror on the opposite side of the door opening.

I recall that others have previously started threads here on this subject.

As already mentions, the standard TSOP4838 devices use a carrier frequency of 38 kHz but then you need to superimpose some data on that carrier frequency. If the carrier alone is sent, after a short period, the IR receiver in effect shuts down.

Are you trying to send actual data or are you just looking for a beam break situation?
For actual data this tutorial I posted previously may be helpful: http://www.picaxeforum.co.uk/showthread.php?17303-Infrared-(IR)-Communications-Basic-Tutorial

You would do well to post links to relevant information you have found (we do not know exactly what you have looked at) along with your schematic and code if you want more help from others here.
 

hippy

Ex-Staff (retired)
Do you think I may need a loop turning the PWM on and off?
Probably and the receiver datasheets should say something about continuous transmission. For example, "There must be a Signal Gap Time (longer than 15ms) at least each 90ms".

Check for other conditions though, for example, "Continuous IR signal (e.g. 1ms burst, 2ms pause)", which may reduce sensitivity or disrupt operation.
 

boriz

Senior Member
A continuous 40kHz PWM output on one pin with a PULSOUT on another pin and the IR LED tied between them (not to ground) would give you nice burst control.
 
Top