We have the MEMS Vibration Sensor and using the MQTT Gateway.
We are getting some really weird readings which are really high:
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<<8)+data;
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.
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?
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?
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.
Yes it appears to be working now the values are normal in mg I think at rest I am getting:
Awesome. Thank you for being patient with us on this new script. If you need anything else please let us know.
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.
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:
Can you share a picture of installation. After installing the sensor did was the sensor reset for calibration.
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