Dark Detector - On for Set Time Then Reset

Discussion in 'General Electronics Chat' started by uknn, Aug 27, 2013.

  1. uknn

    Thread Starter New Member

    May 6, 2013
    13
    2
    Good Evening All.

    I need to build a circuit that will activate a solonoid (on a water valve to water the plants while I'm on holiday!) at dusk, and remain on for a adjustable pre-set time.

    I've come up with the attached design - LDR and comparator trip a 555 flip flop (when it gets dark) to turn on the output transistor and a 555 timer. The timer pulses every 30 seconds to a 4017 which drives an LED indication of time elapsed.

    The 4017 outputs also feed via selector switch a transistor which will reset the flip flop and turn off the water. This theory seems sound to me, but before I expend the effort of building it, I'd appreciate any suggestions from the forum to improve it, or if you can see some obvious mistake I've made!

    Thanks and Best Regards,
    Ian.
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,553
    2,375
    They already have them off the shelf, either sprinkler system timers, OR yard light timer with the Dusk detect photo cell!!
    Max.
     
  3. uknn

    Thread Starter New Member

    May 6, 2013
    13
    2
    I know, but I get a lot more satisfaction from building it myself. :)

    And thinking about they already sell tomatoes in the store, so no point growing my own then I wouldn't need to water anything either...... :)
     
    Last edited: Aug 27, 2013
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    If you don't want to use any feedback reset for CD4017, then the reset pin 15 must be connected to GND, and Cout Pin12 should be open, no any connection, it is an output pin you can't connected to GND
     
    Last edited: Aug 27, 2013
    uknn likes this.
  5. uknn

    Thread Starter New Member

    May 6, 2013
    13
    2
    Thank you for spotting that Scott, yes I'd grounded the wrong pin by mistake. Just the sort of silly error I hoped you good people would spot before I etched a board for it!
     
  6. uknn

    Thread Starter New Member

    May 6, 2013
    13
    2
    Right folks, I've built this thing as per the diagram, but with the correction to to 4017's pins as per Scott's post above. However it dosen't work!

    Comparator works fine, but neither it nor the buttons trip the 555 flip flop. If I ground pin 2 or 4 with a probe it flips fine, but it seems the decoupling capacitors are not taking the voltage on pins 2/4 low enough to trip them - should I raise the value of the 100K's after the capacitors, or perhaps change the value of the caps themselves?

    Any advice much appreciated!
     
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    1. To seperate each IC and testing their own function.
    2. Using 10K to replace 100K for pin 2, also for the pin 2.
     
  8. uknn

    Thread Starter New Member

    May 6, 2013
    13
    2
    Thanks for the reply Scott, can you explain how reducing the value of the pull up after the capacitor will help? I would have thought that that would just recharge the capacitor quicker - my thinkng is that the 555 pins are not seeing enough of fall off voltage when the capacitor discharges?

    Of course I could be completly wrong?
     
  9. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    I was modified the values of some resistors and one position as the blue frame, you can compare to the original circuit.

    [​IMG]
     
    Last edited: Sep 10, 2013
    uknn likes this.
  10. uknn

    Thread Starter New Member

    May 6, 2013
    13
    2
    Thanks for your time on this Scott, much apreciated, I'll swap the resistors to the 22K's you suggest, and let you know what happens!

    Many Thanks,
    Ian.
     
  11. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    Just don't forget the Rc(C of T2)10K that I was moved it from pin3 of NE555 to the +12V.
     
    uknn likes this.
  12. uknn

    Thread Starter New Member

    May 6, 2013
    13
    2
    Yes, just noticed the "Move" - No wonder it dosen't work - Of course I've etched the PCB wrong, but I luckily that end of the resistor is right next to a +ve track so it's not too much of a problem to correct it.

    Many thanks again Scott!
     
  13. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,055
    Hard to get excited about something you can buy for <$5. ;)
    But if you're having fun, go for it.
     
Loading...