Infrared Jammer not working
brandan
Posts: 52
I wanted to create an IR jammer but for some weird reason it's not working. If I mess with the IR led's pin the IR receiver detects the signal for a half of a second.
My setup:
This is my code for the jammer:
#include "simpletools.h"
int main(){
const int pin =15;
const int hertz= 38000*2;
clkset(0b01101111, hertz*(80000000/hertz));
set_direction(pin,1);
printf("%d",CLKFREQ);
while(1){
waitcnt(CLKFREQ/hertz + CNT);
toggle(pin);
}
}
My setup:
This is my code for the jammer:
#include "simpletools.h"
int main(){
const int pin =15;
const int hertz= 38000*2;
clkset(0b01101111, hertz*(80000000/hertz));
set_direction(pin,1);
printf("%d",CLKFREQ);
while(1){
waitcnt(CLKFREQ/hertz + CNT);
toggle(pin);
}
}
Comments
So, reception might degrade when blocking at 38000Hz for a 38500Hz or 42000Hz receiver; but something may get through. It is not easy to identify the frequency response by markings on the unit. Likely you have to test the frequency response.
And if that isn't enough of a problem, I suspect that the jammer not only has to be the right frequency, but be powerful enough to overwhelm competing good data.
You might need to drive an array of IR LEDs, not just one. And these LEDs would need to be taIlored to output a wavelength of light similar to what the receiver is designed to receive.
Here's a method I have in my standards Spin template (I don't program in C) -- this should translate pretty easily. Once you've got it working, your main loop can sweep through the range of frequencies you want to jam (I'd go 30kHz to 60kHz in 1kHz steps; spend a couple milliseconds at each frequency).
15 APIN
38 KHZ
That's all you need to do for it to be spewing out a 38KHz signal on P15 automatically. Now if you want to change it to 38,500 then just type:
38,500 HZ
That's all, but to sweep in 500Hz spacings from 37kHz to 42kHz every 50 ms perhaps try this:
15 APIN BEGIN 37,000 5,000 ADO I HZ 50 ms 500 +LOOP AGAIN
To lock that into the system so it does it on startup is straightforward:
pub JAMMER 15 APIN BEGIN 37000 5000 ADO I HZ 50 ms 500 +LOOP AGAIN ;
AUTORUN JAMMER
That's all, clean and mean and as quick to get running as it takes to type a one-liner.
EDIT: after setting the AUTORUN you will need to run BACKUP to save everything to the EEPROM. For the examples make sure you are in DECIMAL or else force decimal as in #15 APIN #38 KHZ etc.
1) Have the jammer "listen" or look rather for the IR traffic and determine the bit timing for the data packet.
2) Next the jammer could insert random bits into the packet based on the timing from step 1
This way it would be more difficult to detect the presence of a jammer, and also the jammer could deliver higher intensity pulses that average out over a longer interval.