Subscribe via RSS

Melbourne and surrounds (October 2010)

Recently purchased a new camera (finally a DSLR!, well, actually a DSLT) and have been checking out the old haunts lately. Great timing too as we've just entered daylight savings.

Steam around Melbourne (and a trip to Seymour)

Steamrail are a Melbourne (Newport Workshops) based heritage rail operator and have quite a nice selection of rolling stock. Their R-Class Steam Locomotives are even licensed to run by themselves on the mainline...

El Zorro Freight

El Zorro is a small freight operator in Victoria who run both Standard and Broad gauge trains. Recently they have been running a grain train to and from Dynon using leased heritage engines in their original VR livery.

Queensland Rail

QR (who are about to be privatised) also run out of Dynon with large intermodal freight. They provide a nice change of scenery on the standard gauge with their LDP and G Class locomotives.

Sims St Junction (Pacific National Locomotive Depot)

At the west side of the freight are in Melbourne is Pacific National's Locomotive Provisioning Centre. Here you'll mainly see NRs getting fueled and services (with the occasional AN) and then either coupled light engine to head off to Spotswood or sent east to a rake of containers for haulage.

Melbourne-Sydney XPT

Poor old Countrylink can't win nowadays; The 'main south' from Sydney to Melbourne has been in the press nearly every day for the last few months as the ARTC bungle up the re-sleepering program (and duplication of the standard gauge.) Recently, due to their technique of sleeper replacement, the new concrete sleepers have not been seated correctly in the ballast and mudholes have resulted. This has caused some very rough riding for all trains and has even caused damage to XPT power cars and break-ups (uncoupling) of freight trains.
Seeing the XPT in Melbourne has become an unexpected treat!

81 Class shunting in Dynon

The intermodal container trains are (usually) shunted around by an 81 Class. This loco will put the empty flatbeds in the correct roads and also reconnect loaded container wagons. Sometimes this train must use the standard gauge track that leads to Southern Cross (Spencer Street) Station but it usually doesn't travel too far along. Fortunately, I was in the right place at the right time to see the 81 travel all the way down the other side of the flyover.

It also then shunts from the other end of the yard across the Dock Link Rd level crossing.

Another random sighting for this shunting maneuver was the original NRs pulling the consist half way up the flyover incline.

Track Machines

Lately there's been a lot of work down at Southern Cross Station for the addition of a new platform for the Regional Rail link debacle. This has meant track machines working during the day to lay new track or realign old lines. They return home each night via Sims St.

Middle Footscray

I tried Middle Footscray Station yesterday instead of the usual Sims St Junction and was impressed with the traffic that passed between 1800-1930.

And that's about it for now... Melbourne sightings are picking up now that daylight savings is here. It seems that early evening is the best time as well. You can can find the whole album that the above shots come from here.


Osaka, Yodogawa, Koyasan and Nishi-Akashi.

Just to finish off displaying the photos I took whilst in Japan over September, here are the highlights from the Kansai area whilst chasing trains.

Noda, Osaka

Full gallery here.
As I was staying near Noda(JR) Station on the Osaka Loop Line, I was able get an elevated view of it from the building stairwell. Fortunately, this station is located between the Ajikawaguchi branch and Umeda, so I got to see the freight pass through, as well as the express services to Kansai Airport and Wakayama.

Southern end of the Umeda Freight Terminal

The west-most track of the Umeda Freight Terminal is used as a single-track bypass of Osaka station between Nishikujo and Shinosaka. Freight trains to Ajikawaguchi and all expresses to Kansai Airport and Wakayama (and further) use this track. Note the second last photo which shows the speed limits for a variety of express trains which travel this section of track:

Noda Hanshin Station

The Hanshin Railway runs from Umeda to Kobe. It is underground from Umeda Station before climbing above ground before Noda Hanshin Station. It does this just before the Osaka Loop Line, which travels over the top.

Noda JR Station

A favourite, Noda JR Station allows you to see for quite a while towards Nishikujo along some very straight track. This provides some great shots at full zoom of the loop line trains and other expresses heading south.

Yodogawa Bridge

This bridge provides a connection east of Osaka City for freight trains from Suita to Hirano in South Osaka. There have been rumours that it will also soon get it's own passenger service. The line is currently being upgraded.

Suita Station, Osaka

I walked back to Suita Station from Yodogawa Bridge hoping to see another service pass along the line; unfortunately the scheduled trains never arrived. Either way, once at Suita there was action in every direction.


Full gallery here.
I travelled with a friend on the back of his motorbike up to a temple in Koyasan, but on the way we stopped at a Gusto Restaurant near Nankai Mikkaichicho Station.

Nishi-Akashi Station

After spending a night in Ako City, I took my time returning back to Osaka and stopped by Nishi-Akashi Station. This is on the main line between Kobe and Himeji and sees a lot of freight passing through. Since it is a larger station, all passenger expresses stop, but the freight trains pass... so you knew when and where to look for them. Note that the first shot is from Ako station of the local to Himeji and the second and third are from Himeji Station.


Sending full bytes over .NET Serial Ports to the Arduino

Ok, I have just spent a good two nights of my life diagnosing why I could send all bytes up to value '127' and no higher. In hindsight, it all makes perfect sense and the documentation is clear, but when you've been taught to think in strings, you might hit this very quickly.

The Scenario

I have my MAX7219 + LedControl Library set up on my Arduino and all works fine. I use two functions to control it: setLed and setRow. setLed simply takes a boolean to determine if the LED you are pointing at is to be on or off, but setRow requires a byte. This is all fairly straight-forward as each 'row' in the LED matrix has 8 LEDs, and a byte has 8 bits. So, starting from the lowest significant bit, a value of b00000001 will turn on the first LED in a specified row. (i.e. setRow(DEVICE,ROW,BITS);).

All communications between my application and the Arduino had been based on strings and so I had previously been using one character (one byte) to set one LED. Due to this being a complete waste of bandwidth, I decided that each byte I sent through the channel should be a byte to control full row of LEDs. This meant that I could therefore no longer 'see' the output as a string (or ASCII), as the characters I would create from setting the bits may no longer be in ASCII range... this was no big deal, as I could just view the byte values and decode it all myself.

So, on the client end (C#.NET Application) I started encoding the bytes from bit values. This all worked until I tried to set the last bit...

byte b = 1 | (1 << 7); //let's set the first and last LED.
string buffer = (char)b + "\0";
Data Sent LEDs lit Correct?
b00000001 1st OK
b01010101 1st, 3rd, 5th, 7th OK
b10101010 1st, 2nd, 3rd, 4th, 5th, 6th WRONG
b10000001 1st, 2nd, 3rd, 4th, 5th, 6th WRONG
b01000000 7th OK
b10000000 1st, 2nd, 3rd, 4th, 5th, 6th WRONG

What the hell was going on? That 8th bit is fishy!

The Answer

So, after reading numerous blogs and not finding my answer, I went to the Arduino Forums and posted a topic asking for help. I was given advice to write a very simple test app to work out where the bytes were failing... but I never did get to write that app, instead I went to the MSDN site as soon as I saw that the Write() procedure could be overloaded.

And look what I found at the article on MSDN:

By default, SerialPort uses ASCIIEncoding to encode the characters. ASCIIEncoding encodes all characters greater than 127 as (char)63 or '?'. To support additional characters in that range, set Encoding to UTF8Encoding, UTF32Encoding, or UnicodeEncoding.

And guess what... ASCII Character ? is 63 in decimal and therefore b00111111 in binary!
So, whenever I was setting the 8th bit, the .NET Framework (in all its wisdom) would translate this to a question mark as it was not expecting to send an invalid ASCII character. Ladies and Gentlemen, ASCII is only 7 bits!

The work-around?

byte[] b = new byte[] { 1, 127, 128, 129, 255 }; //let's set the first bit, last bit, etc...
serialPort.Write(b, 0, b.Length);

And then everything just worked. Do not send chars to your port if your receiver wants bytes.


Gakunan Railway

I'd heard a lot about this railway, and had seen the models released by Tomix, but wanted to see it for myself. I'd been in Tokyo overnight and decided that, although I had my RailPass, I wanted to also ride the Odakyu Express to Odawara and then commute further to Yoshiwara to ride this railway. This trip therefore also involved catching the Shinkansen.

After a quick trip on the Tokaido Line, I arrived at Yoshiwara to find a DE10 in the yard. I later realised that this was the marshalling area for the freight that then gets taken by the Gakunan railway.

I caught the next service through to Hina, as this was the best location at the time to see the most freight movements. I'd gathered this via the 2010 Japan Freight Timetable (but you can also get the timetable here.)

I was greeted at Hina by some archaic looking machines. After around 15minutes of checking out the area, the boom gates came down and then I saw 5 WAMU wagons coupled together and rolling towards me. One of the shunters was hanging on the back and one was in the middle. The guy in the middle all-of-a-sudden jumped off the consist and then jumped back on as the cars kept rolling. I then realised there was no engine attached as the shunters grabbed the handbrake on the wagons.

Before they'd dragged that rake to a hault, the engine (which may have given them a push... it was out of sight) then came through the crossing and coupled up to another rake of WAMUs.

Unfortunately, this was then the total of the freight action seen on the Gakunan Railway itself. But before I returned to Yoshiwara, I checked out the area. There's a few abandoned carriages around the station.

I then waited for the next service back to Yoshiwara. I must note that the passenger services are spaced half-hourly and they give you a good deal of time to check the area out.

Back at Yoshiwara, I checked my freight timetable and saw that there'd be a JR service arriving shortly to drop off cars for the Gakunan Railway. There were also to be other services passing, so I grabbed a bite to eat and waited.

I then returned to Osaka, taking the Tokaido Line to Shizuoka and the Shinkansen from there. You can find the complete photo album for the Gakunan Railway here.