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.