4 lobe NIR photo transistor flashing light tracker for outdoor use code help


I have been trying to make a flashing light tracker for a few weeks and I am not sure how to filter the analog signal to determine what sensor is receiving the strongest.

-Filter analog background noise to find a PWM signal in 4 sensors.
-Compare the deviation of these 4 sensors to determine what sensor is receiving the strongest input from the flashing beacon.

-Flashing NIR light beacon tracker outside. It does not track the brightest thing in the sky (the sun) or random lights, just the flashing light beacon.

-4 equally sensitive NIR phototransistors operating from 0-5 volts on the tracker.

  • A strong known PWM flashing NIR beacon that will shine on the tracker
    -All sensors cover different lobes

How does filtering out background noise work for this application?

In a way, its like receiving a signal from an “Ir remote” (beacon) signal from 4 different directions. By comparing the received signal strength, corrective commands can be generated to move the sensor apparatus and track the beacon.
How can the noise be filtered out to understand the relative received signal strength between sensors?

This default library can secure communication with background noise, but cannot show signal strength. :confused:

Picture explanation

  • The “lobes” are phototransistors, not radio feeds. The geometry is similar. The problem is that each feed has different changing noise levels, as the sun will come in and out of the picture. The actual signal strength, relative to each of the phototransistors, would not change much if the sun came in and out of perspective.

I would really appreciate any help or pointers.


Need more power for your IR beacon. Try pulsed arc lamps or lasers. Hide in a bunker while doing the tests.

The IR LED used in most remotes "flashes" at 38 to 50 kHz.

The IR receiver is sensitive to signals in only a narrow range, centered on the flash frequency, which cuts out most of the background signal.

Well, If the flashes understood by the Arduino and their raw signal strength recorded, how does that get subtracted from "Background" to be compared with the other sensors?

I guess the max's could be checked with the min's to see if the interval is right.
If the intervals are right, then the code takes the difference between the measures to find the actual signal strength.

The problem with the flash frequency thing is that there might be flashes at similar frequencies that constructively interfere with the actual signal, and background.

Is there a way to smoothen raw input data to account for the constructive flashes, to then compare the raw signal, find the desired 50 khz signal or something, and then find the difference between the found 50khz signal with the raw signal to compare and generate corrective commands?

how does that get subtracted from "Background" to be compared with the other sensors?

The 38 kHz background is essentially zero, so there is no need to subtract.

In IR remote signalling, the 38 kHz "carrier" is further modulated into pulses, typically around 1 millisecond long, which carry the actual data. Tutorial here.