• Hey all,

    Im working on a project controlling multiple stepper motors using isadora via an arduino (isadora is also communicating stepper information with processing)
    Ive built a patch that controls and accurately tracks the steppers position and it works great however I'm very well aware that if one of the steppers
    was to miss a step due to its load or other real world scenario the math in the patch would be out of sync.
    I'm aware of absolute rotary encoders, continuous potentiometers and hall effect sensors to track or momentarily know the motors position, 
    However absolute rotary encoders seem pretty expensive and processer hungry especially when they need to be super accurate ( over 360 steps per rev)
    and theres something about they need interrupt pins and an uno only has two ? (my knowledge fails me here) i need at least 5.  
    Continuous pots, though continuous only have a reading around 270 degrees.
    Hall effect sensors are good for setting a starting position but not great for keeping things in check during its movement.
    Has anyone else ever used stepper motors and isadora that has any tips or tricks? 
    Best, Lanz

  • rotary or shaft encoders are the way to go but you are right about the interrupt pins and the price, about $40 each. You have the option of using only 1 interrupt pin per encoder, but you loose resolution. Anyway with shaft encoders you still only really get relative position, you need to use a switch of some kind for your zero point. I dont think they are so processor hungry though. Is there a way to use servos instead? You can just set the degrees of rotation with these but they are limited.

    This may help
    The arduino mega actually has 5 interrupt pins though.
    Here is some info and code for accurate shaft encoders

  • Hey Fred,

    Thanks for that! really useful stuff ill read up on that enabling interrupts it doesn't look as hard as i first thought it might be.
    I've got one of those YUMO encoders you've got in your tutorial they are brilliant and I was using similar code to what you've got on your site when i was experimenting. I wish there was an absolute version of that very same encoder so there wasn't a need for a switch for the 0 point. 
    Im going to do some more testing and see if i really need to get the encoder back out the box.
    I wish i could use servos but it has to to be able to go all the way round many times. i modified a servo for continuous rotation but it still has a gaps in its readings. 
    thanks again Fred! ill put up my findings when the projects over

  • I used a 2€ rotary enoder to track a DC motor recently. Got it at sgeor.de

    The interrupt pin limitation can be solved too: http://www.me.ucsb.edu/~me170c/Code/How_to_Enable_Interrupts_on_ANY_pin.pdf