Light Detecting Auto LED Lighting... (RC Truck)

Discussion in 'The Projects Forum' started by NFA Fabrication, Sep 7, 2012.

  1. NFA Fabrication

    Thread Starter Member

    Aug 12, 2012
    104
    3
    OK, I am trying to make automated lighting for an RC truck. I have figure out a basic design that I like and have it tested, but it still has one glitch. I built and tested this light detecting circuit, added a 555 timer circuit to keep the LED's on for a while after triggered (So they would not flicker). I then drew it out after I had it tested, and liked it:

    [​IMG]

    I am new to 555's, and thought that with each trigger, the 555's timer would "Start over". I have figure out how to manipulate the 555 "On time", but if I set if for 30 sec's or so, I don;t want to have the lights glitching on/off every 30 secs as the timer resets, as the LDR circuit will have slightly varying input as it gradually gets dark.

    I would basically like to have the timer on the 555 reset everytime the LDR circuit goes low, instead of just taking input at the end of the cycle. I hope that makes sense! Thanks!

    Here is the truck (The front one):

    [​IMG]

    If this can't be done, I am considering using the light detecting circuit to charge a large capacitor that drives a transistor that will run the LED's. I like the elegance of the 555 timer idea if it can be accomplished. I had something like this working, but did not like how the LED's dimmed at the end of the triggering cycles, it appeared half ass'd to me. Thanks for any assistance!
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,089
    3,027
    I suppose you could add another 555, or use a 556. You could use the existing circuit for, say, a 5 second pulse and the second timer for a 30 second pulse. This way, a low-light detection within a 5 second window before the end of the 30-second cycle would ensure that the trigger was there and waiting to reset another 30 second cycle without a visible delay.

    Does your current circuit work fine once it's dark enough?
     
  3. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    Instead of a 555, why not use an op-amp (set up as a comparator) as the trigger for the LED's..... then you wont have to deal with the LED's flickering.... basically once the CDS triggers the comparator, it will stay on until it gets into a bright enough area for the lights to turn off.... something similar to this >> http://www.morse-code.com/9125cf00.png
     
  4. NFA Fabrication

    Thread Starter Member

    Aug 12, 2012
    104
    3
    I may play around with that idea. Overall it works great, but I am fairly new to electronics, and made the assumption that the trigger would restart the timing cycle, which would make this work perfect.

    I also played with using the above circuit set to 5 seconds, and had it charge a capacitor, and then used a 2222/2907 transistor combo after the capacitor to run the LED's. This made it better, but the LED's would eventually dim out, instead of cutting off, which I'd prefer.

    I will have to do some reading on this, I am new to this, but eagerly learning!
     
  5. wayneh

    Expert

    Sep 9, 2010
    12,089
    3,027
    I must be dense but I don't see how this would be different than his existing sensor, as neither has any hysteresis. I thought his problem was that the ambient light level - when it's near the switching point - may not stay low enough to maintain the low trigger for the 555 monostable.

    I agree that using a comparator with hysteresis would probably be the simplest solution.
     
  6. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    A LM324 may work to add hysteresis to the output, something like this:
    oops, wrong diagram..... will have to locate right one and post it... :)

    everything from pin 8 of the comparator can be ignored for this purpose......
     
  7. NFA Fabrication

    Thread Starter Member

    Aug 12, 2012
    104
    3
    I will be looking into that as well now. But I have a question, what happens if you pull pin 4 low, with the 555 reset when brought back to power? Also as far using a capacitor on the output before a transistor (Or 2), is there a simply way to make the power cut off sharper, as opposed to tapering off? Here is basically what I have now:

    [​IMG]
     
  8. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Do you really want the lights to go off after 30 seconds, or do you want them to stay on until it gets light again outside?
     
  9. antapetr

    New Member

    Sep 1, 2012
    3
    1
  10. NFA Fabrication

    Thread Starter Member

    Aug 12, 2012
    104
    3
    The idea here is that I don't want the lights on the truck to be turning on and off a lot when the outdoor light is just on the borderline of triggering my system. The truck gets driven on trails in the woods, and going under trees and other overhead stuff can make the lights go on/off a bunch making the truck look likes it's having a seizure.

    This is sounding more like what I was looking for. I will read up on this. I am somewhat new to the 555 and basic electronics, and did not realize the the 555 would not restart it's "Timer" with each trigger. Thanks!

    Edit: Just read up on this, I think this is exactly what I am looking for!

    Also, if this works, it is only a very slight modification to my existing circuit! I do not have any BC557B PNP transistors though. I wonder if I could substitute a 2N2907 PNP? I have plenty of those!
     
    Last edited: Sep 7, 2012
  11. NFA Fabrication

    Thread Starter Member

    Aug 12, 2012
    104
    3
    Well, I have re-worked the plan with the new information, and have the revised diagram. I just ordered BC557's, as I have none. Any ideas of what may be able to be substituted in it's place for now? I have plenty of 2N2222's, 2N2907's, BC547's...

    [​IMG]
     
    Last edited: Sep 7, 2012
Loading...