MetalworkingFun Forum
Reading Digital caliper with Arduino - Printable Version

+- MetalworkingFun Forum (http://www.metalworkingfun.com)
+-- Forum: Machining (http://www.metalworkingfun.com/forum-5.html)
+--- Forum: Metrology (http://www.metalworkingfun.com/forum-33.html)
+--- Thread: Reading Digital caliper with Arduino (/thread-2564.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


RE: Reading Digital caliper with Arduino - EdK - 03-24-2015

Chuck,

I haven't given up on this. Other things got in the way. I'll get back to it soon.

Ed


RE: Reading Digital caliper with Arduino - chucketn - 03-24-2015

Not to worry. Got an order of header pins and multicolor ribbon cables with female connectors on both ends.
I just finished a year long project to cut change gears for a friend's Atlas. What a job.
I used the Arduino Rotary Table controller developed by Chuck Fellows on another forum. What a labor and sanity saver! I hope to add a 4x4 matrix keypad and better switch debounce to it.
Now, unfortunately, I have to get the lawn tractor out of winter storeage and get it ready for cutting the grass. it'll be up to my butt soon, if I don't!

Chuck


RE: Reading Digital caliper with Arduino - EdK - 03-24-2015

I wish I had grass problems. It's going to be a while before that happens though. Sad

Ed


RE: Reading Digital caliper with Arduino - dallen - 03-24-2015

I poisoned mine yesterday to retard its growth, dang stuff is growing like weeds


RE: Reading Digital caliper with Arduino - EdK - 03-26-2015

Now that I got my hands on a scope that triggers properly, I was able to confirm that the protocol matches the PDF file by Rick Sparber.

http://rick.sparber.org/electronics/hf6.pdf

Here's what I measured with this scope. These are measurements taken from the Atmel IO pins, not on the digital caliper pins.

Clock high pulse is 205uS
Clock low pulse is 84uS
Time between nibbles is 374uS
Time between bursts of nibbles is 104mS

Those are pretty close to what I got using the first scope.

I've attached a couple of screen images from the scope. The first one is in inch mode and the second one in millimeter mode.

By using one of the unused IO pins, I programmed it as an output so I could toggle it for diagnostic purposes. I've verified that the interrupt is working properly since the ISR is triggering on the falling edge of the clock. The bit counter is also working since it counts up to 24 and then resets. The problem area yet to get working is the retrieving of the data. I'm seeing all bits being 1's which makes no sense. Now that I have a decent scope to work with I should be able to figure it out easier.

Ed

[attachment=10420]  [attachment=10421]


RE: Reading Digital caliper with Arduino - Vinny - 03-26-2015

Was the display reading 324.5 thou or 0.3245" for the top one?


RE: Reading Digital caliper with Arduino - Vinny - 03-26-2015

Looking at it again, it may be 0.390"


RE: Reading Digital caliper with Arduino - EdK - 03-26-2015

Neither, it reads .262". Remember to invert the data bits you're seeing in that image. The data is clocked in on the falling edge so invert the data shown on the falling edge of the clock. The data comes in least significant bit first so the first bit on the left is the least significant bit.

Ed


RE: Reading Digital caliper with Arduino - Vinny - 03-26-2015

The inverted data occurred to me after the first post, hence the second. That happened when I realized that falling edge is actually rising edge of the caliper. But the pic is a bit scrunched for these old eyes and I was having a hard time lining up the bits.


RE: Reading Digital caliper with Arduino - Vinny - 03-26-2015

Now I see it. I saved it to a file and loaded it into gimp and enlarged it. In nibble 3 the LSB looked like a 1 until I enlarged it.