Servo operated points and signals

What is your latest project?

Moderators: Big Jim, laalratty

User avatar
philipy
Driver
Driver
Posts: 1381
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants
Contact:

Servo operated points and signals

Post by philipy » Wed Jul 11, 2018 7:27 am

This is a follow on from my Picaxe Controlled Servo thread .https://gardenrails.org/forum/viewtopic ... 0&start=30

As I said earlier, back at the end of May I did finally get the turn-out servo's wiggling back and forth as I wanted and you've now seen the end result of that. However at that point my brain did it's usual trick of wandering onwards and sideways. The two turnouts in question are not only difficult to get at routinely, hence my search for reliable remote operation, they are also not easy to see, and I've always had it in mind that signals would be a good way of indicating which way they were set. So, with my newly acquired 'skill' (!!) at programming I set to to see if I could devise a Picaxe program to operate signals which would show the the state of the turnouts. Since I only had one Picaxe chip and project board this meant that the turnout servo installation and controls went onto the back burner for a while whilst I played with signal control. This of course explains the long gap before I could do Tom's requested video. :D

At this point I must acknowledge the assistance from ge_rik and gregh, both directly and via their blogs, webpage tutorials and posts on here, and Tom-tom also had a small part to play, of which more later. At the risk of sounding like an Oscar speech, I seriously couldn't have done it without them all.

The two turnouts, although physically separated by a few inches, effectively function as a 3-way and would need to be controlled by a 3-doll bracket signal. So not only did I need to work out the programming but I also needed to work out the mechanics of the signal and build the thing and then find a way of interfacing the two modules.

It took a while but eventually I got the program working. (If anyone is interested in the program, I'll post it up?)
At this point the signals, or rather the three servos, were operating as and when I wanted but they were simply going up and down with no bounces. I thought about trying to devise my own bounce routine and looked at Greg's programming to see how he did it. No way could I get my head around the maths involved in that, although I could see the outline of what he was doing and why. Then I thought, "Why re-invent the wheel?", so a quick PM to Greg and Rik gained me their consent to copy their bounce routines. It proved remarkably simple to add it into my own operating logic, basically only needing a few labels changing.

While all this was going on, I was also working on the signal itself as a little light relief. I've never built a bracket signal before so this was also new territory and I'll be honest and admit that I made much of it up as I went along, although obviously I had an overall idea of what I wanted to achieve. Also Rik's "How I made 19 signals" blog was invaluable: https://riksrailway.blogspot.com/2014/0 ... gnals.html

I decided that I would 3D print the gantry, top posts and fancy support brackets as one pair of items, a front and back, but this didn't work because the dimensions would only just fit on the printer's build plate and I had adhesion issues at the extremities. So I removed the support brackets and finials from the drawings and this gave me just enough leeway for it to work. Tbh, they were not my finest prints even so, but some filling and filing sorted them out.
The other thing I did was print a groove in the centre of the posts and gantry. I had noted in Rik's blog that he commented on not thinking soon enough about power supplies for the lamp LED's, so I designed in the internal cableways from the beginning and then laid in the wiring before gluing the two half's together.
DSC_0042 small.jpg
The brackets were then printed separately, again as front and back pairs.
DSC_0046 small.jpg
For the main post I had in stock some 10mm and 8mm square styrene tube which I acquired years ago from China in a job lot assorted bundle. I know the post should be tapered and also should be a bit thicker, but I wasn't going for a scale model and the overall effect looks Ok to my eye. Anyway, to give it all a bit more rigidity I slid a length of the 8mm inside the 10mm and dribbled solvent into the fine gap. I don't know how far capiliary action took it but it seems rigid enough and I was glad of the additional wall thickness later on when it came to fixing things to it. This main post was then glued to the underside of the gantry and the support brackets added each side.
DSC_0050 small.jpg
This post is going to get extremely long, so I'll end it here, with more to follow.
Last edited by philipy on Thu Jul 12, 2018 8:17 pm, edited 1 time in total.

User avatar
Lonsdaler
Fireman
Fireman
Posts: 421
Joined: Tue May 20, 2014 9:50 am
Location: North Yorkshire

Re: Servo operated points and signals

Post by Lonsdaler » Wed Jul 11, 2018 8:25 am

philipy wrote:
Wed Jul 11, 2018 7:27 am

This post is going to get extremely long, so I'll end it here, with more to follow.
Oh I don't know. Looks about 6 inches to me :mrgreen:
Sorry - I'll fetch me coat...

(Very nice work by the way :thumbup: )
Phil

I am not young enough to know everything anymore...

User avatar
IanC
Trainee Driver
Trainee Driver
Posts: 597
Joined: Mon Feb 15, 2016 9:15 am
Location: Nr. Warrington, Cheshire

Re: Servo operated points and signals

Post by IanC » Wed Jul 11, 2018 9:45 am

Excellent stuff. I like the signal build, but I doubt I'll be able to follow the electronics/programming part.

Looking forward to more.

Ian
Ian

User avatar
tom_tom_go
Chairman
Chairman
Posts: 3496
Joined: Wed Feb 23, 2011 3:08 am
Location: Kent, UK
Contact:

Re: Servo operated points and signals

Post by tom_tom_go » Wed Jul 11, 2018 12:35 pm

Phil, that's looking very slick (3D printed groove for wire, master class!).

Looking forward to the finished result.

User avatar
Peter Butler
Driver
Driver
Posts: 3042
Joined: Sun Sep 09, 2012 10:33 pm
Location: West Wales

Re: Servo operated points and signals

Post by Peter Butler » Wed Jul 11, 2018 1:18 pm

That does look a very attractive and functional job, inventive use of the 3D printing technique too.
The best things in life are free.... so why am I doing this?

User avatar
philipy
Driver
Driver
Posts: 1381
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants
Contact:

Re: Servo operated points and signals

Post by philipy » Thu Jul 12, 2018 7:06 am

Having got the basic signal to a point where it was worth carrying on with, I next had to work out how to arrange 3 servo's as close to the post as possible without any physical conflicts, given that the operating wires would need to be no more than about 2mm apart, going up the post. I considered all sorts of options of one on each side, etc, but eventually decided that all facing the same way and stacked above each other made the most sense.
Whilst working on the turnout servo's previously, I had designed and printed a servo mount :
DSC_0016 small.jpg
and now a bit of playing around with Sketchup gave me a nice neat stack of three, one above another and each offset sideways by about 2mm, plus a mounting socket for the signal post correctly positioned above to hold everything in line with minimal deflection. As an unplanned bonus it also subsequently allowed the whole thing to stand upright whilst working on the rest of the signal.
DSC_0014 small.jpg
Next came the bit that I had been slightly dreading, the cranks to transfer the up and down rod movements sideways along the bracket and then again vertically up each post.
I worked out that each crank arm needed to be about 6mm from pivot to pivot with arms about 2mm wide and at least 1mm thick for mechanical strength. I didn't fancy trying to cut and drill 4 of those from sheet and in the end I got a length of 1.5mm brass rod and bent it to the shape of the 4 cranks, plus a couple of spares. I then beat it flat with a hammer on a block of steel. It was simple then to drill a 0.8mm hole at the bend of each and a crude jig, consisting of pins hammered into a block of wood, to get the holes all the same distance apart. I used pieces of 0.8mm brass rod for the crank axles and these were soldered at right angles, again using a hole in a piece of wood to hold things square.
Unfortunately I forgot to take pictures of this process but this is a detail of the cranks in situ:
DSC_0030 cranks small.jpg
For bearings, I cut short pieces of 1mm ID brass tube, drilled holes in the signal and inserted them, fixing in place with a tiny smear of Gorilla glue. At this stage the cranks were just left loose in their bearings whilst I worked on everything else. More 0.8mm brass rod was used to form the linkage rods and the holes in the cranks eased to allow nice sliding fit. Working slowly, I found it wasn't as difficult as I had feared and somewhat to my surprise, jiggling the bottom of the main rod caused the top of the upper one to mirror it! The brass rod came in 250mm lengths which wasn't long enough for the vertical centre arm rod, so I had to join that one with a short piece if the 1mm tube. I made a dummy signal arm out of styrene for testing purposes, just using a pin for the axle, running in a bearing tube glued into the post. I had printed integral bearing housings on the sides of the posts and the holes just needed carefully opening to fit. You can see these on the pictures posted yesterday.

Now came the moment of truth - connecting the vertical rods to the servo's! I Confess that it wasn't easy to get them set up and I had to rebend the bottom of the first rod a couple of times. The servo arms are located on their shafts with small splines and of course they were always just not quite holding it where I wanted. The other problem I found on the long vertical rods was that the mechanical resistance in the system caused them to flex when being pushed and they clearly needed to be restrained.
In the 'bits box' I found a length of 1.5 x 1.5 T-section brass and I drilled 3 x 0.8mm holes in the leg of the T, at 2mm spacings. I then carefully opened these holes out to get a loose sliding fit for the 0.8mm rod. A 10mm long piece was cut off and 1.5mm sections filed flat at each end, and fixing holes were drilled in these flats. This triple hole guide was then slid onto the vertical rods and pushed up the post to the centre.
DSC_0025 guides small.jpg
Just holding it in place with a finger and operating the servo's, showed that it worked and did restrain the rods, but somehow it didn't look quite right, and I decided that it actually needed two of them, so I made another! Whilst on the post I drilled through the fixing holes and loosely inserted pins to hold them until I was ready for permanent fixing.
DSC_0030 2x guides small.jpg
The proper signal arms were next made of brass and nickel silver sheet ( I happened to have a small piece of the right thickness N/S) basically following Rik's method from his blog, but I used brass rod rather than copper wire for the spectacles. Getting ahead of the timeline for a minute now, for the spectacle 'glasses' I had originally intended to use coloured acetate sheet, again as per Rik. However I found a very ancient pot of 'KristalClear" in the cupboard which, with a small drop of water added, proved to still work, so I used that. For anyone who doesn't know it, KristalClear is a very refined PVA which as it's name suggests, dries completely transparent. All you do is dip a cocktail stick in the white liquid and wipe it round the inside of the frame to wet it, then drag the stick flat across the opening in contact with the edges, and it leaves a thin film behind, right across the frame.
DSC_0005 small.jpg
Leave it for an hour or two and it dries to a clear film. These can be coloured using permanent felt tip pens. ( I also did a partial experiment, and I think it might be possible to use ordinary PVA glue to achieve the same effect for signals, where it doesn't matter too much if the 'glass' is not completely transparent).
DSC_0029 coloured glass.jpg
Ok, at this point I removed all of the rods and cranks and sprayed them with rattle can grey primer, followed by matt black. I also gave everything else a couple of coats of white primer. Eventually spraying everything with a coat of satin varnish to even out the finishes. The signal arms were also given the standard red front with white stripe and white rear with black stripe.

Stay tuned for Episode 3......

User avatar
tom_tom_go
Chairman
Chairman
Posts: 3496
Joined: Wed Feb 23, 2011 3:08 am
Location: Kent, UK
Contact:

Re: Servo operated points and signals

Post by tom_tom_go » Thu Jul 12, 2018 7:43 am

You learn new stuff on here all the time, KristalClear!

This stuff will work great for some white metal lamps I think which I want to drill out for LED's.

User avatar
FWLR
Driver
Driver
Posts: 1473
Joined: Sat Aug 05, 2017 9:45 am
Location: Preston, Lancashire, UK

Re: Servo operated points and signals

Post by FWLR » Fri Jul 13, 2018 6:45 am

Wow Phil, that is some explanation of your building of the signals.

Looking forward to seeing episode 3. :thumbright: :thumbright:
Rod

Life is so easy when I run my trains. :thumbright:


https://gardenrails.org/forum/viewtopic ... 41&t=11364

User avatar
philipy
Driver
Driver
Posts: 1381
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants
Contact:

Re: Servo operated points and signals

Post by philipy » Fri Jul 13, 2018 7:35 am

The signal lamps were made almost identically to Rik's build method, with 3 exceptions: 1) I used some 'warm white' LED's running on a low voltage, rather than the flickering candle type. 2) I used rapid set clear epoxy to fill the inside of the lamp bodies rather than Bostik. 3) I used the legs of the LED's as brackets for the lamp shelf. Once the epoxy is set, it's a simple matter to bend the legs to the correct L-shape under the shelf and then put a small additional inward bend at the bottom to plug into 2 small holes drilled in the signal post, either side of the opening from which the wires exit. These power supply wires were then simply soldered to the adjacent legs/brackets.
DSC_0003 small.jpg
(Having seen this rather cruel closeup, I think the paintwork needs some attention!)

At about this point, Tom started the discussion about signal ladders over on his thread (https://gardenrails.org/forum/viewtopic ... rs#p137723 ) . It had been on my mind since the beginning that I was not overly keen on the appearance of Rik's copper wire versions ( sorry Rik!), but I couldn't think of a better way to do it. I did get some 3mm wide brass strip to use as ladder sides but it looked wrong even before I started. Then Tom showed his ladder using 00 bullhead rail and that looked much better and I felt could easily live with that, but then I remembered that I still have in stock some P4 bullhead rail which is even finer than the 00 equivalent and looks even better.
To construct the ladder, I gave a thorough clean to a length of rail twice as long as the ladder, and tinned one side. It was then folded in half with the tinning inside and the soldering iron applied in 2 or 3 places along its length to tack the two sides together. Using my Minicraft drill in it's vertical drill stand I put a 0.8mm hole through the rail webs near one end. I then moved it along by the rung spacing distance and drilled again. I knocked a pin through the first hole into the wood underneath and moved the rail along so that the second hole was on the pin, ensured that the drill was lined up in the web ready for the 3rd hole and put another pin through the first hole. I then drilled the 3rd hole, moved the rail along so that the next pair of holes were on the pins and drilled the 4th hole, etc.
DSC_0002 small.jpg
All the drilling took only a few minutes. I used the soldering iron to split the solder tacks and and then cut the folded end leaving 2 identical ladders sides. I decided to pre-cut the rungs from the 0.8mm brass rod, so I drilled a hole the correct depth into a piece of wood and simply poked it in and cut off flush, until I had enough. A simple jig was made of 2 pieces thick card drawing-pinned to a piece of wood at the correct distance apart, with removable card spacers to keep the sides from accidentally moving inwards during soldering.
DSC_0004 small.jpg
The whole lot was soldered together and then cleaned up. ( Psst... Tom, all done with an 18watt iron!). The tops of the ladder sides were bent over to sit into holes drilled horizontally into the edge of the signal platform, the bottoms were bent out sideways to create fixing anchors and horizontal stays were made to hold it to the post in the centre. These are soldered to the ladder and pinned and glued to the post. Including making the jigs it all took about a couple of hours, and I'm pleased with the result, which looks even better after a couple of coats of paint!
DSC_0011 small.jpg
The ladder was not fixed at this stage and removed for safe keeping whilst the rest of it was being worked on. Similarly the safety rail round the gantry which was fabricated from brass wire, and painted, but kept separate.
DSC_0008 small.jpg
I had it in mind that the balance weight arms were missing from my grand design. Early on I did consider making them work as Rik did, but with all of the cranks and direction changes I was concerned anyway that play in the joints and rod flexing would mechanically smooth out the bouncing, and putting another three joints in the system might be too much. In practice this doesn't seem to be as much of a problem as I feared but who knows what wear will do in future. So, if they couldn't be made to work as part of the mechanics, I thought about cosmetic versions. I made arms and brackets in very much the same way as Rik's version. However the operating rod holes I elongated into slots. I then soldered small L-shaped pieces of 0.5mm brass wire to the vertical rods and slipped the slots over them before fixing to the post. The balance arm now goes up and down in tandem with the signal arm but the slot allows the rod to still move vertically instead of being pushed sideways which a simple hole would do, as it would follow an arc.
DSC_0004 small.jpg
Up to this point, everything was still loose until I was sure no modifications were required, but I could no longer put off the evil day.
However it still bothered me that fixing the cranks by bending the axle ends would make life very difficult if any repairs are ever needed. Then just at the last minute I discovered that the 0.8mm rod will just about take a 14BA thread. Not a proper full thread but enough to run a nut on and a dab of black paint then just holds it enough to stop it coming undone. So, now everything was put together and tested before finally bending the signal arm axle rods to hold the backlight blind, very much as Rik's blog shows.

The next step was to build a box around the servo mount to hold a 4 x AA rechargeable battery pack, the Picaxe board, on/off switch, charging socket and a 3-pin DIN socket to provide a connection to the detector switches on the two turnouts. This box was constructed in 5mm Foamex board simply glued together apart from a screw-on access panel. The upstand on the signal post mounting socket at the top of the servo holder was deliberately 10mm high to allow for a 10mm Foamex top plate and everything else is screwed below that, again to allow for maintenance access.
DSC_0022 small.jpg

User avatar
Lonsdaler
Fireman
Fireman
Posts: 421
Joined: Tue May 20, 2014 9:50 am
Location: North Yorkshire

Re: Servo operated points and signals

Post by Lonsdaler » Fri Jul 13, 2018 8:42 am

Wow. That's a masterclass in so many skills. Thanks for sharing Philip. I have bookmarked this thread just for the modelling info, as I don't intend making working signals. However, I can't wait to see yours in position and working 8)
Phil

I am not young enough to know everything anymore...

User avatar
philipy
Driver
Driver
Posts: 1381
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants
Contact:

Re: Servo operated points and signals

Post by philipy » Fri Jul 13, 2018 10:13 am

OK, I think this is the last part of the epic!

The signal ladder and guard rails were finally fixed in place and that was just about it, job done.

DSC_0002 (1) smaller.jpg

The only thing left to do now was to install it on the layout. The signals location on the layout is about 12" above ground and the boards at that point are not wide enough to simply cut a hole. So, using some 20x20 aluminium angle screwed to the underside of the main boards as supports, I added two cantilevered triangular side extensions, topped with pieces of decking board covered in roofing felt to match the original track boards. The gap between the triangles being made exactly the right size for the signal to slide into. The inner edges of the opening were covered in masking tape, as was the outside of the signal mount, then loose ballast laid to cover everything and blend into the track and then SBR sprayed on. In the hot weather this past week it had dried to the rubbery state in about an hour and the signal was removed before it got permanently fixed in place by accident. The glue appeared to be solid in about 3 hours but was left overnight to be sure, before the tape was removed.
DSC_0003 (1) small.jpg
So, now back to the beginning.
With the signal program working I could reclaim the Picaxe project board and 18M2 chip which I had borrowed from the turnout operation, but that meant acquiring a 2nd one to run the signals. The signals don't actually need the 18pin chip, an 8pin unit provides the the 2 inputs and three outputs necessary, so I decided that rather than spend £20 on an official board I would construct my own on stripboard from the info provided on the Picaxe site.
DSC_0003 (2) small.jpg
Since I had a working program it seemed as though it would simply be a matter of changing the pin numbers to match the smaller chip. It didn't take long to physically make the board but it took almost a week of real frustration to get things actually working, due to what seems to be an error in the Picaxe manual circuit. When I did get it working, I was correct in my original assumption, the program did only need the pin numbers changing!

Anyway, with the Picaxe now available, it was a fairly simple matter to install the servo's in the signal box in place of the original Tortoises.
Turnout  servo's.jpg
The wiring was already in place, as was the point rodding, and I took the opportunity to do some maintenance on various bits and pieces. At this point, a couple of days ago, I was also finally able to post the video that Tom asked for back at the end of May! For anyone who missed it on the other thread, this is the link: https://youtu.be/NP97X1lkO94

My original intention was to pinch yet another idea from Greg and fix magnets to the ends of the tie bars to operate reed switches which would detect when the point blades moved and provide the electronic input to the signal Picaxe. However I had difficulty in finding a reed switch that was sensitive enough to go on and off with the relatively small 4mm or so movement involved. Then I found some pre-wired waterproof microswitches which are exactly what is needed and ( assuming they really are waterproof!) should be reliable. It simply needed an extension on each tiebar to reach the microswitch at the edge of the ballast and they work fine, triggering the signals exactly as I had always hoped.
Turnout microswitch.jpg
That finally seems to be the end of this little project, much to my wife's relief!

I haven't posted any of my programming because this has been a long enough write-up anyway and I know it is of limited interest to most members, but if anyone is interested I'll happily post it, just say.

This is the end result, complete and working....

https://gardenrails.org/forum

User avatar
ge_rik
Driver
Driver
Posts: 2182
Joined: Sun Oct 25, 2009 10:20 pm
Location: Cheshire
Contact:

Re: Servo operated points and signals

Post by ge_rik » Fri Jul 13, 2018 10:20 am

Absolute masterpiece, Philip! I really like the way you planned ahead and embedded the wiring inside the post. Very clever and neat. Really looks excellent in situ. Brilliant!!

Rik
------------------------
Peckforton Light Railway - Blog Facebook Youtube

User avatar
FWLR
Driver
Driver
Posts: 1473
Joined: Sat Aug 05, 2017 9:45 am
Location: Preston, Lancashire, UK

Re: Servo operated points and signals

Post by FWLR » Fri Jul 13, 2018 11:59 am

What a brilliant build of a set of three signals, that not only has a bounce, but lit as well. Excellent job Philip and well described in your thread… :thumbright: :thumbright:
Rod

Life is so easy when I run my trains. :thumbright:


https://gardenrails.org/forum/viewtopic ... 41&t=11364

User avatar
Peter Butler
Driver
Driver
Posts: 3042
Joined: Sun Sep 09, 2012 10:33 pm
Location: West Wales

Re: Servo operated points and signals

Post by Peter Butler » Fri Jul 13, 2018 1:37 pm

I'm almost speechless (but not quite!)... an outstanding achievement and so well planned and executed. Top marks for this project.
The best things in life are free.... so why am I doing this?

User avatar
IanC
Trainee Driver
Trainee Driver
Posts: 597
Joined: Mon Feb 15, 2016 9:15 am
Location: Nr. Warrington, Cheshire

Re: Servo operated points and signals

Post by IanC » Fri Jul 13, 2018 2:45 pm

I can only echo the praise others have already shared. My line will be "one engine in steam" so no need of signals, but the work demonstrated in this post is absolutely first class.

Ian
Ian

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests