Whats wrong with my fish tank auto illumination circuit

Discussion in 'The Projects Forum' started by Tarek Hossain Dinaji, Apr 2, 2015.

  1. Tarek Hossain Dinaji

    Thread Starter New Member

    Apr 2, 2015
    8
    0
    When I power it up it works just fine. It responds to the light. But after it is working about 20 minutes when I shadowed the ldr it switched off the relay but when I removed the shadow it does not activate the relay anymore. Now when I switch off the whole thing for 30 minutes it again starts and then after 20 minutes if I cover the ldr same old story.

    What is wrong with this circuit. How can I get a reliable service?

    Thanks in advance.
     
  2. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,503
    Are any of the components warming up?
     
  3. Tarek Hossain Dinaji

    Thread Starter New Member

    Apr 2, 2015
    8
    0
    Nope! They are slightly but that happens to all sorts of ic and transistor I suppose. Nothing extreme
     
  4. Tarek Hossain Dinaji

    Thread Starter New Member

    Apr 2, 2015
    8
    0
    My concern is the 300k Resistor. I did not have a 300k available so I solder a 330k.

    Most of the time I saw pin 5 is partially grounded via 0.1 / 0.01 uF capacitor but in this diagram it is sorted to pin 3
     
  5. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,965
    743
    remove R2, its not required..the 555 has built in hysteresis of 1/3 and 2/3 supply, the light comes on when the ldr sees daylight and goes off when in darkness.
     
    Tarek Hossain Dinaji likes this.
  6. pwdixon

    Member

    Oct 11, 2012
    488
    56
    The 330k resistor is providing some hysteresis to the comparator so it isn't going to make much difference what value it is.
    Not really making much use of the features of a 555 as a timer you are just using the comparator, you might have understood he circuit better if you simply used a comparator instead.

    Have you checked your battery voltage when the circuit doesn't switch?
     
    Marcus2012 likes this.
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I don't see any capacitors across the 555's supply pins (4 and 1).
    The minimum requirement is one 0.1uF ceramic or poly metal film capacitor, and one 1uF or larger aluminum electrolytic capacitor in parallel.

    What is the current requirement of your relay's coil, or what is it's resistance?
    The BC547B is only rated for 100mA maximum collector current; best to not push it past 70mA max. The 555 (transistorized) can actually sink or source up to 200mA directly from it's output. It's better to sink current with it, as maximum source output voltage is ~1.3v less than Vcc.
    What are you using for a power supply?
     
  8. Marcus2012

    Member

    Feb 22, 2015
    349
    26
    I think pwdixon was right on the money with the voltage comparator suggestion. Probably the best option here if you're not actually timing anything.

    Try adapting this circuit

    Light Activated Switch Circuit

    [​IMG]
     
    cmartinez likes this.
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    One rather large problem with that circuit is many common comparators like the LM311, LM339, LM393 have open-collector outputs which can sink, but not source current - which would make that circuit completely non-functional. Certain opamps might be used, but some (like the ancient 741) might not ever let the transistor Q1 turn off due to the output not getting within about 2v of either power rail. R2 being 10k would severely limit Q1's base current, so Q1 wouldn't saturate; the collector-emitter voltage would be so high that the relay wouldn't turn on. If the transistor did manage to turn on, and then off, Q1 would be blasted to smithereens because there is no diode across the relay coil to provide a current path for the reverse EMF which will occur when Q1 turns off. Finally, there is no feedback to provide hysteresis, so when lighting is near the trip point, the relay would chatter incessantly.
     
    Tarek Hossain Dinaji likes this.
  10. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,503
  11. Tarek Hossain Dinaji

    Thread Starter New Member

    Apr 2, 2015
    8
    0
    Yes. The voltage is slightly higher then 12 as I am using a 220v to 12v transformar with a simple rectifier using 2 diod and a 100uF capacitor.
     
  12. Tarek Hossain Dinaji

    Thread Starter New Member

    Apr 2, 2015
    8
    0
  13. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,965
    743
    your circuit is ok it will work, get a voltmeter and measure the voltage on pin 2 with the ldr covered and open.
     
  14. Tarek Hossain Dinaji

    Thread Starter New Member

    Apr 2, 2015
    8
    0
    Thanks for the reply. I appreciate it very much.

    The Relay is rated for 12V and 12A and the shopkeeper said this is IC 555 and IC 1408 Version. I am outside now so I cant check the resistance.
     
  15. Tarek Hossain Dinaji

    Thread Starter New Member

    Apr 2, 2015
    8
    0
    Thanks.

    I will try removing it and ground it using 0.1uF. See how it deals with that. I intentionally added the transistor to keep the IC cool as It will work continuously for months and years.
     
  16. Tarek Hossain Dinaji

    Thread Starter New Member

    Apr 2, 2015
    8
    0
    Thanks I will get you these readings when I am home.
     
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    If you're going to use a transistor, then use a 2N2222 or PN2222, as they are rated for a maximum collector current of 800mA (500mA is a practical design limit) rather than 100mA (~65mA practical) like the transistor you are using. The 555 timer itself has a rating of ±200mA from it's pin 3, about 3x that of your transistor. It really does help to read and understand datasheets. When you're starting out, datasheets can seem intimidating, and a practically incomprehensible mountain of information - but feel free to ask questions. Nobody starts out knowing this stuff.
     
    ebeowulf17 and cmartinez like this.
Loading...