Servo operated points and signals
Posted: 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.
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.
The brackets were then printed separately, again as front and back pairs.
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.
This post is going to get extremely long, so I'll end it here, with more to follow.
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.
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.
The brackets were then printed separately, again as front and back pairs.
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.
This post is going to get extremely long, so I'll end it here, with more to follow.