Model Railway Forum banner
301 - 320 of 387 Posts

·
Administrator
Joined
·
9,852 Posts
Discussion Starter · #301 ·
Thanks for the thoughts Tony !

David
 

·
Administrator
Joined
·
9,852 Posts
Discussion Starter · #302 ·
It may be almost six months since my last post in this topic but I promise you I have not been idle. It's just that this project has been rather involved requiring some new tricks to be learned.

This photo illustrates the problem:



The far end of the layout is very dark, much too dark for my video loco to be able to see or for me to take photos. So the challenge was to provide lighting and for that lighting to be controllable over a WiFi network link.

My first attempt was to use an RGB WiFi LED controller. My intention was to use it with the warm white / cool white LED strip I already had but it didn't work out.

Lesson number 1: You cannot control a common anode LED strip with a common cathode controller.
Lesson number 2: It is much easier to make a common cathode controller than a common anode controller.
Lesson number 3: RGB LED strips give out a very blue light and are not very bright compared to warm white / cool white strips.

At about this time Ruud started posting about his use of Arduinos. This got me thinking. I did some research online and found that controlling a single LED strip with a MOSFET was pretty straight forward. If you choose a "logic level" MOSFET, all you need is a TTL "1" signal. If you make that a Pulse Width Modulated signal, then you can control the brightness as well.

I wanted the controller to be accessible over the network, so that meant I needed networking on the controller. To try to keep the learning curve from being too steep I chose the current Raspberry Pi 2 as it has all the networking stacks etc. built in.

Whilst the Raspberry Pi is good at networking, it is not so good at real time control without major work on the host OS, so doing some more research, I soon found the Adafruit 16 channel PWM controller. This sits on the I2C bus and will happily pump out accurate and consistent PWM signals without any intervention from the processor. Adafruit provide a Python library for it, so setting up a PWM signal is little more than one line of code per channel.

The longest part of the job was drawing up the connections required for the strip board which would host the Adafruit module and 16 MOSFETs.

The LED strips are 3528 with 60 LEDs per meter. I have used warm white and cool white strips in parallel so that I can adjust the colour temperature. They are connected as common cathode
. The LEDs run from 12v DC.

To reduce the number of power supplies, the Pi is powered from a 12v to 5v converter.

The final assembly looks like this:



And now a photo with the lights full on looks like this:



So now I can take hand held auto focussed photos down that end of the layout:



I have set the Pi up to set all channels to max brightness. I have a very basic Python program on my laptop which can adjust the levels.

If anyone is interested in fuller build details, I could do a separate workbench topic.

David
 

·
garage hobbit!!!
Joined
·
1,715 Posts
My swede is totally mashed ready that DWB, no idea what anybof it means, but I do like the effect

Am I they only one who went looking for custard after reading it? Although I do prefer Apple Pi....

I'll fetch my coat....
 

·
Registered
Joined
·
1,147 Posts
No idea what you are talking about David,
but I take my hat off to you and to any one else who does. I shall have to continue to languish in my backwater of ignorance.I hope you continue to enjoy your Raspberry Pi. If it were me it would be all 'pie in the sky'.
Regards and admiration.
 

·
Administrator
Joined
·
9,852 Posts
Discussion Starter · #307 ·
For me the Raspberry Pi adds a new dimension to model railways and allows me to fulfil dreams I had as a teenager, a long time ago.

Don't worry if it's not for you - there are so many different aspects of railway modelling there's something for everyone. I have confess that getting the I2C bus enabled on the Pi was harder than work
.

David
 

·
Administrator
Joined
·
9,852 Posts
Discussion Starter · #308 ·
The Bachmann Derby Lightweight is a fine model but the one thing I don't like about it is the "permanently on" interior lighting. When I came across ESU's new DCC controller lighting strips last year, I thought that maybe they would provide a solution so I bought a 50708 warm white strip as an experiment. You can learn more about these strips here on the ESU website.

In a nutshell what you get is an 11 LED strip in which the LEDs can be controlled in five separate sections. The strip also comes with a pair of red LEDs for use as tail lamps although this is probably most suited to modern continental coaching stock. There is a wide range of programmability built in to the strips but I just stuck with the default programming for this project.

Using the ESU lighting strip meant replacing the existing lighting in the roof of the vehicle. This is fed by a pair of phosphor bronze strips riveted to the PCB in the floor. These were removed. I worked out the lighting circuit on the floor PCB and rewired it so that the LEDs at the front - two white and one red - were wired directly from the decoder socket.

The ESU strip also comes with pads for wiring up an LED which is powered when the trailer is going forwards. I created my own 6 pin plug using Manufacturer: HARWIN Part No M52-040023V2045 which I got from Farnell - their order code is 1099562. It's not easy to find connectors with the pitch used by 6 pin DCC sockets which is why I have posted this information.

The wiring on the plug is 2 pins for Forward signal/return, 2 pins for track power, 2 pins for Reverse signal/return. The result of the change in wiring is that the front LEDs are far less bright than before. In the case of the white LEDs, this is a good thing. I'm not so sure about the red LED but perhaps barely being able to see them unless the light is very low is just how it was on the prototype.

I took this video under the full output of an RGB strip which tends to being quite blue, but you can see the lights coming on and off. My perception is that the LEDs on the ESU strip are less inclined to flicker than the original lighting. If flicker does become a problem, ESU have provided pads for a small capacitor and one of their power packs, although the latter probably costs more than the strip.

http://www.youtube-nocookie.com/embed/3bc8Ea9t1dg?rel=0

I am pleased with the result. As you have to install a six pin decoder in the trailer car in order to control the front LEDs, having the ESU strip instead does not cost much more. I do have a another strip which is intended for the driving car, but it will have to be installed in parallel with the existing 8 pin control decoder.

David
 

·
Administrator
Joined
·
9,852 Posts
Discussion Starter · #310 ·
I wasn't satisfied with the rather clunky control method I had created for my lighting strip controller so over the past couple of weeks I have created a new one. Essentially I have given the controller a web page which allows you to control over each strip individually using a slider control. This means that I don't have to write separate programs for my PC (Windows) and mobile phone (Android).

This is what it looks like on my laptop:



And the same page on my phone:


The settings are stored on the controller (Raspberry Pi) so when the controller is switched back on, it returns to the last settings used. When a web browser connects, it receives the current settings which it can then change.

David
 

·
Administrator
Joined
·
9,852 Posts
Discussion Starter · #312 ·
This small piece of track is much more significant than it looks!



It completes the outer circuit of track so for the first time since February 2011 as far as I can tell from the photos in my UK Modelling Album.

You can see from the photo that the backscene is in place and is now complete for the whole layout. Despite appearances, this track is "temporary" to allow me to run / play with my collection of trains, note I avoid saying model railway at this point
, while I get on with building the track for the inner two circuits.

I will be posting some videos in the fullness of time but right now I am just enjoying giving trains collected over the last five years a bit of a run.

David
 

·
Administrator
Joined
·
9,852 Posts
Discussion Starter · #313 ·
This is the reason why the loop was closed:



It takes a long time to stop from full speed so a lot of space is required.

I opted to buy two extra coaches to give a train of similar length to the Blue Pullman.

David
 

·
Premium Member
Joined
·
617 Posts
Hi David I'm with the others baffled buy this techno stuff but I get that lighting can have a huge effect on your model. The one thing that everyone gets is running trains completing the loop and just running different trains around is the basic thing
all the rest just adds to it! That is a long run you have that's the big plus for loft layouts
Jim
 

·
Administrator
Joined
·
9,852 Posts
Discussion Starter · #317 ·
So now that I have branched out into collecting trains, it was only a matter of time before the makings of an HST joined the collection. This is a Hornby Eastern Region set from DC Video pre-fitted with a sound decoder from Legomann Biffo. I carried it round the NEC for most of the day!



David
 

·
Premium Member
Joined
·
1,475 Posts
QUOTE (dwb @ 13 Jul 2017, 20:31) <{POST_SNAPBACK}>Oh yes. It's all very well wishing you had more space but then the modelling takes on an epic scale and things are done in industrial quantities. For example there are 3 Gaugemaster backscenes and that covers about half the layout.

Progress may be slow but looking back at the photos from five or six years ago I can at least see that something has been done.

David

Reading the above in another thread got me to thinking about your layout posts David so I searched back to .................. Somewhere in West Yorkshire.

It would be good to have an update (preferably with video's) explaining what's been happening.

Best regards ................... Greyvoices (alias John)
 

·
Administrator
Joined
·
9,852 Posts
Discussion Starter · #319 ·
Request noted...

David
 

·
Administrator
Joined
·
9,852 Posts
Discussion Starter · #320 ·
As promised, here is an update.

On reviewing the photos which I have uploaded over the last couple of years, I don't see any which give much of a clue to how the layout is set out so these photos may help.

A long, long time ago (March 2011) I posted a photo of the curve at the east end of the layout:



The upper level track was laid early last year and the whole lot painted in spring this year. The base is Halfords grey primer. The rail is airbrushed with Phoenix track colour. The track colour overspray is then covered up with Phoenix weathered sleeper.



The mainline through Engine Shed junction has been completely ballasted.


The eastern approach has also been ballasted and there is some Wills point rodding visible on the right.
The ballast and sleepers still need to be weathered with the gunk that falls off working steam locos.


At the western end of Engine Shed junction the upper level track has been painted ready for ballasting.


The lower level double junction has been designed using Templot and is the next major project to be undertaken. I dawdled over making that signal in the foreground over the winter of 2016. They can be somewhat tedious but I am pleased with the result.


Meanwhile I've been collecting trains and they have to be stored somewhere. As the lower level storage yard is mostly full there's nowhere else to put them except in the temporary link section of the north side of the layout. There are actually only three trains on the inner loop so I can run them together if I concentrate. To be honest I am going to have to automate the mainlines.


So there has been some progress but as I have said elsewhere, when you have a large layout - this one is approx 8ft x 29ft - everything starts taking on an industrial scale.

David
 
301 - 320 of 387 Posts
Top