hevans1944
Hop - AC8NS
It is certainly possible for digital logic circuits to bite you in the ass, especially if you don't read and understand everything that is important to know... like if you want to use the I/O pins for digital I/O instead of using them as analog comparator inputs, and not knowing they default to being analog inputs, and that you have to disable the comparator to use those two pins as digital I/O. But once you do understand, it's a done deal and will never rise up to bite you again. That is NEVER true with analog circuits, whose operation is always dictated by Murphy's Law: if something can go wrong, it will. And this has a corollary: Murphy was an optimist.
You can still get your circuit to work in analog fashion. You just need to increase the power supply voltage a little to make things easier. There is probably no need for an LED to turn on when it gets dark, or if there is, it could be a small LED with limited brightness... after all, it will be dark so you can easily see it! If you arrange the circuit so that bright light saturates the output transistor, you can PROBABLY (remember Murphy, though!) use that to hold the 555 timer in reset until it gets dark and starts your timed interval. If you need some hysteresis at the day/night switching point, there are some simple Schmitt trigger circuits to play around with on the web, or you can purchase two 555 timers in one 14-pin DIP package and use one of them as a set/reset latch with hysteresis.
Your outline of how to use the PIC is exactly how I would do it. I would maybe add a "calibrate" button that you press after the delay starts. When the delay is long enough to your satisfaction, momentarily press the button and the program records the time interval in a non-volatile RAM location... well, non-volatile as long as power is applied. So, the next "day" it operates un-attended when night falls.
There are other PICs that have true non-volatile EEPROM storage that persists even after a power failure... but let's not go there yet!
You can still get your circuit to work in analog fashion. You just need to increase the power supply voltage a little to make things easier. There is probably no need for an LED to turn on when it gets dark, or if there is, it could be a small LED with limited brightness... after all, it will be dark so you can easily see it! If you arrange the circuit so that bright light saturates the output transistor, you can PROBABLY (remember Murphy, though!) use that to hold the 555 timer in reset until it gets dark and starts your timed interval. If you need some hysteresis at the day/night switching point, there are some simple Schmitt trigger circuits to play around with on the web, or you can purchase two 555 timers in one 14-pin DIP package and use one of them as a set/reset latch with hysteresis.
Your outline of how to use the PIC is exactly how I would do it. I would maybe add a "calibrate" button that you press after the delay starts. When the delay is long enough to your satisfaction, momentarily press the button and the program records the time interval in a non-volatile RAM location... well, non-volatile as long as power is applied. So, the next "day" it operates un-attended when night falls.
There are other PICs that have true non-volatile EEPROM storage that persists even after a power failure... but let's not go there yet!