Compass sensor quit working


#1

I am using the compass sensor with the megapi board. I calibrated it using port 8 and the compass worked perfectly. The next day, it did not work… returned values from 155 to 158 regardless of orientation. I did not change the mblock program at all, or the position of the sensor.

Nothing I do now will make the compass work. I turn on the megapi, connect the serial cable, and the red led is on but not the blue. If I try to read the compass from my mblock sketch, the blue led comes on but I get false, unresponsive responses. Calibrating does not help.

I have switched ports and cables, to no avail.

I wonder if the sensor is broken?


#2

Hi Pgchurch,

Have you ever uploaded any program to the MegaPi board after you tested the me compass the first day?
If yes, you need upgrade firmware for the MegaPi before you running mBlock online program to test the me compass sensor next time.
Please refer to this instruction to upgrade firmware for megapi first,How to Upgrade Firmware for MegaPi.zip (253.7 KB) then test the me compass again have a check.


#3

Hello Pgchurch:
I had a similar problem when I used the compass on my ultimate 2.
To solve the problem, I had to mount the module vertically (RJ25 cable coming out the bottom and the “makeblock” logo on the top.
I then turned the power on and re-calibrated.
I think it has something to do with what X, Y or Z axis it uses to give the readings.
I now get readings like the following when I turn 90 degrees
245
133 + 307
45


#4

Hello.
I updated the firmware then plugged the compass sensor into port 8. Only the red led came on. Then I read the sensor in a loop using makeblock and the blue led came on steadily. Garbage readings. I recalibrated the compass. Still garbage.

Do you have any other ideas?


#5

Hi, thanks for the tip. I tried mounting the sensor vertically, but the readings are still garbage.


#6

What type of readings are you getting?
As I rotate the robot 90 degrees clockwise on its track, I get readings of 245, 307, 45, 133.

simple compass test


#7

They vary and change after I calibrate. Butusually something like 150 plus or minus 5 as Irotate sensor 360 degrees. Thing is, it worked perfectly one day, rolling right around from 0 to 360 and has never worked since.


#8

Hi Pgchurch,

Do you use the latest version mBlock 3.4.11 software to test me compass sensor?
Besides, could you try clear the cache on the mBlock software, then test again have a check.
image

Once still the same issue, could you add my Skype account (1021306172@qq.com), we hope to do a video chat to double check the issue. We are available from 9:00~18:30 on working day, China time. Please kindly let me know your available time.


#9

I am using that version of mBlock and I cleared the cache as you suggested, I calibrated the compass but although the reading changes, it is still garbage.

I do not use Skype, what do you suggest?


#10

Hi Pgchurch,

Is it possible for you to download a Skype and register an account? Normally, this is free.
Or do you use wechat? We may try video chat via wechat too.


#11

No, I am sorry but I do not videochat. I tried to send a video of an earoier problem but it was incompatible with your site. I guess I am stuck.


#12

Hi Pgchurch,

Sorry to hear that!
How about sending the video to us via pCloud transfer?
You can send it to email daisy@makeblock.com.

Besides, how about trying just connect the me compass sensor to the MegaPi board with RJ25 cable, and remove other electronic modules from the MegaPi board(like the first picture below)? Then upgrade firmware for the MegaPi and run the following online program (second picture below) have a check?


image
You can take a video to show all your operations and the behaves from the Compass sensor while test above.

Just make sure you have calibrate the me compass correctly, here we attach the instruction too.Process of calibrating the Me Compass module.zip (144.7 KB)

Btw, may we know do you also have other me compass to check it in the same way?


#13

Ok I will try this.
Thank you.


#14

Hi, that procedure worked but only when the compass was not mounted on the robot. Once I put it in place, it registered garbage and would not recalibrate. It is bad to attach the compass to metal parts using screws?


#15

look at my postings with a similar problem with the gyro. I have to use a piece of cardboard as a barrier.
http://forum.makeblock.com/t/robotic-arm-and-gyro-with-encoder-motor/10423


#16

That is a really good idea. I will check it out.Thanks for the insight.
Paul


#17