Any Digital Designers Here?

You are going to be working like:

Get a couple pulses from the encoder (you need at least two to get a direction)
Move x number of steps (variable to the movement resolution) and possibly check limit switches between steps
Wait for more pulses to handle.

The number of steps you are servicing with the pulse is the tunable parameter. As an example, you can put it in inchworm mode and have to turn 10 full revolutions to get a step or in hyper-drive and move thousands of steps per pulse.

You need to allow yourself time to see and react to the movement. You are the control loop. If you lose pulses on the encoder, no biggie. In fact, you might want to wait a few pulses before moving just as a debounce.

The only acceleration was about the original idea of linking the speed of the encoder to the rate of movement. In this case, I think that would be problematic and require much more overhead.
 
I'd like to make a stepper controlled indexer. No hole counting. How would this be done? I'm thinking the control would be similar to this one you guys are talking about.
 
It would be the same. All you need to know is how many steps for a full 360 degrees. With some gear reduction, you could be able to do a huge number of divisions.
 
....

Isn't this where a ladder logic (?) or something can sample the encoder pulses as a function of time and simply drive a chip to output the same frequency to the controller? Sample period could be in the 10s of microseconds or even mili-seconds and still be sufficient for this.

....

Bill

The trick is reading the encoder as a quadrature signal (assuming you want directionality). You could probably rig something up up using discrete logic, or using a CPLD. Honestly, if you are only making one or two, then the cheapest/fastest/easiest way is to get an arduino ($20), a small incremental encoder ($50), and an off the shelf stepper driver such as this [link]http://www.geckodrive.com/geckodrive-step-motor-drives/g250x.html[/link]. The pulse rate on the encoder should be slow enough to read, even in the mainline (no ISRs) (unless you have a really high count encoder, or you can move your arms _real_ fast.

The nice thing about the arduino is that it is flexible, and you can tweak things you want. If you want to leave it simple, they would be cheaper than spinning your own board. You would even be hard pressed to hand solder something on a proto board for what you can get one for.
 
It is not a drop in fit, but I think I found something that might be made to work: A CNC pendant. Found some for sale online.

Now I think I would just need some logic that takes the pendant pulses and translates that to what the driver needs to step .1, .01, or .001 for each 'step' of the wheel on the pendant. I think a fwd/rev switch might be simpler to implement than trying to determine direction from the pendant wheel. Or not, I really haven't done any digital circuit design in decades so I'm just guessing here.

I have a STM32F4 Discovery board that I have a little RTOS and 4 tasks running on and a full Crossworks development IDE on my Mac if I want to do an event/interrupt driven implementation C, but I'm not interested in taking on a coding project. Did way too much of this at work, for way too many years. :)

I'll have to borrow a friend's scope to determine the outputs and signal levels that come out of a pendant.

Bill
 
My arduino kit and rotary encoders have already arrived and my stepper, driver, and power supply should be here this week.
 
If you prefer the PIC processor and using Basic, check out the processor boards at www.futurlec.com. All kinds of micro building blocks including PIC, ARM and others. Good prices - they are off shore, so delivery is a little slow sometimes. Also I bough a Basic pic compiler for Mikroelectronica (www.mikroe.com - one US distributor is MMouser electronics). I had played with programming PICs in their assembler and got nowhere, but the Basic compiler had tons of little routines already written that you can just drop in and go to build a program. It can be used free with limited number of lines of code. As for the project, I've had a couple thoughts. Using a stepper and translating the pulse count into Stepper pulses sounds great, but I am concered that someone may be looking for an analog feel that just won't be there. If you set the processor to move .100 for 1 pulse of the encoder, it will move that distance at whatever speed the processor generates the pulse train. No way for the processor to determine a speed from one pulse input, so you may have to accept the fact that the output will never be smooth - it will always be "jerky" when translating the number of pulses. A one pulse = one step would be smoothest possible mode. Add to that the fact that you have some serious lag time - say you have it set for .01 per step and you turn the encoder 10 steps, depending on the speed the processor is programmed to turn the stepper it may end up over shooting where you want to go, unless you count the clicks or add a display to tell you where it is "going". Maybe a more user friendly device would be a power feed with adjustable speed and settable stops. Add a LCD display and keypad that would allow you to preset speed, direction, start and stop. You could even set it up to reverse direction at the end of the programmed travel, or control both x and y and have a teachable or programmable x-y table on a mill. I think I would use an external stepper drive with step and direction input, just like you would use with a Mach3 setup. Then it could be adapted to any size machine, small or large. Again, these are just my thoughts. The idea certainly has potential - especially if you think about controlling both X and Y together - programmable arcs anyone? Backlash correction? Angles?
 
Well, for the simplest possible way to use an encoder to drive stepper motor, here it is. Check this webpage out - pretty simple! Same thing could be done using simple logic and power mosfets to drive higher current motors. The ULN2003 is essentially a darlington transistor array (7 inverting 1 amp open collector drivers).


http://www.instructables.com/id/Simple-manual-control-of-stepper-motors-without-a-/

I don't think it is that practical for this application, but interesting none the less.
 
I was thinking of using this for positioning the Z-axis only, not trying to translate X or Y while cutting, so jerkiness in the .1 or .01 step function is a don't care. For me. :)

Bill
 
Back
Top