PDA

View Full Version : Using Cheap Chinese Calipers as encoders



Archangel
- 22nd September 2007, 00:32
Hello Everyone,
Question for Forum experts:
Is the data from Chinese calipers usable by the PIC Microcontroller ?
The link below has data on them, but it refers to 48 bit data?

http://www.shumatech.com/support/chinese_scales.htm

Thank You
JS

GrandPa
- 22nd September 2007, 00:43
Hi,

Cannot really answer your question, but I would suggest to buy a stepmotor with a rotary encoder attached instead, assuming you're looking for an encoder.

It's easier to find than just the encoder and you can pay as low as 15$ + shipping for it on e-Bay. Certainly much easier to use than the calipers and you can hook it up directly to the QEI module of a 18FXX31 PIC.

J-P

Archangel
- 22nd September 2007, 01:15
Thanks Grandpa,
Steppers are what I want to get away from. I want to use servo motors, these scales are so cheap and very easy to fabricate brackets for.
The Little Machine Shop sells a DRO using these type scales, and a company calling their product YADRO markets a kit that uses them and an AT Micro.
JS

Luciano
- 22nd September 2007, 09:54
Hi Joe,

From the link you have posted:

In fast reading mode, the scale updates about every 20ms (50 Hz) instead of every 300ms (3 Hz).

* * *

Is that fast enough for your application?

Best regards,

Luciano

Jerson
- 22nd September 2007, 11:18
Yes, I think they can be used

Archangel
- 23rd September 2007, 02:18
Hi Joe,

From the link you have posted:

In fast reading mode, the scale updates about every 20ms (50 Hz) instead of every 300ms (3 Hz).

* * *

Is that fast enough for your application?

Best regards,

Luciano
Oh yes, a milling cutter for any machine I might build will only travel at about 4 or 5 inches per minute while cutting, a rapid will be much faster though.
Thanks,
JS

tenaja
- 23rd September 2007, 15:14
Oh yes, a milling cutter for any machine I might build will only travel at about 4 or 5 inches per minute while cutting, a rapid will be much faster though.
Thanks,
JS

At that rate, just take note that you won't be able to do smooth interpolation of arcs or circles, and your stopping accuracy will be directly related to your moving speed. Note that 5 inches per minute is about .083"/sec. With an update rate of 50Hz, your best case scenario for accuracy is .00333". (That's double of .00167", because you can't respond to the motor until after you have your update.) That's fine for a sign router, but no good for machining parts with any kind of accuracy.

Also, in any kind of application, 5ipm is painfully slow after the first time. (Maybe even on the first time!)

I have extensive experience with steppers and servos, having used them in tiny little applications to 25lb motors moving hundreds of pounds. At the speeds you are considering, if you are having trouble with stepper motors, then either you are using the wrong size motor or your motor drives stink. Steppers are the absolute best--cheapest, simplest, and most accurate--way to get motion in that speed range, unless you have absolutely no idea what the load will be--but in a mill such as yours, you know 100% what the load is. If you are having stalling issues then you need to crank up your supply voltage, or use a bipolar chopper drive instead of a cheasy "transistor & resistor" drive.

Chances are that you are probably better off using a cheap home made encoder on the back of a servo than trying to get the caliper setup to work. Even a cheap encoder with 40 pulses per rev will give you .00125" resolution with a 20tpi screw--and you get the data the instant it moves, not at a delayed transmission.

As a quick fix, you could even install that same cheap encoder on the back of your existing stepper, and use it for stall detection. But if you need stall detection on a stepper application, then you've already missed on the most important part of using a stepper system--sizing the motor and power supply. If you've missed out on it here, you'll probably miss out on it with a servo, too.

Archangel
- 23rd September 2007, 23:32
Actually rethinking this whole thread, 5 ipm is pretty fast for the size constraints these calipers offer, What I have in mind is to make a small engraving machine for semi precious stones, like turquois, I am presently in process of purchasing a HAAS TM1 from a friend, so my short term CNC needs will be filled by that, the stone cutter is to be for My Mom. I was toying with the Idea of tracking the Z axis of a larger machine though.<p>

Speed isn't going to be the issue. My problem is how do I retreive the data from a 48 Bit data stream with a 16 bit word capable Microcontroller, I am guessing it can be done as at least 3 comercial enterprises use them as the basis of a DRO, my math skills and inadequate experience in programming are such that I am looking for suggestions as to how to accomplish this feat, mind you, not a code author, but some pointers. Would you store it in 3 words ? Would that involve using an array, something like:<p> MyData var word[3]<p>
Thank You All for your time and consideration, it is appreciated.
JS

tenaja
- 23rd September 2007, 23:48
Speed isn't going to be the issue. My problem is how do I retreive the data from a 48 Bit data stream with a 16 bit word capable Microcontroller, I am guessing it can be done as at least 3 comercial enterprises use them as the basis of a DRO, my math skills and inadequate experience in programming are such that I am looking for suggestions as to how to accomplish this feat, mind you, not a code author, but some pointers. Would you store it in 3 words ? Would that involve using an array, something like:<p>

MyData var word[24]<p>

The PIC only handles 8 bits--your limitation of 16 is within the compiler, which you can always try another. If you want to stay with the existing one, then the array is probably the best way to go. You'll just have to work out any math commands that you want.

arniepj
- 24th September 2007, 00:38
I have read the 52 bits of data out of a Mitutoyo dial indicator with a pic.The clock signal is tied to an interrupt pin and the data is read into a 52 bit array.The data can then be manipulated however necessary.The Chinese calipers while different, can probably read in a similar manner.

Archangel
- 25th September 2007, 01:28
Thanks arniepj,
So if I got this right, output the clock and data pins through a couple of comparators or OPAmps, to get levels up to 5 volt levels, and hook the clock pin to an interrupt on change pin then read the data into array, sounds simple enough, I have to read up on getting the data out of an array, in a way I can use and understand it.

Thanks
JS

arniepj
- 26th September 2007, 02:22
I used a 16F877 with the data tied directly to portb.1 and the clock tied directly to portb.0.Enabling the weak pull up resistors was all that was needed.I believe the signal voltage levels were on par with the caliper levels.Looking at the link waveforms,I would start by capturing the pause in between the clock pulse groups as an indicator to start clocking the data.

Archangel
- 29th September 2007, 02:56
Thank You.