
Andy Roid
USA
Asked
— Edited

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
Hi Alan, I guess I will continue to wait also. I would rather have a device which is compatable with the EZB, than mess around to get something working.
Dj mentioned he would work on a tutorial. I will see how he makes out.
Ron R
Moving my conversation over here where it belongs instead of in the release note thread. I am having a little more luck tonight. It is very strange. It kind of works in 2 orientations With the board right side up, and the plug to the rear it detects turns, in the right direction, but when I get it generally towards "0" it is facing south. If I turn it around with the plug facing forwards to try to fool it into thinking it is pointed north, it doesn't work at all, just fluxuates up and down in the mid "200's" when I turn it, which makes no sense at all, accept that with tonight's tests it is mounted to a cube off the front of Adventurebot, so maybe the servos or even the EZ-B itself, which it is pointed towards in that position is having an impact.
Any other orientation has the same issue even if I move it as far away from the EZ-B and 2 servos as the cable will allow. It only works at all oriented one way.
OK, so with it in the position where it sort of works, comes the next problem. It isn't consistent in how far a degree is... If I turn face south, so it measures ~ 0 (it is very jumpy, but I can get it jumping between 355 and 5) and I turn 90 degrees to the right, it measures that I have turned 180 degrees. If I go back to 0, then turn 90 degrees to the left, it reads 300, thinking I have gone 60 degrees. It spends most of the circle in the 200's, with a big jump from 200 down to 0 in the last ~90 degrees or so.
All of this is with the default settings and using the default script. Increasing the smoothing just seems to make it react late to turns, but doesn't smooth out the jumpyness. Same with increasing or decreasing the time between reads in the script.
So, some progress, but still not really useful.
Alan
I haven't had as much luck as Alan so far, although (as mentioned) it doesn't jump around as much. But right now no matter what orientation I have the compass in it tends to read only from about 200 - 300 (but not really accurately). It seems to ignore anything between 0 and 180... I did calibrate it once, but I will keep at it today to see if I can improve on it... I did this waving the compass by hand. Later I will put it on my Roomba to have a stable platform to rotate from...
To help with gathering more test results, I'll test the compass my 4 in 1 later as well and post the results. This will be the one ordered directly from China when it was first released.
Thanks steve - you won't need to do that. I have the issue resolved for the next release.
Olay DJ. That's cool.
Yeah - it's been 18 hours of math class getting it right
and learning a lot about compasses and calibration requirements. It's good now.
Good morning.
I ran a number of tests. I only used the compass on an ezb, nothing else connected. The compass and EZB was placed on my desk with my monitor and keyboard local to it. I don't believe they caused any interference. I placed the compass on the top slot of 3 stacked cubes. I ran the compass script, init. script. and Variable watch. I used the figure 8 motion to calibrate. I marked a base line on the pad below the cubes to set a zero point, which was south by a magnetic compass. Typical outputs shown on sweep display. I will re run tests later and monitor the variable watch display.
I rotated the block and ezb compass 90 degrees at a time and got the following results.
Angle turned (clockwise from top)
Pointed Degrees 0, 90, 180, 270, 0
Tests results 358-4 , 103-104, 208-220, 284- 290, 355- 6
Readout values were not stable and varied about +- 10 points at rest. Any movement caused additional lack of accuracy. Accuracy of coordinates to true value was not good, but without any movement seemed somewhat repeatable. The zero point value (south) seemed to repeat within tolerance +-10 points.
I don't know if I will have the opportunity to connect the compass to my adventure Bot until next week to see if it works while running. If I can sneak in some time later, I will try to do additional tests.
The results seems better than they were during my initial tests in the past.
Ron R