My mBot Ranger gyro-Z value keep increasing


#1

Hi All,

Could any one teach me how to fix my Mbot Ranger I just bought from Amazon. The issue is with the “gyro on board z”, keep increasing by one, so it is will be from 0 to 179 then to -179 then go up to zero.

I am using MakeBlock App on Android, just purchased a mBot Ranger with Auriga control board.

Thank you so much
Sean


Python gyroRead for Z value not working properly
#2

Is this behavior occurring while the robot is turning/moving or when it is stationary?


#3

Hi.
When the robot is stationary. Robot just put on table.

Thanks


#4

Hi hsbk1982,

For the Z axis of gyro on the Ranger, please refer to explanation for the Me 3-Axis Accelerometer and Gyro Sensor in this post.


#5

Hi, @hsbk1982,

I’ve connected the mBot Ranger via USB to the mBlock environment on my computer, and I’m seeing relatively stable numbers from the Z-axis (which corresponds to the heading of the robot).

The program I’m using in mBlock is essentially:

When _green flag_ clicked
    Forever loop
        say 3-axis gyro on board (Z-Axis) for (.25) seconds

The control that I built in the Makeblock App on Android was:

when start
repeat forever
    display [read gyro on board (z) on (this)

After connecting to the mBot Ranger, this worked as I expected, with a stable reading when the robot was not moving.

I would suggest connecting the robot to your computer with the USB cable provided, and attempt to upgrade the firmware. That will often clear up any weirdness like that.

Regards,

Chuck


#6

Thanks Chuck. I will try to upgrade firmware now and let you know soon the results.

Nice weekend ahead…


#7

After many times trial and error, I also upgraded firmware. I even get a new laptop to install mBlock etc. I think the gyro sensor in my board is malfunction. All other sensor is working fine, except this gyro-z. So I will try to buy an external gyro sensor to see whether it works.

@chuckmcknight: hey thanks for your time, man. It really helps. I learned alot after trial and error and do all installation stuff…

Best regards,


#8

I know this is almost a year old. But, my comment is relevant to the original issue.

I have mBot Rangers with on-board gyros. I have updated the firmware on this robot.

When plugged in and connected to the computer via USB, the z-axis numbers do not drift and appear to be fairly locked.

However, when powered with a DC battery pack and connected via 2.4G Wireless Serial, the z-axis is drifting approximately 1° / second.

It appears that user dasansa had this same problem:

Also, this same issue was discussed here:

Is there any way to fix this?


#9

I’m not sure right off the top. It may have to do with the power supply not being as stable although that would seem to be odd to me. I would address the issue to @tec_support after the Lunar New Year is over and everyone gets back to work (their note said they should be back after 21 February). I’ll try to look at that when I get a chance, but it may be a couple of days. If the Auriga uses the same InvenSens MPU-6050 Gyro, you might want to look at this article (link) or this one (link).


#10

Hi rosemarybianchi,

The gyro sensor doesn’t support hot-swappable. So it needs reset to do the initial calibration base on the current position.
Before you run the online program to read the Z axis value, you can try put the Auriga board on the floor (stock-still), then press the reset button (if the board makes a voice, means the reset is successful), the Gyro sensor calibrate automatically during reset, and you can run the program to read Z axis value in which situation, the offset will be much smaller.


#11