Since PV panels are wide angle view , the solar tracking is not that critical but you can gain 25% on average with a latitude tracker if you adjust the azimuth manually each season, and less if you dont. and with no solar tracking you lose on average 29%, but during peak hours more than 50% and during cloudy periods 0 gain over a fixed vertical angle.
When it is cloudy the solar power is significantly reduced and widespread , so tracking is not required. unless you want to wast time power clouds.
You create a sunset detector using a comparator with hysteresis for sunset using the same LED as photo-sensor. Since you may not have power in the morning to move the array, sunset is the best time, then use a timer or a another photos sensor to detect the sunrise position with an LED shining in the sunrise position that is less bright than sunrise but brighter than sunset.
You may want to put heatshrink tubing around the LED so it does not pik up stray light from headlights or street lights, so that it reaches slightly beyond the tip of the LED.
The algorithm of the tracker ought to be defined.
e.g. if the West/East differential voltage is X% brighter then move and after x seconds of moving stop or until the threshold of difference drops to Y% above noise levels.
If there is inertia in the motor, it will coast past the stop point, which may be ok, but if the threshold is too low , it will oscillate.
Corrections should not be done less than T minute intervals, because the motor loss in Watt-hrs will exceed the gain in solar energy in Watt-hrs.
T has to be determined by your motor and PV panel specs, but I suspect the motor power to PV power ratio may be large to manage the torque, so the net gain is improved by less frequent corrections. A 10deg correction might only improve power 5%, but you can plot in excel.
Ref.
https://www.solarpaneltilt.com/#other
free Software:
https://www.nrel.gov/rredc/models_tools.html