Asked — Edited
Resolved Resolved by DJ Sures!

4 In One Orientation Sensor

I have purchased a 4 in One Orientation Sensor. My desire is to use the compass function.

Once loaded and running, I view the compass heading values in the Variable watch window.. The value fail to read correctly. I find when I set the device in 90 degree directions ( 0 - 90 - 180 - 270 - back to zero ) I get value that do not even come close to the set position., nor do they repeat. I have changed my location, and even tried it in a wooden shed without any potential magnetic interferences, and still it did not work.

Has anyone use this sensor and has been able to get it to display correctly?

My reason for buying this was for the compass only and I am disappointed to see it not work.

Ron R


ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

#49  

Hi Dj, First, Again thanks for the upgrades of the compass.

The Quadrant displays are great. This will help with turns and direction.

Are we still able to get the "degree" numbers also? I want to experiment with both. I want to use them also as coordinates.

EDIT: Oops,, I messed with the setup and found the rounding works. This is great! Now I can go play.

Ron R

#50  

@ANDYROID Thanks for the input.

Ok, I decided to start from scratch so I made a new project and tried the calibrate and run script with it. I even made sure the servos had no power going to them yet. And ... it worked perfectly! Progress! Set it to nearest 10 degrees and it still worked perfectly.

Then I imported the Auto Position control from the example so I would have a servo setup model from which I could load a servo profile to set and energize the servos. Still worked fine. Even tried another calibration with the servos energized, still perfect.

Finally I went back to the original project I was running last night. Went through the calibration process again and all went well this time.

I kind of hate it when that happens because now I don't know why it didn't work last night. I changed nothing in the project.

Anyway, now I'm going to try another unit (still in the original packaging) and see if the same thing happens with the project from last night.

All of which leads to a question .... Once calibrated, do the calibration values get stored on the MPU9150 itself or in the EZB project file?

#51  

I would say in each project because of how the config settings work with plugins but that is a good question.

#52  

I think in the project. Doesn't the sensor only send the raw data and Dj's all night math, makes the values work ? I am not even sure the calibration will stay accurate? We will need some more tests or confirmation.

Ron R

PRO
Synthiam
#53  

The calibration is required each time - because it is not saved, yet. Also, the calibration continues to "learn" the longer the compass is used. So, if you continue to use it the calibration will become more accurate over time.

What can really screw the calibration up is large jolts or bangs. The compass will need to be re calibrated if that happens - this is due to the physics of a compass module and how it works - if they are jolted the calibration will be lost.

The drawing of how to calibrate does not imply the compass should be thrown in a figure 8:). Simply gently wave it in a figure 8 motion like you do with an iPhone when prompted.

#55  

Only had a little time for testing tonight, but the rounding function is perfect for my needs. I set it to 15 and it gives just the right amount of precision for navigation, and enough stability that I can trust my scripts not to overshoot their turn.

Thanks

Alan

PRO
Synthiam
#56  

Wicked - it should come in handy the most with Roli because the PWM can be modified slightly for forward rolling turns to compensate for the compass variations.