PICAXE based Model Railway Speedometer Wagon

westaust55

Moderator
I know there are a number of model railway enthusiasts lurking out there. Some may find this small project of interest to construct a PICAXE 20M2 based Speedometer Wagon either just to know what the scaled speed is for a locomotive or wishing to calibrate the speed. While the program is calibrated for 00 Gauge for English outline there are ample comments in the program listing that calibration for HO scale and maybe others can also be achieved.

While some way off having a new layout up and running, I am still interested to find aspects in which I will be able to utilise PICAXE micro-controllers in some of the functions hence this project as a starter.

Attached are the words including the embedded program listing plus a schematic diagram and some photographs.
The BASIC program file (.bas format) is included
 

Attachments

Last edited:

westaust55

Moderator
Here is the Main PCB layout image as developed in the PEBBLE program.
The wires overlapping the Tens digit of the 7-seg display are on top of the board and under the display.
Other wires shown but not visible in the photos including the decoupling capacitor are on the underside on the Main board.

Second image is the lower board layout to which the slide switch (shown here as a toggle switch), battery, sensor wires, and header to main board are connected.
Image generated initially in PEBBLE and then a bit of hand tweaking in Paint to extend switch terminals through to where they really do connect.
This board is mounted within the wagon with the slide switch hard against the floor of the wagon and "knob" protruding through rectangular hole cut/filed in end wall of wagon.
 

Attachments

Last edited:

westaust55

Moderator
Are you missing the connection from the battery negative to pin 4 of the header.

Bill
Thanks for that pick-up Bill. Currently not at home but edited the pdf with Adobe pdf editor to fix.
Also managed to append the schematic and photos into 1 pdf file so separate parts are also now removed.

Interestingly my pdf creator program at home would pdf the whole lot but it created a 1.3 MB file - just too big for the forum which has a 0.9 MB limit.
Yet if I pdf'ed just the photos, the result was a 13 MB pdf file. :eek:
Now, while away from home, using the Adobe Acrobat 9 Pro resulted in the entire collection of parts combined as just 365 kB. :)
 

westaust55

Moderator
I have made a minor modification to the PICAXE program.

Observation running the wagon over a few metres of track was that if the wagon (and locomotive) is accelerating and the first speed measurement is less than 10 mph but by the time a second speed measurement is taken the speed exceeds 10 mph that the display starts to look like "h.5" or similar.
The revised code checks if after the second speed measurement the speed is > 9.5 mph and adjusts the display accordingly.
Rev B of the PICAXE program is attached.
 

Attachments

Last edited:
Top