Infrared Control and Proximity Sensing

This section gives some development design details of the IR remote control and 360 degree IR proximity sensing for the IRCF360 sensor.

Equipment:

A RIGOL DS1054 was used to measure the signals.The Python application from RoGeorge was used to screen capture the display of a Rigol DS1000Z series oscilloscope by LAN, using LXI SCPI commands. This is a great application as No USB, no VISA, no IVI and no Rigol drivers are required.Install Python v2.X and pillow and download the application from github:

    • https://github.com/RoGeorge/DS1054Z_screen_capture

To capture the screen you just need to open a command prompt and run the following command

C:\<path of DS1054Z_screen_capture-master directory\

python OscScreenGrabLAN.py png 192.168.178.100

The png is the file format of the captured image and the numbers are the IP address of the RIGOL oscilloscope

Single IR Pulsing

As detailed in the previous section, the IR sensor will only trigger once modulated IR pulses are received in the region of 38Khz.

This means that , the sensors will only recognise a 1 or 0 pulse, when the infrared source is sending bursts of Infrared light at a frequency of 32Khz – 40Khz. If we use the formula [seconds=1/frequency], we see that the pulse width is 31,25– 25.0 uS (microseconds). Remember that uS is one millionth of a second or thousandth of a millisecond! For a Peak sensitivity of 38Khz,that is 26.32 uS per pulse. This calculates to 22.8 (say 23) IR pulses for a '0' pulse (0.6ms =600us) and 45.6 (say 46) IR pulses for a '1' (1200us).

To gain some immunity from ambient light sources, the IR sensors ‘trigger’ only when a 32KHz-40KHz modulated IR signal is sent. The sensors used in the IR-CF are PNA4620M-ND from Panasonic (or similar component) that has a centre frequency of around 38KHz.

For the IRCF360 Arduino development we checked to see if we needed

to check how accurately we can re-produce the 38Khz modulated pulse and f the Arduino command "delayMicrosecond" is accurate enough. We found that 14us was very close which we tweeked very slightly using inline assembler to add some further delays.

To trigger the IRLED the following code was used:

//IR 38MHZ modulation wave

for (int i=1; i <= 4; i++){

DDRB = LED_N_DDRB;

PORTB = LED_N_ON;

delayMicroseconds(14);

asm (

"nop \n"

"nop \n"

"nop \n"

);

PORTB = LED_OFF;

delayMicroseconds(14);

asm (

"nop \n"

"nop \n"

"nop \n"

);

};

delay(200);

(Click to Zoom)

The image depicts a single pulse of 14us as this gave the nearest to the peak frequency of 38Khz.

(Click to Zoom)

At least 2 - 3 cycle where required to get the IR receiver to trigger. There is about a 269us delay between the start of the 1st IR pulse to the triggering the IR receiver.

(Click to Zoom)

We increased the number of pulse to 10 to ensure triggering was more reliable.

The period between the 10 pulse package was reduced to 0.5ms but it seemed not to give the receiver time to settle. this was increased to 1.5ms which worked reliably.

If you look closely at the receiver triggered, there a some dropped readings.

References:

    • arduinoinlineassembly-sample.pdf

    • http://www.avr-asm-download.de/beginner_en.pdf