Visitors

Flag Counter

Saturday, February 27, 2021

Movements in the month of Feb

The following photos shows all the movements that took place from 07th Feb to 27 Feb.  Unfortunately I didn't record the movements that occurred during the period of 01 Feb to 07 Feb.  From the ones that were recorded, there was a total of 46 movements.  This show how much I am enjoying the layout - obviously there are times when I am not motivated, doing other things on the layout,  or too busy doing other things that are not model railway related.
1 / 46
2021:02:06 13:09:25
2 / 46
2021:02:06 13:19:17
3 / 46
2021:02:06 13:40:20
4 / 46
2021:02:06 14:19:46
5 / 46
2021:02:06 14:45:21
6 / 46
2021:02:07 07:52:15
7 / 46
2021:02:07 07:54:23
8 / 46
2021:02:07 08:11:27
9 / 46
2021:02:07 10:44:43
10 / 46
2021:02:07 10:58:52
11 / 47
2021:02:07 11:19:39
12 / 46
2021:02:07 11:38:07
13 / 46
2021:02:07 11:46:48
14 / 46
2021:02:07 13:44:10
15 / 46
2021:02:07 14:18:41
16 / 46
2021:02:07 15:23:54
17 / 46
2021:02:07 15:34:17
18 / 46
2021:02:07 15:39:12
19 / 46
2021:02:13 16:22:34
20 / 46
2021:02:13 16:33:37
21 / 46
2021:02:13 16:45:05
22 / 46
2021:02:13 16:54:05
23 / 46
2021:02:14 14:29:48
24 / 46
2021:02:14 14:31:05
25 / 46
2021:02:14 15:21:57
26 / 46
2021:02:14 16:43:59
27 / 46
2021:02:16 16:30:04
28 / 46
2021:02:16 16:51:17
29 / 46
2021:02:16 17:06:21
30 / 46
2021:02:20 07:38:50
31 / 46
2021:02:20 07:53:37
32 / 46
2021:02:20 08:05:02
33 / 46
2021:02:20 10:13:13
34/ 46
2021:02:20 10:24:38
35 / 46
2021:02:20 10:41:09
36/ 46
2021:02:20 10:49:12
37/ 46
2021:02:20 16:29:17
38/ 46
2021:02:21 08:20:18
39/ 46
2021:02:21 08:32:46
40 / 46
2021:02:21 09:07:51
41 / 46
2021:02:21 10:29:29
42 / 46
2021:02:21 10:43:45
43 / 46
2021:02:21 10:52:56
44 / 46
2021:02:27 08:29:42
45 / 46
2021:02:27 08:39:36
46 / 46
2021:02:27 09:28:39

I have added a timestamp to show when the movement arrived at the railway station.  

Sunday, October 4, 2020

LM324 Op Amp Wonders

As I have explained in my previous posts on how I operate my layout which is basically from the viewpoint of a locomotive driver calling on shift to do a job from one main town to another main town, both having a crew change stop.

Given the small layout I have, I use the same station area as multiple places that we pass through until arriving at the next main town where this driver gets out and clocks off.

This entails a few laps of the layout.  I have settled on two inner laps and then one outer lap where the station is located.

 I am always looking at ways to enjoy this small layout.  One issue I have with this operation is the changing of points every-time I leave the outer loop/station area to traverse the two inner loops (which represents some distance between stations).  Instead of enjoying the layout from different viewpoints, I am called back to the location of the layout where I can change the points, one is operated by a Modertec Lever and the other by a Tortoise Switch machine.

I know I could use a decoder to control both if I replaced the Modertec lever with a tortoise, but that would entail more cumbersome button presses on the throttle.  Wouldn't it be good if I could automate this whole concept, namely, for every two passes of the inner loop, the points would change to the direction of the outer loop and every time a train was in the outer loop, the points would change and a path would be made to take the inner loop.

I researched whether this was possible and to my amazement I came across the following schematic that uses the LM324 OP-AM  connected to an Arduino Micro-controller!




However I had some major thinking to do in the realm of how to code this.  Lucky for me, I had some spare Current Transformers as detection circuits which I had built previously for my signalling project so I could use these as well.

Logic used to construct the code and the different scenarios I had to take into account:

Tortoise T1 Point near stagingTortoise T2 Point near station
1: Travelling in the UP Direction
SW2 HIGH and SW 4 HIGH
T1T2
ex staging
Goes Over detect A0HIGHHIGH
Goes Over detect A1HIGHLOW
Goes Over detect A1 againLOWLOW
Goes Over detect A0HIGHHIGH
2: Travelling in the DN Direction
SW1 HIGH and SW3 HIGH
T1T2
ex staging
Goes Over detect A0LOWLOW
Goes Over detect A1HIGHLOW
Goes Over detect A1 againHIGHHIGH
Goes Over detect A0LOWLOW
3 - Travelling in the UP Direction
SW2 HIGH and SW3 HIGH
T1T2
ex STATION
Initially Set: using flags in codeHIGHHIGH
Goes Over detect A1HIGHLOW
Goes Over detect A1 againLOWLOW
Goes Over detect A0HIGHHIGH
SW4/2:Traveling in the DN Direction
Can be used as 2!
SW1 HIGH and SW3 HIGH
T1T2
ex STATION
Goes Over detect A0LOWLOW
Goes Over detect A1HIGHLOW
Goes Over detect A1 againHIGHHIGH
Goes Over detect A0LOWLOW
MANUAL: When our train takes loop for Cross/Meets
SW1 HIGH and SW4 HIGH
T1T2
When this SW5 SW4 set to HIGHLOWHIGH


After some thinking and coding, I got to the testing phase and then came the deployment phase.  This took about one whole day to get all the toggle switches and wiring set up as well as the wiring from the Arduino UNO and the LM324.

Power was supplied and to my relief I heard one of the Point motors make that crawling sound.  Good, now I need to run a train and see if the points set correctly, so I took a Down Goods and as it went over the sensor block of the outer loop, both points changed and made a path for the inner loop! Good!! Now, two passes of the inner loop and again, automatically, both points changed to make a path for the Outer Loop!  WOW!  Total automation of the points!!!  I was ecstatic!  Now I can walk round the layout whilst we make the journey from one major town, passing some intermediate towns and then arriving at out crew change location.

LM324 soldered to a veroboard (2 pins from the UNO which is not shown are connected to the LM324):




The only times I need to change points, is when leaving the yard and when re-entering at the end of the journey at the "other" location.

So I now have the signalling of the DOWN section near the station automated, points for the correct path automated, the two automatic signals displaying the yellow aspect and automated.  The only section left is the UP side near the station to automate.

The following video demonstrates the LM384 automatically changing the points when the sensor is detected






The opportunity cost of spending all this time spent on the electronics side is that I have not spend any time on scenery.  But the winds are full in my sails so I am not going to change course at this point.



Monday, September 7, 2020

More Arduino microcontroller fun

The automatic signals as discussed in the previous post are now controlled by an arduino and display all three aspects. The red aspect is shown whenever a train passes the signal.  It will then show yellow for a set period of time, then turn to green.  This has been done for both the UP and DOWN signals



The main station and yard is governed by an UP Home Departure signals and an Arrival Home Signal with a LOW speed indicator as per the prototype.   The LOW speed signal is used to bring in trains into the yard with a reduced speed as there could be obstructions/wagons on the same track.

I was able to use the one detection circuit for both the Approach Home Head and the LOW Speed Head - so that made the LOW Speed detector circuit surplus.  Another bonus of using the Arduino.

I spent the last two days re-wiring everything on that section of the layout and also took the opportunity to label the wires!

Now, I have these sets of signals on "Automatic" mode using a toggle switch (DPDT), or I can override the signals to manual, in case there is a cross or meet at the loop.  Obviously, the LOW Speed signal is not set for automatic operation as this aspect is shown to bring a train into the yard.

The good thing is I can use the same code for the other side of the layout - in the UP direction, as the signalling setup is the same, with a DOWN Approach HOME signal and a UP Departure Signal.

I will have to leave this side of the layout for another time.


Arduino UNO wired up

This mess is the testing circuit

Down Home Departure Signal now wired up to the UNO

UP Arrival Home - Top Head now having the ability to show the YELLOW Aspect!  Low Speed currently in the OFF position

Low Speed indicator currently ON - TOP Head showing Yellow aspect - this was for testing, however in real life and when not testing, the TOP HEAD will show RED when the LOW Speed indicator is ON.


Sunday, August 2, 2020

Automatic SearchLight Signals - from Transistors to MicroController

The next project I have spent time on is with the Automatic Searchlight signals I built from scratch.  These signals are deployed on the main Western line which I am modelling and I really like how they look.  They are of a US design I believe.



 I was euphoric when I got the signals to automatically change from Red aspect to Green as the train approached, however now I can get them to also display the Yellow aspect with some programming of an Arduino. They will now look even more realistic seeing them display a yellow then turn to green after a short time.  

 Not only can they act as true automatic signals, I have them programmed to also be over-ridden and to go into manual mode - so if the train has to cross in a loop, I can display a constant Yellow aspect which then acts as a distant signal giving the driver plenty of notice of the Low Speed or Danger indication for the next signal - to slow down to enter the loop - just like in real life!

Furthermore, in real life, after a train has exited the block, these searchlight signals change from showing a Red aspect to a Yellow aspect, and then stay on this aspect until overridden by the central controller.  

I can also model this feature which is something extra that again adds so much to the enoyment. I remember as a young boy riding my bike to a railway crossing where these signals were present and to see them turn to green, drop to Red when the train went past, then when the train cleared the block, they would go to Yellow aspect and stay there.  There were a pair of them just like on the layout.  
Arriving at the railway crossing and  seeing which one is yellow at the signal would tell me in which direction the last train came through. So, if the last train was an UP movement, and cleared the block, the signal would turn to yellow and stay there.   

 If the next movement is a DOWN one, I simply switch it over, and the Up signal turns Red from Yellow, and the Down Signal turns Green from Red.The Signal will turn to Red when the train goes past the signal, then to Yellow aspect, then to Green Aspect, but if I am going to the outer loop i.e. going past a town and main yard and if there is a meet or cross, I display a Yellow aspect.The programming got tricky as I had to cater for bi-directional movements. 




By using an Arduino, I save on two Detection Circuits I had made earlier which were used to change the aspect from Red to Green, and also the Signal Circuits that were made using a 556 timer that now become redundant.

On startup of the Arduino, one of the Automatic signals will show a Yellow aspect, and the other will show a Red aspect (opposing signal) - which one shows a Yellow aspect and which one show a Red aspect is purely random (however I have skewed it to show the DOWN signal a Yellow aspect more often as this signal is near my seat and looks really good from the control desk)

Rough Sketch:

I can expand on this and since there are three more Analog pins available which can be used for detection, I can do the same for the Approach Home Signals, although the Home signals do have a small LOW Speed signal as well....a project for another time.



Tuesday, July 28, 2020

Got Ya!

As I told you in my previous post, I had built this Call Out System which announces what station is coming up next as we circuit the layout.  All was good and well until I ran a freight train with a CP Guards van.
 
Now, there shouldn't be anything unusal with this right? It's just another guards van which was used on express freight trains back in the day.  Well the ones I have do have lovely red marker lights at the rear so there is a built in circuit inside and when this van hits the detector, it would announce the following station past the one we are approaching!

How to resolve this issue?

I thought for sometime.  The options I had were
1.  Remove the circuit inside the vans - which I was reluctant to do as they do look very nice running during the dark.
2.  Increase the delay function from 20 secs to say 40 secs in the Arduino Code

Well I did just that - option 2- but the arduino would then get "lost" for some reason and would not detect the next time round!
So I was back to square 1.
Then it hit me, instead of using the built in delay function, why not call another function called killtime() and in it program a While Loop and delay another x seconds.
I gave this a try and lo and behold this worked!  I was pretty pleased with myself for working this one out.  So I call killtime(x) where x is the number of seconds I want to delay.
It works like a bought one!

Sunday, July 19, 2020

Call Out System


I had a few wins this weekend.
I have been working on a CALL OUT system using an arduino.  Bascially, instead of counting the laps why not have a sensor connected to an Arduino and then call out what station is coming up next.
So, I ordered one of those DFPlayer modules and after cutting up some code and getting my Current Sensor Transformer working with the arduino, I was at a point where I could solder up the DFPlayer to a piece of protoboard.
The first issue was that the DFPlayer didnt have a peaceful time in transit as can be seen in the photo.  After straighting out the legs I was able to revive it.



With the sensor working, the code basically counts everytime there is a detection and increments a internal counter then calls the DFplayer to play the mp3 files stored on there.  I had recoded some audio files using the iphone  - just place names, like Murtoa, Horsham.  

The possibliites of this on a layout are endless e.g. one could use this to model the sounds of birds and wildlife, or a Gregorian chant coming from a Catholic church, or an argument between parents coming from a house, or the noise of music and dancing coming out from a pub, or the playful laughs of children from a school etc...

I run a train trying to mimic some distance travelled on the main western line in Victoria - namely between Ararat and Dimboola which used to be important railway places where crew change used to happen



So the setup looks like this:


I was able to get the system working however there were a few issues when I took it out to the "real" world - the shed where the trains run.
First, I was not able to get the 5v signal on the output of the Block Occupancy Detector (BOD) (drop to 0v when there is a detection).  After trouble-shooting the issue I found that the wire connected to the A0 input on the Arduino was not sitting in properly - so will need to solder this connection sometime in the near future.  The second issue I had was that there was no audio coming out of the speaker - the issue here was due to bad solder joints.

So, now I have this BOD deployed in the shed, I needed another one for testing inside near my computer didnt I?  So I had to build another one - after spending about 2 hours this morning, I was able to get one constructed - luckly I had a spare Current Transformer laying round.  That's the second win for the weekend.

The other success I had was with the inoperable 12v DC PSU that died back in Oct last year.  I put it away so I could have a closer look at it at a later time.  Well I did buy a replacement one but at $30 I thought I'd see if I can fix this and use it as a spare.  I think it has 5amp capacity.  I think you can see what the problem was if you examine the photo carefully.


So fixing that was pretty straight forward - I didnt even have to replace the fuse.

Now, I am thinking on how to improve the Call Our System....and I have a few other Arduino projects in my mind....





 

Tuesday, July 14, 2020

Adding passengers and drivers to Railmotor

Having a few HO scale people round, I thought it would be a good idea to add some passengers to the Walker RM that I have.  It just didnt look very realistic with no passengers and it looked worse with
no driver.  It didnt take too long to add the passengers as they fitted in the seats without too much problem.  
However there was some work needed to add the drivers (on both ends).  I had to cut them off at the 
knees or higher and also paint them.  I went with the navy dark blue for the uniform to represent the "overalls" outfit.  After placing the shell back on, I could tell that this made a huge difference.  It went from a scence that didn't look too realistic to one that looks much more interesting.  Now it is pleasing the see the RailMotor travelling round the layout with passengers going on their journeys.


 



Followers

Blog Archive