Variable LED Sequencer with Dimming

Discussion in 'The Projects Forum' started by SurviverMan, Dec 3, 2013.

  1. SurviverMan

    Thread Starter New Member

    Dec 3, 2013
    7
    0
    I want to add realism to my N Scale Railroad layout with a controller that sequences Interior Lights within model building to make it appear that people are moving from room to room and turning lights on and off as they move about.
    I've read through a lot of this site and know what I want can be done but it exists in bits & pieces in the 555 & 556 areas of this forum. I need someone to pull it together and sketch up a workable schematic.

    Requirements:
    Using one or more LM555's or LM556's, control the individual on/off sequence of a minimum of 4 to 8 White LEDs.
    LEDs to be on wire leads so they may be placed inside model structure.
    Individual LED dimming using variable resistors/rheostats.
    On & Off timing to be variable using variable resistors/rheostats and settable from approx. 10 seconds to 10 minutes. No precision required.
    Sequence/operation starts with application of power & stops when power is removed..
    Timing sequence may be random or repeating.
    All LEDs may be on or off at same time during a portion of the sequence but not regularly. I don't want all the buildings to be "flashing" in unison.

    Available power: 1.5 to 14Vdc - 500mA max

    This shouldn't be too difficult to sketch up but I lack the expertise to do it myself. The finished device would be a real boon to the Model Railroading community worldwide.
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,140
    3,054
    You crack me up. Don't take my rant personally because we see this over and over. "Here's a [huge, perhaps even impossible] task I can't do myself but feel certain it's a small job for you [an unpaid volunteer]." Why do people think they can judge a project's difficulty when they themselves lack the abilities to complete it?

    OK, I feel better now.

    This project screams for a microprocessor, and I am loathe to say that normally. I think the ideal solution would allow complete PWM control over each LED (or branch of LEDs behaving the same). Then the time profile for each circuit - on, off, dimmed to x%, whatever - could be programmed to your heart's content, and could even be programmed to respond to various inputs or sensors.
     
  3. SurviverMan

    Thread Starter New Member

    Dec 3, 2013
    7
    0
    Wow. Who whizzed in your cheerios this morning? I would not have gone to the trouble of asking for help if i knew how to do this myself. I realize it's an effort for you but... Think about the logic of that for a minute.

    Now, I feel better.

    As I said in my request, this is a Model Railroad project that would be a boon to a LOT of Model Railroaders across many gauges. I was TRYING to keep it cheap and dirty. I could be wrong but a microprocessor sounds much more expensive and would require a lot more in the way of hardware, software and programming knowledge. Model Railroaders, on the other hand, love to BUILD, TINKER and otherwise waste huge amounts of time doing little things that they can later display to their peers with a great deal of pride.

    Lastly, where would you suggest I look for guidance if not on this forum?
     
  4. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    You are in the right place, and the first response you got was from one of the best here.

    He is right that a μC would be a great choice for the project, and microcontrollers don't have to be expensive. Some retail for less than fifty cents, however they do have some barriers to entry, programming being the most obvious.

    You mentioned 4-8 LEDs. In a perfect world, how many would you like?
     
  5. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,173
    397
    One possibility: 555 clock, 4 or 5 parallel load shift registers,SR, 4 or 5 DIP switches, 4 to 8 2k pots, & 4 to 8 LED's. Each SR can drive 1 or 2 LED's. With 74AC165, no driver needed for LED's, but only one output, 4021 will need drivers, but has 3 outs. ' Used similar ckt for " Lightning In A Bottle".
     
  6. SurviverMan

    Thread Starter New Member

    Dec 3, 2013
    7
    0
    I know that Mechanical Engineers aren't the most liked by EE's but I didn't think I needed my flack jacket on my first sortie in this forum.

    Four separate LEDs, operating independently of each other is GREAT. I know enough to add extras, once the basic schematic is in place.

    I'm not opposed to a microprocessor. It's just that it's not very amateur builder friendly. We Model RR'ers aren't a sophisticated lot. We can barely keep red and black DC wiring straight most of the time. :>)
     
  7. wayneh

    Expert

    Sep 9, 2010
    12,140
    3,054
    Sorry to jump on the noob - didn't want to discourage you in any way. Consider my comments just an aside to the other helpers that hang out around here.

    If you must avoid a µC, one trick I have used is using one 555 to drive the control pin on a second 555. (Actually, I used a 556 dual timer.) You can get a range of almost 4X in frequency this way. With this trick I built something that would vary the frequency of the second timer from 0.5 to 2Hz, over a cycle time of about 10 seconds on the first timer. It ends up looking somewhat random.

    Another trick is to use a 555 clock and a counter such as 4017. This can allow you to sequence various behaviors depending on the clock count. One light on, all off, two others on, and so on. I think this is more or less similar to what Bernard was referring to.

    Incorporating dimming could be a challenge.

    I think if you are not using a µC - which gives you full control - you'll need to define exactly what you want to do beforehand and then design circuits to accomplish that. Lots of things are possible.
     
  8. JoeFromOzarks

    Active Member

    Apr 14, 2010
    95
    27

    "4 to 8 White LEDs." A maximum of 8 White LED's? (Determines the total number of active outputs.)

    "LEDs to be on wire leads so they may be placed inside model structure." Are these LED's surface mount, or through hole? What size LED's? (Most of the "prewired" LED's available through on-line resellers are usually 12VDC with inline resistor.)

    "Individual LED dimming using variable resistors/rheostats." Do you mean each LED brightness is adjusted once, or is each LED brightness controlled by the uC or 555?

    Also, LED's turn on and off instantaneously whereas incandescents are delayed a bit reaching full intensity or full dark.

    "On & Off timing to be variable using variable resistors/rheostats and settable from approx. 10 seconds to 10 minutes. No precision required." There is one variable resistor which affects the overall timing of all of the LED's (the sequence) or is each LED timing independently controlled?

    "Timing sequence may be random or repeating." Either OR or AND? :)

    "All LEDs may be on or off at same time during a portion of the sequence but not regularly. I don't want all the buildings to be "flashing" in unison." In the requirement above, "random" may occasionally cause/produce a "unison" flash, albeit very infrequently.

    "Available power: 1.5 to 14Vdc - 500mA max" Might be a wee bit difficult to light a white LED at 1.5V.

    Please sketch up your idea of the "buildings" using your lighting idea with the number of LED's in each "building." Then sketch up a flow chart of how you'd like the LED's to turn on and off, from power up until "sometime" when the loop repeats.

    "The finished device would be a real boon to the Model Railroading community worldwide." Seems like every time I help someone with such a project, in a month or two my designs and code is plastered all over the Internet and others selling the project for profit I designed for free. Kinda sucks the wind out of "fun" and redefines "boon."

    :) joe
     
  9. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,173
    397
    If you have a solderless breadboard, DIP switches are not needed. I paid $ .31 for 4021's.
     
  10. JoeFromOzarks

    Active Member

    Apr 14, 2010
    95
    27
    +1 wayneh

    Gospel applicable to every project:

    :) joe
     
  11. SurviverMan

    Thread Starter New Member

    Dec 3, 2013
    7
    0


    Let me supply as many answers as possible...

    Let's use 4 LEDs for now to keep things as simple as possible. (I'd rather build 2 simple things than 1 really complicated one.)

    SMALL LEDs. Think tiny. They don't have to produce much light at all.

    Each LED's brightness is individually adjusted manually, once and left alone.

    I think the instantaneous nature of LEDs can be ignored.

    Individual control of sequences... Think about a different LED in each room of a four room cottage. Each LED should come on & off as though one or several miniature people were living in the cottage. Each LED should dance to the beat of its own song.

    If each LED has a single, repeating on/off sequence (like on for X seconds and off for Y Seconds and then repeats) but X & Y are different for each LED, the four simple but overlapping sequences will give the cottage a really random "looking" appearance.

    An infrequent "unison" flash is acceptable.

    You tell me what DC voltage is needed. 14vDC is max for most Model Railroading projects but could just as easily be 12, 9, 6, 5.1, etc. Whatever is needed. I envision using a large wall wart to power this thing.

    I want this to be assemblable from inexpensive parts on a breadboard by a guy/gal who knows how to solder and use a DMM and that's about the limit of expertice. Programming is beyond the scope of this project.

    I understand your retiscience to "give away" so much only to see it being sold or republished. Let's do everything we can to keep this one for ourselves.

    Mike/
     
  12. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Now your getting down to basics. :)

    How about this.

    If you change current limit resistors and paralleled a couple outputs, you might even finagle random brightness.

    ps. The three identical oscillator inputs will have enough variation for some randomness.
     
    Last edited: Dec 3, 2013
    absf likes this.
  13. JoeFromOzarks

    Active Member

    Apr 14, 2010
    95
    27
    Well, I'm out then. :)

    If a fellow model railroader from Connecticut comes by wanting $15 for a .HEX file and schematic perfectly fitting a Microchip 20-pin device, tell him I said hello.

    :) joe
     
    SurviverMan likes this.
  14. SurviverMan

    Thread Starter New Member

    Dec 3, 2013
    7
    0
    Thanks to all. I'll stop by Radio Shack tomorrow morning and buy The stuff in the above attachment. I think I can rig up a version 1.0 from Inwo's sketch.
     
  15. iimagine

    Active Member

    Dec 20, 2010
    129
    9
    Good luck getting anything from a local Radio Shack now aday. I went in a local RS to get some bjts and they didnt even have one!
     
  16. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    "What I was thinking is sizing a couple output resistors for dim lite. Then paralleling the two (thru diodes). When ever the two came on at the same time it would be brighter."

    A better way that won't sacrifice and leds might be to connect anodes of two leds direct to output pins.

    Then use a common current limit for the two.

    Each led would work normally alone, but be dim when activated together.
     
  17. Meixner

    Member

    Sep 26, 2011
    116
    21
    I would suggest that now is a good time to check the sale paper for your local home improvement stores for a good price on a string of warm white led christmas lights. You can use the led's from the string for your railroad project. Warm white led's have the same color as incandecent lamps.

    P.S. Please let us know how it works out.
     
    Last edited: Dec 4, 2013
Loading...