On Sunday 09 June 2013 22:54:01 Kent A. Reed did opine: > On 6/9/2013 9:08 PM, Jon Elson wrote: > > Gene Heskett wrote: > >> Looking at its voltage output, with the motor disabled so there is no > >> feedback,off = 0.125 volts > >> click fwd button= 0.382 diff = 0.257 > >> click + button = 0.942 diff = 0.560 > >> click + again = 1.584 diff = 0.642 > >> click + again = 2.302 diff = 0.718 > >> click + again = 3.094 diff = 0.792 > >> click + again = 3.970 diff = 0.876 > >> click + again = 4.940 diff = 0.970 > >> click + again = 6.04 diff = 1.100 > >> click + again = 7.33 diff = 1.29 > >> click + again = 8.88 diff = 1.55 > >> click + again = 9.90 diff = 1.02 > > > > URK! It isn't even monotonic! That is harder to fix with a > > piecewise-linear > > interpolation. (Some simplistic codes won't handle that.) > > Ummm, I expect you mean the differences aren't monotonic, Jon. > > Actually, plotting Gene's data as a set of twelve points X, V where X is > the number of clicks, I get a pretty decent graph --- looks like a > parabolic curve opening upward, with a bit of a burble in the next to > last point (or last two depending on how you look at data). > > Trying a second-order curve fit (using the free tool simfit, but there's > lots of other tools) got me a decent looking result with a plot of > residuals that also gives the impression that the last two points are > questionable compared to the rest. > > I don't chose simply to post the results because I don't believe any > single experimental run is sufficient. Repeat this experiment three or > more times, Gene, so we can begin to get an idea of the quality of the > data and then we can talk. > > Regards, > Kent
Let me talk to myself & you eavesdrop. Lets consider a D/A consisting of an LM2907 to derive the controlling voltage. What have we got to play with in a .hal module? BASE_THREAD 25 microseconds SERVO_THREAD 1 millisecond in most default machines Load a counter with the desired number of pulses to be generated in this SERVO_THREAD. Capped of course at SERVO_THREAD/BASE_THREAD, = 40,000 in this example case. If the counter has not counted down to zero using BASE_THREAD as a countdown clock, generate a pulse that is parport reset time in duration (3.3u-secs in my case) and decrement the counter, continuing to do this until the counter is zeroed, then be quiet till the counter is reloaded on the next SERVO_THREAD. Repeat as long as there is a digital value available. Stop is of course fully inactive regardless of residual count. With the above thread timings, and without any dithering, we will have an output granularity of .03 rpms when the top speed is 1200 rpms. The output will be groups of pulses, with the groups spaced at SERVO_THREAD times. With a 1 kilohertz update rate, we can probably filter the output with a 20 hz corner frequency filter if we don't like the 1 kilohertz tone from the motor which, given the mass of the spinning stuff, should result in a very steady motor speed with or without the filter. Suitable scaling and the PID controller should be able to handle the load variations. The LM2907 implementation could come right out of the chips app notes. Thoughts? Cheers, Gene -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) My web page: <http://coyoteden.dyndns-free.com:85/gene> is up! My views <http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml> Most people have two reasons for doing anything -- a good reason, and the real reason. A pen in the hand of this president is far more dangerous than 200 million guns in the hands of law-abiding citizens. ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
