0

For a milling machine I need to connect magnetic linear sensors which output a quadrature signal in order to read the position of 4 axes. The professional digital readouts are rather expensive. After some searching I tried to use an Arduino board and Yuri's digital readout Android software. I kept having issues with the bluetooth connection between my tablet and the Arduino failing.

I've since settled on a four axis serial to USB box, sold by a company which is involved the precision measurement industry. Now my issue is that the software supplied by the vendor for the converter box is only offered for Microsoft Windows. I'd like to run a Raspberry Pi 3 as my readout instead of dedicating a laptop.

I'm reading that running x86 on ARM is possible via QEMU or a paid software option. I'd rather not have to run WINE or a full Windows installation. I think it's possible to make this work in Linux on a Pi3 with a little bit of code. Where I think I will have the most trouble is that the Windows software requires some manner of special code to 'authenticate' the USB box.

Internally the box has a PIC18F45K22 8-bit RISC chip and a MC74HC86A XOR chip. I suspect the latter is used to combine the signals of the four axes before output. The USB to serial chip is a common FTDI FT232RL which I can see connects as ttyUSB0. Running 'screen' against that device has produced no output.

The specification of the microcontroller indicates that it is re-programmable with 1024 bytes of EEPROM. Among the other code they've flashed to the chip, would they have programmed in the 'authentication' code mentioned earlier? Short of de-compiling the Windows program, can I interrogate the device across USB without ruining it?

The microcontroller manufacturer site seems to have reasonable documentation and even code samples. Assuming the flashed code isn't obfuscated, could I download the contents of the EEPROM? From there I suspect I could see what commands are required to initialize the box. I could either remove the 'authentication' or re-write the program in its' entirety and flash it.

  • I thought of another way to tackle this issue. I used wireshark to capture the USB conversation. I was thinking it may be possible to replay the conversation in Linux to setup the device. I took two captures. In the first has only the device connected. In the second I connected a sensor. I began the packet capture after connecting the device, and before opening the Windows software. https://drive.google.com/open?id=0B9TGbzxFTIRva2R1SlJZUVYzZ0E https://drive.google.com/open?id=0B9TGbzxFTIRvQ2N6Z1JTV1lQY00 – falconluvr64 Jul 30 '17 at 08:07
  • What is your programming question that we can answer right now? What is the part that you're using? Datasheets? Anything? – TomServo Jul 30 '17 at 10:28
  • I think my challenge is understanding what signal or data the unit is sending across USB so I may interpret it and present it via a GUI. I have only confirmed the device is registering with the kernel. I tried to use 'screen' to see the data which didn't appear to work. So I used Wireshark alongside the Windows application. Are the captures helpful or do I need to dump the data differently? The Windows application stores configuration data in an ini file. I found the code I input in that file. I think the code is used only as a software license. Should I take this over to a hardware forum? – falconluvr64 Jul 30 '17 at 15:44
  • I've attached the box to my Raspberry Pi. It registers as /dev/ttyUSB0. After installing and configuring minicom, I'm not seeing any output with an sensor attached. – falconluvr64 Jul 30 '17 at 16:09

0 Answers0