Using IMU Lord Microstrain 3DM-GX4-45

We are planning to use the Lord Microstrain 3DM-GX4-45 IMU instead of the Lord Microstrain 3DM-CX5-25. The power supply works and also the protocol seems to be the same. Still the master board does not receive any data from the IMU. Probably the imu_init() in the master board’s firmware does not work for this IMU. Has anyone tried using this IMU?

Hi,

I posted below message in a similar topic… still haven’t gotten around to actually implementing the IMU itself on the robot:

we’re actually planning on using a 3DM-GX5-25… note that Solo is designed for the CX5 IMU.
To use the GX5 we need to take the supply voltage from the power supply externally since the master board only provides 3.3v and the GX5 needs a minimum of 4.0v and we’re using a small converter for the GX5 to be able to communicate with the masterboard. This converter is the following: https://www.amazon.it/gp/product/B07ZDK4BLH/ref=ppx_yo_dt_b_asin_image_o03_s00?ie=UTF8&psc=1

I’ve slightly adjusted the stl file for holding the IMU as the GX5 is connected with two bolts on the side instead of the 3 bolts with which the CX5 is connected. in case anyone is interested I can share this stl, not sure if I can upload this to the github as well…

I’ll let you know once we’ve managed to get this IMU working with solo.

Thanks

Hi,

did anyone had success using the 3DM-GX5-25 using your setup? We have some 3DM-GX5-25/45 as well and wonder if someone managed to get them to work in the meantime.

Best,
Julian

Hi,

The suggested IMU by odri, 3DM-CX5-25, comes with an TTL UART interface that runs with 3.3V. If you want to use an IMU with a RS232 communication (which most of newer IMU have), you need to use an TTL-to-RS232 adapter. This is because the protocolls have a different voltage level for 0 and 1. The most common chip for the adapter is MAX3232. There are several TTL-to-RS232-adapters with the MAX3232 chip to purchase (eg this suggested by Chundri_Boelens above).

The MAX3232 chip is limited in terms of the maximum baud rate. Solo12 uses a very fast baud rate of 921,600 in order to transmit the imu data in 1kHz. Using an adapter with a MAX3232 chip results in a poor signal quality which leads the communication between master board and imu to fail.


Image: Poor signal quality at 921,600 baud rate due to the speed limitation of the RS3232 transmitter chip (I used the “ANGEEK 3PCS RS232 to TTL Serial Port Converter Module Connector MAX3232 Serial Module”)

The maximum baud rate I could establish was 460,800. This may still lead to some missing data due to poor signal quality and might lead to a lower frequency of the imu data due to the lower baud rate.

If you want to lower the baud rate, you need to modify the firmware of the master board. In detail, you need to edit the uart_imu.c as explained in the following:

Both the master board and the imu need to be told to use the different baud rate. In the uart_imu.c, the IMU is told to use a baud rate of 921,600 by sending a specific command (uart_write_bytes(UART_NUM, cmd6, sizeof(cmd6));). You can search for the correct command for your IMU and the desired baud rate and replace the string in cmd6. Or you can connect the IMU to the MIP-software, change the baud rate in the system settings and then save current settings.

The baud rate used by the master board is set by uart_set_baudrate(UART_NUM, 921600);. If you have set the imu’s baud rate in the software, you need to remove uart_write_bytes(UART_NUM, cmd6, sizeof(cmd6)); and insert the uart_set_baudrate(UART_NUM, 460800); to set the master board’s communication’ baud rate to 460,800 right after the uart comminication is established (eg in this line).

After modifying the files, you can continue with make and make flash.

As this workaround solution is kind of messy, I am happy to hear better solutions. However, I hope I could help.

Best
Ferdinand

Hi Ferdinand,

thanks a lot for your detailed explanation! This is super helpful.

The 3DM-GX5-25 uses a micro-DB9 adapter. How did you connect the D-Sub connector from the TTL-to-RS232 adapter to the connector of the IMU?

I checked and found a connector cable (see link below) on Amazon but it’s over 100 dollars. So I was wondering if you found a cheaper solution.

Best,
Julian

We used this:
https://uk.rs-online.com/web/p/av-cables/6126372/
https://de.rs-online.com/web/p/av-kabel/6126372/
Still expensive (~30 Euro), but cheapter than what Amazon offers

Great, thanks a lot for sharing your adapters!

Hi,

we ran into similar problems at which point we decided to just go ahead and buy a CX5 IMU, although we might consider to give the above input from Ferdindand a go. Thanks a lot for sharing!

Regarding the adapter we basically cut the TTL-to-RS232 board to have only the chip left and we connected the cables directly, pretty much using the connector + cable that Ferdinand has also linked to from RS.

Thanks!