this post was submitted on 28 Jul 2024
22 points (100.0% liked)
Ask Electronics
3326 readers
2 users here now
For questions about component-level electronic circuits, tools and equipment.
Rules
1: Be nice.
2: Be on-topic (eg: Electronic, not electrical).
3: No commercial stuff, buying, selling or valuations.
4: Be safe.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It's not completely stupid. One pissible issue: when the light level is around the threshold, slight variations (think: cloud passing by) will cause the relay to switch back and forth quickly. This can be solved with some additional parts (keyword: hysteresis).
I would recommend using a microcontroller, it makes this problem easy to solve, plus you can have more logic to trigger the lights (eg time based).
Another thing is turning off: if it's purely based on light level, you need to make sure the sensor does not "see" any of the LED light, otherwise it thinks the sun is back up
At least the last problem could probably be solved by simply a simple housing so the sensor "looks" outside - at least I hope so.
If you're looking to do this project without a microcontroller -- it's an exercise that every SW engineer should consider doing at least once -- then the venerable 555 timer may be of aid here:
https://elonics.org/light-sensor-circuit-using-ldr-555-timer-adjustable/