Board index Talking T Gauge Forum T Gauge General Discussions

The place for general discussions and requests for help on all matters relating to T gauge.

Re: PWM

Postby martink » Sun Aug 02, 2015 8:21 pm

1.5 amps? Each motor pulls about 25mA at full power, plus another 5mA for each LED. I've set up my system with a combined overload threshold of 0.5A for the entire layout - that leaves plenty of margin even for 3 trains with 8 motors all at full speed. I do strongly recommend using some sort of overload protection, and with the very low currents we cannot really use the old incandescent lamp trick.

I chose to use a master PWM since that is a really easy approach with a microcontroller generating low frequency PWM - just bit bash 4 (or more) output pins together. Since you only need a single 555 for each basic controller, I wouldn't expect a common timebase design to simplify the circuit for you. It would, however, provide a not-so-obvious benefit that all the outputs are properly synchronised. This avoids a classic problem with multiple PWM controllers - unwanted and unpredictable speed surges when a train moves from one controller region to another and two out-of-phase drive pulses are superimposed.

With an exhibition coming up, I have a minor controller upgrade planned for this week. This will increase the number of speed pots from 3 to 6 to let me set unique high and low speed values for each of the 3 trains, plus a bit of a revamp of the station slowdown and stop handling.
martink
 
Posts: 226
Joined: Sun Feb 09, 2014 3:13 am
Location: Melbourne, Australia

Re: PWM

Postby Reith01 » Sun Aug 02, 2015 9:09 pm

martink wrote:1.5 amps? Each motor pulls about 25mA at full power, plus another 5mA for each LED. I've set up my system with a combined overload threshold of 0.5A for the entire layout - that leaves plenty of margin even for 3 trains with 8 motors all at full speed. I do strongly recommend using some sort of overload protection, and with the very low currents we cannot really use the old incandescent lamp trick.

That's good to know. For each controller, then, I may go for a fuse, say, 250 milliamp, with zeners at about 5.6 volts (as long as the motors don't cause spikes). I'll probably set up a general 6 volt power supply and put a crowbar circuit on that in case it goes high. I'm working with 6 volts at the mo and lower it a tad with a converter that can easily handle 1 amp.

I haven't though about sectioning, block control yet but that's going to be inevitable. I cant think I'd have enough to need a microcontroller but I'll use logic circuitry if needed.
Reith01
 
Posts: 132
Joined: Thu Jul 30, 2015 3:34 pm
Location: Sussex.

Re: PWM

Postby Reith01 » Sun Aug 02, 2015 9:32 pm

mattd10 wrote:Fascinating to follow as I'd love to build my own PWM controller with added simulation (I also looked at having a capacitor across the control pin to achieve this) but my electronics knowledge is pretty limited so I resorted to using other designs found online which were all designed for larger scales. This could be the answer I'm looking for!
Matt


Yes, the internet is a source of ideas but some contain mistakes. Much can be done by adapting others' ideas - no sense in reinventing things. It seems more like Lego these days. You can get circuits for individual functions and the art is joining them up. This PWM is the same in principle for any motor control, just the voltages, currents and range of duty cycle changes. In this t-Gauge I'm much of a beginner and learning from Martink and others about the characteristics.

I went for using the 555 as just an oscillator, feeding its triangle output to a comparator. The control voltage also goes into the comparator - its increase and decrease cause the comparator to switch at different levels, hence widening or narrowing the pulse. You probably know all this. Apologies if so.
The point is this method allows a bigger control of the duty cycle than a single 555 allows. It's possible to do it with two 555s using the second as a monostable. I'll happily draw up the circuit if you like - once it's been tried on trains!

It's a most interesting aspect of this hobby. I can't disagree there.

Cheers,
Reith
Reith01
 
Posts: 132
Joined: Thu Jul 30, 2015 3:34 pm
Location: Sussex.

Re: PWM

Postby Reith01 » Thu Aug 13, 2015 11:59 am

Moving on a little, a capacitor acceleration/deceleration circuit is on the board. A basic charge-discharge curve gives poorer results than a linear one although it gives more power to a train when starting. (Stopping is quite good though.) The circuitry is a little more elaborate but once done…. It's also possible to control the rates of starting and stopping easily.

A single 6 volt power supply will be used (as things stand) so I’ll protect it with a crowbar circuit set at something like 6.8 volts. The PSU will go through down converters for the track and other voltages. More local protection might be needed.

I’m thinking of adjusting the control voltages so that at minimum the duty cycle goes to zero. The worry is if a very small duty cycle may harm the motors. Is there a minimum recommended? (It would save using a switchable pot though I’ll be happy to use one if it seems advisable).
Please for opinions.

Otherwise, the baseboard for the layout is under construction and paper track templates cut out ready. The fun is about to start!!
Reith01
 
Posts: 132
Joined: Thu Jul 30, 2015 3:34 pm
Location: Sussex.

Re: PWM

Postby martink » Thu Aug 13, 2015 12:51 pm

While I made sure that the duty cycle on mine really does go to zero, the standard commercial product doesn't. The obvious conclusion is that Eishindo is not concerned about this. Doing the math, 5V and 25mA at (say) 5% works out to 6mW - not much power at all. If anything, the main reason for a true zero is to stop the hum.
martink
 
Posts: 226
Joined: Sun Feb 09, 2014 3:13 am
Location: Melbourne, Australia

Re: PWM

Postby Reith01 » Thu Aug 13, 2015 9:25 pm

That's good, then. It means some automation is possible, bringing a train to a standstill at no current without having to use a (mechanical) switch or other circuitry to do the same thing. I'm using the triangle from a 555 so I have to arrange the control voltage to dip below the 1/3 Vcc to which the triangle discharges.

Thank you.

Reith.
Reith01
 
Posts: 132
Joined: Thu Jul 30, 2015 3:34 pm
Location: Sussex.

Previous

Return to T Gauge General Discussions

Who is online

Users browsing this forum: No registered users and 3 guests