How to trigger a button on a usb cable connector?

Hi everyone..

I was wondering if any of you can help me solve a little issue that i have either by using an arduino or not..
I have a usb cable that is connected on one end to a digital caliper and on the other end to the PC,
on the USB connector itself there is a button, each time I click on it I get the reading from the caliper transferred to the PC in text.

This is my own USB connector:

and in general it's something similar (but no exactly) like this (the cable is shown in 2 parts that should be connected):

the thing is that I have to manually and physically click the button each time so I would like to automate the process in a way that i can get the readings to the pc either by having some sort of mechanical means to physically click the button every time i send any command from the PC to the arduino OR by hacking into the device itself, which I have tried figuring out how to do but it does not have any additional software and it uses the windows usb driver which also goes for keyboards and mice so I suspected it's not so possible but there might be something else which i am not thinking of..

I would have really mach rathered to have any electronic means of automating it..

any thoughts?

Thanks a lot,

Roy.

The simplest way that doesn't need to know anything about what that switch does is to put a small relay across the switch.

If you can reverse engineer the circuit there may be better options but the relay is the easiest I think.


Rob

You may not need to reverse-engineer the entire circuit. You can have the Arduino request the data and convert it to text:

The 52-bit (13 hex digit) output is:
FFFFsddddddpu

FFFF = 0xFFFF
s = sign (0='+', 8='-')
dddddd = six digits
p = location of decimal point
u = units (0=mm, 1=inch)

0xEEEEEEEEEEEEE = error indicator

See page 22: http://www.mitutoyo.com/pdf/1715.pdf

Thank a lot for the help guys!

@Graynomad: yep, this is also the way I was thinking but I will try to go the electronic way for start..

@John: This is so nice! I wasn't aware it is possible.. I will try it! although my caliper is of a different brand it should work the same..
The only thing I am thinking now is how to make it happen.. please excuse my noob questions but..
I want to get the readings to a C# .net program I am writing so,
I will probably have to write the "REQUEST" procedure and upload it to the Arduino and then whenever I would like
I can call the Arduino from my own PC Program to make the Arduino execute the procedure and send me back a text string..
is that a good way? is it a way at all? because from what I've read there is no way to directly set pins and so to the arduino from a .net program,
unless you are using something like Firmata V2.3ProtocolDetails - Firmata which may also work for me since my Uno came preloaded with it..
in the Firmata protocol information page I can see the different options of messages and such..
from what I understand from you and your link it is just a data message?..
I would be happy to get any more leads.. :slight_smile:

Thanks again to you all..

Roy.

anybody anything? please :slight_smile:

I can call the Arduino from my own PC Program to make the Arduino execute the procedure and send me back a text string..
is that a good way? is it a way at all?

Yes, you don't really "call the Arduino" but you can tell it to do something for the PC and return any results.

there is no way to directly set pins and so to the arduino from a .net program,

That depends on what you call "directly".

Literally that's the case but all you have to do is send a command over the serial link and have your Arduino program set the pin.


Rob

got it.. so now I guess I just need to experiment..

Thank you very much, and thanks everybody!
I appreciate the help.

Roy.

Well a really low-tech/kludge way is to program a servo to press the button. Obviously in this case, that is not needed, but since nobody mentioned it, I thought I would. :slight_smile: