I programmed a arduino board for a 4 lane hotwheels racetrack. When the car hits a sensor an led ligh pops in. It works great. Heres the weird issue. As soon as i darg it in sunlight, all the lights come on. If i drag back in the hkuse, it works. I even enclosed everything in a box, and all the led lights still stay on in the sunlight. Thoughts?
It's called sensor overload or saturation. A modulated signal will come thru even an overloaded sensor.
LDR's are very slow to recover after light exposure.
IR LED's will pick up modulation that LDR's just can't see.
The problem is you can't easily flood the track with modulated IR to see when a sensor goes dark. You might want to go to a downward reflection sensor or magnetic hall sw (would require gluing a small magnet to the cars).
Invert your logic. All sensors ON with light and look for the one input that goes away as the car passes over it. The blazing sun won't make them any more ON that any strong light. Problem comes with shadows being seen as cars.