Skip to main content

Reply to "computer controlled"

@jwetzel1492

That's way outside of my league! I'm approaching the movement from an aesthetics point of view...not whether it models the physical motion aspects of a real train.  My patience would be gone in a matter of a few minutes if I was to take on that task.

I have previous motion control work where I just use a time based S curve for motor control (start point, stop point) which worked surprisingly well even with an 8 bit microcontroller.  As mentioned earlier, I introduced feedback based on the current speed of the locomotive.  I've since modified the concept and introduced time into the feedback: (ds/dt = f(s,t) or ds/dt = f(s)g(t)).  In my case, g(t) is a constant c which is the number of times per second I update the motor speed.  So, once again, I'm off the hook on any elaborate separation of variable or partial integration.  I may not have mentioned f(s) is a cubic bezier curve (aka polynomials).  This allows me to update the curve to my hearts content based only on four points.  Quick changes in speed only happen at higher speeds in my logic and the maximum speed change is also limited.  (This may have to be adjusted for negative speed changes.)

I have three speeds that I track: actual speed, current target speed, final target speed.  On paper, I have made notes to use any difference between the actual speed and the target speed to induce labor/drift sound and, like you, to use the actual speed for rpm.  (I have no plans to introduce sound into the system any time soon.)

The one thing that concerned me with your set-up is that you only have 4 detents/indexes per axial revolution.  Doesn't this result in jerking at low speed?

Anthony

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×