Sunday, 3 April 2016

Preparing for a four day show

As March gives way to April, the first quarter of 2016 is already over. I need to turn my attentions to the next outing for the layout at the end of April - four days in a marquee at the Abbey Hill steam fair.

The layout has never been run in a marquee before and therefore has never had to cope with being setup on uneven ground, then there's the moisture / humidity to factor in, and of course four consecutive days of running the layout.

I will probably rest some of the more expensive purchases as a precaution but will still need plenty of items to run and it will be necessary to ensure that the stock is rotated regularly.

Work to update the switch panel has now been completed, with suitably matched transformers installed for all four tracks and the walkabout controller - all of the duette transformers have now been removed.

The Arduino signal system has now been fully bench tested (and works!) so hopefully will be installed prior to the end of the month. The new system should reduce the power demands of the laptop power supply which is used to power the turntable, points & signals. It was also powering the cooling fan in the back of the switch panel, this has now been moved to a spare transformer coil as part of the transformer upgrade. It also means that should the supply ever fail again, there is a back-up system readily available within the switch panel so a repeat of the issues at Gartell should be avoided.

One area of concern with a four day show is the shuttle. Running the old SR EMU up and down on such a short distance over four days may cause some issues, so this will probably be kept to minimal running. The Hornby bubble car has proven quite successful and so I've decided to invest in something similar, something that hopefully won't look too out of place...


This is only the second Lima conversion I've attempted. The first, a class 33/0 has never appeared on the layout due to it being HO gauge and totally out of scale when compared to the rest of the stock! Currently I'm adding extra ballast to ensure that the third rail pickup will work properly. I'll try using a Marklin skate underneath but clearance space is tight.

I will also be investigating whether it will be possible for my Bachmann two car DMU, which appeared on the old layout a few times but has not yet made an appearance on I 'ad That, to be modified to work on the shuttle. Some of the other Bachmann EMUs and the Hornby VEP will also most likely be making appearances.

I think this will be a good test of 1950s engineering vs modern design!

Tuesday, 29 March 2016

Arduino shuttle - Video updated

As the Arduino shuttle system is now fully up and running, I've deleted the original Youtube video and created a new version, which includes footage of the entire shuttle program running and the Arduino sketch itself for those interested.

The new video can be found here:

https://www.youtube.com/watch?v=Go7bTNSXdBs&feature=youtu.be

Wednesday, 23 March 2016

Arduino signal aspect control

The first Arduino project was to modify the shuttle control system, which has settled in nicely and is a vast improvement on the old one, much simpler and far fewer components and wiring needed.

Modern technology and old trains don't generally mix that well (as the DCC experiment proved) but it can provide subtle little tweaks that can accentuate things like operation of the end to end shuttle, and now the signal controls. 

The current arrangement works reasonably well but isn't perfect. On the inner loop the train passes through the colour light signals, then though a home and distant double semaphore, passing one final signal before entering the tunnel. There are three trigger points to operate the signals and two PCBs control the operation - one for the colour light signals and one for the semaphores. The semaphore PCB utilises a number of capacitors, the board itself is too small the capacitors protrude making them vulnerable. Also the power consumption of this board is questionable, when the signal arms move the lights dim. I suspect that's putting unnecessary load on the power supply, as a semaphore only needs a minimal pulse of power to operate the arms.

The other minor issue is that the current controllers work on a timed basis, which is the time taken for a charged capacitor, wired to the base of a transistor and a relay, to discharge - typically 12 to 25 seconds depending on the size of the capacitor and resistor. Once the train passes the various triggers, the timing cycles begin and can't be stopped, meaning that if a train is detached and reversed into the turntable sidings, the signal will reset while the manoeuvres are going on. The ideal solution would be for the Arduino to oversee the control of all three signals, using the three triggers as it does now, with the timing cycle for the three signals paused until the train has passed the last trigger. 

After some head scratching and some research, I mocked up a test board, using push buttons to replicate the track triggers and wrote a basic control sketch. Unlike the shuttle system, which is purely a time based program and relies on no sensors, this time I have to incorporate the three track triggers and make sure that the Arduino can see them. The best way to do this is to use a similar trigger design,  a relay coil wired to each trigger section. I could have used current sensors but these are not straightforward and the relay switching method should prove more reliable. Plus the Arduino is then not directly connected to the tracks, which provides some protection from short-circuits etc. The Arduino units are very delicate and it doesn't take much to blow one up, as I've found out a few times.

For the colour light signals, there are two sets due to the double track and the trigger is wired to the points. As the points are changed, the relevant signal aspect changes, via a changeover relay. I could have done away with this design and written extra code to th Arduino but this complicates the programming and a simple changeover relay mounted within the PCB makes this job much simpler.

The new signal control system will work as follows:

Train passes the first trigger point (points after colour light signals) both signals set to red.

Train passes the second trigger (sidings points) 300 millisecond pulse of power to upper semaphore, followed by 300 millisecond pulse to the lower semaphore (to reduce the power consumption) both arms drop. 

Train passes the third trigger (before tunnel) green colour light aspect restored, corresponding signal controlled via changeover relay (as this signal block is now clear) third signal semaphore arm drops via 300 millisecond pulse. After a further five second delay, the home semaphore arm of the first signal resets, via another 300 millisecond pulse. Five seconds later and the distant aspect, and the second semaphore arm is reset, again with a separate pulse to each in quick succession.  The cycle is then complete ready for the next pass of the train through the trigger sections. 

As with the shuttle, all of the timings are adjustable so once installed into the layout and tested, the timings can be tweaked if needed.

This will leave only one capacitor controlled signal aspect controller, as this only controls the one colour light signal on the outer loop, it draws very little power and isn't worth replacing. 

If time allows then this new circuit will be installed before the next outing. 


The LED signals are fed directly from the D11 and D12 outputs of the Arduino via the changeover relay. The six transistors connected to pins D5 - D10 control the semaphore arms. The signal itself is wired common live, switching the 0v through the transistors, which again protects the device.

The three track triggers are connected to pins D2 - D4, with the device configured to recognise these pins as inputs, with the rest set as outputs (anyone familiar with Arduino sketches will be familiar with this)

The cost of construction works out cheaper than a shop-bought signal sequencer and I don't know of a commercially produced system that would work with both signal types and give me this level of control adjustment. 

Plus there's the satisfaction of seeing it all work after spending hours soldering and writing the program.

It's the little touches that make all the difference!

Sunday, 20 March 2016

Ray Heard Exhibition - Wimborne 19th & 20th March

A familiar venue, we were here last year for a different association.

We're starting to get the hang of early morning set ups and after getting up at some unearthly time on a Saturday morning (OK it was only a 30 minute drive) we were at the venue for 7am, ready to set up in time for the 10am opening.


The layout was in, put together, new power supply for the Arduino shuttle installed, stocked and tested in no time at all, even finding time for a leisurely (free!) breakfast before the viewing public started to arrive.


We shared our room with two other layouts and a trader who just happened to be a Hornby Dublo specialist and a fellow HRCA member, which proved both extremely helpful and also expensive! 


I was able to get the two, sluggish EMUs remagnetised (what a great bit of kit!) and purchase some new tyres at the same time. The blue EMU then spent the entire weekend on the upper loop, with the green EMU working the shuttle and the blue & grey one running stand-alone (as it looks better this way) on the outer loop. The 8Fs were paired up initially as always but I decided to swap them for a pair of 2-6-4s (80104 & 80105) these also ran quite successfully.


No major issues to report, apart from two broken wires and a track fault that only manifested itself during the second day, not sure why but the solution was to replace one of the quarter straights, having purchased some from across the room!


We're starting to see familiar faces, people who share our unhealthy obsession with all things three rail. One of our "groupies" subsequently returned on the second day, presenting me with three locos to run while he looked around the exhibition again. Whilst I don't normally cover other people's work. these are truly stunning locos that are worthy of exposure here.

It only takes a loco with a light in it to get my attention!


The blue Deltic is a beautiful recreation. Worthy of note is the work done to incorporate the headlamps, which are bi-directional. The moulding can be seen in the front bonnet and it's a seamless job. I need one of these!!!


Then there's this streamlined Princess Coronation also in Blue:


Finally, this LMS turbine locomotive. The detailing done to both the body and the chassis is of a very high standard. It's hard to believe that these aren't genuine Hornby Dublo locomotives!


After being very well looked after, fed and watered, we were loaded and on our way. The next outing will be our biggest challenge to date - four days in a marquee at the end of April!

And just to prove that the layout does all fit in one car - here's the layout snugly inside my Citroen Berlingo Multispace...



It certainly means that we won't be expanding any time soon!

With grateful thanks to Brian & Carol from Dublo Heaven for helping me lighten my wallet.

Tuesday, 15 March 2016

Preparing for the next outing


It was a pretty busy and somewhat stressful February, with two exhibition weekends back-to-back and more than a few faults to resolve in between.

Thankfully I've been able to take it easy over the last few weeks, with only a couple of locos requiring attention.

Primary job was to get the E3002 loco running, having done a motor swap with one of the EMUs. Bascially I had a very strong, original magnet in the motor of the E3002 loco and as the motor bogie is identical to the EMU, it was swapped with one of the poor runners, knowing that I had a spare neo ringfield magnet at home that I could install.

The neo ringfields can't be fitted to a standard EMU without further modification due to the metal sides, whereas the E3002 is plastic. Once this minor repair was done, the loco was fully tested and put back in the box ready for the next outing.

The green EMU was a bit more serious. No real issues with the magnet but very noisy and kept stalling because the gear cog was severly worn on one side.

At this angle, the damage is hard to see...

But viewed from this angle, it's much easier to see the extent of the wear...


EMU / E3002 motor bogies are not the easiest to acquire, so after some head-scratching I retreated to the loft to check the size of the gear cogs fitted to the Co-Co / Co-Bo locos, knowing that I had a scrap motor bogie up there.

Having checked the service sheets, the part number of the gear cog is the same on the Co-Co and Co-Bo (as expected) but is listed under a different number for the EMU. Having compared the two together it was hard to tell, especially as the original is so badly worn, so I just decided to fit it anyway...


And it worked!

After bench running the motor I gave it a run around the loft track - no noise, no stalling. Another one to go back in the box ready for this weekend.

The only loco remaining in need of attention is St Paddy. Hopefully I will get time before the weekend to replace the missing brush spring, if I can find one.

Sunday, 21 February 2016

Wessex Association of Model Railway Clubs Exhibition


Another weekend of playing trains!

Unfortunately there hasn't been sufficient time to thoroughly test all the problem areas from last week. The new transformer that I fitted in place of the old laptop power supply struggled to supply enough voltage (although there was 5 amps of current available) and made the points buzz when thrown. The blue & grey EMU also didn't want to work. This didn't spoil the weekend though and by Sunday morning, the offending power supply had been replaced by another laptop PSU - full power and proper operation restored!

Thankfully the repair to the Trax controller was a complete success but I now have a spare one as a precaution.

So this was our first outing to Sherborne as part of the Wessex Association of Model Railway Clubs, we were again very well received, exhibiting alongside many familiar faces, some of whom we'd worked with last weekend. A straightforward setup with no major issues with the rest of the layout (thankfully) but a few gremlins crept in with the stock over the weekend.

The blue & grey EMU, as previously mentioned, didn't want to run and closer inspection revealed damage to the worm gear. The only option is to replace it but I didn't have one with me, so I substituted the bottom motor assembly from the green two car EMU, which was also not running terribly well. The motor car ran ok but needed full power and then slowed to a standstill after a 
couple of laps once running as a three car.


I was desperate to see this three car set run, so drastic measures followed. 
Basically the E3002 - the most expensive purchase ever, has the same motor bogie as the EMUs and, as I purchased a new magnet for it when I converted it to three rail running, it has plenty of power. Meanwhile my existing blue EMU set now struggles with six coaches but runs perfectly as a sole, three car unit. So basically a three-way exchange was done - the E3002 motor bogie has ended up in the blue EMU and the bogie from the blue EMU is now in the blue & grey one, with the lifeless bogie now transplanted into E3002. The electric loco had seen plenty of use over the weekend and repairs should be relatively easy, plus a neo magnet will work in E3002 because the body is plastic. 
With the E3002 motor powering the blue EMU, the power difference was immense - it flew round the layout, even in nine car formation. The LED signal on the outer loop is timed generously to allow the long goods train to travel through without turning green, as a result it serves as a good indication of when travelling too fast. If you SPAD then you're going too quickly. The Brighton Belle is more than capable of SPADding this signal, as is E3002. The nine car formation was also fast enough to do this, as was the blue & grey EMU. Just need to install a neo magnet into E3002 and source a new worm gear for the green EMU, neither job is too difficult.


With the EMUs running, time for the next problem(s)

City of Liverpool began stalling and shortly afterwards, Duchess of Atholl followed with the same problem. In the case of Liverpool, it was just a connection rod fouling and had become bent, so this was straightened and bent out of the way of the rest of the valve gear.

For the Atholl, the problem was slightly more serious...


The wheel had come off the axle and this then bent the coupling rod on the other side as the loco tried to power the wheels through one driving wheel. Although this looks quite drastic, the connecting rod bent back into shape with reasonable ease and after a quick dab of superglue on the end of the axle, the wheel was refitted and both locos were back in service.

Deltic St Paddy managed to move barely a few feet this weekend before stopping dead. Closer inspection revealed that one of the brush caps had come off and one of the brush springs has disappeared. I attempted repairs using a brush spring from one of the Co-Bo locos - one of which is missing three tyres but after losing this spring as well, I now need two brush springs and three tyres to bring these back into service.

Regardless of all the issues above, it was a relatively smooth weekend and most of the repairs were done quickly. There's enough stock to cover repairs to multiple locos and the more locos I can repair during an exhibition, the less I have to bring home and fix!

Another recent acquisition, a Wrenn 8F, which I converted to three rail running, also made its debut on the upper loop, replacing 48158 which really needs a repaint so will be retired for the time being.

No video footage this weekend, more pictures below...

This weekend saw the bubble car covering for the two car EMU, which ran for the entire weekend without fault. The Arduino-controlled shuttle has settled in well and required no further adjustments.


Action shot of the front of the layout. St Paddy was due to be double-heading with Crepello but didn't even manage to leave the siding! 


The single Deltic managed to haul the goods train reasonably well but slipped a bit on the bends. This isn't good for the rubber tyres, so Royal Scots Grey was added to cover for the loss of St Paddy.


The Hornby VEP saw use again this weekend. It runs perfectly on the top loop, which makes up for the many hours spent trying to get it to work!


Of all my restorations and repaints, Dorchester Castle is the one I'm most proud of. Here it passes the turntable with City of Liverpool parked up and the poorly green EMU left in the shuttle siding.


You don't need two of the same locos to double-head! An 0-6-2 and 2-6-4 will run just as happily together. These two pulled the brick wagons with ease but the tight radius of the curves on the upper loop precluded the use of more brick wagons.


Royal Scots Grey has now joined the goods train. As this Deltic has a plastic coupling at one end and an older metal coupling on the back, it's best suited to run in this formation. No derailments, no detaching. This has been the most successful outing of the goods train so far. It saw a fair amount of use as a result.


The back of the goods train. 20 wagons plus guard's van,


Looks very impressive (if I say so myself) running slowly along the layout. The Trax controllers mean that low speed running can easily be done.


Duchess of Abercorn & City of Liverpool. This is after the repairs described above. Duchess of Abercorn then started to derail on the corner just beyond the turntable. Replacing a half curve solved the problem.


Busy station. Brighton Belle is stopped for the picture, while the bubble car is just accelerating away back to Brough station.


Busy fiddle yard. The two tracks next to the goods train are the main running lines. Captured just as the VEP flew through overhead.


Duchess of Abercorn just about to pass the spot where it kept derailing. Another popular loco due to its unusual colour. Not bad for Halfords grey primer really!


Sir Nigel Gresley, still sporting a wonky R in the LNER lettering. Thankfully it's on the other side!


Dorchester. My first ever three rail attempt at a very young age and one of only two locos that survived childhood, still going strong.



Friday, 19 February 2016

Hectic week

Undoubtedly the biggest issue with exhibiting two weekends in succession is that if something goes wrong during the first exhibition, there is very little time available to put things right before the second one.

Having come home on Sunday with a knackered switch panel and a seized EMU, priority was to get the switch panel fully operational. This meant ordering replacement transformers to replace the two that failed. The EMU wasn't so essential.

So late on Sunday evening, I bit the bullet and ordered a complete new set of transformers. I went with slightly more powerful ones, roughly 2.5 amps output, thinking that this would give me ample power for lighting, points, etc and would also be more than enough power for the controllers. Plus by standardising the transformers, it'll be easier to carry one replacement transformer that could be fitted in place very quickly should one fail again.

That was the theory. The reality has proved somewhat different.

So the transformers arrived on Thursday and I quickly got to work stripping the old Duette transformers from the panel, soldering in the shiny new ones in place. As the lighting and accessories were powered from a laptop power supply, a rectifier was needed to convert the power output to DC. A thermal cut-out has also been added as a precaution.

Now to test the controllers. All seemed well - no difference in power but it seemed the right thing to do to test under fault conditions, which will happen frequently. It was quite notable that the ammeters really kicked when put under fault conditions and the Trax controllers reacted far quicker than ever before. I was a little concerned but pressed on with testing, trying the fault condition test at a lower power level. That's when the smoke appeared from the back of the panel, followed by the familiar smell of burning PCB. Not good.

My function test had fried the shuttle controller and I had no spare. The transformers clearly are too powerful for the Trax controllers so less powerful ones are needed, and it's Thursday. The layout is out in two days. Time to panic.

After a conversation with Trax, they very kindly agreed to build and post a new controller by first class post (it arrived this morning) they also advised that 1.5 amps is the maximum power input for their controllers. But best of all, they were able to not only tell me which component was most likely to have blown, they also gave me the part number of the thyristor I needed and pointed me in the direction of my nearest Maplin. Having bought two thyrisors as a precaution, I very quickly had my shuttle controller back in operation, and of course I now have a spare one!

I don't think there are many companies around these days that would give that level of support, so if you're in the market for new controllers, I can't praise Trax highly enough.

Managed to track down a more sensible transformer, courtesy of Railroom electronics in Wareham and for now I've refitted the remaining Duette transformers so that I now have everything operational. I've ordered more transformers to eventually replace all the Duettes but this will get me through this weekend.

With that little drama resolved I still managed time to take a look at the blue & grey EMU. In fairness I hadn't expected much from it as I knew the magnet was weak. However it became clear over the weekend that there was more than just a magnet required. It sounded quite rough when running and there was visible movement in the bottom of the armature shaft, indicating that the bottom bearing had failed.

Whilst trawling Ebay for the transformers, I happened to see a trader selling the very bottom bearing I needed and another seller offering a remagnetised ringield magnet - far cheaper than a neo replacement and without the hassle of modifying to fit, also cheaper than buying a magnetiser!

I had concerns that I might have cooked the armature as the mechanism looked to be jammed solid. It seems to have escaped unharmed, the resistances across the three poles are all equal and after a quick commutator clean up, the new bearing and magnet were installed and the motor coach was spinning quite happily on the desk. It's passed the finger test but there wasn't time to track test so I'll find out tomorrow if my repairs were successful.

Fingers crossed that this weekend will be a little less eventful...



Sunday, 14 February 2016

Gartell light railway exhibition

There's no better place for a model railway exhibition than at a railway!

The Gartell Light Railway is a small narrow gauge system that runs along part of the old S&D trackbed and as a fan of the S&D I was more than happy to attend.




The layout's been stored away in the cold, damp garage for over two and a half months. It's wise to expect problems.

We arrived on a cold and wet Saturday morning and began setting up. Straight away it was noted that one of the rear boards, which stack on top of the front boards, with supports at each end, had a very prominent sag in it. A rethink on the stacking when at home is needed but thankfully once the board was fitted the correct way up, it eased itself back into shape and caused no issues.

The layout legs were challenging to fit, the pine timber has clearly expanded somewhat in the cold garage but eventually everything went together and it was quite pleasing to see not one single track short - the layout fired straight up, which was a huge relief.
The shuttle system, having recently been updated at home to an Arduino control was soon put through its paces, that is until a train on the outer loop struck the station signal, catching the live supply to the red LED, sending 12 volts down a feed controlled by the Arduino and rated at only 5 volts.

Thinking that I'd fried yet another Arduino, I carried a spare, un-programmed one just in case. Just a matter of hooking it up to the laptop, sending the sketch to it and plugging back in. Sadly I hadn't fully tested the laptop after installing Windows 10 and then discovered that although the USB port would power the device, I couldn't read from it or send the sketch until I'd updated the USB drivers, and with no internet or phone signal this wasn't possible. 

I soon realised however that the original device, when plugged into the laptop, appeared to be operating as the indicator lights within the unit still seemed to mimic one of the signals. So with nothing to lose, I plugged it back into the circuit board... Nothing.

It turns out that my little "modification" to lower the input voltage had actually lowered the voltage a little too much. Once all the other 12v accessories within the layout were in use, there wasn't enough power coming into the Arduino, so it shut down. After hooking the USB cable up to the laptop it came back to life, although not surprisingly the red signal in the main station didn't work. 

With that drama resolved, we settled down to a day of running. I took the opportunity of bringing along the Hornby VEP and bubble car, as well as the Bachmann class 25 diesel and the recent City of Liverpool restoration and the final of the four scrapheap locos - Dorchester Castle. The VEP finally works properly, running quite happily on the outer loop and even the upper loop. The class 25 was able to pull seven tinplate coaches, which is impressive. The bubble car also ran faultlessly on the straight shuttle section. This now has metal tinplate coach wheels fitted in the non-motorised bogie. The VEP has Bo-Bo driving wheels!

City of Liverpool also proved to be a strong and quiet runner as did Dorchester Castle. Both saw excessive use to make sure that they were properly run-in.

With Saturday's session over, we returned on Sunday to find no power. After replacing an extension lead there were still no lights on the control panel, no signals, just track power via the controllers. The 16v DC laptop power supply that's been happily powering the layout since it was built had failed, and I didn't have a replacement.
After a MacGuyver-ish attempt to create a rectifier circuit using four diodes which I hooked up to the transformer that powers the sidings, I also managed to fry this transformer so we resorted to borrowing a Duette controller to run the points and lights (thanks Steve!) and kept the points and turntable movements to a minimum. This meant not swapping locos as frequently as normal and Dorchester Castle spending almost the entire day on the inner loop, thankfully without issue.
The blue & grey EMU also made an appearance, I knew it was a sluggish runner but decided to give it a run anyway. Whilst it did initially run reasonably well, by Sunday afternoon it had had enough and slowed to a stop. I'll need to check the armature for damage but it will need a remag.

With another exhibition next weekend, the pressure's on to repair the control panel. Although I have a spare laptop charger, I've opted to replace all of the transformers within the control panel and use a chassis mounted transformer for lighting and accessories. The panel is still running with the remnants of the old Duettes and with ten exhibitions this year, and Warley next year, I think it's wise to update everything and keep a spare transformer just in case.

Hopefully the transformers will arrive before the weekend!

Yet again we were very well received, more requests to attend exhibitions etc.

A few pictures from the weekend:

Only two of the locomotives in this picture weren't painted by me! (Duchess of Montrose & LMS 2-6-4)


City of Liverpool on its maiden run, looking far better than I remembered!
Duchess of Abercorn, one of the scrapheap projects, also saw use this weekend.


Busy station!
The Hornby VEP is on the outer loop. Duchess of Abercorn is on the mail train and Dorchester Castle is paired with Bristol Castle. Dorchester Castle looked stunning and is without doubt my favourite restoration project.


On the other side of the main station, the only two Hornby models, both of which have caused major headaches to get them to run properly, are behaving and running nicely. The bubble car is about to depart.

Considering Hornby's current financial woes, it seemed only fair to promote them a bit!


Having tested it on the outer loop successfully, I experimented with the Bachmann class 25 on the upper loop. Although slowing on the tight reverse curves, it happily pulled seven tinplate coaches. In fact of all the locomotive combinations we tried on the top loop, this was by far the most reliable! 


The seven coaches can be seen, with the class 25 just disappearing through the back scenery.



Although there were several challenges, it was a very enjoyable weekend. We'll be back at Gartell in 2018!

Video footage to follow...


Saturday, 6 February 2016

Arduino shuttle control - part three

The Arduino Nano PCB is now fully tested and installed within the layout.

 All of this...

...has now been replaced by this:


And there were other components needed in the other boards too, these are also now redundant.


Close-up view of an Arduino Nano:


Video of the Arduino shuttle module being tested:


Thursday, 4 February 2016

Arduino shuttle control - part two

More components have arrived so I've been able to finish construction of the shuttle control.

The breakdown of what this does is as follows:


Relay 1 is a bypass relay. When power is applied to it, the train control is routed via the Arduino and transistor within the board. When off, the train can be controlled manually.

Relay 2 is for track polarity - the Arduino can't directly control direction so this relay changes direction for me. When off the track polarity is normal and when powered the polarity is reversed.

Relay 3 is for the terminus station points, currently controlled elsewhere within the first board.

Relay 4 is for the sidings points, this is not controlled via the Arduino at all and is purely manually operated.

Transistor 5 is the speed control - the Arduino can pulse the transistor and vary the speed. This allows for smoother starting and eventually, stopping (when it's been programmed)

The Arduino Nano is component number 6. This is the brain. Programmable via PC, it's now mounted on socket pins so should it fail, or should it prove easier to remove it from the PCB for programming, it just unplugs.

The LEDs (number 7) are purely for indication. These show me the signal operation, points operation and speed regulation. The idea being that if a fault develops, the LEDs will help to identify where the fault is, ie if the Nano isn't generating the signal then the LEDs won't illuminate.

For added protection from accidental polarity reversal and short-circuits, I've added a number of diodes to the board. The Nano device is very sensitive and easy to kill so a few pence spent on diodes is money well spent.

Here the points are being tested, using the Nano and testing manual override. 


Time to test with a loco.

The Trix Western is used as a guinea pig:




It's ready to be installed.

At some point I will add current detection and then amend the program to slow the trains down as they near the station.

For now though this is a massive improvement on what's under the board currently - much neater, tidier and far easier for fault-finding!

Tuesday, 2 February 2016

Arduino shuttle control - part one

So with the restoration work finished for the moment, I've been playing with the Arduino and learning how to program it, seeing what it can control etc.

My first program was a basic version of the current shuttle system, ie one train up and back, change points, second train up and back, change points, and so on.

Having spent more time researching and programming, I realised that I could also use this device to regulate the train speed, creating a more realistic start and, with extra sensors, I can program it to slow down the train when it reaches a certain point of the shuttle. As the shuttle is wired across all three front boards, all I would need in theory is a sensor at each end - when the train enters each of these sections I could make it slow to a stop, still using the diodes to ensure that the loco comes to a complete standstill in the same place.

As I await the arrival of some current sensors, I continue to program and tweak. Each of the LEDs attached, rather badly, to the unit represents part of the program, ie direction, speed, points & signals.


Before long, I'd transfered this into a bespoke PCB...


So now we're down to just two PCBs. Trouble is, the connecting pins could become loose in operation so I would like a better solution.

Thankfully the Arduino is also available as a Nano:


So I got to work building another PCB, incorporating both sets of points on the first board (only one set is controlled for the shuttle) and soldered the Nano to the board. All went well until it came to testing, where I may have accidentally sent too much power into the Nano unit and blew it up. Thankfully I can cope with the cost (about £3.50) but in the process of de-soldering it, I ended up wrecking the pcb, so the components were harvested and soldered into another board.

This time I've thoroughly tested everything prior to fitting the Nano. As there is still a risk of damaging the unit I'll add some resistors and diodes just to be sure. I'll also be fitting a socket to the board so that the Nano can just plug into it, should it ever fail in future, swapping will be easier.

Just need to add the signal terminals, which I'll do once the socket pins arrive...