Help me track the sun. I'm not sure what I'm doing wrong.
My project involves 3 photosensors that I'm trying to use to track the sun. I have multiple issues. First I'll explain how things are setup. I've attached my config file. It will need changed from .txt to .xml. Please have a look. This is a version 3 brain.
This picture will help the most. See attachment. The three sensor tubes are made of copper, corked on the bottom to keep critters from entering, and have 3 small holes drilled in the top to allow the light in. They are between 6-7" long, and have the sensor coming in the side with the sensor part facing directly up. I get around a value of 10 when in direct sunlight. I've tried numerous positions for these sensors. The image is that shows where they are currently at is just where I left them for the day. I'm pretty sure I need to start from scratch here.
Issue #1. The sensors are not consistent. I can open the program and the middle sensor will read a value of 8 and then close and open the program a few times and have it show a value of 5. It really screws up my tracking abilities and I'm not sure what is causing this. This is with a clear sky and no random clouds.
Issue #2. The program simply won't update the values sometimes. If my digital outputs are on, sometimes the program simply will not change the value of my analog inputs resulting in the dish just keeping on moving. It doesn't always do this, but it does it enough to be a real problem.
Issue #3. (The biggie) I can get the dish to move toward whichever sensor has the highest value, but I can't get it to stop consistently when it's directly facing the sun. The best I got right now is that it will move toward the highest sensor and then where the two sensors are even it will just move back and forth. This is the biggest issue as I'm dead in the water if I can't get it to stop moving when it actually is focused on the sun. I tried to add some logic in to keep it from moving when it gets to the center, but it doesn't work well.
Any advice would be greatly appreciated.