Vibration Readings at Rest Too High

Hi Guys,

We have the MEMS Vibration Sensor and using the MQTT Gateway.

We are getting some really weird readings which are really high:
rms_x: 6937.59

rms_y: 8591.36

rms_z: 7582.71

max_x: 30333.44

max_y: 46871.03

max_z: 34805.76

min_x: -32000

min_y: -29166.08

min_z: -20224

The sensor is sitting on my desk so there is absolutely no movement. I tried pressing RESET as suggested in another post but it has had no effect.

Also if these readings are correct how do we scale these readings to get a g output? I know the readings should be in mg. Can you suggest what we do?


@TravisE_NCD_Technica how does the gateway calculates the mg values.

it should be like this – mg = (msb >> 16 + msb >> 8 + lsb) /100
its possible gateway is not dividing the values by 100.

If this is a type 40 sensor then that looks to be how the measurements are calculated. Here is the code:

dataObject["rms_x"] = (float)(signedInt(data, 9, 24)/100.00);
dataObject["rms_y"] = (float)(signedInt(data, 12, 24)/100.00);
dataObject["rms_z"] = (float)(signedInt(data, 15, 24)/100.00);
dataObject["max_x"] = (float)(signedInt(data, 18, 24)/100.00);
dataObject["max_y"] = (float)(signedInt(data, 21, 24)/100.00);
dataObject["max_z"] = (float)(signedInt(data, 24, 24)/100.00);
dataObject["min_x"] = (float)(signedInt(data, 27, 24)/100.00);
dataObject["min_y"] = (float)(signedInt(data, 30, 24)/100.00);
dataObject["min_z"] = (float)(signedInt(data, 33, 24)/100.00);
dataObject["temperature"] = (int16_t)(data[36]<<8)+data[37];

Hi Guys,

Thanks for your help so far.

So my final question is can we assume that we just divide 16g / (sensor value) and this gives us the value in g for each axis. 16000 mg is 16 g

Also the max and min values are only an indicator of the max and min values recorded at each 500 ms interval during the sample period right they don’t have any impact on using this value for the calculation above right?

So for testing I shook the sensor and I think am getting correct values now, I got this value at the sensor:

rms_x: rms_x: 15490.55

So if we do the calculation we get:

16000/15490.55 = 1.03 g

This makes sense to me but I am not 100% sure as I don’t know what the actual scaling factor is I am assuming 16 g or 16000 mg?

Can you confirm our calculation is correct?


I think @TravisE_NCD_Technica released a new firmware which will fix the high values issue in micro gateways. Travis i think sensor type 40 will also need vibration calculation update if you havent done it already.

After updating the firmware gateway will send correct data.

No, the vibration values doesn’t need to be divided by 16g.

The values are calculated for that 500 msec period.

Hi Bhaskar,

The issue is that we are getting massive values from the sensors … this could be 16000-250000 and I dont know what these values mean? Can you clarify this?

I have a megamodem which Jacob created a new flash for and loaded the MQTT gateway onto it … dont know if this is causing an issue?


Hi Guys,

This just happened without me changing any settings in the gateway was working perfectly and then this …

I also have another issue now the gateway is a SOLID BLUE and I did not change any settings or anything just happened to do that for a while and then I it just goes RED? Then it goes no color(BLUE/RED dim) and then BLUE again I tried flashing it again with the MQTT but it fails with fail cu? Is there anything I can do to fix this?

I tried loading the Megamodem firmware it loads but does nothing? Then I tried loading the MQTT firmware again but it fails cu message. Now I just get red/blue dim led nothing else?

It has a weird wireless network ESP_9600A5 and now works kind of normally with BLUE flashing but I think its doing something strange?


@Anil_Bhaskar the update I released applies to all sensors that calculate a 24bit reading so it applies to sensor type 40 as well. I released this update for The MQTT Gateway so if the Python flash script is used to flash the gateway to MQTT Gateway firmware this should fix the incorrect vibration readings.

I will attempt testing with a type 40 sensor today.

@corptek what you are describing almost sounds like a hardware error of some sort on the Gateway. can you post a screen shot of the flash error you get when trying to flash The MQTT Gateway or just paste here the output of the log?

Hi Travis,

Here is the screen for the error I am getting and the whole process:

Its weird as it seems that the Megamodem flash works but something else is still in there, MQTT gateway causes the above error.


I apologize. This flash script is only a few days old. I made a correction to the Python script. Please re download and try running the script again, it should work now.

Hi Guys,

Yes it appears to be working now the values are normal in mg I think at rest I am getting:
{“Gateway ID”:{“transmission_count”:225,“battery_level”:2.85936,“type”:40,“node_id”:1,“rssi”:100,“rms_x”:29.86,“rms_y”:48.22,“rms_z”:240.35,“max_x”:133.36,“max_y”:124.37,“max_z”:0,“min_x”:-109.2,“min_y”:-199.5,“min_z”:-392.28,“temperature”:20}}

Awesome. Thank you for being patient with us on this new script. If you need anything else please let us know.

Hi Guys,

Just one more question. From your experiments is it possible you are getting some of the following figures at rest(ie. no movement):


These are all in G as we converted them from mg.


Yes, these could be the values when there is no movement.


Hi Bhaskar,

It seems that the sensor is not resetting to a lower value when we run it for a while and then stop it doesnt seem to be dropping values down to almost zero?

As you can see here there is absolutely no movement but we are still recording these value coming from the gateway? Can you tell us what is happening here?

I also checked the gateway as well directly in case we made some error:

node_id 1
rms_x 969.73
rms_y 988.14
rms_z 49.42
max_x 1058.08
max_y 0
max_z 88.19
min_x 0
min_y -1066.16
min_z -165.36
temperature 29

Same readings.


Can you share a picture of installation. After installing the sensor did was the sensor reset for calibration.


Hi Bhaskar,

Thanks for getting back to me.

I basically just moved it to the drop drill and just ran it. What is the exact process to calibrate when putting on a new motor can you go through it for me please as its not clearly documented?


after installing the sensor turn off the motor and hit reset on the sensor. This will re calibrate the sensor.

Yep that seemed to do the trick! Thanks Bhaskar