Could you post more metails on the project. I have been playing in various pics of the past year and would like to get a little more advanced in reading other pulses.
Continued from Welcome thread
ThanksLook like you haave been busy. The engraver looks great.
The DRO (still work in progress) uses one 12F675 per channel to read the digital scale. The outputs of four PIC are multiplexed into one serial port of a PC. The PC runs a VB5 application that displays the readings (see attached).I would be interested in how you used the PICs for your DRO`s. Did you design them yourself?
I wonder if they could work using encoders ?
Mario
The layout of the main form is designed to match my homebrew PC's touchswitches that are arranged down the left and right sides of the display
I spent sometime getting every thing to talk to each other neatly, so for instance, you can plug an extra vernier/scale into the adapter block and it just pops up on the screen.
As to using the PICs with quadrature encoder, I'm sure the little 8 pinners I've used lack the necessary hardware (you'd need a couple of fast counters to ensure no pulses were lost). The ones to use would be the dsPIC devices like the 30F4012 (?) which have the quadrature hardware inside.
Similar Threads:
Last edited by BillTodd; 08-11-2008 at 05:10 PM.
Could you post more metails on the project. I have been playing in various pics of the past year and would like to get a little more advanced in reading other pulses.
I am trying to do a better job in understanding teh analog and digital side of the processing. I have played with temp sensors and other simple items for input. I have not worked with any encoders at all. This is where I am lacking examples and expereience.
I'm not actually reading encoders. I'm decoding the digital data outputs of those cheap Chinese digital calipers (see :examples here). To keep my circuit simple, I'm using the PICs onboard comparitor and reference to convert the low level (~1.5v) signal to one that the PIC can read.
This circuit is of a single device reader powered by the serial port.
The LEDs (D1,2,3) limit the voltage to about 1.2v when the PIC drives the scale's inputs.
As to using the PICs with quadrature encoder, I'm sure the little 8 pinners I've used lack the necessary hardware (you'd need a couple of fast counters to ensure no pulses were lost). The ones to use would be the dsPIC devices like the 30F4012 (?) which have the quadrature hardware inside.[/QUOTE]
Hi Bill. It all looks impressive. You have certainly done a good job. I wish I had your talents. Unfortunately I am just a Trial and error learner at both electronics and Cnc`ing If i had one wish it would be that there was a way to verify my steppers with an encoder in Mach 3. A task too difficult for me with my limited experience.
Marz
The usual method is to mark the motor's starting position accurately, then run a torture test (i.e. a test that runs the motor at various speeds back and forth until finally return ing to the start point), then check the motor has returned to the start postition correctly.If i had one wish it would be that there was a way to verify my steppers with an encoder
The usual method is to mark the motor's starting position accurately, then run a torture test (i.e. a test that runs the motor at various speeds back and forth until finally return ing to the start point), then check the motor has returned to the start postition correctly.
Yer Bill. I have done all that. I set up a dial indicator on both axis and then ran a g code program with rapid moves for a 1/2 hr. I tuned the motors for 10% under the max revs before it misses pulses. Its just sometimes if I push the toolbit too hard it misses a few steps. I know thats my fault, but it would be nice if it could correct itself. If only I had the money to run servos....
Marz
I see. Can mach3 do that, if it has encoder/count inputs?but it would be nice if it could correct itself.
What sort of input does Mach3 need?
I'm brewing up much the same but with a home made computer board reading scales and stepping motors.
The step timer interrupt compares "where I am" with "where I want to be" and steps accordingly.
The "where I am" can change at any moment should a report be received from any of the 3 scale interrupts. (I read them with hardware because any lag will only serve to confuse it).
At the end of an x,y,z stepping sequence it works out the error on all 3 axes. Should any be outside tolerance it doesn't update the "where I want to be" to a new position. This means I get remedial steps to put it back on course.
Questions are, wil it do more remedial steps than moving steps, and, how tight can I put the tolerance
I only have to mount the scales and I can find out
Interesting idea Although,the missed steps may not be able to be corrected until the cause has been removed.
i.e. if it drops steps because of excess speed v load, will there be time to correct them before the next motion without increasing the frequency of the pulses thus exacerbating the speed v load problem?
(Well worth trying though )
The fast traverse is a completely separate interrupt handler, precise placement only happens at speeds where the motors can handle an instantaneous reversal.
There is more work to do. When it encounters back lash it will tend to trail by the tolerance and I will need extra remedial steps. OTOH I'm not going to try to fix anything until it has had a chance to tell me what needs fixing.
I'm writing the code and everything runs in SRAM. I can recompile and upload all new in a matter of seconds. I am in control
Hi Robin. What a brilliant idea. When you get it right you will have solved one of the major issues with using steppers. i would be interested in the outcome.I had another thought that if i had the knowhow would be worth pursuing. What if you had a PIC counting pulses sent my Mach 3 and then the PIC moved the stepper motor using the encoder to go to the correct position? Its probably complicated, and you would get some lag,but i would gladly put up with lag for accuracy.
Hmmm , That wouldn't be too difficult.What if you had a PIC counting pulses sent my Mach 3 and then the PIC moved the stepper motor using the encoder to go to the correct position?
I use a PIC (16F84 and an L6219) to drive the Z motor on my engraver, it'll happily keep up with the step inputs from the controller using interrupts. It even has has a couple of unused timer/counters that could be used to track an encoder. Might be worth a look
[I still wonder, if you're going to add all this complexity you might be better of using proper servo-motors]
"just as good.." No, I'm afraid not.Yeah. you could be right, but steppers and encoders on ebay are a lot cheaper than servos, and if a cheap PIC could be made to act as a Pseudo closed loop it would be just as good for a lot less money for the Dyer's
If a servo system requires speed to catch-up with the commanded steps all it has to do is dump more power into the servo motor (right up to the point it/something goes bang or hits a power limit) . A stepper motor driver cannot do this. The best a closed loop stepper system could do is to wait until the overload event has passed then add pulses to get back on track.
Now let's assume the above error occurred while cutting material with multiple passes ( caused by a knot in a piece of wood for example) ; both would have left a 'bump' of uncut material. The servo system would have probably left a smaller bump than the stepper (since it had more power available to attack the bump), so subsequent passes would likely reduce the bump. The stepper system would have to leave the bump untouched and add to the bump while it waited to correct the error. Subsequent passes are very likely to stall again at the initial bump and... well you can see where it's going.
If you overload a stepper to the point where you lose steps everything thereafter is garbage. That's why us stepper people tend to drive them way below capacity. I have more than enough power to snap the tool but I try not to use it
With the scales attached, theoretically if it can't cut the material all 3 axes stop, possibly within 0.02 seconds depending on the tolerance. The repeating step pattern will cause it to back off and then try again and again until it succeeds, or not as the case may be.
That would be the advantage of taking control at an earlier stage in the system.With the scales attached, theoretically if it can't cut the material all 3 axes stop, possibly within 0.02 seconds depending on the tolerance. The repeating step pattern will cause it to back off and then try again and again until it succeeds, or not as the case may be.
Although, If your steppers aren't losing steps (because you're driving them well within limits) why do you need the recovery system?
Not so much a recovery system, more an external reference to locate the table without depending on everything staying in adjustment on a cheap mill
I have a certain amount of spring in the system. The Gibbs are tighter at the ends where I rarely stray making backlash a variable. Changing pressure from the tool makes it unpredictable.
Aiming to better 1 thou accuracy has become a sort of Grail quest... Not quite sure what I'd do with it if I found it but I feel compelled to try