SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Variance
#111709
Hey everybody,

I have a couple of the SEN-09088 mini photocells, and would like to track the position of a light source, such as a flashlight. Most of the projects I've come across seem to use an incremental method, in which the servo the sensors are mounted to continues to "step" in a direction until the readings from the sensors are equal. I would like to use the readings from my photocells to instead "triangulate" (I use the term loosely) the angle of the light source, then have the servo rotate directly to that angle. Unfortunately, I'm having troubles figuring out the math required to do so, and was hoping that someone more experienced than I might have some insight into the matter. Thanks in advance for any assistance!

Edit - I'm using a PIC18F2550 and Picbasic Pro, just to cover all the bases.
By anhingus
#111809
you could do ballpark stuff using photocells but it would take quite a few of them. say 2 sets of 18 arranged every 10 degrees on a semicircle perimeter.

very crude pointing at best.

a photocell can't tell left from right or top to bottom for positioning purposes which is why mounted servo rotation until both photocells currents are equal does the job.