Reading a digital dial/caliper with a U3 | LabJack
 

Reading a digital dial/caliper with a U3

10 posts / 0 new
Last post
marcus
Reading a digital dial/caliper with a U3

Hello... I'm thinking about connecting a digital caliper to my U3 / DaqF application so I can get the caliper readout directly into my DaqF program. Most calipers seem to have 4 pins: GND, Data, Clock and +V(usually 1.5V), anybody ever tried this with the U3 and know what to do? I'm thinking in the line of counting falling edges on the data line with the idea(my idea) that each count I get corresponds to 0.01mm increase/decrease (the resolution of most metric calipers) but I'm not sure if this is really the way to address the problem? I guess I probably need to amplify the caliper signal too for the counter approach to work? Also, it would be nice to be able to somehow read direction of the caliper, i.e is it expanding or retracting?

Any thoughts are much appreciated,

Marcus

LabJack Support
LabJack Support's picture
The labels "Data" and "Clock"

The labels "Data" and "Clock" would suggest some sort of synchronous serial interface, but we would have to know what protocol it is using.  SPI, I2C, or something else?  In addition to knowing the type of protocol, you then need details about how it is used to send data.  That is, what bytes do you need to send to the device, if any, and what sort of bytes does it respond with.  The manufacturer will have to provide this information.

marcus
Got it... I'll do my homework

Got it... I'll do my homework better and get back on the topic.

Thanks,

Marcus

marcus
Instead of chasing hard t get

Instead of chasing hard t get protocols for DIY digital calipers I found this linear displacement sensor, would it work with the U3LV and a LJtick-Resistance? http://docs-europe.electrocomponents.com/webdocs/14c0/0900766b814c072b.pdf

LabJack Support
LabJack Support's picture
Yes, that is essentially just

Yes, that is essentially just a potentiometer and pretty easy to work with.  If you use all 3 leads, you just need to give it an excitation voltage across the outer leads and the wiper lead will give a signal voltage.  If you connect that signal voltage directly to an analog input that input is seeing the entire source impedance of the potentiometer, but even the highest impedance model at 5.1k is no problem for the low-voltage analog inputs on the U3:

https://labjack.com/support/datasheets/u3/appendix-a

So you could probably just on of the built-in DAC outputs for excitation, with an extra analog input used to measure the actual value in real time, but for an easier and better excitation get an LJTick-Vref-25.

The other way to use a potentiometer, is to just use one end lead and the wiper lead, such that you have a singular variable resistor.  You then use the LJTick-Resistance to convert that to a voltage value that you can acquire and then calculate the resistance.

 

marcus
Got it... Is there any

Got it... Is there any benefit to powering the sensor from DAC0/1 as compared to just hooking it up to any of the Vs terminals? I assume I'd want the highest voltage output across the sensor to achieve max resolution?

LabJack Support
LabJack Support's picture
With a potentiometer, any

With a potentiometer, any noise or change in excitation voltage will proportionately show up in the signal.

VS is simply the USB power supply, which is only specified to stay in the range 4.75-5.25 volts and does not have any specification for noise.

The DAC lines are more accurate, much more stable, and have much less noise.

An LJTick-Vref is better yet for all those parameters.

If using VS or a DAC line you want to use an analog input to monitor that excitation voltage in real time so you can use that value in your math every time rather than some assumed value or initial value.  This should get rid of most accuracy & stability effects, but not noise.

If using VS, you need to use a high-voltage AIN to acquire the signal but you are only using a quarter of the input range.  If using a DAC line you can set it so the excitation voltage and signal stay under 2.4 volts so you can use the full span of a low voltage analog input (FIO/EIO).  With the LJTick-Vref 2.5V you can get most of the signal output range from a 0-2.4 volt analog input, and if you need all the 0-2.5 volt range you can use the "special 0-3.6" option on the U3.

 

marcus
Interesting... In my set-up I

Interesting... In my set-up I'm using a LJTick-InAmp with only one wheatstone bridge load cell connected so I should be able to "steal" the 2.5V ref voltage from that with the special 0-3.6V range for any of the available AINs? I assume the 2.5 ref voltage in the InAmp is just as stable as the voltage output from the LJTick-Vref 2.5 module?

LabJack Support
LabJack Support's picture
Yes, both references are

Yes, both references are similarly excellent.

Vref on the LJTIA can source up to 25 mA.  If you have a 350 ohm bridge, that is drawing 7 mA, and a 1.7k pot would draw another 1.5 mA, so no problem.

 

marcus
Using the 2.5 Vref from the

Using the 2.5 Vref from the LJTick-InAmp with this sensor worked perfect, when the sensor is not engaged I get a full 2.5V reading (using the special 0-3.6 range on my sensor voltage input FIO) and then it decreases down to 0V at full stroke, providing me with a ~0.01mm resolution (I multiply the voltage by around 10.1, mm/V calibrated with a digital caliper). This is very useful for one of my applications.