If all you want to do is monitor how many you sent and send correction less frequently based on what you measured I would say use the PWM and connect that pin to another input capture pin to count pulses.
--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/4qJY1XrrMlUJ.
To post to this group, send email to ioio-...@googlegroups.com.
To unsubscribe from this group, send email to ioio-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ioio-users?hl=en.
Hi all,I have an application using stepper motors with IOIO, and for that purpose I added a little enhancement to the PWMOutput API that allows controlling the frequency. It works great, but it is missing the feature you're requesting which is counting the pulses. So it basically lets you precisely control the speed, but not the position.I'm planning on adding position control too at some point, an API that will let you say "go X steps at Y steps per second", possibly syncing more than one stepper. You'd be able to enqueue several such commands, and then query the current steps traveled and which command is currently being executed.For the time being, there's no easy way around this.InputCapture will not currently let you count pulses, but only measure their width and frequency. This is again something I'm planning of addressing, in the form or an encoder API, which would also support quadrature encoders.
Stay tuned...
On Fri, May 11, 2012 at 12:47 PM, Ranganathan Sridharan wrote:
If all you want to do is monitor how many you sent and send correction less frequently based on what you measured I would say use the PWM and connect that pin to another input capture pin to count pulses.
--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
ytai,
these thoughts sound great to me, in the response of yours you are referring to you state
'I'm planning on adding position control too at some point, an API that will let you say "go X steps at Y steps per second", possibly syncing more than one stepper. You'd be able to enqueue several such commands, and then query the current steps traveled and which command is currently being executed.'
such would be a very comfortable interface to suit many needs regarding stepper control (and the ability of ramping up/down the frequency sounds even better).
i looked around and came across this tutorial about easydriver for stepper motors with arduino http://bildr.org/2011/06/easydriver/
the code presented there does not use pwm pulses but switches digital signals over the step control line which is what i suppose christian means by 'I already have a circuit which allows me to send one pulse to rotate the motor by one step'.
i now wonder which pulse-rate would be doable this way in combination with ioio and if the time resolution and latency would be exact enough to provide a relatively steady movement.
of course a proper and supposedly way more powerful solution would be through precisely controllable pwm-signals but until such is available i wonder if it would be feasable to start of into this direction?
as asked earlier, has this pwm api-extension already appeared on the ioio wishlist or should it be added for a better overview?
ytai, could you elaborate on what you mean with open-loop and why it makes the problem simpler?
regards,
anti
On Thursday, June 14, 2012 6:41:16 AM UTC+2, Ytai wrote:Agree with Chris.Such control loops are probably better closed on the IOIO side. With steppers, however, you can often safely run in open-loop, so the control problem becomes a lot simpler.Take a look at my post to this thread dated May 11 for a description of how I envision the API. I believe it will address your needs and more. The implementation then can easily incorporate, say, a PWM-controlled motor with encoder under the exact same API ("go this much, this fast").Makes sense?
--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/I_LulxlUhUIJ.
--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/groups/opt_out.