simple tracking device

Hello Forum,

I am trying to build a little tracking device system having two light sensors mounted on it that tracks and points to a LED that can be placed at different positions in the room. The two sensors would be mounted on a servo motor that can rotate. The servo is placed in a fixed location in the room. As we move the LED around the room the servo rotates towards the LED until it is in straight line of sight.

This is my idea: the two light sensors receive different amount of light from the LED if the servo is not facing the LED directly. I think I need a difference amplifier that will measure the voltage difference between the two sensors and control the servo so that it rotate until the difference seen by the two sensors is zero or close to it. At that moment the two light detectors will be facing the LED.....

How do tell the servo to rotate to that angular position where the comparator output is zero? Do i need some feedback loop between the servo and difference amplifier? How does the servo know to rotate either left or right to reduce the voltage difference at the difference amplifier?

Can I use Arduino Uno and the servo library, write some small code and be ok with it, without the need of difference amplifier?

I think I also need a a blinking LED in a room that has other lighting, like a LED flashing at 38 KHz and infrared receivers. Infrared sensors give an output that is LOW when it receives a signal. If no inputs are low turn left (or right, whatever) to rotate until you find a signal. If one is low turn towards the other one. If both inputs are low, stop turning.

Any suggestion on how to solve this problem the simplest way?

thanks, Antennaboy

I've been able to track a laser dot, the reflection, with a camera on a servo. I'm curious to see how you do it without a camera? All you need is a light sensor that varies with the angle? For example 2 sensors with a thin wall between them so one side is partially blocked until it's straight on? If there is other light sources you will need to modulate it somehow.

It's easy to detect a dot in the dark with a camera. How can I do it when it's light, with IR laser? Here's my idea: Sample 2 frames, laser off, then on. Calculate the threshold where 99% pixels are darker. Count number of pixels above this, compare on to off. The count alone will tell you IF there's a dot. The pixels that changed, where. This will work when the scene is moving a little, wind blowing trees.

When the scene is completely static, you can look for any pixels that got brighter near to each other. Brighter by more than a constant threshold. What do you think?

The first part of your solution is the standard technique for light-following, found in most all of the hobby robotics books. The problem is how to identify the specific Led in question, rather than just any old light source.

The problem with the 2nd half of your solution is that IR receivers give only a yes/no output, plus they have extremely wide pickup beam patterns. The differential light following scheme, however, requires analog outputs not digital, and narrow pickup beamwidth, if you plan to zero in to the light source.

Sounds like you need to go to either phototransistors plus appropriate high-gain amplifier, or possibly CdS cells. You still want to modulate the Led at some frequency to distinquish it from everything else, including 60-hz room lighting.

I don't know how fast CdS cells will respond, but this would be the first thing I'd check.

Also, you would probably need at least 4 pickup cells, arranged in a grid pattern, so you could servo for sources in 3-dimensions.

You could limit the pickup beam widths for CdS cells and phototransistors using a simple tube mounted over the sensors.

If you just want something to follow the brightest light in the room, it’s dead easy and it might be a place to start. You can then do the difference in math in the program. I did this a few months ago as a demonstration and I think the program was only about 20 lines long. I used cds cells (photo resistive) and placed them at right angles to each other.

I'm looking forward to seeing how this turns out? I will pursue the Serial JPG camera method, we can compare in the end.

Thanks everyone,

as far as the infrared detectors getting confused with other sources in the room, I could use a blinking LED with a specific frequency. That way the LED will be the source the detectors see…
That sounds good conceptually but I would I implement that? Again, I just got Arduino and I am completely new to wiring and else…

thanks,
antennaboy

That would be easy to do at a low frequency say 1hz. It would not have to be in sync at that speed. In other words they could be 2 different clocks so long as they were both 1sec. If the LED is not moving, you'd look for changes in every other sample, when you sample at exactly 1sec intervals. 1 on, 1 off. I'm doing the same thing with the laser at 2hz. The problem is that there will be many other changes in the room with people moving around. This could be solved with a much faster rate. But then you'd have to synchronize the clocks somehow? The sample time is finite, much bigger than 1us.

Hi sbright33, thanks for your comment. As I said, I have never put anything together and my plan is purely conceptual.... I would like to understand your suggestions better:

So, in baby steps, I think I am able to get the LED to blink at the right frequency (using a 555 chip). I have Arduino Uno and two sensors. I don't get the sync and clock discussion you are talking about (forgive my inexperience)....

Where do the synchronizing clocks fit?

Each sensor receives some light that is converted to a voltage....what is next? Do I need to write some small routine for the Arduino? The sensors are mounted on the servo that is supposed to rotate the two sensors straight to the LED, in the case they are not....I know a servo is controlled by a pulsed signal.....I guess I need to convert the output of the sensors to some pulsed signal....

I am little confused....Sorry, but it is my first Arduino project...

thanks antennaboy

teach me how youve been able to track that laser :D:D:D:D:D:D i gotta try this

sbright33: I've been able to track a laser dot, the reflection, with a camera on a servo. I'm curious to see how you do it without a camera? All you need is a light sensor that varies with the angle? For example 2 sensors with a thin wall between them so one side is partially blocked until it's straight on? If there is other light sources you will need to modulate it somehow.

It's easy to detect a dot in the dark with a camera. How can I do it when it's light, with IR laser? Here's my idea: Sample 2 frames, laser off, then on. Calculate the threshold where 99% pixels are darker. Count number of pixels above this, compare on to off. The count alone will tell you IF there's a dot. The pixels that changed, where. This will work when the scene is moving a little, wind blowing trees.

When the scene is completely static, you can look for any pixels that got brighter near to each other. Brighter by more than a constant threshold. What do you think?

First can you see how this is useful? I can detect motion in the pitch dark 100m away in the middle of the woods with trees all around. All I need to do is take 50-500 steps around measuring the size of the reflection when it hits the tree. Bigger is closer. None means far away. If there's a change it's a new object reflecting the dot.