Author Topic: Model Trains  (Read 46250 times)

0 Members and 1 Guest are viewing this topic.

Online andy3055Topic starter

  • Super Contributor
  • ***
  • Posts: 1167
  • Country: us
Re: Model Trains
« Reply #200 on: July 17, 2024, 03:31:49 pm »
I can't remember if it had the speech from JFK. The Berlin layout definitely has it. It is made like an outdoor cinema where people are watching him speak with a cell phone size screen!
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #201 on: November 01, 2024, 11:37:01 am »
I have just completed some major work on my speed profile and thought I would share my results for those interested.

My layout is non-DCC.  Designed before the advent of DCC.

The custom track power has 100 speed steps.  The 0-12VDC has 256 voltage divisions.  In addition to a constant DC voltage, it can produce a PWM output with 127 pulse widths.  The amplitude of the PWM pulses is also controllable.

I should also mention that I settled on a PWM frequency of 80Hz.  The hardware is capable of 10Hz to 400Hz (generated by software).

BEFORE (red):
My original speed profile was linear with the first 24 steps being PWM then changing to constant DC for the remaining steps.  While this had very good slow speed response and control, I found that a lot of knob turning with little change in the locomotive speed.

AFTER (green):
I moved to an exponential profile for both the PWM and constant DC speed ranges.  The number of speed steps was reduced to 50 and the PWM widths reduced to 16.  These changes have maintained the slow speed response while providing the appearance of a smoother control over the entire speed range.

Attached is a graph of the before and after speed profiles.  Notice that the PWM pulse amplitude is not full scale but only about 8V.  Not shown is a 4V idle stage which I hoped to be able to turn on the locomotive headlight while not moving.  The problem is that the pulse width to keep the loco from moving is to small to have the LED headlights to come on.  So, the idle position has be reduced to perform just block detection.


« Last Edit: November 01, 2024, 02:00:21 pm by MarkF »
 
The following users thanked this post: fourtytwo42, andy3055

Online andy3055Topic starter

  • Super Contributor
  • ***
  • Posts: 1167
  • Country: us
Re: Model Trains
« Reply #202 on: November 01, 2024, 04:18:03 pm »
Wow! That is very impressive. I am just about done with my scenery. I will post some photos 2nd week of November when I get back home from travel.  Your info makes me think a lot more in to this. Currently I have 3 loops individually controlled for 3 trains with cross overs from track to track. All DC. Can't afford DCC conversions on my 80 s models.
« Last Edit: November 01, 2024, 04:23:21 pm by andy3055 »
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #203 on: November 01, 2024, 04:40:10 pm »
Each track block is driven by a PIC16F876 microcontroller and a MCP4802 8-bit DAC.  This allows me to create pretty much any waveform shape to drive the locomotive to experiment with.  Back in the day, power packs used various methods to drive the loco from constant DC, to rectified AC, to PWM.  I decided on this mix of PWM for best slow speed response then switching to constant DC to avoid any motor over heating.  Overkill.  Probably just a pure PWM would work well without any adverse issues.  Also, it would be easier to generate.

By the way, my current layout is divided into 15 blocks.  I have two analog PCBs that are capable of 10 blocks each.

I estimated that there is around 80ft of track all totaled.
« Last Edit: November 01, 2024, 04:46:47 pm by MarkF »
 

Offline valcher

  • Contributor
  • Posts: 36
  • Country: ru
Re: Model Trains
« Reply #204 on: November 01, 2024, 06:15:34 pm »
What a wonderful hobby you have, looking at your models took me back to my distant childhood. Once I had several sets of trains with a large ring, three switches and two dead ends. All the sets were from East Germany, if my memory serves me right - Piko, track width -16.5 mm, locomotive power supply DC -12V, switch control AC 16V. Of course, none of this exists now. Too bad...
Five years ago I gave my grandson one of these sets, but his interest in it lasted literally three days. The tablet won.
Recently I visited the exhibition - "Grand Maket Russia", it is located in St. Petersburg. I was amazed by its scale and equipment of moving models of trains, cars and their interaction with each other. Of course, all this is controlled by controllers.
Please, do not consider this an advertisement.
https://youtu.be/5vN2tS5rBCY
 
The following users thanked this post: RoGeorge, andy3055

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #205 on: November 01, 2024, 06:49:29 pm »
A few more pictures:

I've been doing a lot of 3D designs for the layout.

An office building complete with interior, LED street lights, and highway Jersey barrier:

2421719-0

2423359-1

Dummy turnout motors with label for easy identification and selection and a real one:
Not a great model.  I just needed a way to id a turnout for the operator to select and throw.
My track sits on 3mm cork and the height allows the model to sit down into the ballast and onto the baseboard.

2421727-2 2422883-3
« Last Edit: November 02, 2024, 11:28:48 pm by MarkF »
 
The following users thanked this post: andy3055

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #206 on: November 02, 2024, 04:18:15 pm »
My locomotive inventory.  Half new and half Athearn Blue Box from the 80s.

2422929-0

You can also see the second section of ballast I'm working on at the top of the photo.
« Last Edit: November 02, 2024, 04:42:30 pm by MarkF »
 
The following users thanked this post: RoGeorge

Online andy3055Topic starter

  • Super Contributor
  • ***
  • Posts: 1167
  • Country: us
Re: Model Trains
« Reply #207 on: November 03, 2024, 12:13:24 am »
How big is the layout? I have limited space. It is a 10'x10' office room. I just confiscated almost 2/3 of the space. The board is 10'x4' but the layout is itself is around 9'x4'. 2 ovals and a smaller circle in the middle.

It was looking bare and the moment I started the scenery, it had a great view. The trains get hidden in some places and when they emerge on the other side, it is very nice to observe. Other than having a decent track plan, the scenery makes it very interesting to watch. At the moment I am adding the last of the scenery and the remaining lighting.
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #208 on: November 03, 2024, 01:31:22 am »
My layout is 10ft x 7ft with 36in legs.
If I had it to do over, I think I would make it 42in high.  Crawling underneath to do the wiring would have been easier.

Here's my AnyRail output of the layout showing a 6in grid:
AnyRail is a nice track planning program with 3D view.  The free version is limited to 50 pieces of track.
« Last Edit: November 03, 2024, 01:34:56 am by MarkF »
 
The following users thanked this post: fourtytwo42

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #209 on: November 03, 2024, 01:58:21 am »
I have spent a great deal of time writing software for the layout.
  - a program for controlling track sections (one pic16f876 does two sections of track)
  - a master program for communicating to the track and the nRF24L01+ radios in the throttles (a pic18f4620 with FTDI FT245RL USB interface)
  - a laptop GUI program with touch screen for overall control and situation awareness
  - a program in the wireless throttles (a pic18f2620)
I stayed with PIC microcontrollers throughout the hardware so that I only needed one development environment and programmer.  The laptop code was done in Visual Studio.  Everything is written in C/C++.

But then software development was my 35+ year career.   :-+

I started working on the track power design back in the early 80s.  At that time I was going to do the PWM all in hardware.  My Apple II just couldn't handle it.  :scared: 
It was put on hold mostly because of the need to wire-wrap a huge board with counters, latches, and DACs.  Then about 10 years ago, I made my way into Microchip PIC microcontrollers and redesigned all of the electronics.

This is the heart of the railroad:
2423479-0


Edit - Missed the program in the throttles
« Last Edit: November 03, 2024, 03:44:44 am by MarkF »
 
The following users thanked this post: fourtytwo42

Online andy3055Topic starter

  • Super Contributor
  • ***
  • Posts: 1167
  • Country: us
Re: Model Trains
« Reply #210 on: November 03, 2024, 05:27:07 pm »
Experience in programming is a great help. My C experience is so many moons old and never did after school stuff.

There is a working carousal and a nonworking Ferris wheel in the layout. The scenery adds a lot of color and detail and it makes the whole thing look very interesting!

I am attaching a few pictures that I had on my phone.
 
The following users thanked this post: fourtytwo42

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #211 on: November 07, 2024, 12:34:40 am »
I have made four versions of street lights.
I may use more than one version.  However, which one does everyone prefer?

2427765-0
 

Online andy3055Topic starter

  • Super Contributor
  • ***
  • Posts: 1167
  • Country: us
Re: Model Trains
« Reply #212 on: November 07, 2024, 01:50:05 am »
It all depends on the time you want to model. B and C looks nice. A does not look a street light and D looks too boxy.
 

Offline Analog Kid

  • Super Contributor
  • ***
  • Posts: 1282
  • Country: us
Re: Model Trains
« Reply #213 on: November 07, 2024, 02:34:50 am »
D looks like the lights at a mall parking lot, if you're modeling modern era.
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #214 on: November 07, 2024, 09:54:26 pm »
Thanks all,

These have flat tops in order to 3D print upside down.  The bottom has an open channel to run the wires.
They are all pretty simple for ease of printing.

I haven't decided on an era.  Probably on the older side.  Not much interested in modern times.

  D)  Is one I've seen in parking lots around stores as mentioned.
  C)  Is a round version of D for variety.
  B)  Is a modern street light that is most common.
  A)  Is an antique light I've seen around parks (thought it might be nice at the depots or engine house).

A few examples of version A:

2428665-0
 

Online andy3055Topic starter

  • Super Contributor
  • ***
  • Posts: 1167
  • Country: us
Re: Model Trains
« Reply #215 on: November 08, 2024, 03:05:00 am »
Makes sense. But the fixture diameter on A, should be smaller in proportion to the height.  It looks too big, I feel.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 8260
  • Country: nl
  • Current job: ATEX product design
Re: Model Trains
« Reply #216 on: November 08, 2024, 12:00:51 pm »
I'm going to drop this quickly. It's mostly MÁV, with some DB cars or engines mixed in.
And yes, it's on the floor. What am I, a carpenter?  :-DD
« Last Edit: November 08, 2024, 12:02:38 pm by tszaboo »
 

Online andy3055Topic starter

  • Super Contributor
  • ***
  • Posts: 1167
  • Country: us
Re: Model Trains
« Reply #217 on: November 08, 2024, 01:17:52 pm »
That is a good way to get the track plan worked out if you don't have the software!
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #218 on: November 08, 2024, 01:19:37 pm »
Makes sense. But the fixture diameter on A, should be smaller in proportion to the height.  It looks too big, I feel.

Yes.  I already reduced the dimensions.  I'm somewhat limited on the lamp size by the size of the LED that needs to fit.  I have various smaller LEDs but they don't give off much light.  These are the ones I'm planning to use: LCW MVSG.EC-AZBZ-4U9X-1

2429421-0


I'm going to drop this quickly. It's mostly MÁV, with some DB cars or engines mixed in.
And yes, it's on the floor. What am I, a carpenter?  :-DD

That's how it starts.  The fever just gets worse.   :-+
« Last Edit: November 08, 2024, 04:58:19 pm by MarkF »
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 8260
  • Country: nl
  • Current job: ATEX product design
Re: Model Trains
« Reply #219 on: November 08, 2024, 06:39:51 pm »
That is a good way to get the track plan worked out if you don't have the software!
There are free software like SCARM to design your layout. It has standard sizes, layers and everything, and it's freeware.
 
The following users thanked this post: andy3055

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #220 on: November 08, 2024, 06:53:53 pm »
That is a good way to get the track plan worked out if you don't have the software!
There are free software like SCARM to design your layout. It has standard sizes, layers and everything, and it's freeware.

And there is AnyRail
I use version 6.58.2 since I'm running Win7.
I think it is easier than SCRAM.  It's easier to make the track connections.
 
The following users thanked this post: andy3055

Offline flipper

  • Regular Contributor
  • *
  • !
  • Posts: 72
  • Country: gb
  • Definitely eti, unlokia, glossywhite, iamwhoiam
Re: Model Trains
« Reply #221 on: November 09, 2024, 12:40:14 am »
Whilst I don’t indulge or find much interest in model trains, I can see very much why people like this pastime.

As a child, I bought some track pieces, just to admire the precision and beauty of the rails and sleepers. I don’t wish to watch models of a train whizzing predictable around a pretend world, but it’s cool :)

I like that Pete Waterman of SAW “Stock Aitken Waterman”, likes model trains; I LOVE the music his production company created, so he gets a free pass in my mind. I wonder if he could train (punintentional) Dave to sing? He sure has the range on the upper octaves 🤣
 
The following users thanked this post: andy3055

Offline fourtytwo42

  • Super Contributor
  • ***
  • Posts: 1222
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: Model Trains
« Reply #222 on: November 18, 2024, 04:01:47 pm »
That is a good way to get the track plan worked out if you don't have the software!
There are free software like SCARM to design your layout. It has standard sizes, layers and everything, and it's freeware.

And there is AnyRail
I use version 6.58.2 since I'm running Win7.
I think it is easier than SCRAM.  It's easier to make the track connections.
I have been using Xtrkcad for years also free, I don't remember what got me started on it but I just got used to it and for me it's the sort of tool I can remember even if I have not used it for a few years.
 
The following users thanked this post: andy3055

Offline fourtytwo42

  • Super Contributor
  • ***
  • Posts: 1222
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: Model Trains
« Reply #223 on: November 18, 2024, 04:26:50 pm »
I have spent a great deal of time writing software for the layout.
  - a program for controlling track sections (one pic16f876 does two sections of track)
  - a master program for communicating to the track and the nRF24L01+ radios in the throttles (a pic18f4620 with FTDI FT245RL USB interface)
  - a laptop GUI program with touch screen for overall control and situation awareness
  - a program in the wireless throttles (a pic18f2620)
I stayed with PIC microcontrollers throughout the hardware so that I only needed one development environment and programmer.  The laptop code was done in Visual Studio.  Everything is written in C/C++.

But then software development was my 35+ year career.   :-+

I started working on the track power design back in the early 80s.  At that time I was going to do the PWM all in hardware.  My Apple II just couldn't handle it.  :scared: 
It was put on hold mostly because of the need to wire-wrap a huge board with counters, latches, and DACs.  Then about 10 years ago, I made my way into Microchip PIC microcontrollers and redesigned all of the electronics.

This is the heart of the railroad:
(Attachment Link)


Edit - Missed the program in the throttles
Ahh another DC automation PIC man! I also had a pre-DCC individual loco-control layout in the 80's, each section had a pwm speed controller & track circuit, loco-speed was passed from section to section as the train moved along. The whole lot ran using 16C84's that AIRC was the only PIC available way back then. It was in N-gauge in the attic of the house and the combination was very unreliable especially as I model UK steam outline. In later years the system moved to a bedroom and got considerably larger but the unreliability persisted even when I got rid of the automation. It was only after 30+years in N gauge I gave it all up and changed to OO, what a revelation!! So now I am embarking on a new automated layout still with PIC's but in OO gauge.

One thing I did learn is to avoid PWM or any other sharp leading edge waveforms like certain feedback controllers, I instead use an emitter follower type amplifier from unsmoothed 1/2 wave 50hZ AC that seems to be motor friendly, good for slow running and confer fairly constant speed. I know everybody has there favorite controller but that is mine for now having been using it for about 20 years.

My present model is very small being just 8 x 6ft & only my second in OO, it has a continuous run that my first did not.
« Last Edit: November 18, 2024, 04:28:40 pm by fourtytwo42 »
 
The following users thanked this post: andy3055

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2789
  • Country: us
Re: Model Trains
« Reply #224 on: November 19, 2024, 03:33:18 am »
One thing I did learn is to avoid PWM or any other sharp leading edge waveforms like certain feedback controllers, I instead use an emitter follower type amplifier from unsmoothed 1/2 wave 50hZ AC that seems to be motor friendly, good for slow running and confer fairly constant speed. I know everybody has there favorite controller but that is mine for now having been using it for about 20 years.

Yes.  Andy and I discussed a rectified AC throttle back in Reply #74.

The avoidance of PWM is the reason I have a transition from PWM to constant DC at high speeds.  Also, I limit the PWM amplitude to apporx. 8Vpeak.  Since modern DCC controllers all use PWM with some form of EMF feedback for control, I feel safe in my current design.  I don't have any DCC equipment to check what the motor waveform looks like.

If you're interested, I'll attach my current circuit.  The left side is on the "Analog controller" PCBs with a PIC16F876 and a MCP4802 DAC to drive two track blocks.  The right side is the "Track driver" PCBs for each block.  It does current limiting and block detection.  And the PWM frequency is set at 80Hz.
I can't say the circuit diagram exactly matches the PCBs.  There are missing caps for example.

Point of interest:
  When I visited the San Diego Model Railroad Museum at Balboa Park back in the early 1980s, they said they were using rectified AC at 90Hz for their HO layout.
 
The following users thanked this post: fourtytwo42


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf