Light Tracker Project: Seeking Algorithm Help

Click For Summary

Discussion Overview

The discussion revolves around developing an algorithm for a light tracker project utilizing phototransistors and a PIC 16F877 microcontroller. Participants explore various methods for tracking light sources, addressing both theoretical and practical aspects of the design.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests using two phototransistors on a turntable with a shield between them, wired in a Wheatstone Bridge configuration, and proposes using a comparator or A to D converters to determine the direction of the light.
  • Another participant raises a concern about how the tracker should behave when both sensors detect the same intensity of light, particularly when the light source is behind the tracker.
  • A different approach is mentioned involving five photoresistors (LDRs) for tracking light, with a reference to a previous discussion that includes a video demonstration.
  • One participant proposes using a microcontroller to check the light levels from the sensors and suggests rotating the motor back and forth if both sensors are in the dark to locate the light source.
  • There is a caution about continuously rotating the motor in one direction to avoid wire twisting, indicating the need for end-of-travel sensors.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to implement the light tracking algorithm, particularly regarding how to handle situations where both sensors detect equal light intensity. The discussion remains unresolved with multiple competing ideas presented.

Contextual Notes

Participants have not reached consensus on the optimal algorithm or method for the light tracker, and there are unresolved questions about specific operational conditions and sensor configurations.

hisham.i
Messages
176
Reaction score
2
Hi every body...
I have a light tracker project, so i will use a photo transistor and pic 16f877 micro controller..
but until now i don't have a complete algorithm and efficient one, of how such a tracker should work.
please send me a detailed algorithm of how such a tracker should work..
thank you
 
Engineering news on Phys.org
One way of doing this is to have two phototransistors next to each other on a turntable rotated by a motor, and having a metal or other opaque shield between them.
You would probably need diffusers in front of each phototransistor. This would be plastic as you see in front of fluorescent lights, or it could be blocks of paraffin wax.

Then you would wire the the phototransistors in a Wheatsone Bridge and take the output to a comparator.
The output of this could switch a relay to turn on a motor to turn the turntable (carrying the light sensors) in the direction of the brighter phototransistor.

Instead of the comparator, you could use two A to D converters in a Micro.

To avoid the tracking becoming too active, you could accept an area of similar brightness as being "good enough" and let the motor rest if this happened.
Or you could just take a reading every 5 seconds or so and ignore the time in between.
The motor would last longer if you didn't have it hunting continuously.
 
you are right..but the problem i faced with this method is the following:
when the light is behind the tracker and both sensors figure the same intensity of light what should it do? and how can the tracker know that it should rotate the next side?
 
you are right..but the problem i faced with this method is the following:
when the light is behind the tracker and both sensors figure the same intensity of light what should it do? and how can the tracker know that it should rotate the next side?
 
We kind of talked about this in this thread. Look for my post and you'll see a video link to a light tracker I made. It consists of 5 photoresistors (LDRs) that keep up with where the light it.

https://www.physicsforums.com/showthread.php?t=223686

-------------
Justin Coulston
TheModernEngineer.blogspot.com
 
If you took the two outputs to a micro, you could check that at least one of them is getting a minimum light level. You will know how bright the light is supposed to be.

If both of them are comparatively in the dark, rotate the motor backwards and forwards until you find the light source or it is turned on.

You can't rotate the motor continuously in one direction or the wires will get twisted, so you need sensors to detect when the end of the travel has been reached.
 

Similar threads

Replies
19
Views
6K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 12 ·
Replies
12
Views
14K
Replies
21
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 26 ·
Replies
26
Views
5K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 49 ·
2
Replies
49
Views
7K