Hi to All
There is a nice Breakoutboard wit a LSM9DS1 and two qwii connector.
Adafruit LSM9DS1 Accelerometer + Gyro + ... F Breakout
It's working with FC10 on an ESP32 simple and stable.
Another big advantage is that two sensors can be connected with one cable and the address of the second sensor can be changed with two small solder bridges. FC10 supports both addresses very comfortable. Also a long Qwii cable can go to the first board and from there a short Qwii cable to the second board. Each board has two Qwii connectors.
Unfortunately, there are two problems
1.
After saving and opening the project, the information about the channel of the LSM9ds1 is lost. This is not pleasant, especially with several LSM9ds1s.
2.
The 16 bit values from the Accelerometer/Gyro are in the wrong order, high byte and low byte are swapped. So I have to swap them myself back.
(Magnetometer is correct)
Maybe that can be improved and it would be a very practical component
regards
Stefan
Swap the A/G byte order:
choose Ground if you use the bridge to ground:
Just solder a bridge:
ESP32 and LSM9DS1 not compiling
-
- Valued Contributor
- Posts: 760
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 150 times
- Been thanked: 171 times
-
- Valued Contributor
- Posts: 760
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 150 times
- Been thanked: 171 times
Re: ESP32 and LSM9DS1 not compiling
Hi Martin
At this opportunity:
I have another small problem.
If I connect both LSM9DS on one bus, all 18 axes work perfectly.
But if only one LSM9DS is connected I want to know which one.
I tried to evaluate the return value from initialize the component
but no matter if the LSM9DS is connected or not, the return value is always 0.
With the MPU6886 this works very well.
So I tried to read a register from the LSM9DS.
Register 15 should always return the value 61 at the AG or 104 M.
But both times it reads the register from the first LSM9DS used. There is something small wrong
regards
Stefan
How I did it when the ret_byte were always 0:
At this opportunity:
I have another small problem.
If I connect both LSM9DS on one bus, all 18 axes work perfectly.
But if only one LSM9DS is connected I want to know which one.
I tried to evaluate the return value from initialize the component
but no matter if the LSM9DS is connected or not, the return value is always 0.
With the MPU6886 this works very well.
So I tried to read a register from the LSM9DS.
Register 15 should always return the value 61 at the AG or 104 M.
But both times it reads the register from the first LSM9DS used. There is something small wrong
regards
Stefan
How I did it when the ret_byte were always 0:
- Attachments
-
- Snag_6dbcb66.png (111.65 KiB) Viewed 692 times
-
- Valued Contributor
- Posts: 760
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 150 times
- Been thanked: 171 times
Re: ESP32 and LSM9DS1 not compiling
Hi Martin
I tried to make a macro to read the register values. I want to use it to read the values and change them later, for example to switch filters on or off.
But I have a little problem with the I2C master. Do I have to initialize the transaction and then deinitialize it again?
And is the I2C master the right component for this?
Init all: use the macro:
I tried to make a macro to read the register values. I want to use it to read the values and change them later, for example to switch filters on or off.
But I have a little problem with the I2C master. Do I have to initialize the transaction and then deinitialize it again?
And is the I2C master the right component for this?
Init all: use the macro:
- Attachments
-
- LSM_read.fcm
- (7.83 KiB) Downloaded 15 times
-
- Valued Contributor
- Posts: 760
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 150 times
- Been thanked: 171 times
Re: ESP32 and LSM9DS1 not compiling
Hi Martin
I still have small problems with the sensor and also with the I2C bus to read and write the registers.
regards
Stefan
I still have small problems with the sensor and also with the I2C bus to read and write the registers.
regards
Stefan
-
- Valued Contributor
- Posts: 760
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 150 times
- Been thanked: 171 times
Re: ESP32 and LSM9DS1 not compiling
Hi Martin
Filters
I do not use filters with Flowcode. However, it would be easy and convenient to install such filters.
This is not a simple sensor. There are two sensors in one housing. 3D accelerometer, 3D gyroscope, is one and the3D magnetometer is the another one.
However, the sensor itself has built-in filters.
I do not yet have access to what these filters are set to. But I will try to read and configure these filters. Would it be possible to update the sensor?
So the register reading and wring works
regards
Stefan
Filters
I do not use filters with Flowcode. However, it would be easy and convenient to install such filters.
This is not a simple sensor. There are two sensors in one housing. 3D accelerometer, 3D gyroscope, is one and the3D magnetometer is the another one.
However, the sensor itself has built-in filters.
I do not yet have access to what these filters are set to. But I will try to read and configure these filters. Would it be possible to update the sensor?
So the register reading and wring works
regards
Stefan
- Attachments
-
- Filter_eng.pdf
- (356.91 KiB) Downloaded 5 times