Light Tracker Project: Seeking Algorithm Help

AI Thread Summary
A light tracker project is being developed using a photo transistor and PIC 16F877 microcontroller, but an efficient algorithm is needed. A suggested method involves using two phototransistors on a turntable with a shield between them, wired in a Wheatstone Bridge to control a motor based on light intensity. To prevent excessive motor activity, the system could accept a range of brightness as acceptable or take readings at intervals. A challenge arises when both sensors detect equal light intensity, prompting a need for a strategy to determine the next direction to rotate. Implementing additional sensors can help manage motor direction and prevent wire twisting during operation.
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.
 
Hey guys. I have a question related to electricity and alternating current. Say an alien fictional society developed electricity, and settled on a standard like 73V AC current at 46 Hz. How would appliances be designed, and what impact would the lower frequency and voltage have on transformers, wiring, TVs, computers, LEDs, motors, and heating, assuming the laws of physics and technology are the same as on Earth?
I used to be an HVAC technician. One time I had a service call in which there was no power to the thermostat. The thermostat did not have power because the fuse in the air handler was blown. The fuse in the air handler was blown because there was a low voltage short. The rubber coating on one of the thermostat wires was chewed off by a rodent. The exposed metal in the thermostat wire was touching the metal cabinet of the air handler. This was a low voltage short. This low voltage...
Thread 'Electromagnet magnetic field issue'
Hi Guys We are a bunch a mechanical engineers trying to build a simple electromagnet. Our design is based on a very similar magnet. However, our version is about 10 times less magnetic and we are wondering why. Our coil has exactly same length, same number of layers and turns. What is possibly wrong? PIN and bracket are made of iron and are in electrical contact, exactly like the reference design. Any help will be appreciated. Thanks. edit: even same wire diameter and coil was wounded by a...
Back
Top