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


Reading Digital caliper with Arduino - chucketn - 03-07-2015

Has anyone found or written a sketch to read the cheap Chinese digital calipers with an Arduino?
I have tried several with no success.
 
Chuck


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

Chuck,

Check this out. It might point you in the right direction.

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

Ed


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

I've studied that reference, Ed, and Yuriy's pages. Most everyone using an Arduino has code for Igaging or other scales. I've found nothing that works for the Chinese ones. I did get my scale powered from the Arduino, but no success in getting a useable readout from them.

Chuck


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

Try these:

http://www.instructables.com/id/Reading-Digital-Callipers-with-an-Arduino-USB/
http://robocombo.blogspot.com/2010/12/using-tis-launchpad-to-interface.html
http://hackaday.io/project/511/logs

The first one is specifically Arduino, the other two may help with general info.


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

Thanks for the links, Vinny. I find that the Launchpad has been used for this successfully, but not much on the Arduino. I'm not enough of a programmer to be able to translate the code to work on the Arduino.

Chuck


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

Chuck,

Can you describe what you're trying to do with the data coming from the caliper? What Arduino board are you using? Are you going to use the Arduino board to send the data to a computer?

Ed


RE: Reading Digital caliper with Arduino - arvidj - 03-07-2015

(03-07-2015, 05:05 PM)chucketn Wrote: Thanks for the links, Vinny. I find that the Launchpad has been used for this successfully, but not much on the Arduino. I'm not enough of a programmer to be able to translate the code to work on the Arduino.

Chuck

Chuck,

Do you have a link to the Launchpad code that works with your scales?

Specifically what 'cheap calipers' are you trying to read?


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

I'm using a HF cheap scale and an Arduino Uno. I am trying to get a display on the Serial Monitor of the Arduino IDE.
I am using the hookup and schematic from here:
http://www.instructables.com/id/Reading-Digital-Callipers-with-an-Arduino-USB/

The sketch displays only one 0, but the caliper is powered and working using the led and resistor circuit shown there. I think the code listed there is for a different protocol.

I am not, nor do I pretend to be, a programmer and I did not stay at a Holiday Inn last night...

Chuck


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

Something I saw in one of the links was the data from the caliper is only going from 0 to 1.5v which is typically not enough to be considered high by the controller. There was a circuit that raised that voltage.


RE: Reading Digital caliper with Arduino - arvidj - 03-08-2015

(03-08-2015, 07:40 AM)chucketn Wrote: I'm using a HF cheap scale and an Arduino Uno. I am trying to get a display on the Serial Monitor of the Arduino IDE.
I am using the hookup and schematic from here:
http://www.instructables.com/id/Reading-Digital-Callipers-with-an-Arduino-USB/

The sketch displays only one 0, but the caliper is powered and working using the led and resistor circuit shown there. I think the code listed there is for a different protocol.

I am not, nor do I pretend to be, a programmer and I did not stay at a Holiday Inn last night...

Chuck

Looking at these two pages ...

http://www.instructables.com/id/Reading-Digital-Callipers-with-an-Arduino-USB/step3/The-Data-Protocol/

http://www.yuriystoys.com/2013/07/chinese-caliper-data-format.html

suggest that the instructables code is expecting to see the information protocol Yuri found coming from his HF calipers.

This leads me to believe that either (a) the level shifting bodge [his definition, not mine] from the instructables is not "level shifting" the inputs enough for your Arduino to read them or (b) the protocol being sent by your HF calipers is different than that sent by the instructables and Yuri's calipers.

To test (a) I would look thru the instructables code and see if the inputs are changing. Something like this might do it ... [note that I have note validated that this will even compile ... just that it looks nice :-}]

// Pin Declarations

int dataIn = 11;
int clockIn = 12;

void setup() {
  // Pin Set Up
  pinMode(dataIn, INPUT);     
  pinMode(clockIn, INPUT);  

  Serial.begin(115200);
  Serial.println("Ready: ");
}

void loop(){

  Serial.print("clockInValue = ");
  Serial.println(digitalRead(clockIn));
  Serial.print("dataInValue = ");
  Serial.print(digitalRead(dataIn));
}

After you validate that the inputs are changing ... or not ... we can look at the next steps.

Arvid