Board index Talking T Gauge Forum T Gauge Custom Rolling Stock

Post details of your rolling stock developments - locomotive, carriages, DMUs, etc.

Re: Chassis dimensions?

Postby dvdouden » Mon Jan 22, 2018 10:07 pm

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 1180 times
My T-gauge stuff on github: https://github.com/dvdouden/tgauge
User avatar
dvdouden
 
Posts: 19
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Postby NeilM » Tue Jan 23, 2018 8:32 am

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
NeilM
 
Posts: 173
Joined: Thu Nov 14, 2013 9:46 am
Location: North Yorkshire, UK

Re: Chassis dimensions?

Postby dvdouden » Tue Jan 23, 2018 10:31 pm

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: 19
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Postby dvdouden » Wed Jan 24, 2018 7:58 am

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 1137 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 1137 times
My T-gauge stuff on github: https://github.com/dvdouden/tgauge
User avatar
dvdouden
 
Posts: 19
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Postby dkightley » Thu Jan 25, 2018 1:22 am

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
dkightley
 
Posts: 1016
Joined: Wed Nov 13, 2013 9:43 pm
Location: Nottingham, UK

Re: Chassis dimensions?

Postby dvdouden » Thu Jan 25, 2018 7:53 am

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 1108 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 1108 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 1108 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 1108 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: 19
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Postby dvdouden » Sat Jan 27, 2018 10:22 pm

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 1061 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: 19
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Postby dvdouden » Tue Jan 30, 2018 9:06 am

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
User avatar
dvdouden
 
Posts: 19
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Re: Chassis dimensions?

Postby jesse6669 » Fri Feb 02, 2018 3:00 pm

Could it fit diagonally in an un-powered locomotive or freight/passenger car shell?
jesse6669
 
Posts: 40
Joined: Thu Nov 14, 2013 6:31 pm

Re: Chassis dimensions?

Postby dvdouden » Fri Feb 02, 2018 8:23 pm

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
User avatar
dvdouden
 
Posts: 19
Joined: Thu Jan 11, 2018 7:16 am
Location: The Netherlands

Previous

Return to T Gauge Custom Rolling Stock

Who is online

Users browsing this forum: No registered users and 1 guest