street light control using ldr
Hi Latecomer,
Don't make your life much more complicated than it is. You don't need any formula to calculate the sunrise and sunset time based, simply because your application don't need it.
Try to imagine a small storm in the middle of day, when natural lights go down (obvious if your lighting company could afford and handle that).
Thus, to switch ON / OFF the street light you need a good light transducer (read photocell), a micro + software (though an ordinary and cheep 555 timer could be suitable as well).
Set two adjusting sensitive threshold level for proper dark and light, when you need to switch ON / OFF the street light, apply a small hysteresys in order to avoid false thriggering and that's all.
This way you'll succeed to solve the problem, even when huge and black clouds covers the sky.
Regards,
Silvio