CMPS14 Compass

I have a similar problem. Could someone clarify our doubts about the orientation of cmps14. I was thinking of placing my pcb (with cmps14) perpendicular to the ground. Could this be a problem?
In the new version of AOG will it be possible to modify the set up of the orientation?

Gorm helped me with this. Screenshot_20210330-122612

Firmware mod

I haven’t been following the CMPS14 development that closely, so maybe this is already done. But I think that identifying the orientation and offset of the CMPS14 could be done automatically with a calibration routine similar to what John Deere uses. Drive in a straight line, stop and do a reading. Then turn the tractor 180 degrees and park it in the same tracks with the position of the axle approximately in the same position, and take another reading. Should be possible to determine not only the “twist” of the cmps14, but also any offset in the roll axis (difference from completely level to what the cmps14 reads.

2 Likes

Also OnTrac/MĂźeller/Fieldbee ECU-S1 + MDU-G4 steering wheel motor combo do this type of calibration for IMU/compass orientation. For compass the process also includes driving a full equal radius circle each way, so it calibrates the compass even more.

As for steering without WAS the calibration asks to drive around 3-7 km/h and the ECU does some random steering and apparently works out degrees of wheel movement per steering motor encoder pulse.

I can make a video of the calibration steps of such a system, if it is of value to someone who might want to implement that in AOG.

Hello,

I agree comparing the heading of 2 IMU (one on the wheel the other on the tractor) to compare them and to deduce the wheel angle required: having the IMU reading referenced to the same landmark, so to magnetic north, so having them operating in rotation vector, so having them perfectly calibrated in their environment.

Agree.

Math

I finally got my CMPS14. Is there an ino. for 4.3.10? My search finds nothing. Thanks

What is the effect of pitch on the stability of the roll reading when using the twistable? Centripetal force also affects roll/pitch, does it now have twice the error involving 2 axis? Twice the noise?

Not saying it doesn’t work, just have questions :slight_smile:

I was planning to put my CMPS in the Mma socket of pcb v2, but when I do it runs into the ADS. I got around that problem with a stackable header.
Will it be a problem running the CMPS “upside down”?
Meaning, will it invert the roll?

Good Question. I have not tested, nor do I fully understand Cmps14. @GoRoNb Could you help us with this? This is above my skill level. :grin: Thanks

Just give it a try! I am gong for a drive today so will flip mine over and see what happens

there are two sides of the story: hardware and software. From the HW point of view, connect the two supply lines + SDA + SCL like any I²C device. The Nano needs a firmware supporting the CMPS, so either my one which should work in any angle as long as the z axis points to either the stars or the middle of the earth or the one from @Aortner (CMPS14 – Magnetischer Kompass mit Neigungsausgleich – DIY – Autosteer – Andreas Ortner) on which I based my mods. The easiest way is to check the raw values in the window where you connect to the virtual COM ports.

Important: If using my one, you’ll have to adjust the values in the beginning of the .ino code according to your mounting position as AOG has no option yet!!

grafik

Turning upside down is automatically detected.

Does pitch affect roll when using this method? What about the inherent affect of centripetal force that distorts the roll readings, is it worse involving 2 axis?

My CMPS14 came from Robot Shop with pins out the top also. Yes, resolder the pins to the bottom.

1 Like

For the case using different (separated) Arduino Nano for the CMPS14, could you help on the schematic for connecting the 6 pins from CMPS14 to Arduino Nano?.

Nano to CMPS 14, only 4 connections.

Screenshot_10

Many thanks Brian.
Now just need to be really patient, the CMPS14 stock is depleted, today´s estimated delivery date is 15th of May.

CMPS pin 1 (3.3v) to Nano pin 14(3V3). Pin 2 (SDA) hooks to 330 ohm resistor and then to pin A4. Pin 3(SCL) to 330 ohm resistor and then to A5. GND needs to go to same GND as Nano .
20210404_114120.jpg

1 Like

Thanks Jkpoizer. Per the CMPS14 data sheet, it allows feeding from 3.5V to 5V. What I don´t know is what would happen if I don´t use the 330 ohms resistors. The Autosteeerschematic.pdf file from which is taken the above picture, certainly includes both resistors, so I understand should be used, but on the other hand, the ADS1115, in the same schematic, for the same function pins (SDA, SCL), do not includes the resistors while in parallel with the MMA8452(now CMPS14) and pins A4, A5 from the Nano.

The answer to your question is here, but I am wondering that most i2c circuits always use pullup, we did not use it.image

1 Like

The manufacturer must not have planned for a huge purchase by the AOG crowd lol.

1 Like