




It might be good to power up the Razor a few minutes before calibration, so the sensors can warm up. Calibrating the sensors the first time can be a little tricky, but let’s go:
If you didn’t change the firmware defaults, you should see lots of output like this:
#YPR=-155.73,-76.48,-129.51Set the firmware output mode to calibration by sending the string #oc. You should now see output like this:
accel x,y,z (min/max) = -5.00/-1.00 25.00/29.00 225.00/232.00Calibrating the magnetometer:
You should now have something like this in your Serial Monitor:
magn x,y,z (min/max) = -564.00/656.00 -585.00/635.00 -550.00/564.00Put these values into Razor_AHRS.ino.
Calibrating the gyroscope:
You should now have output that looks like this:
gyro x,y,z (current/average) = -29.00/-27.98 102.00/100.51 -5.00/-5.85Try to rotate the sensor in a way so that you cover all orientations so you produce dots that more or less evenly cover the sphere.
In a mostly undistorted environment this could look something like this:

Hit SPACE and watch the Processing console - you’ll find some lines of code that you have to put into the firmware under "USER SETUP AREA" / "SENSOR CALIBRATION" and you’re done.
The collected data (the dots) are also written to a file magnetom.float in the sketch folder. Now in case you own Matlab, underMatlab/magnetometer_calibration you’ll find a script called magnetometer_calibration.m that uses this file and produces some plots for you, so you can visually check the calibration.
Ellipsoid fit and corrected values:


Sampled raw magnetometer values:

Ellipsoid fit and corrected values:






Shipping | Delivery Period | For in-stock parts, orders are estimated to ship out in 3 days. Elecbee ships orders once a day at about 5pm except Sunday. Once shipped, estimated delivery time depends on the below carriers you chose. DHL Express: 3-7 business days DHLeCommerce: 12-22 business days FedEx International Priority: 3-7 business days EMS: 10-15 business days Registered Air Mail: 15-30 business days | |
| Shipping Rates | Shipping rates for your order can be found in the shopping cart. | ||
| Shipping Options | Shipping rates for your order can be found in the shopping cart. | ||
| Shipping Tracking | We will notify you by email with tracking number once order is shipped. You can track your order using the “Track My Order” feature. | ||
| Returning/Warranty | Returning | Returns are normally accepted when completed within 30 days from date of shipment, please contact customer service for a return authorization. Parts should be unused and in original packaging. Customer has to take charge for the shipping | |
| Warranty | All Elecbee purchases come with a 30-day money-back return policy, plus 1-year Elecbee warranty against any manufacturing defects. | ||
| This warranty shall not apply to any item where defects have been caused by improper customer assembly failure by customer to follow instructions, product modification, negligent or improper operation | |||
| Ordering | How to Buy | Elecbee accepts online orders. | |
| Add to cart > Check out > Submit order > Complete payment > Delivery | |||
| Payment | PayPal, Credit Card includes Visa, Master, American Express, Bank transfer. | ||