Showing posts with label railbus. Show all posts
Showing posts with label railbus. Show all posts

Thursday, August 20, 2026

How I used Arduino and a DF Player Mini as a sound card

Introduction

Originally, the sounds in my Ford(ish) railbus were provided by a cheap MP3 player with each track being triggered by flicking a switch on the transmitter to move forwards and back through the various sound effects (See How I used an MP3 Player as a soundcard). This was a bit cumbersome and there was a one second gap as each new track was played.

More recently, I replaced with antiquated MP3 player with a DF Player Mini module (See How I used a DF Mini Player as a sound card). This has many similarities to the old MP3 Player in that it includes an amplifier and also plays tracks from a Micro SD Card. Its advantage is that it plays .WAV tracks with no noticeable gap when it loops a track or switches to another. Its disadvantage was that the tracks still needed to be triggered by flicking a switch on the transmitter and, as with the MP3 Player, the horn could bot be sounded separately.

So, I speculated about using an Arduino microprocessor to automate some of the switching of tracks and also providing the much-needed horn sounds. I had previously used Arduino to provide radio control and sound effects for a diesel loco (see Arduino-based radio control). However, the radio control seemed a bit twitchy compared with my Deltang/Micron based system and was not as precise. However, I gained some useful experience in using an Arduino to switch MP3 tracks on a DF Player Mini.

Armed with this knowledge (my blog is useful in reminding me how I did something previously), I explored writing some similar code which would respond to the input from the ESC on the Deltang Rx61b receiver/controller used in the railbus.

 

Voltage Divider 

The first step was to transform the motor output from the ESC on the Deltang receiver into something suitable for an Arduino analogue input. Whereas, the ESC provides 0 - 12v PWM output, the Arduino can only measure 0 - 5v input. Furthermore, the motor supply from the ESC is reversible and so this needed to be rectified for the Arduino analogue input.

Fortunately, my mate in Australia is a dab hand with electronics and so guided me through the voltage divider circuitry needed to convert the 0 - 12v reversible PWM input into a more acceptable 0 - 5v output.

Note: R2 = 80/(Vb-8) kΩ.   IF Vb is less than 8V you don't need R2. 

So, with my supply voltage being around 12v, R2 = 80/(12-8)k = 20kΩ

 Alternatively, you could purchase a ready made DFR0051 analogue voltage divider module from Farnell at around £3.50 GBP (at current prices).


 Voltage Regulator

 The DF Player works on 5v and, although the Nano can work on up to 12v, it is happier on 5v. So, I needed to reduce the supply to these components. In the original railbus set-up, I soldered together a circuit with a 5v voltage regulator chip (L7805) but these days there are plenty of voltage regulator modules on eBay which actually work out just as cheap, without the faff of soldering the components together.

I used an adjustable voltage regulator which I bought very cheaply in a job lot. A digital multi-meter was used to make sure the output was just below 5v (rather than just above it), a small screwdriver being used to adjust the trimpot.


 

Connecting up the Arduino


I used an Arduino Nano as I had a couple in stock and also there is plenty of space beneath the roof of the railbus to accommodate it.

  • VIN - connects to the 5v output from a voltage regulator
  • GND - connects to the negative (0v) output from the battery or voltage regulator
  • A0 - connects to the output from the voltage divider above
  • D8 - connects to Pad 5 on the Deltang Rx61b (via a 1k resistor)
  • D10 - connects to Tx on the DF Player Mini
  • D11 - connects to Rx on the DF Player Mini (via a 1k resistor)

 NOTE: If you decide to use two sets of batteries - one for the motor and one for the electronics, make sure the negative leads for both batteries are connected.

 

Connecting up the DF Player Mini

  •  VCC - connects to the 5v positive output from either the voltage regulator or the Arduino Nano
  • GND - connects to the negative (0v) output from the battery or voltage regulator
  • Tx - connects to D10 on the Arduino Nano
  • Rx - connects to D11 on the Arduino Nano (via a 1k resistor)
  • SPK_1 - connects to an 8Ω speaker
  • SPK_2 - connects to an 8Ω speaker

 I connected a Li-ion 3S battery pack, a Micron MR603, a motor, the voltage regulator, the voltage divider circuitry, the Arduino Nano, the DF Player Mini and a speaker together on a breadboard so that I could use it to test my Arduino code.



 NOTE:  The Rx61b is a very early incarnation of Deltang's RC equipment for trains and did not have the facility to re-program 0v outputs on its pads. Consequently, the output from Pad 5 needed to be passed through a transistor inverter circuit to switch the 3.3v output to a 0v output to trigger the Arduino. I maybe could have adjusted the code to sense this input, but the inverter circuitry already existed in the original version of the sound system. Micron and later Deltang receivers can be programmed to give 0v outputs but, if you need to know the circuitry for the inverter see - How I trigger sounds with a Deltang Rx65 receiver.
 

The sound effects

 The next job was to edit the sound files needed. Fortunately, I had already purchased a series of suitable sound files of a Ford Model A car from the StockMusic.com website and so was able to incorporate these with other sounds captured from YouTube with Audacity - a free open source audio editing package. See - How I used Audacity to create sounds for my railbus - for more information.

 I ended up with ten sound files:

  • Track 001 = Engine start (6 sec)
  • Track 002 = Idle (24 sec)
  • Track 003 = Idle plus horn (1 sec)
  • Track 004 = Accelerate to cruise (31 sec)
  • Track 005 = Cruise (1 min 19 sec)
  • Track 006 = Cruise plus horn (2 sec)
  • Track 007 = Decelerate to idle (12 sec)
  • Track 008 = Engine off (3 sec)
  • Track 009 = Horn (1 sec)
  • Track 010 = Silence (15 sec)

 These were copied on to a 512Mb Micro SD Card. I have found that, not only do the files have to be numbered correctly - ie 001, 002, 003, 004 etc - they have to be copied to the card in the correct order, otherwise the DF Player gets confused. Also, it is advisable to reformat the card before saving the files to it.

I'm sorry, but I can't share my sound files as this would infringe the copyright agreement for the files I downloaded from StockMusic.com

 

The code

 I am no coding expert. I make copious use of the online reference facility on the Arduino website and search online for pieces of code to do specific jobs (eg to differentiate between a short press and long press of a digital (push button) input). The beauty of coding is that you can keep trying things out and, if it doesn't work as you expect, you can edit it and try again - you get instant feedback.

OK, it is a bit more complicated than that as sometimes, you have no idea why what you've written doesn't work and so you have to research the internet for a better way of doing it, but the more you try, the better at it you become.

Here's the entire code for the sound  

/*  
Arduino connections
A0 - Motor input from voltage divider circuit DO NOT connect directly to motor leads!!
D8 - 0v trigger for horn (short press) and engine start/stop (long press)
D10 - Tx on DF Player Mini
D11 - via 1k resistor to Rx on DF Player Mini
VIN - 5v +ve
GND - Ground (same as for Arduino)

SD Card tracks
Track 001 = Engine start (6 sec)
Track 002 = Idle (24 sec)
Track 003 = Idle plus horn (1 sec)
Track 004 = Accelerate to cruise (31 sec)
Track 005 = Cruise (1 min 19 sec)
Track 006 = Cruise plus horn (2 sec)
Track 007 = Decelerate to idle (12 sec)
Track 008 = Engine off (3 sec)
Track 009 = Horn (1 sec)
Track 010 = Silence (15 sec)
*/

#include <SoftwareSerial.h>
#include <DFPlayerMini_Fast.h>

SoftwareSerial mySerial(10, 11); // D10 RX (thro 1k resistor), D11 TX
DFPlayerMini_Fast myMP3;

int analogPin = A0; // ESC through voltage divider
int Ch5Pin = 8; // 0v trigger for Horn (short press) and engine on/off (long press ) - Ch5 on Deltang or Micron Rx and Tx
int Lights = 1; // Flag - 0 = lights off - 1 = lights on
int Horn = 1;
int Engine = 1;
const int SHORT_PRESS_TIME = 1000; // Duration for long press on horn / engine trigger - 1000 milliseconds = 1 second

bool ch5Triggered = false; // the previous state from the input pin to test for short or long press
int currentState; // the current reading from the input pin
unsigned long pressedTime = 0; // When the horn/engine trigger was pushed
unsigned long releasedTime = 0; // When it was released

int val = 0; //Current value of ESC output (subtracted from 1023 as Micron / Deltang ESC starts high and goes lower as speed increases)
int maxval = 0; //Max value of output from ESC (as this will vary dependent on charge in battery pack)
int minval = 1023; //Min value of output from ESC (How high the throttle reaches)
int currentTrack = 10; //Track currently playing (starts off with silence)


void setup() {
Serial.begin(9600);
mySerial.begin(9600);
myMP3.begin(mySerial);
pinMode (Ch5Pin, INPUT_PULLUP); // Sets the horn / engine trigger to high initially
delay(1000); // Helps prevent any falso triggers
myMP3.loop(10); // Loop play silence
}

void loop() {

currentState = digitalRead(Ch5Pin);// read the state of the horn / engine trigger input

if(currentState == LOW && !ch5Triggered) { // trigger button has been pressed
ch5Triggered = true;
pressedTime = millis(); // When the button was pressed
}
if(currentState == HIGH && ch5Triggered) { // button is released
ch5Triggered = false;
releasedTime = millis(); // When the button was released

long pressDuration = releasedTime - pressedTime;

if(pressDuration < SHORT_PRESS_TIME )
Horn = 0; // Sets the horn flag to 0
else
Engine = 0; // Sets the engine flag to 0
}

val = analogRead(analogPin); // Read the input level from the ESC voltage divider circuit (NB 0 - 1023)
if(val>maxval) maxval=val; // Records the max input level
if(val<minval) minval=val; // Records min input

if (Engine == 0 && currentTrack == 10) { // If long press and current track is silence
myMP3.play(1); // then play engine start
delay(6000); // length of the engine start track (ie six seconds)
myMP3.loop(2); //Now loop the idle sound track
currentTrack = 2;
Engine = 1; // Resets the long press trigger flag
}

if (Engine == 0 && currentTrack == 2){ // If long press and current track is idle sound ....
myMP3.play(8); // .... then play the engine cut off track
currentTrack = 10;
delay(3000); // Length of the engine cut off track (ie 3 seconds)
Engine = 1; // Reset the long press trigger flag
}

if (Horn == 0 && currentTrack == 2){ //If short press and current track is idle sound .....
myMP3.play(3); //.... then play the idle + horn track
delay(1800); // Length of the horn + idle track (ie 1.8 seconds)
myMP3.loop(2); // Carry on looping the idle sound track
Horn = 1; // Reset the short press trigger flag
}

if (Horn == 0 && currentTrack == 5){ // If short press and current track is cruise sound ....
myMP3.play(6); // .... then play the cruise plus horn sound ....
delay(2000); // ... for two seconds ....
myMP3.loop(5); // .... and then carry on looping the cruise sound track
Horn = 1; // Reset the short press trigger flag
}

if (Horn == 0 && currentTrack == 10){ // If short press and current track is silence .....
myMP3.play(9); // .... then play the horn sound
delay(1500); // ... for 1.5 seconds ....
myMP3.loop(10); // ... then carry on looping silence
Horn = 1; //Reset the short press triggee flag
}

if(val < maxval - 10 && currentTrack == 2) { //If the input from the ESC voltage divider drops 10 units below the max value while idling ....
myMP3.play(4); // ... then play the acceleration sound track ....
delay(29000); // ... for 29 seconds ....
myMP3.loop(5); // ... and then play the cruise sound track
currentTrack = 5;
val = 0; //Reset the input value to 0 to prevent triggering the next if loop
}

if (val > minval+ 120 && currentTrack == 5){ //If crusing and the input value from the ESC rises 120 units above the minimum value ...
myMP3.play(7); // ... then play the deceleration track ....
delay(12000); // ... for 12 seconds ....
myMP3.loop(2);// ....and then play the engine idle sound...
currentTrack = 2;
minval = 1023; // Reset the minimum input value ....
maxval = 0; // ... and the maximim input value (just in case!)
}
Engine = 1; //Reset long press flag if it is pressed and triggers nothing
Horn = 1; // Ditto for short press flag
delay(100); //To help reduce false readings

}




Hopefully, the comments alongside each of the statements help explain how the code works.

If you decide to follow in my footsteps, you will have to tweak the 'delay' timings, eg

    if (Horn == 0 && currentTrack == 2){ //If short press and current track is idle sound .....
myMP3.play(3); //.... then play the idle + horn track
delay(1800); // Length of the horn + idle track (ie 1.8 seconds)
myMP3.loop(2); // Carry on looping the idle sound track
Horn = 1; // Reset the short press trigger flag
}

 and the variables in the if statements eg 

if(val < maxval - 10 && currentTrack == 2)

to suit your sound files and the ESC output values to match the characteristics of your motor and model.

Once the railbus has been turned on, a long press on the bind button (Channel 5 input) will trigger the engine start sound and then loop the engine idle sound. At any point, a short press on the bind button will sound the relevant horn sound file. A small turn of the throttle knob on the transmitter will make the gear grinding and acceleration sound file start. once this has finished the cruising sound file starts. Reducing the speed of the railbus to around half will trigger the deceleration sound file which then loops the idle sound. A long press of the bind button while the idle sound in playing will trigger the engine cut-off file to start which then leads to the silent sound file looping.

It actually took me nearly two weeks to perfect the code. Even so, it's not perfect and I might experiment with a revised version of it sometime in the future, but for now it seems to work. 

 

 Costs

  •  Arduino Nano = c£4.50 GBP (eBay) or c£1.99GBP (AliExpress)
  • DF Player Mini = c£4.00 GBP (eBay) or c£1.00GBP (AliExpress)
  • Micro SD Card = c£4.00 GBP (eBay) or £0.99 GBP (AliExpress) 
  • 12v - 5v Voltage regulator = c£2.75GBP (eBay) or c£1.50 (AliExpress)
  • Voltage divider parts = (c£1.50GBP (eBay) or c£0.50GBP (AliExpress)
  • OR DF Robot Analogue voltage divider = £3.50GBP (Farnell)
  • Miniature speaker = c£5.00 GBP (eBay) or c£2.50 (AliExpress)

It's assumed you will have an existing battery powered locomotive with radio control into which the sound system will be fitted. 

Friday, November 06, 2015

How I used Audacity to create sound files for my Ford(ish) railbus

Introduction

Having just modified a cheap USB MP3 Player to enable a Deltang receiver to trigger movement from file to file (see How I modified an MP3 Player to provide sound for my railbus), I needed to create some appropriate sound files to use with it.

I decided that I needed five sound files:
  1. 20 min of silence (when the railbus was stationary with no engine running)
  2. Engine start-up and idle (for 20 minutes)
  3. Horn, gears and acceleration through the gears before running sound (for 20 mins)
  4. Deceleration, brake squeal and idle (for 20 mins)
  5. Engine stop
I figured that I could move forward and back through these files using the direction switch on my Deltang Tx22 transmitter to cover all eventualities under which the railbus might operate.

Locating suitable sound files

The internet is a wonderful place. I searched for appropriate sound files of antiquated Ford motor vehicles which I could use. Initially, I searched for Model T Ford sounds as I had previously used some of these to dub sounds on to a video of the railbus in action (see A Day in the Life of Peckforton Station).

 These sounds had been suitable for lineside shots, with the railbus moving towards and away from the camera, but I needed engine sounds which were more constant.

Eventually, I managed to track down the sound of a Model A Ford on the StockMusic.com website. For a modest sum (just under $10), I was equipped with the sound of a car running past, the car starting, idling and stopping, and the sound of a car horn.

I was now ready to start editing in Audacity, which is a free open-source sound editing program available from SourceForge. To demonstrate the editing processes involved in producing the sound files, I'll show you how I produced the most complicated one - the third file with the horn, gear change and acceleration to running speed.

The first step was to start up Audacity and then open the downloaded file containing the idling engine sound. The engine start and engine stop sections of the file were highlighted and then deleted, leaving just the sound of the idling engine.

Part of the engine sound was highlighted and then Adjustable fade ... was selected from the Effects menu

 The opening volume was set to 100% and the closing volume was set to 200%. You may need to experiment with these values to suit the sound file you are working with.

 Once the rising effect of the volume was checked, the same section was highlighted once more and the Sliding Time Scale/Pitch Shift tool was selected from the Effects menu.

 The initial tempo change was set to 0 and the final tempo change was set to 200%. Again this final value was determined by experimentation. After some checking I decided the pitch needed to be changed as well to give a rising pitch to the engine as it increased in speed. The final pitch shift was set to 100%.

 The effect was tested to check the settings sounded satisfactory.

 The edited section of sound was highlighted, copied and pasted into the sound track and another section of the original idling sound was edited to give a slightly different and shorter section of rising sound, which was copied and pasted again to give the effect of working through four gears.

I decided the sound would be enhanced with the addition of the gearbox whining in the background. I tracked down the video of a vintage bus on the internet and extracted the sound using another piece of free software - Any Video Converter.

Once a suitable section of whining gearbox was found it was imported into the Audacity .......

.... where it opened as a new track

The short section of whine was copied and pasted a few times....

 The section of whine sound before the rising engine sound was highlighted and then, using the Amplify tool from the Effects menu, its volume was reduced to zero (there would be no gearbox whine while the railbus is stationary).

A section about twice as long as the rising engine sound was highlighted and amplified, rising from 0 to 400% using the Adjustable fade tool from the Effects menu (again some experimentation was necessary to find the most appropriate value).

The tempo and pitch of the same section was edited with the Sliding Time Scale/Pitch Shift tool from the Effects menu. The tempo was changed from 0 to 200, and the pitch from 0 to 100%.

The effect was applied again and copied and pasted to match the other sections of the engine sound track.

After some tweaking and adjustment, the sound of a grating gearbox (found on a free sound effects website - https://www.freesound.org/ ) was then imported and copied and pasted on to a new track to occur at appropriate places alongside the engine and gearbox sounds.

Finally, the sound of the Ford's klaxon horn was imported and added on a track near the start of the recording.

 A similar approach was used to create the other files needed (ie start and idle, decelerate and idle, idle and engine stop). These were exported from Audacity as MP3s and then transferred, one at a time (to ensure they appeared in the correct order) on to the micro SD card.

The SD card was then installed into the MP3 player on the railbus and tested to ensure everything worked as intended.

As you can see, there is a 1 second pause when moving from one track to another. I may look into the possibility of using a recordable sound module triggered by a Picaxe chip to mask this pause, but for now I am happy to live with the pause - my imagination disguises the gap in sound and when making videos of the railbus, I can edit out the pauses.




Tuesday, April 29, 2014

How added suspension to my railmotor

A couple of years ago, I constructed a two-car railmotor based on a couple of Andel resin freelance coaches (see How I constructed a railmotor). Since her construction, she has been through quite a few reincarnations as I have sorted-out a series of problems. Whilst this has at times been frustrating, the solutions have also provided me with opportunities to develop knowledge and experience in a range of different fields.



Problem: Erratic radio control
Initially, she was controlled with a keyfob controller using a circuit from a gadget for dimming LEDs.
Solution: After trying various modifications, I eventually discarded this control system and installed a Deltang receiver/controller (see An evaluation of the Deltang r/c system)


Problem: Lack of power
 Initially, the railmotor was powered by an IP Engineering motor and gearbox assembly. The 16:1 gearing on this mechanism meant that there was insufficient power from the motor running on 12 volts to take the power car and trailer up the 1:40 gradients on the railway.
Solution: The original motor/gearbox was discarded an MFA gearbox motor was mounted beneath the chassis powering the wheels through bevel gears. (see  Progress Report 48)

Problem: Regular derailment
Whilst sometimes she would run round the track without problems, on other occasions she would regularly become derailed as she negotiated some pointwork.
Solution 1: My first diagnosis was that she needed more weight over the front wheels - to keep her nose down. Some strips of lead flashing were trimmed to fit into the cavity beneath the bonnet and, with fingers crossed, I gave her a trial.

Some sets of points she negotiated without problem, but others she refused to take without derailment. Close scrutiny of her progress showed that one wheel was riding up over the check rail, thereby causing the other to foul the frog.

 Solution 2: My next attempt was to widen and deepen the flanges of the Tenmille wheels with plasticard as I had done successfully with other finer-flanged wheels (see How I improved the compatability of IP Engineering wheels with LGB pointwork)
Tenmille wheels
Plasticard 'washers' roughly shaped
Superglued to the back of the wheels before being filed to shape
Testing.
 Whilst this has been successful with other rolling stock, this was not so with the railbus. I then tried some LGB spoked metal wheels which have wider treads and deeper flanges and of course are designed to be compatible with LGB pointwork. No success. Clearly the problem was more deep-rooted.

I studied her closely again as she went through the points and realised that, as her wheelbase is quite long (in comparison to most of my other locos), she was unable to flex her chassis if the rail dropped slightly. This meant that in certain places, not all four wheels were in contact with the rail. Whilst this was less of a problem on straight track, it was disastrous on the curves of points which were not perfectly level.

Solution 3: What was needed was some simple form of compensated suspension - to allow the leading wheels to follow the contours of my uneven trackwork. After considering (and rejecting) a range of complex hinged systems, I eventually opted for the simplest - a U-bracket which was loosely mounted so it could rock from side to side.

 A bracket was made from 64thou brass strip, with two fixing-holes along the centre-line.

Between these holes a short length of 2mm diameter brass rod was soldered.

The bracket was then bent into shape and fixed in place with self-tapping screws as, unlike nuts and bolts, these could be screwed-in without me having to dismantle the bonnet assembly (a fiddly process).

Another test-run showed that this solution was successful. The wheels now remained in contact with even my most irregular trackwork.

A few more test-runs showed I needed to adjust the back-to-back distances on the wheels on the powered axle, but the railmotor will now trundle around the railway at a sedate pace with only the occasional mishap - usually explained by overhanging vegetation or twigs which have fallen on to the track.

I spruced her up by giving the radiators and headlamp surrounds a couple of coats of brass paint and painted the underframes and steps with matt black.

And then, of course, she needed extensive test-running ......


And then, although she will never need to traverse R1 pointwork (the only R1 points I now have on my railway are in the copper mine sidings), I decided to see how she would fare through the most challenging trackwork on my railway.

No trickery involved (apart from editing out the manual changing of the points) - I even tried her flat-out through the points without mishap. However, she struggled to get through two R1 points connected in tandem to form a cross-over. But this was because the buffers between the two cars locked rather than any problem with the suspension system.

So, I feel very pleased with my applied problem-solving in this instance. This is one of the reasons I find railway modelling so rewarding - each day presents a new challenge which requires ingenuity and sometimes dogged persistence to overcome.

Sunday, August 18, 2013

Progress Report 48

The weather has been quite mixed since the previous Progress Report (see Progress Report 47) but I have managed to get a couple of complete operating sessions in, and also have run the railway in tail-chasing mode a few times when we've had visitors or when I just fancy seeing something running.

Battery Power

I must admit, I am becoming more and more enamoured with battery power. Today, for example, one of my friends phoned up and asked if he could bring his future son-in-law round to see the railway in half an hour's time. It's been a week or so since I last ran a train as the weather has not been conducive and normally I'd say, give me an hour and a half to make sure the track is clean enough - but not this time. A quick whiz round the track to remove fallen leaves,
........ a battery loco was placed on the track with some rolling stock and within twenty minutes we were up and running.

Normally, after cleaning the track, I'd have a test loco running around a couple of times to check whether there were any mucky bits I'd missed, but now I have the confidence to run a full train straight off.

I'm looking forward to extending the number of battery powered locos so I will eventually have a full complement for a running session (a minimum of three locos - one passenger, one goods and one for the copper ore trains).


Deltang radio control system

After hearing about this system on the G Scale Central forum, I decided to invest in a transmitter and a couple of receivers to see whether it would be up to running my slowly expanding fleet of battery operated locos. The Deltang system uses 2.4gHz with a transmitter which can control up to 12 locomotives independently. (see An evaluation of the Deltang r/c system). After some initial trials with one loco, I have now invested in another three receivers and so have no excuse not to finish adapting and building sufficient battery locos to run a full operating session.

The most reliable battery loco so far is the 0-6-2 model based on the Southwold Railway's No.4 Wenhaston (see How I constructed a battery powered 0-6-2T locomotive). I have now run this extensively with a Deltang receiver/controller which, despite its diminutive size, seems to be able to cope with the loco hauling a full train up the line's gradients. I am intending to add a heat sink to the receiver just to be on the safe side, but I'm not entirely convinced it's needed.

IP Engineering Lollypop railcar

To test out the Deltang system on a low powered loco (all my other battery models run on 12 volts), I am in the process of putting together an IP Engineering Lollypop railcar kit (no longer available) which I've had on the to-do shelf for well over a year. This is powered by 4.5 volts and responds well to the Deltang controller/receiver. Although she's sufficiently functional to enable me to engage in testing ........

... she still requires detailing, painting and weathering. I'm considering making a small flat truck to go with her so that she will form the railway's engineering train. (see How I constructed an IP Engineering Lollypop Railcar)

New gearboxes for the IP Engineering diesel and the railbus

 Diesel loco

The IP Engineering diesel was already on its second gearbox when I constructed it. I'd bought it as a half-made kit and it came with a stripped gearbox and an new one. Within a very short space of the time the plastic gears in the new gearbox became stripped as well.

I tried constructing my own using a metal worm and worm wheel from Cambrian Models but my engineering skills were not sufficient to make a gearbox which would mesh properly. A friend came to the rescue and constructed one for me using metal 00 loco gears. However, he was not convinced the gears would be up to the job for more than a short period of time.

When testing this model with the Deltang controller (see above), I found that while it was fine running in reverse, the controller sometimes struggled to turn over the motor when it ran forwards. After consulting the designer of the Deltang system, he adapted one of his ordinary receivers to work with his Tx22 transmitter enable me to use the Brian Jones Mac 5 controller with the transmitter. She now works reliably though she is more responsive in reverse than when travelling forwards which suggests the problem lies with the mechanism rather than the control system.

If the present gearbox does succumb to excessive wear, I will replace this gearbox with an MFA Como gearbox motor and bevel gears, as I have done on the railbus (see below)

 The Railmotor

The railmotor also had a gearbox with plastic gears and while the gears had not become stripped they were wearing alarmingly. A major problem with the motor and gearbox on this model was that it was seriously under-powered. The gearbox provided only 16:1 reduction and as a consequence the motor didn't generate sufficient torque to power the railbus when pulling its trailer car.

I trawled the internet for suitable gears and motors and it looked as if I would have to have a special gearbox constructed for me (at considerable expense!). After consulting the opinions of fellow modellers on the G Scale Central forum, I invested in a 30:1 12-24v gearbox motor and a set of bevel gears from MFA Como. I have since seen these available in my local Maplin store - and what is more the gearbox motors cost only around £10!

After making a simple brass U-shaped bracket for the wheels I needed also to source a sleeve which would slip over the drive axle to increase its diameter to 4mm for the bevel gear. This I tracked down from MotionCo, and when it arrived, I realised I already had some 3mm brass tube which would have sufficed. This is all part of the learning process!

It's a whole lot easier to mesh bevel gears than it is to mesh worm gears and within a short space of time I had a fully functioning and powerful railbus. So far, I have only been able to test it with a few alkaline batteries, but I have just taken delivery of a 12v li-ion battery and will shortly have another couple of Deltang receivers so I will be able to wire this up properly and enable it to enter service (see How I built a railmotor and scroll down to the update).

At last figured out where the water goes

Ever since I installed the stream (see How I constructed a stream) I have been perplexed as to why it sometimes will run for several hours with only minimal topping-up and yet on other occasions it needs topping up every half an hour or so. There seemed to be no logical reason until, recently, I had need to clean out the sump hurriedly before a visitor came to call to see the railway and more specifically how I'd constructed the stream. Whereas prior to the clean-up I'd been topping it up every half hour, while he was there (for three hours) it didn't need a top-up once. Suddenly it came to me. If the holes were blocked in the cover over the sump, rather than flowing down into the sump, the water would soak away around the edge of it.

So now, from time to time, I poke a pointed stick down into the holes drilled in the lid of the sump (an inverted plastic dustbin lid) to unclog them and, at last, the stream goes on happily for hours without the need for topping-up.