Author Topic: My enormously complicated, enormously fun DC throttle project  (Read 3282 times)

0 Members and 1 Guest are viewing this topic.

mmagliaro

  • Crew
  • *
  • Posts: 6298
  • Gender: Male
  • Respect: +1802
    • Maxcow Online
My enormously complicated, enormously fun DC throttle project
« on: January 15, 2023, 05:57:29 PM »
+14
UPDATE:
BIG addition at the end of this thread with info on a finished version, and making it available for purchase, since a few people
did ask when I started this.
-------------------------------------------------------------------------------------------------------------------------------------------------------



Over a year ago, I started fooling around with the circuit design of my old DC throttle, which came from a plan in Peter Thorne's old book, "Practical Electronic Projects for Model Railroaders".  I etched my own board in the laundry room sink and built it when I was 17, and it is STILL the board under my layout to this day.  But... it was long in the tooth and there were lots of things I could improve about it.

At first, I just planned on making a neater, cleaner PCB design, having the board professional etched, putting the components on it, and that would be that.  But the more I got into it, well, the more I got into it.  Better overcurrent protection, better pulse generator, more efficient component design (less wasted heat), support as a power-pack style "all in one box" in addition to an under-layout board, in addition to walk-around control, no zero-throttle "bleed" to the rails, overtemp and heat regulation... that's what happens when one is curious.

Then I wondered about walk-around control (some of you may remember me asking about whether "memory" was important, and whether using a knob vs pushbuttons for speed control was important).

That exploded into a full RF wireless walk-around system. 

Like I said, that's what happens when one is curious.

Rather than prattle on... here's a short video and a photo.  I figure if anybody is really interested in a DC throttle in this age of DCC, or has questions about the circuit design, features, and so on, you'll ask.  Just fire away.



« Last Edit: April 28, 2023, 12:31:51 AM by mmagliaro »

Bill H

  • Crew
  • *
  • Posts: 716
  • Gender: Male
  • Respect: +132
Re: My enormously complicated, enormously fun DC throttle project
« Reply #1 on: January 16, 2023, 12:50:26 PM »
0
Max:
Even though I have zero interest in a DC controller now that I dwell in the land of DCC, I will be following along with interest. At the risk of a pun, interesting stuff...

Best,
Bill

Glenn Poole

  • Crew
  • *
  • Posts: 146
  • Respect: +1
Re: My enormously complicated, enormously fun DC throttle project
« Reply #2 on: January 16, 2023, 01:14:35 PM »
0
I currently operate my layout with 5 Train Engineer wireless throttles (transmitters) & receivers.  These are no longer made and are prone to quit on a regular basis.  I am constantly monitoring E-Bay watching for these to show up and I will pick them up as spares to have around incase one of my operating ones decides to quit functioning.  It would be nice if I could find a shop that could fix these when they go bad.   I really do like these, except I wish they had a rotary dial for speed instead of push buttons. 
Let us know if you decide to market these.

« Last Edit: January 16, 2023, 01:16:56 PM by Glenn Poole »
Glenn

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 24230
  • Head Kino
  • Respect: +8288
    • Conrail 1285
Re: My enormously complicated, enormously fun DC throttle project
« Reply #3 on: January 16, 2023, 04:58:53 PM »
0
See, this is why everyone calls you "Mad" Max!

Very cool man.

mmagliaro

  • Crew
  • *
  • Posts: 6298
  • Gender: Male
  • Respect: +1802
    • Maxcow Online
Re: My enormously complicated, enormously fun DC throttle project
« Reply #4 on: January 16, 2023, 07:26:00 PM »
+1
I was not going to do a start-to-finish discussion of the whole design, because I fear it would take volumes to explain.  I worked on this
on-and-off for over a year.  So I'll just have to show photos or schematics and answer questions people might have about how it works.
So if there's anything you want to know about how it works, feel free to ask.  I will post schematics and answer questions - no problem.

The 'knob'
.... Yes, When I polled Railwire about this, the overwhelming response was that no matter what, DC or DCC,
people like "the knob", and they would rather it be a single turn that stops at each end instead of the rotary-encoder style that you just spin around and around.  (I recall Peteski especially saying the single-turn was much preferable.  I agree.)

That increased the complexity quite a bit.  I explored all sorts of options for "the knob".. Ultimately, the easiest way was to use Arduino microcontrollers at each end (heck, the knock-offs are 2 bucks these days, who knew?   Certainly not me.)
For those electrically inclined:
Analog pot in hand-held forms a voltage divider fed into one of the ADC pins of the Arduino.  My arduino code reads the ADC, gets a value between 1...254, sends that in a message, the Arduino at the other end decoders it and outputs to another ADC to get a PWM voltage out that is proportional to the value (i.e. 1 = 0 volts, 254 = 5v).  That goes through a filter and opamp circuit of my own design to get smooth DC that is amplified up to be 0...16v.  That voltage is then fed into my conventional transistor throttle in place of the original speed pot that used to control the speed.

Of course, there are a million subtleties to all this to handle turning either end off and on and not having the train go crazy,
handling dropped messages, sleeping the processors to preserve battery, but waking up if you touch a control, allowing more than one of them to operate in the same room together, the right sort of antennas for good distance, ... 



---------
As for "marketing these"  Ugh...  I really didn't expect that, because building one takes several days and the cost to cover EVERYTHING (a power transformer, the nice cases and cover plates, the PCB boards, all the components, plus my time to build it all) would be in the hundreds of dollars.  But if somebody wants to be a "guinea pig", message me and we will talk.

A quick run-down of features:
- 0-12v output (not 15, not 18, not 21.27832)... 12v maximum
- 3A output (but I can set it to be limited to less than that if you prefer)
- Rapid overcurrent detection (will trip in less than 100 mS at 3.2A)
- Overtemp protection (will shut itself down)
- Half-wave sine pulses that will not heat, fry, make noise, bother any kind of motor, nor confuse a decoder if you run a DCC equipped
engine on this.
- Momentum - Your basic "turn up the throttle and the train accelerates gently up to that set speed in about 30 seconds".  Turn the knob down and it decelerates the same way.
Forgot to add this!  Unlike a LOT of throttles, if you turn the momentum on or off while the train is moving, it doesn't obnoxiously
slam to a halt.  Most DC throttles use a charging capacitor to introduce the delay in the speed repsponsiveness.  But if you are running in non-momentum mode and turn it on, that capacitor isn't charged so the train stops dead and then gradually picks back up.  Now, you could say "don't do that".  But wouldn't it be handy if the train just kept going like it was, and the momentum feel was just "on" from that point on?  I added some extra circuitry to allow the momentum cap to "keep track" of the speed dial position, even when momentum is off, so when you turn it on, it's just a "hand off", not a dead stop.
- Input 16V  AC or DC.  You can use less, but you'll get less than 12v maximum out.  That may not bother you.
- Board has 1A accessory output terminals if you are so inclined.  It will be AC or DC - same as whatever your input power is.
- You can use your own analog controls (pushbuttons for direction, pot for speed, and toggle for momentum and pulse on/off)
if you want to just mount them in a fascia and hook them to the bare throttle board under the layout.

Walk-around:
RF based.  Hand-held runs on 9V battery.  I am not sure what the battery life is.  I just got this fully operational about 3 weeks ago.
It puts itself to sleep after 30 seconds of idleness (you not changing anything or moving the device).  It will wake up if you
tilt it, flip one of the toggles, or push the power button again. 
It will light a "Lo Batt" warning light when the 9v battery drops below 7.5v.

After 15 minutes of idleness, it shuts itself off completely.
NOTE: The receiver and throttle keep going, so the train will just keep going how it was going, and if you wake up or turn on the
hand-held, you just pick up where you left off.   But it does mean that if it shuts itself off and you are in a panic to stop the train,
you will have a wait a few seconds for it to power up.

It uses 433 MHz transmitter/receiver (those inexpensive Tx/Rx little modules you can get off eBay or AliExpress all the time).
This is the same frequency used by garage door openers and other household devices, so will there be interference?   I don't think so, but who knows.  I am using message packets with a preamble, and CRC checking, so I doubt my receiver would confuse some other
signal with a message.  I also am not continuously spamming messages out over the RF link.  It only transmits when you change something like speed, direction, momentum.  The range seems really good.  It works as far away from it in my house as I can go, through multiple wall partitions.

« Last Edit: January 17, 2023, 02:51:53 AM by mmagliaro »

peteski

  • Crew
  • *
  • Posts: 32139
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +4808
    • Coming (not so) soon...
Re: My enormously complicated, enormously fun DC throttle project
« Reply #5 on: January 16, 2023, 08:48:09 PM »
0
That sure is very impressive Max.
I also had to smile seeing all this modern (and wireless)  digital circuitry for prducing old-fashion variable DC voltage to  run old-school models.  8)
. . . 42 . . .

Tom L

  • Crew
  • *
  • Posts: 448
  • Respect: +498
Re: My enormously complicated, enormously fun DC throttle project
« Reply #6 on: January 16, 2023, 09:16:05 PM »
0
As a DC operator, that is very nice.  I currently have a GML tethered handheld and a Ken Stapleton PWM tethered handheld. Both are pretty basic, nothing like this.

Not much to choose from in the handheld DC world anymore.  GML shut when the owner passed away a year or so ago.

I don’t know what the demand would be, if much of any, but you would probably have the market cornered for such a thing.  Beyond wiring a DC layout for cab control and replacing the knob and tube in my old house, I’m clueless about stuff like this.

Tom L
Wellington CO


peteski

  • Crew
  • *
  • Posts: 32139
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +4808
    • Coming (not so) soon...
Re: My enormously complicated, enormously fun DC throttle project
« Reply #7 on: January 16, 2023, 09:36:25 PM »
0
I wonder if Max could come up with a stripped down (no frills) version of his super-fancy throttle?  Yes, that would require a new set of some of the PC boards, but it would be simpler to assemble, and less expensive.  Sell it as a kit maybe?  I suspect though that Max already has too many projects on his plate (I can relate to that), so getting into throttle selling business is probably not what he would want to do.
. . . 42 . . .

mmagliaro

  • Crew
  • *
  • Posts: 6298
  • Gender: Male
  • Respect: +1802
    • Maxcow Online
Re: My enormously complicated, enormously fun DC throttle project
« Reply #8 on: January 16, 2023, 10:07:13 PM »
0
Peteski,
There are a number of things I could do to simplify it.
Not much on the wireless hand-held and receiver modules, as those pretty much just provide wireless control.

But on the main throttle board, I designed it so that whole features could be omitted and it would all still work.

a) The internal sine generator is actually built on a little plug-in module.  It can be omitted, and old-style pulse that derives from
the AC input all still works.   That would be about 15 components and little board omitted
just from that.

b) The nice overload detection could be ditched (thought it would aesthetically and philosophically break my heart.  LOL!)
Again, it's a suite of components on the board that could just be omitted, and a simple auto-resetting thermal fuse (a Polyswitch)
wired in instead. That's all you find inside a typical power pack anyway.  That gets rid of a bunch of components and a relay.

c) Momentum.  Ditto.  Set of components that can just he left out and everything still works, and there's just no momentum option.

If you don't use the wireless modules, you can just connect switches and a pot to the main board and run it like a conventional
DC throttle.  But of course, then you get no walk-around.

The real expensive pain in things like this is in the "surroundings".  The board and electronic components aren't all that expensive.
But when you add on the speed pot, toggles or pushbuttons, knobs, terminal blocks, and a power transformer - THAT's the stuff that really costs money.  That nice little case I am using for the handheld comes from Polycase and costs about $7 just for that!
and of course, any sort of AC input power transformer is going to cost you a $20 bill these days unless you have one lying around
or get lucky on eBay.  The fact is, 16v AC transformers with a 3.5A or better current rating are pretty darn expensive.  It's not like
the old days.

Because it works on AC or DC input, you can snag surplus switcher laptop bricks these days for about 10 bucks.  But if you use a DC
input, you get no pulses at all.  Maybe people wouldn't care.

mmagliaro

  • Crew
  • *
  • Posts: 6298
  • Gender: Male
  • Respect: +1802
    • Maxcow Online
Re: My enormously complicated, enormously fun DC throttle project
« Reply #9 on: January 16, 2023, 10:11:05 PM »
+1
That sure is very impressive Max.
I also had to smile seeing all this modern (and wireless)  digital circuitry for prducing old-fashion variable DC voltage to  run old-school models.  8)
Heh. That was not lost on me, believe me.  I tinkered with a lot of options to avoid going to a full-on microcontroller, but in the end,
it was absolutely the cleanest, least complicated, and cheapest way to do it.  And since I'm a software developer anyway, writing up a batch of C code to control an Arduino was a piece of cake.   Anything else would have been a lot harder. 

greenwizard88

  • Crew
  • *
  • Posts: 285
  • Respect: +60
Re: My enormously complicated, enormously fun DC throttle project
« Reply #10 on: January 17, 2023, 10:10:15 AM »
0
Count me in as another interested person if you decide to market these. I have no idea what I would use it for, but I'm aware of how difficult it is to find high quality DC controllers, and this is probably the most well thought out one I've seen, period.

mmagliaro

  • Crew
  • *
  • Posts: 6298
  • Gender: Male
  • Respect: +1802
    • Maxcow Online
Re: My enormously complicated, enormously fun DC throttle project
« Reply #11 on: January 17, 2023, 12:37:43 PM »
+1
I am in the process of writing a "technical guide" for this thing that will explain all the separate modules, have full schematics, PCB layouts, parts lists, and discuss how each circuit works (a "theory of operations" if you will).  I am doing this mostly for myself so I don't forget (as in, "Why did I add that capacitor there... I know it was important, but I forget now!").  It will take a while to write, but when it's done I will let people have it to read if they want it.

The thing about making these available for sale is this...  What that really means is me building them one at a time in my garage.
I'm not going to set up some manufacturing facility and go into a full-on business for this.  And I still don't really know what a fair price will be.  I need to account for all the component costs, the PCB fabrication, and my hourly time to actually build and test them. 
Still, I will consider the idea.  But first I need to finish my document and beat this thing up on my own layout for a while.



Lemosteam

  • Crew
  • *
  • Posts: 5827
  • Gender: Male
  • PRR, The Standard Railroad of my World
  • Respect: +3401
    • Designer at Keystone Details
Re: My enormously complicated, enormously fun DC throttle project
« Reply #12 on: January 17, 2023, 01:23:48 PM »
+1
I am in the process of writing a "technical guide" for this thing that will explain all the separate modules, have full schematics, PCB layouts, parts lists, and discuss how each circuit works (a "theory of operations" if you will).  I am doing this mostly for myself so I don't forget (as in, "Why did I add that capacitor there... I know it was important, but I forget now!").  It will take a while to write, but when it's done I will let people have it to read if they want it.

The thing about making these available for sale is this...  What that really means is me building them one at a time in my garage.
I'm not going to set up some manufacturing facility and go into a full-on business for this.  And I still don't really know what a fair price will be.  I need to account for all the component costs, the PCB fabrication, and my hourly time to actually build and test them. 
Still, I will consider the idea.  But first I need to finish my document and beat this thing up on my own layout for a while.

Max, I would be interested in only the component list, potential sources, pre-made PCB's, and your description of course.  I have always wanted to procure and build an electronic device.  Similar to a model- it's just another form of modeling.

Have you tallied up the overall full-blown cost? That I am curious about.

PS, the only thing I missed in your video is your voice, LOL.

mmagliaro

  • Crew
  • *
  • Posts: 6298
  • Gender: Male
  • Respect: +1802
    • Maxcow Online
Re: My enormously complicated, enormously fun DC throttle project
« Reply #13 on: January 17, 2023, 07:20:33 PM »
+1
Max, I would be interested in only the component list, potential sources, pre-made PCB's, and your description of course.  I have always wanted to procure and build an electronic device.  Similar to a model- it's just another form of modeling.

Have you tallied up the overall full-blown cost? That I am curious about.

PS, the only thing I missed in your video is your voice, LOL.

John,
I will do another video where I melodiously talk, then!

When I finish this "Technical  Guide", it will have everything in it that you need to build this thing,  including exact part numbers and sources.  I would not be willing to give away the PCB layout files, as that took an enormous amount of work.  But I would certainly have a batch of boards made and sell them bare.  As you can see from the video, they are really nice boards with fully-labeled part footprints, so they are easy to populate with components.

About 6 months ago, I had an up-to-date parts list with costs and exact parts references at Mouser (my favorite source) and other sources if I needed them, like JameCo or Digi-key.  The parts cost alone was at about $60 without a power transformer, and that was BEFORE I did any development of a wireless transmitter and receiver, so it is surely over $100 by now.

jagged ben

  • Crew
  • *
  • Posts: 3116
  • Respect: +452
Re: My enormously complicated, enormously fun DC throttle project
« Reply #14 on: January 17, 2023, 10:25:34 PM »
0
Possible encouragement....

The club is still wired for both DCC and DC (common rail) but there's almost no functionality left to our DC throttles.  And yet there would be a lot of value to getting DC reliable again.   I would probably advocate strongly for some of these of they were made available, assuming cost weren't astronomical.   (Hundreds of $$ could be okay.)  Would the range go up to about 60ft do you think? 

Not opposed to some form of kit, either.