CMPS14 Compass

I am currently using the 3.3V MMA8452 using version 4.3.1. I have both the CMPS14 and BNO08x. I was thinking of first desoldering the CMPS14 and putting plugging it into the MMA8452 slot as that seems to be the easiest to do. I know I have read that the BNO08x is better for some, but easy I will try first. My only concern is it will not be centered on tractor as my box sits over the wheel hub. I seem to be having issues with the roll in that it seems that when I roll to the right, positive roll number, the tractor does not correct by driving the tractor left but stays on the right side of the line. I would think it should compensate and steer more to the left of line if tilting right. We have mostly flat fields but have some slight rolls and the lines get a little wiggley when approaching the rolls and leaving the rolls. was hoping the CMPS14 or BNO08x would help. Thanks.

Iā€™m having a problem disabling the auto-calibration of the cmps14maybe anyone can give advice for the code. Cause look at the datasheet thereā€™s no explanation about it.

I didnā€™t think you had to disable anything. Just plug it into the arduino and upload the ino

From the datasheet. Implies exactly what you say, itā€™s off by default.

Calibration of the CMPS14
The CMPS14 is shipped with a static factory calibration, but the module is able to automatically update its calibration with algorithms running in the background if desired. To achieve background calibration the user just needs to turn the functionality on and perform the required simple movements.

Maybe explain the problem you are seeing with the CMPS. Normally, you plug it in, and it works.

Hello everyone,
I have tested the New Version 5.2.2 with cmps14 via UDP and fix2fix Single Antenna via UDP.
I works pretty good, but sometimes there are some Problems.
The reverse direction even with reverse detect ion does not work. Also i have seen random Spikes of the Imu. What could be the cause of it. (see picture) IMG_20210804_180123
IMG_20210804_180736
Is there a tip to avoid These Spikes. It really freaks out the steering!

Best Regards

Seems to work ok backing up. Not sure why you are dropping the imu, that is tough to figure out

Screenshot_15

I will try a new sensor! Maybe the Sensor is broken.

Hello ,
AOG 5.2.2 I like more and more, but, when I am busy with fields, if I often maneuver the tractor can be found in reverse gear on AOG! . I use the CMPS14 which is not disturbed by anything, positioned in the right direction ā€¦ Itā€™s a shame because otherwise the system is very promising.

Hi, I have finally put some time into installing the cmps14. seems to work great except when there is a jump. Im not sure whats going on with this. I have put the filter all the way up and it didnt change anything, also I played with the imu to gps slider and that also did seem to change much.
I know there was some talk about this a while back just wondering if there is some fix?

you can see in the video right at the start there is a big jump and then some smaller jumps. it does seem to happen rather frequently and almost every time right after a u turn.

1 Like

Your jumps looks pretty much like mine. I 'm not yet 100 % sure if it GPS or IMU related, or both.
I was playing yesterday with my BNO085. If I understand correctly cmps14 is bno085 with added compass. What I noticed, there are random packet errors (I2C). Mostly they just appear without any harm. Sometimes, I think, packet is corrupted such a way that it is technically correct, but orientation is way off. If heading suddenly jumps like 90 degrees, steering goes wild.
My solution was to take 3 measurements average from quaternion vector and compare it to a new measurement. If vector is off by some value (0.1) I discard them all and start over for next 3 measurements. I havenā€™t tested it on tractor yet.

2 Likes

I seen in AOG there is a filter slide I wonder if that is doing something similar? Trying to dump the bad information?
Indo have another cmps14 I might try and swap it and see if that helps.

Iā€™m wondering if the average of three samples introduces too much latency. What about comparing the latest sample with the average of the past few and let the latest one go if it isnā€™t way off. This way you would have zero additional latency except for the (hopefully) rare case that a sample needs to be discarded.

Three value sample average makes output still around 10 Hz.Yes it makes more latency. I wanted to do even larger average. Itā€™s a bit of compromise.
It is actually a good idea to compare last few good values. I might try that.

I tested 3 values average filtering today with aog. There are still spikes on heading chart. I have no idea how is that even possible.

1 Like

No. The CMPS14 is simply a BNO085 with an additional onboard controller to basically send the information in a particular format. It is however a BNO085 stuck in one mode. Some, myself included, would argue the wrong mode for our purpose. Hence why I use a BNO085 and not the CMPS14.

6 Likes

I checked the Ali bno085 for this last night and did not see this behaviour, so it may be just the cmps14.

This is a long thread, but back around post 55 this was discussed.
AOG has the ability to set bno085 correctly today.
But cmps14 maybe come with different settings, as this issue does not happen to Brianā€™s cmps14.
Both cmps14 and bno085 should be plug and play in AOG (AOG detects automatically)
If you want to go the USB way cmps14 should be easier to connect.
But as mentioned above cmps14 is set up to detect magnetic fields(compass) so you must consider not to place cmps14 close electromagnetic fields.

2 Likes

How stupid of me. I just canā€™t take an average from quoternion vectors. There are valid jumps from -1 to 1, just like -180 degrees to 180 degrees (or 360 to 0).

As I read from CMPS14 manual. Heading is calculated from quaternion outputs. I donā€™t know how well it handles errors. It does not seem to provide quaternion output.

I have done some table test logging on my (aliexpress version) bno085. Bad quaternions are quite common (single values > Ā± 1). Less common are quaternions where norm is not close to 1. Those are also bad values.
Here is a graph. The one on the top is raw quaternions, most splikes are bad values (> Ā± 1). The one on the middle is euler angles calculated from from quaternions where values are not > Ā± 1.
The one on the bottom is euler angles where bad quaternion norms are filtered out. No spikes there.
vector_full

3 Likes

Hello,

Your graphics are from CMPS or BNO085 ? Iā€™ve done a lot of test of Adafruit BNO085 board (see BNO085 topics) and never see spikes like this on Euler angle.

Math

1 Like

I have a chinese aliexpress version of bno085. It might have some differences to Adafuit version- At least board is differentā€¦