Computer controlled (timed cycle) layout lighting

Post all your model railway electronic problems, solutions and discoverys here.
User avatar
hockeyshooter
Posts: 6
Joined: Thu Feb 09, 2017 10:22 pm
Location: near Milton Keynes, UK
Contact:

Re: Computer controlled (timed cycle) layout lighting

Postby hockeyshooter » Sat Feb 11, 2017 6:59 pm

I don't think I'm going to need anything more than on/off for a number of channels - some to introduce randomness to domestic lighting - so I could probably just use a multichannel relay board (around £8 via eBay) and an Arduino.

User avatar
TimberSurf
Posts: 2022
Joined: Wed Jan 08, 2014 5:47 pm
Location: N.Wales
Contact:

Re: Computer controlled (timed cycle) layout lighting

Postby TimberSurf » Sat Feb 11, 2017 7:52 pm

As said in previous posts, I don't need to, have to learn Arduino, I have it fully working in Excel (a program I am an expert in). I did buy an Arduino, but it has not made it out of the packaging, more interest in other avenues at the moment.
But if you get something running, please start a thread, we would all be interested.
Image
Lumsdonia <--- Hit link to go to my website for full story and wiring advice!

User avatar
Teedoubleudee
Posts: 44
Joined: Mon Sep 19, 2016 9:13 am

Re: Computer controlled (timed cycle) layout lighting

Postby Teedoubleudee » Mon Feb 13, 2017 9:10 am

About 18 months ago I built a row of Metcalfe terraced houses (the ones with just the front halves to go at the back of the layout). I went to great lengths to fit out some rooms with lights and others not in a random fashion. They all come on together with the dark, via an LDR circuit. Only a few months later I was introduced by another forum member to the delights of micro-controllers (Picaxe). Had I been building that same terraced row now I would have incorporated a randomized lighting effect using one of these devices. Hope that gives encouragement for someone else to do the same - it will look awesome!

User avatar
End2end
Posts: 3562
Joined: Sun Jan 12, 2014 9:58 pm
Location: At the end....... and sometimes at the other end

Re: Computer controlled (timed cycle) layout lighting

Postby End2end » Mon Feb 13, 2017 12:58 pm

Would it possible for a link or some deeper info please Teedoubleudee? My inquisitive mind needs feeding. :D
Thanks
End2end
"St Blazey's" - The progress and predicaments.
Welcome‎
Planning
Building
St. Blazey's Works & Depot thread

User avatar
Teedoubleudee
Posts: 44
Joined: Mon Sep 19, 2016 9:13 am

Re: Computer controlled (timed cycle) layout lighting

Postby Teedoubleudee » Mon Feb 13, 2017 1:30 pm

Hi E2E, I don't have anything concrete to show you as this is still in my head but I expect there are links available. Check out the Picaxe forum or just google for it. What I am suggesting is a very basic set up where different LEDs or sets of LEDs are connected to the outputs of a microprocessor. A basic Picaxe has up to 4 outputs but much bigger ones are also available. Microprocessor outputs can drive a LED directly with just the LED and current limit resistor connected. No CPU inputs are necessary though I would probably use the Light Dependent Resistor (LDR) circuit to shut down any lights during "daytime" by using one of the input connections. The program would just run autonomously by cycling round with either fixed delays for on/off periods or using the randomize instruction (something I've yet to get to grips with) for a more...........well random effect!

Arduino and Pi owners can do the same kind of thing but with a slightly different instruction set. If you have no computer programming knowledge I can't help further here, but if you want to learn more then arm yourself with a starter kit and manual and have a play. I understand Richard fixed up some working crossing gates for you driven by Picaxe so you can see the possibilities are endless.

User avatar
End2end
Posts: 3562
Joined: Sun Jan 12, 2014 9:58 pm
Location: At the end....... and sometimes at the other end

Re: Computer controlled (timed cycle) layout lighting

Postby End2end » Mon Feb 13, 2017 1:56 pm

Sorry my mistake. I thought you had a working example but I do understand what you mean about the picaxe. A very interesting bit of electronics! :)
Thanks
End2end
"St Blazey's" - The progress and predicaments.
Welcome‎
Planning
Building
St. Blazey's Works & Depot thread

User avatar
TimberSurf
Posts: 2022
Joined: Wed Jan 08, 2014 5:47 pm
Location: N.Wales
Contact:

Re: Computer controlled (timed cycle) layout lighting

Postby TimberSurf » Thu Oct 26, 2017 11:39 pm

The panel has been built for a while now, but waiting for the layout to catch up and buildings to be fitted with lights.
This week it has all come together. A wooden box was made to hold the panel and fixed to the layout. Lighted buildings have been installed and the short task of making the ribbon harnesses progressed quickly, having made the splitter boards last week. Then simply join all the ready made parts together to get the system tested and running. So now have 10 circuits live out of possible 16, with the other two harnesses to be made for later boards. Detail write up and pictures of the wiring system and harnesses to come.
Auto Light switch box iso.jpg


Station lighting east.jpg


Engine shed dark.jpg
Image
Lumsdonia <--- Hit link to go to my website for full story and wiring advice!

m.levin
Posts: 1981
Joined: Mon Jan 09, 2006 6:46 pm

Re: Computer controlled (timed cycle) layout lighting

Postby m.levin » Mon Oct 30, 2017 2:35 am

You could make a very basic comparator circuit using an OpAmp and replace one of the resistors with a LDR then connect the output to a relay, you may have to use the NC contact on the replay.

http://www.circuitstoday.com/voltage-comparator

User avatar
TimberSurf
Posts: 2022
Joined: Wed Jan 08, 2014 5:47 pm
Location: N.Wales
Contact:

Re: Computer controlled (timed cycle) layout lighting

Postby TimberSurf » Mon Oct 30, 2017 11:54 pm

Hi M.Levin, I might ask you read the whole thread, this is not about discrete circuits, they have very limited use i.e. just follow the daylight or dimmed lights, using the above allows many other fancy functions and complete control of individual lights, down to variable max intensity, when on/off, variable program sets, flickering/other random states to mention a few. The point being I have total control of every light and freedom to program anything I want and can even change that on the fly.
Image
Lumsdonia <--- Hit link to go to my website for full story and wiring advice!


Return to “Electronics”

Who is online

Users browsing this forum: No registered users and 1 guest