Author Topic: Anyone use PWM control for DC layout?  (Read 508 times)

0 Members and 1 Guest are viewing this topic.

Scott1984

  • Crew
  • *
  • Posts: 119
  • Gender: Male
  • Respect: +52
Anyone use PWM control for DC layout?
« on: January 11, 2024, 03:33:02 PM »
0
I have seen some guys on Youtube use Pulse Width Modulation for controlling DC layouts instead of regular power packs. I was curious if anyone has tried using this. I know almost all of you use DCC but thought there might be someone who has tried PWM. Thanks

peteski

  • Crew
  • *
  • Posts: 32934
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5334
    • Coming (not so) soon...
Re: Anyone use PWM control for DC layout?
« Reply #1 on: January 11, 2024, 04:41:46 PM »
0
Yes, our own Max designed (and sells) such a throttle.
See https://www.therailwire.net/forum/index.php?topic=55335.0
I also seem to recall that others had used similar but simpler throttles.  Our own esteemed DKS used one on his layout: https://www.therailwire.net/forum/index.php?topic=49183.0

Also some related info: https://www.therailwire.net/forum/index.php?topic=55273.0

I found all that using forum search for "PWM throttle".  :)

. . . 42 . . .

Scott1984

  • Crew
  • *
  • Posts: 119
  • Gender: Male
  • Respect: +52
Re: Anyone use PWM control for DC layout?
« Reply #2 on: January 11, 2024, 07:34:13 PM »
0
Thanks for the info on that!! I will check it out. Really appreciate the help.

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: Anyone use PWM control for DC layout?
« Reply #3 on: January 11, 2024, 08:17:55 PM »
0
If you mean those cheap little PWM controllers you can get off eBay, sure.  The work.  I bought one and tried it out.  It worked fine.

And Peteski, I deeply appreciate the plug.. But I must correct it.  My throttle design does not use PWM.  It uses half sine waves on top of smooth DC, and it varies the amplitude of the pulse so it goes away at higher throttle settings.  But I side-stepped PWM because I didn't want it to screw up decoder-equipped engines trying to run in DC mode.  (but thanks  :) )

peteski

  • Crew
  • *
  • Posts: 32934
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5334
    • Coming (not so) soon...
Re: Anyone use PWM control for DC layout?
« Reply #4 on: January 11, 2024, 08:31:43 PM »
0
And Peteski, I deeply appreciate the plug.. But I must correct it.  My throttle design does not use PWM.  It uses half sine waves on top of smooth DC, and it varies the amplitude of the pulse so it goes away at higher throttle settings.  But I side-stepped PWM because I didn't want it to screw up decoder-equipped engines trying to run in DC mode.  (but thanks  :) )

Ah ok.  When I did the search your rather sizable thread about the throttle came up and I did a quick scan of the post where PMW was mentioned.  It seemed to indicate that you used a Arduino to generate the PWM signal. But that might have just been a some early design considerations.  It is on me for not being more thorough.   Either way, your throttle is a very impressive product.
. . . 42 . . .

Scott1984

  • Crew
  • *
  • Posts: 119
  • Gender: Male
  • Respect: +52
Re: Anyone use PWM control for DC layout?
« Reply #5 on: January 11, 2024, 08:38:17 PM »
0
Ah ok.  When I did the search your rather sizable thread about the throttle came up and I did a quick scan of the post where PMW was mentioned.  It seemed to indicate that you used a Arduino to generate the PWM signal. But that might have just been a some early design considerations.  It is on me for not being more thorough.   Either way, your throttle is a very impressive product.

Yes those are the ones that I have seen. Just trying to get something that works in a smaller footprint. Thanks!!

Chris333

  • Crew
  • *
  • Posts: 18392
  • Respect: +5662
Re: Anyone use PWM control for DC layout?
« Reply #6 on: January 11, 2024, 09:37:24 PM »
0
I use one of these a bunch:  Rokuhan rc02

Scott1984

  • Crew
  • *
  • Posts: 119
  • Gender: Male
  • Respect: +52
Re: Anyone use PWM control for DC layout?
« Reply #7 on: January 11, 2024, 10:57:45 PM »
0
Chris, Is Rokuhan rc02 the name or brand? Just thought I would ask.

MK

  • Crew
  • *
  • Posts: 4064
  • Respect: +772
Re: Anyone use PWM control for DC layout?
« Reply #8 on: January 11, 2024, 11:18:28 PM »
0

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: Anyone use PWM control for DC layout?
« Reply #9 on: January 11, 2024, 11:27:06 PM »
0
Ah ok.  When I did the search your rather sizable thread about the throttle came up and I did a quick scan of the post where PMW was mentioned.  It seemed to indicate that you used a Arduino to generate the PWM signal. But that might have just been a some early design considerations.  It is on me for not being more thorough.   Either way, your throttle is a very impressive product.
Thank you again, sir!

I did have to deal with PWM because PWM is what actually comes out of an Arduino pin if you use it as a D to A.  So you get "0 to 5 volts" for a value between 0... 1023, but that is only the average DC based on the pulse width.  In my case, I needed actual smooth DC to go into my analog throttle where the conventional pot control used to be, so I had to put a little RC filter across  the PWM to get smooth DC between 0...5, and then run that through an opamp to make it 0...16v to go into my throttle ( fun, eh?)


Scott1984

  • Crew
  • *
  • Posts: 119
  • Gender: Male
  • Respect: +52

peteski

  • Crew
  • *
  • Posts: 32934
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5334
    • Coming (not so) soon...
Re: Anyone use PWM control for DC layout?
« Reply #11 on: January 12, 2024, 12:14:31 AM »
0
Thank you again, sir!

I did have to deal with PWM because PWM is what actually comes out of an Arduino pin if you use it as a D to A.  So you get "0 to 5 volts" for a value between 0... 1023, but that is only the average DC based on the pulse width.  In my case, I needed actual smooth DC to go into my analog throttle where the conventional pot control used to be, so I had to put a little RC filter across  the PWM to get smooth DC between 0...5, and then run that through an opamp to make it 0...16v to go into my throttle ( fun, eh?)

Makes sense Max (and yes, lots of fun).  ;)
. . . 42 . . .