Hi everyone:
What methods can be used to get individual structure lights to turn on and off randomly?
I'm thinking of something like an apartment building or an office building where I want lights in various rooms to turn off and on on their own in a random pattern. Ideally I'd like to do it so that each building has only two leads for power if that is possible, hopefully without spending a fortune on circuitry.
Any suggestions?
Thanks
Dave
I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!
Dave,
This is one of the uses that the NMRA's new LCC (Layout Command Control) standard addresses. Might be some ideas there: http://www.nmra.org/news/facts-about-lcc-new-layout-command-control-standard-nmra
Products based on LCC are just starting to hit the market, so might be worthd oing some research into who is offering what and perhaps giving things a year or so to shake out if it sounds interesting.
Woodland Scenics new system has manually swicthed controls,but not sure about automation with it, although would seem to me to be a useful option for them to offer.
On the face of it, LEDs will be easier to tie into an automation circuit than bulbs will be, besides their other advantages.
Mike Lehman
Urbana, IL
I'm always keeping an eye out for neat electrical gizmos at flea markets, surplus shops and "junk" stores.
I found this gem at an electronics surplus joint:
Each microswitch rides on a pair of adjustable cams so you can vary the on-off cycles. You could wire two sets of lights to each switch since they are N-C / N-O SPDT contacts so when the cam depresses the roller they will switch from one to the other.
You may not be lucky enough to find this exact switch but if you get an old synchronous motor you can make your own cam or a drum and mount several microswitches around it for animating lights. The one I show above turns at 1 RPM but you can find slower ones or make your own gear reducer.
Alternately, I have found "stepper switches" that will advance with one pulse of input voltage and you could wire your lights to the outputs, some have as many as 48 positions, and use a timer circuit to step the switch randomly.
I'm sure there are solid-state, electronic solutions out there but this works for me and I can "see" exactly how it functions.
Just a few ideas... Ed
OK Mike and Ed!
You have presented me with two options which seem to be on the opposite ends of the electronic spectrum. Don't worry, I'm not complaining.
The LCC concept is certainly interesting and obviously has huge possibilities, but there are two things that give me pause. One is the time factor related to how long it will be before products are available. The other is cost. The NMRA bulletin suggests that hopefully costs will be comparable to current devices. The prices for current accessory control devices already give me reasons to question the cost/benefit relationship. That means I really don't want to wait until new products are announced which will quite likely cost more than I want to spend (do you hear the birds singing "cheap, cheap, cheap...").
That brings me back to Ed's suggestion but I also don't really want a whole bunch of clicking and snapping going on under my layout either. However, beggars can't be choosers so maybe the mechanical devices will rule. They can always be replaced at a later date. The wiring will already be in place.
Ed:
What voltage is needed to drive the low speed motors?
You can always make your own, basically a turntable and lay some brass contacts strips on it, for controlling LEDs this will be perfectly fine because of the low current involved, and it will be all sliding contacts, no snapping contacts. There have been DIY ones in the magazines over the years, i remember one that used a coffee can turned my an old loco motor and the contacts were arranged along the can. A couple of layers of paper under the moving contacts on the can insulated them fromt he can - again perfectly ok for low voltage low current power. Then there's all-electronic solutions using something like an Arduino driving solid state relays or power transistors to switchthe circuits on and off.
Lots of ways to skin this cat (sorry Lion)
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
Hi, Dave
The synchronous motors are always 115 VAC since they rely on the 60 cycle house current. The same motor that has been driving plug-in clocks for years.
I found a 6" x 8" pvc box that I mounted it in and it runs very quietly.
There are many sources for slow RPM motors that are more like 6 to 12 volts DC, like the noisy Walthers 933-1050 bridge/oil pump motor.
If you are not already familiar with ALL Electronics you should browse there for fun electronic goodies:
http://www.allelectronics.com/
They usually have lots of handy stuff for model railroad use.
In fact, I just got an email from them showing little mercury switches for $2.25 ea.
http://www.allelectronics.com/make-a-store/item/ms-40/mercury-tilt-switch/1.html
You could glue, or make holes to sink the switches in, at varying angles onto a wood square with pivots, then a crank arm to a very slow motor that would essentially "rock" the switches back & forth to make & break for your lights. It would not have to make a complete rotation so the wire would just flex with the rocking of the "switch bar".
http://www.allelectronics.com/make-a-store/item/dcm-351/24-vdc-gear-motor-w/turntable/1.html
If you don't want little glass vials of mercury under your layout you can use nearly any one of these snap-action "Microswitches" and drive them off your own rotating drum with varying lengths of strips glued on to activate the switches at random lengths and times.
http://www.allelectronics.com/make-a-store/category/727/switches-snap-action/1.html
Some of these switches have a very soft action and are nearly silent. Some have a more pronounced click.
As Randy points out, lots of options. Grab a sketch pad and go to town!
Have Fun, Ed
Hopefully I'm not violating any rules here, but there's a company that makes such a circuit..(Modderator, if it's inappropriate please remove, sorry)
www.eastcoastcircuits.com/ They make a pretty good circuit for the price. It's called a random lighting cirucit. Since I'm not an electronic guy, I would rather buy something like they have..
Neal
That looks pretty neat, Neal!
You are not violating any forum rules by pointing a fellow member to a product that will help solve an issue.
If you were selling these and trying to solicit customers here, that would clearly violate policy.
That board would satisfy Dave's desire to have the unit within the structure and have only two wires coming out of the structure.
Ed
RR_MelWhile I don’t have any PICs programmed for long periods they are random. I’m not into programming so I’m asking for help from some sharpies out there. The PIC modules are available in an eight output configuration for under $10. Still waiting on some sharpies with PIC knowledge to chime in and give us your thoughts.
Mel,
I suspect PIC devices is one of the ways that LCC can be implemented. If so, that prices sounds good to me even if you hear the chicks going "cheep, cheep..." once someone gets a "command station" for LCC to market.
If you want a simple, two-wire solution for multiple lights in a building, it almost has to be some sort of addessable controller.
On the other hand, old school stuff like gmpullman showed should be easy to find on the surplus market. I suspect cost kinda depends on what scrap value for the metals involved happens to be.
THat's why I suggested Arduino, boards can be had for not much more the PIC board, and no programmer needed, they have USB on them. Arduino was designed for non-engineers to work with. There are NMRA DCC, Loconet, and CMRI libraries already for Arduino.
That's the key to a 'cheap' interface device for any bus, like LCC - someone, or you, needs to develop a library to access the protocol - not exactly an easy job but if someone does so and makes it freely available you can build on that.
nealknowswww.eastcoastcircuits.com/ They make a pretty good circuit for the price. It's called a random lighting cirucit.
I looked at this link and their "Random Lighting Circuit" looks like it would do the job. My only issue would be that the timing is pretty short, 5-45 seconds. At that rate, the structure might seem to be calling for attention.
It takes an iron man to play with a toy iron horse.
I have no idea about the rate on it.. Drop them an e-mail... be interesting to see what they say.. Wish i was more tech savvy...
Here's someone who did it with an Arduino Nano. Unfortunately he doesn't provide the sketch. It shouldn't be too difficult to find a sketch that will randomize the lights for you.
Steve S
rrinker Arduino was designed for non-engineers to work with. --Randy
Arduino was designed for non-engineers to work with.
I don't have any answers to your question - but I can see how cool it would be to have a building have randon lights turning on and off.
Let us know if the Arduino kit works out.
In the old days we would have has a batch of switches to control the lighting - nowadays you can let a circuit board do it all for you. Is that progress?
Okay I'm a luddite that works in the computer industry - go figure.
Chris.
Loco Guy - is a state of mind - not an affinity to locomotives.
Sit back and enjoy your track...
Take some pictures as you go, and keep good notes of how you program the Arduino unit.
This would make a great how-to article for a certain model railroading magazine.
Wow - lots of possibilities!
For those who suggested the mechanical devices - thanks very much. I think I'm leaning towards the electronic options but I will keep the others in mind.
Neal:
The Random Lighting Control is a great product but I would need a bunch of them to do what I want because they will only drive 6 LEDs each. The low Canadian dollar is becoming a serious issue, and it is predicted to go even lower by the summer so buying 12 - 15 of the RLC units would get expensive.
Steve and Randy:
Arduino obviously addresses the issue about the number of LEDs that can be driven by a single unit, plus there is apparently greater flexibility in the timing settings.
Mel:
Where did you order your Arduino kit from?
Thanks everyone!
Just ordered the book 'Arduinos for Dummys'. Sounds like its aimed right at my level!
Hi Ed:
I'm familiar with All Electronics but thanks for the links.
The most common Arduino, the Uno, has 20 outputs that can be used to switch LEDs on and off (the analog lines can be used for digital). They can only drive one or two LEDs directly, but you can find simple circuit examples that drive a transistor which can then drive a dozen LEDs per line or so, so you can run a whole town on a single Arduino and have multiple lights on multiple circuits in each building.
The most basic beginner examples show you how to turn an LED on and off and make it blink. They will typicall just use one LED, often on pin 13 (because the Arduino has traditionally come with an LED already on the board, connected to pin 13, so you don;t even have to add external components). The key thing to take away from those examples to expand it to the concept of driving multiple LED circuits is the part of the code where you spcify which pin the LED is connected to. You can reference ANY pin number, so long as you hook the LED to it. Or many at the same time. In just a few minutes I had a Knight Rider thing going with 4 LEDs, and a simple change to the code made it just sweep in one direction instead of back and forth.
It's really hard to actually damage anything by having your program incorrect, but when connecting things to the Arduino you do have to remember things like putting current limiting resistors on LEDs. Just like if you were powering them with a toggle switch instead of a miniature computer - concept as far as the LED circuit goes is exactly the same, the difference is with the Arduino, your program turns the LED on and off instead of your finger on the toggle. So the same wiring rules apply.
ANd if you start playing around and need help with your sketch (see - Arduino was made for art students originally - it's not a 'program', it's a 'sketch'), I can help you out. I don;t need to have your exact circuit - you might have a transistor connected to the Arduino driving 10 LEDs, but the sketch is exactly the same even if all I do is hook 1 LED to mine. That is, of course, how you should start - one LED and resistor per output to test the program, then worry about the transistor driver later - the code would remain unchanged.
There are other Arduino models better suited to building into a permanent circuit that are less expensive than the Uno - I also have a Nano, which basically looks like an overgrown IC chip but it runs the same code as the Uno and has the same outputs and I think the one I have cost $3.99. And if the 20 outputs aren;t enough, the Arduino Mega has over 60.
If you have a MicroCenter store near you, they have Uno clones on sale for $6, and Mega clones for $10.
http://www.microcenter.com/product/431997/Uno_R3_MainBoard
http://www.microcenter.com/product/431995/Arduino_Mega_2560
They only have 25 stores nationwide. Here are the locations...
(scroll down)
http://www.microcenter.com/site/stores/default.aspx
Steve:
Thanks for the MicroCenter lead. I'm in Canada so that particular source is going to be expensive with the exchange rate and shipping.
I did a brief search on the Canadian Amazon site and the clones are actually available for only slightly higher amounts in Canadian $ and lots of the suppliers offer free shipping.
Randy:
Thanks for the explanation and for the offer of help. At the rate that I am getting information from you recently I'll have to put up a plaque with your name on it in the layout room.
I looked up the article related to the video that Steve referenced and it includes the 'sketch' needed to run multiple LEDs although the example only has one LED per output.
Here is the article for those who might be interested. If the link doesn't take you directly to the page, it starts on page 99:
http://mrhpub.com/2014-11-nov/land/#99
It would be amazing to have several dozen LEDs going on and off randomly with only one or two small inexpensive micro processors running the whole show. It looks entirely doable but I can just imagine the maze of wires under the layout!
Thanks for the leads. Unfortunately that particular supplier doesn't ship to Canada but as I told Steve, the Canadian Amazon site has tons of listings for items available in Canada.
hon30critter Mel: Thanks for the leads. Unfortunately that particular supplier doesn't ship to Canada but as I told Steve, the Canadian Amazon site has tons of listings for items available in Canada. Dave
No problem Mel. Appreciate your help.
rrinker THat's why I suggested Arduino, boards can be had for not much more the PIC board, and no programmer needed, they have USB on them. Arduino was designed for non-engineers to work with. There are NMRA DCC, Loconet, and CMRI libraries already for Arduino. That's the key to a 'cheap' interface device for any bus, like LCC - someone, or you, needs to develop a library to access the protocol - not exactly an easy job but if someone does so and makes it freely available you can build on that. --Randy