So I have a device called Torque meter that connects to the PC via USB and communicates data to the computer via a COM Port. I know that for sure because we can read the Torque meter's data with the help of the device software through that COM Port.
I want an Arduino to be able to also read values from that COM port so it can react based on those values.
My question is simple--how do I do that?
I suspect things will be a little more complex than you would like.
Your device connects to the PC using a USB connection and appears as a COM port.
When you connect an Arduino to your PC it will use another USB connection and will appear as a different COM port.
You will need to write a program on your PC that reads data from one COM port and sends the data to the Arduino through the other COM port.
A possible alternative is to get a USB Host shield for your Arduino and connect your torque meter directly to the Arduino with no PC involved. However I have no idea whether the ESB Host shield would recognize your torque meter.
Another possibility is an Arduino Yun as the Linux side of the Yun has a USB Host connector.
...R
Valeriya:
So I have a device called Torque meter that connects to the PC via USB and communicates data to the computer via a COM Port. I know that for sure because we can read the Torque meter's data with the help of the device software through that COM Port.
I want an Arduino to be able to also read values from that COM port so it can react based on those values.
My question is simple--how do I do that?
There is no need to drag the Arduino into this.
You use the PC and some sort of programming language - Python, Java, VB.NET, C# - to name some of the more popular ones - and write a program to read from the Torque meter.
It maybe that you need to know the API for that Torque meter if it is doesn't respond to simple ASCII queries over the COM port.
ieee488:
There is no need to drag the Arduino into this.
I think he wants the Arduino to control something else based on the torque values.
...R
Robin2:
I think he wants the Arduino to control something else based on the torque values....R
Maybe so.
If the torque meter doesn't have a simple ASCII command set similar to AT commands, using the Arduino is not going to be an option.
Thanks for the feedback. And yes Robin, you're right, I want it to control a motor; hence the arduino.
Anyway, I found out recently the Torque meter only transfers data once a certain button on the Torque meter guage is pushed, which defeats the purpose of what I had in mind.
Regardless, appreciate the feedback! Taught me that such a thing as a USB Host shield existed!
Valeriya:
I found out recently the Torque meter only transfers data once a certain button on the Torque meter guage is pushed,
A Heath-Robinson (Rube Goldberg) solution would be to use the Arduino to control a servo that pushes the button ![]()
...R