3軸 QMC5883L コンパスモジュールは、I2Cを基づいて、高分解能の磁気抵抗センサーと16ビットADCが装備されており、1°〜2°までのコンパス方位精度が得られます。この小型センサは、無人偵察機やロボットナビゲーションシステムなど小さなサイズのものにも収容できます。センサは、磁場を3軸の差動電圧として出力します。 この電圧レベルシフトは、進行方向の計算や、異なる方向からの磁場の感知に使用できるデジタル値として出力されます。 増幅、自動消磁ストラップドライバ、オフセットキャンセルなどの信号調整が組み込まれています。このモジュールには、MIC5205-2.5電圧レギュレータも搭載していますので、3.3V〜5VのDC電源に接続することができます。

下記のregister mapをご参照して、モジュールから獲得したのデータ理解できます。QMC5883Lには14個のレジスタがあり、その中の2つの制御レジスタがデバイスは工作モードを決定し、アドレスは「09H」と「0AH」になります。
残りのレジスタのほとんどは、読み出し専用のデータ出力レジスタ、ステータスレジスタおよび識別レジスタです。

このプロジェクトでは、QMC5883Lモジュールを使って、南とこのモジュール間の方位角数値を出力します。


DownLoad Url osoyoo.com
Hi
I tried this and i get
isHMC_= 0
isQMC_= 0
Could not find a valid QMC5883 sensor, check wiring!
Forgot to mention
I2C Scanner reports 0x0C as address.
Is this right?
I purchased two GY-87 modules and one GY-271 module. The GY-87 features the HP5883 magneto-sensor chip, while the GY-271 uses the L883 chip. Regarding Arduino IDE compatibility, the L883 chip works with the library written for the HMC5883. However, none of the HMC5883, QMC5883L, or QMC5883P libraries are suitable for the HP5883 chip! The registers and register bits for these three chips differ significantly. Getting the HP5883 to work is like fishing in murky water. Does anyone have any information on this? Another issue is that the GY-87 module does not operate on 5V VCC; a dual-MOSFET level shifter doesn’t do the trick. It only works with 3.3V.