kriswiner/EM7180_SENtral_sensor_hub

Missing writeByte(EM7180_ADDRESS, EM7180_AlgorithmControl, 0x00); ?

Closed this issue · 11 comments

In the "EM71280_MPU9250_BMP280_M24512DFC_WS_Acc_Cal.ino" program, routine "void EM7180_set_WS_params()" there is not a "writeByte(EM7180_ADDRESS, EM7180_AlgorithmControl, 0x00);" at the end of the routine to restart the algorithm.

Should there be a write of 0x00 to the AlgorithmControl register after the "writeByte(EM7180_ADDRESS, EM7180_ParamRequest, 0x00);" at line 929?

Thanks,
Tom

Perfect makes sense, thanks for the link to the other files, and the quick reply!

Closing this issue

Regards,
Tom

So is this out of date then?

https://github.com/kriswiner/EM7180_SENtral_sensor_hub/tree/master/WarmStartandAccelCal

I've been using this sketch since I began with the USFS board, since it was linked in the writeup found here:
https://github.com/kriswiner/EM7180_SENtral_sensor_hub/wiki/F.--Magnetometer-and-Accelerometer-Calibration

If this is outdated, it may be the reason for all my intermittent hanging issues

I can't seem to get this one to work. Using Teensy 3.2, the Sentral MPU9250 board, and the "Teensy_INV_USFS_Baseline_Calibration_Utility_Acc_WS" script with all the header files copied into my VisualMicro solution in Visual Studio.

I was able to get "Sentral Status: 11" at first, and tried to calibrate the accel, but after rebooting I still had "Acc Cal data invalid". And now I'm only getting "Sentral Status: 3".


Opening port
Port open
VMDPR_Initializing Sentral_0
Sentral_0:
Scanning...
I2C device found at address 0x28  !
I2C scan complete

Sentral Status: 3 (Should be 11)

Sentral firmware loaded. Fetching Accel Cal and WS parameters...
Done...

Acceleromater Calibration Data:
X-acc max: -1
Y-acc max: -1
Z-acc max: -1
X-acc min: -1
Y-acc min: -1
Z-acc min: -1

Checking/loading Acc Cal data...
Acc Cal data invalid! Defaults loaded...
Done. Loading Warm Start Parameters, modifying sensor ranges and data rates...
Warm Start data NOT loaded!
Done. Starting the Sentral...
Done. Loading algorithm tuning parameters...
Sentral initialization complete!

Algorithm Status = 0

ax_0 = -8 ay_0 = 4 az_0 = 1036 mg
gx_0 = 0.00 gy_0 = 0.00 gz_0 = 0.00 deg/s

mx_0 = 22 my_0 = -22 mz_0 = 1 uT

Sentral_0 Quaternion (NED):
Q0_0 = 0.91 Qx_0 = -0.03 Qy_0 = -0.06 Qz_0 = 0.41

Sentral_0 Yaw, Pitch, Roll: 62.53, -5.09, -6.25

Baro Pressure: 949.40 mbar
Baro Temperature: 19.49 deg C

Loop Cycletime:11087316 us

Send '1' for Sentral_0 Accel Cal
Make sure the desired accelerometer axis is properly aligned with gravity and remains still
All three accelerometers must to be calibrated in the +/-1g condition for accurate results
Send '2' to save Sentral_0 Warm Start params

I probably need to hook up the interrupt pin, don't I?

Copy that. I'm still using the sketch as-written, and will refactor it just a bit as I bring it into my solution. Do you have any general recommendations for changing the script to a more request-based format? My scripting is a little slow since I'm sending packets over the air at around 80Hz, and I want to be sure I'm sending the most recent IMU data with each packet.