Chassis dimensions?

Post details of your rolling stock developments - locomotive, carriages, DMUs, etc.
Post Reply
User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Chassis dimensions?

Post by dvdouden »

Hi there, newbie here. I've just taken my first steps back into the scale trains hobby by purchasing some T gauge items. Last time I touched a scale train was two decades ago when I was in my teens (my dad's H0 Marklin).

Anyway, I'd Ike to build my own DCC-like system from scratch. Ideally, I'd like the decoder to fit inside the chassis, but since my order hasn't arrived yet I have no way of measuring the available space in the chassis.
Does anyone know the width of the motorized chassis (so inside the body shell)?
The 19 meter and longer chassis' have some empty space behind the motor. What is the height of this space and the length for the various chassis'? (19, 20, 21 and 23 meter)
What is the vertical distance between the motor and the bus-bars?

And the last question: is the construction of standard locomotives similar to the motorized chassis'? I.e.: is the body shell of standard locomotives removable and is there similar space available underneath?

My order hasn't been shipped yet, otherwise I would've measured it myself (ordered a 23m chassis), but I'd like to be able do some pcb designing in the mean time and having some target dimensions would help a lot, especially the width of the chassis is crucial.

Thanks in advance for any answers!
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

User avatar
dkightley
Posts: 1270
Joined: Wed Nov 13, 2013 9:43 pm
Location: Nottingham, UK

Re: Chassis dimensions?

Post by dkightley »

Welcome to the world of T!

I think your questions can be sort of answered by referring you to a couple of existing threads...

Firstly, this thread: http://www.talkingtgauge.net/viewtopic. ... cx65#p7820

You'll see what space is available....but not the dimensions, as all will be revealed. There's only one DCC decoder chip available at present that stands any chance of being fited inside any existing T gauge power unit..the DCX65 decoder from CT Elektroniks. I have had some on order for three months now....and neither myself nor the UK distributer can get any form of explanation from CT as to why they are not supplying! The DCX65 by the way is 6mm x 5mm x 1.8mm and will fit in the 23mm chassis...but at present, I'm not sure how the smaller units fair!

The second thread is http://www.talkingtgauge.net/viewtopic.php?f=10&t=525

This thread documents what I'm currently doing with DCC....

To answer one of your questions....all of the power units are constructed in exactly the same way....so the "gap" you refer to , if space is available, will be there on both the unbodied and bodied power units.
Doug Kightley
Webmaster here and volunteer at the National Tramway Museum http://www.tramway.co.uk

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

dkightley wrote:Welcome to the world of T!

I think your questions can be sort of answered by referring you to a couple of existing threads...
Thanks! I did read those threads before, and made some guesses on the dimensions based on the picture I found here and on tgauge.com, but couldn't find any info on the width of the chassis, nor deduce it from photo's.
I saw the DCX65, that's ridiculously tiny! I won't be able to make my board that small, since I can't solder lead-less IC's by hand. The current design is 14 by 7 mm's. I guess it's too wide to fit, I can bring the width down to 5 mm I think, but that will increase the length of the board by a couple of mm.
To answer one of your questions....all of the power units are constructed in exactly the same way....so the "gap" you refer to , if space is available, will be there on both the unbodied and bodied power units.
Cool, I was hoping for that

Thanks for the reply!
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

Well, it's here! :D

First thoughts: TINY! :shock: And very cool to see something of that size running.

I didn't order a PWM controller since I wanted to build my own. Wired an Arduino and an H-bridge to the track, wrote a few lines of code and here's the result!

It seems to have some difficulty with running at low speeds especially in curved sections. It tends to stop running, requiring a small push to get going again. I guess I should clean the track and wheels properly first since it appears to lose its electrical connection to the track (motor stops buzzing).
It also seems to wobble a bit in corners at low speeds, but I guess that's the gears not meshing properly due to the small radius of the bend (120mm)?

Measured some lap times and tweaked the controller a bit to get a scale speed of about 130km/h (75mph). Then added some code to slowly ramp up the speed, trying to get an acceleration of 2.2m/s/s and a deceleration of twice that, which works out to roughly 16 seconds from standstill to top speed and 8 seconds back to standstill.
Shot a video, uploaded it, and then realized the Wikipedia article mentioned acceleration in km/h/s instead of m/s/s... DOH
The 16 seconds looked about right. When you're in a car :lol: It should've been 57 seconds and a bit.

Anyway, to answer some of my own questions:
Width of the chassis without body shell: 5.1mm
Dimensions of the space behind the motor on the 23m chassis: L=12.2mm, W=5.1mm, H=3.4mm. The bottom of this space has walls running back to front which are 1.0mm high (so in the center the space is 4.4mm high). I'm unable to measure the thickness of these walls without taking stuff apart, but if I had to take a guess then I'd say 0.5mm (so inner width would be 5.0mm)
The space between the motor and the bus-bars measures ~1.0mm, so it should be possible to slide a thin PCB between the bus-bar and the motor contacts; this would be ideal for a plug and play controller.

All in all I'm pretty pleased. Got it working pretty fast, seems to run good and the quality is great. Still need to sort some things out:
-fiddle a bit more with the controller to make it run a bit smoother at low speeds; haven't touched the PWM frequency yet)
-fix the acceleration
-rework the decoder design; it doesn't look like it's going to fit right now. The width is okay, the length is somewhat problematic (it will fit the 23m chassis, but I'd like it to fit the 20 and 21m chassis as well), but the height is the real problem here. Back to the drawing board...
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

User avatar
dkightley
Posts: 1270
Joined: Wed Nov 13, 2013 9:43 pm
Location: Nottingham, UK

Re: Chassis dimensions?

Post by dkightley »

This is good stuff!!!

I do like the smooth acceleration you've been able to achieve so quickly.

What peak line voltage are you using for the PWM output? And what frequency?
Doug Kightley
Webmaster here and volunteer at the National Tramway Museum http://www.tramway.co.uk

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

Voltage should be somewhere around 4.5V, frequency is 100Hz, duty cycle is 32% at top speed. I'm just increasing the duty cycle from 0% to 32% linearly in 16 seconds. I tried going for the correct acceleration (57 seconds), but that makes it a lot less smooth. But there's plenty of variables to play with when you're building your own gear :D
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

Now with the correct acceleration
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

msimister
Posts: 96
Joined: Sun Jun 21, 2015 6:18 pm
Location: Melbourne, Australia

Re: Chassis dimensions?

Post by msimister »

That's brilliant. I'd like to get my rolling stock accelerating and decelerating like that but for this very non-electrically minded bloke, where did you add code and to what? Are you using a standard controller from Tgauge.com?
Thanks.
Malcolm

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

msimister wrote:That's brilliant. I'd like to get my rolling stock accelerating and decelerating like that but for this very non-electrically minded bloke, where did you add code and to what? Are you using a standard controller from Tgauge.com?
Thanks.
Malcolm
Thanks for the compliments! :)
I'm not using the standard Tgauge controller. Instead I opted for building my own from some parts I already had.
I'm using an Arduino ( https://www.arduino.cc/ ) and a dc motor driver board ( https://www.banggood.com/Dual-Channel-L ... rehouse=CN ). The Arduino controls the motor driver, and the motor driver is connected to the track. The code is uploaded to and executed by the Arduino microcontroller. Dumbed down, it looks something like this:

Code: Select all

start applying power to motor driver
wait for 3200 microseconds
stop applying power to motor driver
wait for 6800 microseconds
repeat (100 times per second)
One run of code takes 10,000 microseconds, or 1/100th of a second. So you can say it operates at 100Hz.
Within this 10,000 microseconds, power is applied for 3,200 microseconds. So that's 32% duty cycle.
By varying the duty cycle you can control the speed of the train (increasing makes it run faster, decreasing makes it slow down and a duty cycle of 0% makes it stop). I found 32% to be the right amount of duty cycle to make the train run at 80 mm/sec (or 75mph/130kph). This may vary from train to train and also depends on the input voltage.

This practice of turning power on and off very quickly with varying ratios of on and off time is called Pulse Width Modulation or PWM, and it's exactly what the official TGauge controller does. By turning the speed knob you can vary the duty cycle and make the train run faster or slower.

To get a smooth acceleration, the code slowly ramps up the duty cycle. So initially it may start with 2 microseconds on and 9998 microseconds off, then 4/9996, 6/9994 etc until it reaches 3200/6800. It will take 3200/2 = 1600 increments to get to full speed, but since the code runs 100 times per second it means full speed is reached in 16 second flat. And that's exactly what happens in the first video. In the second video I reduced the increments to 0.5 microseconds, so it takes four times longer to reach full speed.

There's no user input at the moment; it's run completely by code. But it's not that difficult to connect some knobs and buttons to the Arduino and write some code to handle them, or to make sure that the train never accelerates faster then a set amount, even when you open the throttle instantly.
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

msimister
Posts: 96
Joined: Sun Jun 21, 2015 6:18 pm
Location: Melbourne, Australia

Re: Chassis dimensions?

Post by msimister »

Er thanks. Think I need to study electronics...

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

Small update.
Still waiting for some components to arrive, so in the mean time I'm cleaning up the code and adding some features. Tacked the track to a cardboard box with double sided tape (and got my first trees for free :lol: ) by lack of a suitably sized piece of wood. Got a few knobs and a display from the parts collection and wired it to the microcontroller.
Turning one knob changes the target speed, the switch changes direction and the other knob changes the acceleration and deceleration (pressing the knob switches between the two).
The actual speed slowly updates to the target speed using either the acceleration or deceleration value depending on whether the target speed is higher or lower than the actual speed respectively. When switching direction, the train first uses the deceleration setting to slow down to stand still, and then uses the acceleration setting to reach the target speed. Pressing the speed knob immediately stops the train (as a safety measure).
The display shows the actual speed and target speed on the top row, preceded by their directions. Speeds are in Km/h.
The second row shows the acceleration and deceleration setting, an indicator in front of the value indicates whether the train is accelerating or decelerating. Values are in Km/h/sec.

I'm planning on using this piece of track to calibrate trains. By adding a few sensors it should be able to accurately calculate the speed of the train at various PWM settings. I'm pretty certain that the relationship between PWM duty cycle and actual speed isn't linear. I.e.: doubling the duty cycle probably more than doubles the actual speed of the train.

I'll shoot a small video of this setup in action once I've gotten rid of the wire mess, it's a bit dodgy at the moment and the track has plenty of conductivity problems as it is; still need to give it a good rub with isopropyl alcohol and a bit of paper to get rid of my greasy fingerprints :roll:
Attachments
CustomController.jpg
CustomController.jpg (134.14 KiB) Viewed 10725 times
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

NeilM
Posts: 181
Joined: Thu Nov 14, 2013 9:46 am
Location: North Yorkshire, UK
Contact:

Re: Chassis dimensions?

Post by NeilM »

Very impressive the level of testing you have done here to work out what settings you will need in your code.

I had started a similar exercise with an Arduino, but so far mine just flashes LEDs to indicate output, as I have not yet had chance to add the electronics needed to drive a motor.

I have set mine up with analogue input, i.e. a variable resistor as you have rather than push button digital input as that is how I prefer to operate. However one other thing I designed into the code was to use the potentiometer as centre off using the code to detect the centre (i.e. off) setting. I did this simply because I have grown up operating layouts using a H&M Duette control which operates this way.
Neil

T gauge items in my Shapeways shop http://www.shapeways.com/shops/t450

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

Thanks Neil!

I guess controls is just a matter of preference. I like using rotary encoders, it's easy to use them for setting multiple values, they're more accurate and I had some in my parts collection. Potentiometers on the other hand are easier to use, but they can be a bit jumpy. And I was all out of pots :)

In other news: I found some high res photos of the DCX65, both front and back. So I was finally able to read the part numbers on the components. Turns out the micro controller they're using is exactly the same as the one I'm planning to use on my decoder :) The Atmel ATtiny84A. It's a little brother of the one the Arduino uses.
Furthermore I found out which voltage regulator they use to bring down the track voltage to 5V. And I noticed that they don't use a dedicated H-bridge IC, but instead they use discrete components to build one on the board using two dual mosfets and a few resistors. This saves some space on the board and it keeps the bill of materials down by a few dollars. I guess the total cost of a single board is somewhere between $5 and $10 in components and manufacturing. So the retail price of €30 seems about right.
I'm quite impressed by the density of the board. They really crammed a lot in there. I can't judge the quality of the design. I haven't figured the entire schematic out (and I won't), I just don't have enough knowledge or experience in electronics for that, but the overall design looks fairly similar to what I came up with so far.
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

Power enters the board through the Left and Right Rail wires and passes through the diodes at the top and bottom of the board (in red). This rectifies the incoming voltage. The rails are constantly switching between positive and negative voltage (AC), the diodes rectify this so one end is always positive and the other negative (DC).
The rectified voltage is then passed to the DC-DC converter (in yellow), which brings the 7 - 21V from the rails down to a more usable 5V. It needs a few other components to work properly, mainly the capacitor and diode to the right of the regulator chip and the inductor on the other side of the board. The resistors are used to configure the output voltage (using different values of resistors result in a different output voltage).
The other components on this side of the board are probably related to input protection, some of the resistors are most likely used by the motor driver
dcx65-2-l-annotated.jpg
dcx65-2-l-annotated.jpg (172.57 KiB) Viewed 10680 times
On bottom of the other side of the board we find the inductor mentioned earlier, as well as a few capacitors. These act like little power storages, batteries if you will; they smooth out any noise on the power lines created by the regulator, motors and contacts. The large chip (a whopping 3x3mm) is the brain of the board. It decodes the signal received from the rails and tells the motor drivers and lights to turn on or off. It runs on the 5V from the regulator.
The two smaller chips in orange are the motor driver. Each chip contains two MOSFETs (a specific type of transistor suited for driving motors). They put power on the motor wires on the other side of the board. As I mentioned earlier, this is more cost effective than putting in a dedicated motor driver chip, it takes up less board space and multiple smaller components are easier to place than one big (2x2mm :roll: ) chip.
dcx65-1-l-annotated.jpg
dcx65-1-l-annotated.jpg (157.6 KiB) Viewed 10680 times
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

User avatar
dkightley
Posts: 1270
Joined: Wed Nov 13, 2013 9:43 pm
Location: Nottingham, UK

Re: Chassis dimensions?

Post by dkightley »

This is fascinating information on this board......

I wonder why they're not supplying them when their distributers place an order for them.....in my case an order was placed in October last year! :cry: :twisted: :twisted: :twisted: :twisted:
Doug Kightley
Webmaster here and volunteer at the National Tramway Museum http://www.tramway.co.uk

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

dkightley wrote:This is fascinating information on this board......

I wonder why they're not supplying them when their distributers place an order for them.....in my case an order was placed in October last year! :cry: :twisted: :twisted: :twisted: :twisted:
One can only guess... When I bought my soldering iron from a well known brand (Weller) I had to wait for four months before the manufacturer finally shipped it to the distributor. And it's not like there wasn't any money to be made from it, but I guess they were out of stock and were waiting for enough orders to make it worth manufacturing some more. Granted, the iron I ordered is a bit of an odd one and probably doesn't get sold that often compared to their regular irons. Perhaps the same applies to the DCX65.

Finished redesigning my decoder yesterday. (Mind you, it's not DCC compatible) Pretty pleased with how it turned out.
TrainDecoderV2_3D.jpg
TrainDecoderV2_3D.jpg (64.61 KiB) Viewed 10651 times
As I mentioned earlier, this board should just slide between the motor contacts and the bus-bars, no soldering required.

Looking at the bottom of the board here. The large pads on the right connect to the motor contacts. In the middle are two dual MOSFETs and left of them four resistors (to prevent stuff from shorting out), far left is the micro controller.
TrainDecoderV2_bottom.jpg
TrainDecoderV2_bottom.jpg (52.89 KiB) Viewed 10651 times
At the top of the board are the diodes for rectifying the power from the rails and capacitors to make the voltage more stable. Two large pads on the right and in the middle connect to the bus bars (the bars should be able to run between the components on the top of the board). I'll need to figure something out to make sure the connection between the board and the bars is as solid as possible.
On the far left are six pads which can be used to update the firmware. The two pads on the bottom are for connecting LEDs. (Okay, so a bit of soldering may be required after all)
TrainDecoderV2_top.jpg
TrainDecoderV2_top.jpg (49.58 KiB) Viewed 10651 times
The board is 12.4mm long and 5.1mm wide and it should fit a 21M motorized chassis, perhaps even a 20M one. (only one way to find out :D ) 21M is my target chassis since I want to build an 885 series EMU, which is 21.something M.
TrainDecoderV2_side.jpg
TrainDecoderV2_side.jpg (23.04 KiB) Viewed 10651 times
I'm relying on the voltage on the rails not being above 6V. The diodes on the board will cause the voltage to drop about 1.2V, so the effective voltage on the electronics and motor will be around 4.8V. From what I've read, DCC uses 15 to 20-something V on the rails. But this requires additional components in the decoder to bring the voltage down to more usable levels. By making sure the voltage at the decoder isn't too high, I can omit these components and keep the board small enough to fit inside the chassis.
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

First version of my decoder pcb arrived today. Hooray for surface based pricing and free shipping, can't imagine anyone made any money on this. ($0.75 including shipping from US and a free promotional sticker)
It's not going to fit inside the train, but it's small enough to attach to the train and do a bit of prototyping. Once all the other components arrive I can put it together and try my hand at building an encoder.
Photo 27-01-2018, 21 59 46.jpg
Photo 27-01-2018, 21 59 46.jpg (69.32 KiB) Viewed 10604 times
Trying to design something of a layout as well, but I'll put that in a separate topic once I've got something worth showing or need some help/ideas/feedback ;)
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

In case anyone is interested in the code of the PWM controller: https://github.com/dvdouden/tgauge
Off to draw some wiring diagram for it :)
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

jesse6669
Posts: 93
Joined: Thu Nov 14, 2013 6:31 pm

Re: Chassis dimensions?

Post by jesse6669 »

Could it fit diagonally in an un-powered locomotive or freight/passenger car shell?

User avatar
dvdouden
Posts: 30
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Post by dvdouden »

It could probably fit horizontally in an un-powered shell. The board needs a bit of trimming on the sides (the manufacturer has a minimum board size of 1/4", but the board can be trimmed down to 5.1mm width). I'm not entirely sure how thick the board will be with all components fitted. The PCB itself is 1.6mm thick. The ICs probably 2mm.
So yeah, I guess it would fit one way or another. Can't tell for sure until I get the required components and assemble one.
My T-gauge stuff on github: https://github.com/dvdouden/tgauge

Post Reply