Part two of my funicular building series...
Funiculars need something to roll along on, i.e. some track. I didn't want to use regular N scale track though as this would look a bit over-sized for my tiny funicular. Instead I quickly (read: crudely) soldered up some code 40 track to 6mm gauge. To help with traction, I added a sheet of metal under the sleepers, the thinking being that if I magnetised the funicular, it would stay stuck to the track.
With the aid of some hot glue I attached the track to the scene and built up the surrounding landscape with some plaster. Some ballast was added, and then the whole thing toned down with some dirt-coloured watery plaster. This does a nice job of making the track look a bit worn out.
What I really wanted was a moving funicular. I decided fairly early on that a DC gear motor underneath the baseboard would be the way to go, driving a continuous loop of "cable" attached to the funicular.
Step 1 was to get the cable through the scenery and down to the baseboard. Some stiff plastic tubing from an old air brush came in handy for this. The hollow tubes that fibre optic cables are blown down would also work... when our street was being "illuminated" I rushed out and claimed a short length as a souvenir.
Naturally some more hot glue came in handy fixing the tubes in place.
I made some small "pulleys" out of smooth brass rob, bent into a gentle V shape, to guide the rope out of the tubes and down the centre of the track.
A lump of wood, some styrene, and a few bits of metal were quickly turned into a mounting bracket for the motor:
What I needed though was a way to tension the rope. Some left over nylon pulleys from dismantled printers came in handy here, along with some more styrene:
The nylon pulley is free to slide up and down the styrene channels, and is tensioned by the spring. So far so good.
Time to install. Here it is under the module screwed into place, with some thin thread running through the springing mechanism.
Attaching the funicular
Track: done. Motor: done. Time to attach the funicular.
I put some magnets into a little styrene bracket under the funicular; this was just under 6mm wide, so slotted into the gap in the rails.
The thread was passed through the holes and pulled as tight as possible, then the magnets glued into place to hold everything. This ensures the cable is kept nice and tight, which in turn ensures maximum grip of the cable on the motor shaft.
I needed some way to make sure the funicular didn't go past the end of the track. The solution here turned out to be some hall effect sensors, which are neat wee three pin devices that sense magnetic fields. Since my car already has magnets underneath this worked out very nicely. What I didn't realise is that the sensors are sensitive to the direction of field, not just field strength. So I had to ensure all my magnets had their poles facing the correct way. Now that I've sorted that wee bug out, the hall effect sensors are working very well, accurately stopping the funicular in the same position each time.
The sensors are hidden under the track and epoxied into place. In time I'll cover these with some ballast and they'll become invisible.
A special Utrainia-brand Arduino board is used to drive the DC gear motor, running a very simple state machine with 4 states:
- At the top, waiting to go down. Turn off the motor and wait for the pushbutton to be pressed.
- Moving down. Turn on the motor and wait for the bottom sensor to go active, or for the button to be pressed again (emergency stop).
- At the bottom waiting to go up. Turn off the motor, wait for pushbutton.
- Moving up. Turn on the motor, wait for top sensor/push button.
Between these four states all possible scenarios are covered. At power up, the sensors are read to work out where the funicular currently is:
- Top sensor active? Then it's state 1
- Bottom sensor active? Then it's state 3
- Any other scenario? Assume it's in state 3 as well
A few little bugs presented themselves while testing:
- Cable slipping: turns out that the smooth metal shaft of the motor wasn't especially good for gripping the fine cotton thread. I fixed this by sliding a length of Lego pneumatic tube over the shaft. Much grippier!
- Cable snagging: my cheap cotton thread got a bit wooly, and was so fine that often the thread would catch on itself while it was wrapped around the motor shaft (capstan effect). I scratched my head and tried a few different approaches. Ultimately I settled on some thicker polyester thread, which since it is thicker sits nicer on the shaft, and does fray as much.
- Funicular jumping: this was pretty obvious in the video. More head scratching, in the end I realised that if I kept the tension on the cable constant, then it would be much smoother. So I built up a wee jig to limit the travel of the spring which made a world of difference.
My current funicular project is to make a platform for the passengers to board. Some balsa, glue, and styrene was quickly turned into this:
A little bit of paint and some plaster to fill in the gaps and this will look very nice. I'm looking forward to adding some platform lights and a few other details.