0
\$\begingroup\$

I am trying to read the acceleration data in the X, Y and Z axes from the LIS2DE12 accelerometer which is connected to an I2C-to-USB adapter, it is UMFT201XB.

I am using a virtual machine in VirtualBox whose operating system is a lubuntu 20.04.5 LTS. I was planning to read it directly from the linux terminal without using any kind of C program as I found on this website but /sys/bus/iio... directories do not exist for me. I have also read in other posts like this where the user @Ashutosh said that the UMFT201XB adapter has the FT201X chipset so it only has I2C slave functionality and since the accelerometer is another slave, you can't initialize the communication.

In VirtualBox, the USB device is being detected as when I run the dmesg I get the following output:

$ dmesg

usb 1-1: new full-speed USB device number 6 using ohci-pci
usb 1-1: New USB device found, idVendor=0403, idProduct=6015, bcdDevice=10.00
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: UMFT201XB
usb 1-1: Manufacturer: FTDI
usb 1-1: SerialNumber: FT5BIUOL
ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
usb 1-1: Detected FT-X
usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0

This way I know it's in located in /dev/ttyUSB0 but I've been trying tools like screen or stty but I don't get any results. Neither when using cat or tail to read the output.

EDIT 1

After some research i found this entrance on FT201X datasheet:

Please note that the FT200XD and FT201X are I2C slave devices only and should be interfaced to an I2C host (often in a microcontroller or FPGA). If an I2C master is required, please see the FT232H, FT2232H, FT4232H and FT2232D devices.

So I decided to look for devices with those chipsets. They all have MPSSE interface so I don't really know where the SDA and SCL pins are but, I managed to find a picture of UM232H device which indicated where these pins are, SDA being a short between AD1 and AD2 and, SCL being the AD0 pin. So, my question now is a bit different... before I buy anything is this device good for the application I want to do?

\$\endgroup\$
4
  • \$\begingroup\$ This is a old post. FYI, you have several problems and the best thing is to handle them one at a time (separate questions). I think your 1st problem is that you need to know that USB is actually many protocols all under the name USB. I think the FTDI chip is attempting to setup a USB/CDC (Communication Device Class) and is simply providing a way to talk to the I2C bus. The next is understanding I2C. For instance, are the terminating resistors installed? Finally, you need to understand the STMicro accelerometer & how to set it up before using it. \$\endgroup\$
    – st2000
    Commented Jan 21 at 18:22
  • \$\begingroup\$ Alternatively, (and this is what I would suggest) you can buy an STMicro accelerometer evaluation kit. Find one that is self contained (i.e. will connect to a computer w/o added hardware) and comes with STMicro demo software (i.e. an application that will run on the PC to demo the STMicro accelerometer). \$\endgroup\$
    – st2000
    Commented Jan 21 at 18:24
  • \$\begingroup\$ Thanks @st2000 for your answer even for such an older question. To ask your questions, i did not install the terminating resistors, following the connections i wrote on the post, no resistors were needed. Finally I bought UM232H but i wasn't able to communicate with it on my Virtual Machine but, connecting it to a kind of raspberry device i was able to get all axis accelerations by using i2c-tools on linux and smbus2 package on python3. \$\endgroup\$
    – Escris
    Commented Jan 23 at 9:04
  • \$\begingroup\$ Thank you @Escris for following up. Good to know you found a solution. In general, I find emulating a machine w/in a machine works well until you need to talk to the outside world. So you are not alone. In many if not all stackexchange web sites, you can answer your own question if/when you find a solution. \$\endgroup\$
    – st2000
    Commented Jan 24 at 14:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.