Multi Source Translation Content

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Multi Source Translation Content

讨论

排序依据:
MPL3115A2? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 大家好, 我买了一个标有" m3pryw0f" 的传感器,以为是 MPL3115A2。I2C 地址是正确的,但当我读取 WHO I AM 时,结果却是 0x0E,而不是 0xC4。此外,在按照快速启动步骤操作后,传感器似乎无法识别超过 1 米的高度变化,尽管它应该显示 0.3 米的显著变化。最后,当我读取压力测量值 LSB 的低 4 位时,它们并不像数据手册上说的那样为 0(即使传感器没有移动,它们也会随机变化)。 我买的传感器可能不是 MPL3115A2 吗?这个标记是什么意思?如能得到任何帮助,我们将不胜感激。 压力传感器 传感平台 Re: MPL3115A2? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好, 首先,M3PR 是 MPL3115A2 的正确零件标记。 当您读取 WHO_AM_I 寄存器 (0x0C) 时,您是否有逻辑分析器或示波器来了解 I2C 总线上发生了什么?查看您的源代码(至少是初始化和数据处理例程)可能也会有所帮助。 要实现 30 厘米分辨率,必须设置最大过采样(OS[2:0] = 0x07)。 看看我的 MPL3115A2 和 KL25Z示例项目,你会发现它很有用。 希望对您有所帮助。 此致, 托马斯 PS: 如果我的回答有助于解决您的问题,请标记为"正确" 或 "有帮助"。谢谢。
查看全文
MMA8451 - 运动时的 INT1 和 INT2 早安 实际上,我们在 GPS 设备上使用 MMA8451,几分钟后我们就进入睡眠状态我们没有明显的移动,我们使用 INT1 在移动时唤醒 CPU。我们想在 INT2 上接收相同的中断信号,但无法成功。 此致, 吉安玛丽亚 Re: MMA8451 - INT1 and INT2 on Movement 你好,吉安玛丽亚、 无法定义中断引脚保持激活状态的时间。 顺祝商祺! 托马斯 Re: MMA8451 - INT1 and INT2 on Movement 你好,托马斯、 无法工作。但使用附件中的示例可以正常工作: https://www.nxp.com/docs/en/application-note/AN4072.pdf 我会用的。在这种情况下,我也可以避免读取源寄存器,因为每次检测到TAP时INT都会上升。 另一个问题是,我能否定义中断保持高电平的时间,实际上它非常快,是否有可能让 INT 保持高电平约一秒钟,然后再自动降低? 感谢您的帮助。我真的很感激。 吉安玛丽亚 Re: MMA8451 - INT1 and INT2 on Movement 你好,吉安玛丽亚、 您的代码似乎是正确的。我建议尝试将阈值从 ~3g (0x30) 降到例如~1g (0x10),也可以选择防抖计数器值。 为了将运动中断路由至 INT1 引脚,请确保 INT_CFG_FF_MT 位 = 0。 然后在 ISR 中清除 MCU 中断标志,并读取 FF_MT_SRC (0x16) 寄存器,以清除 SRC_FF_MT 状态位,并解除 INT1 引脚的保护。 顺祝商祺! 托马斯 Re: MMA8451 - INT1 and INT2 on Movement 早上好,托马斯、 我正在使用附件https://www.nxp.com/docs/en/application-note/AN4070.pdf 第 11 页的示例步骤。 下面是我的代码,也许我哪里出错了。 _____________________________________________________ //进入待机模式 resDue= i2c_smbus_write_byte_data(client, 0x2A, 0x18); printk(KERN_INFO"ASI - set standby mode, res=%d\n",resDue); resDue= i2c_smbus_write_byte_data(client, 0x15, 0xD8); resDue= i2c_smbus_write_byte_data(client, 0x17, 0x30); resDue= i2c_smbus_write_byte_data(client, 0x18, 0x0A); resDue= i2c_smbus_write_byte_data(client, 0x2D, 0x04); resDue= i2c_smbus_write_byte_data(client, 0x2E, 0x04); value = i2c_smbus_read_byte_data(client, 0x2A); value |= 1; resDue= i2c_smbus_write_byte_data(client, 0x2A, value); printk(KERN_INFO"ASI - exit standby mode, res=%d\n", resDue); return 0; ____________________________________________________________ 如果我用附件的TAP示例 https://www.nxp.com/docs/en/application-note/AN4072.pdf第 15 页一切正常,我看见 INT1 正在移动... 如上所述,我的想法是将这个TAP放在INT1上,将运动传感器的工作代码放在INT2上,但是我不清楚为什么示例中的代码不起作用以及如何放在INT2上,因为示例在INT1上。 此致, gianmaria Re: MMA8451 - INT1 and INT2 on Movement 你好,吉安玛丽亚、 是的,将TAP(脉冲)中断路由到 INT1 引脚(INT_CFG_PULSE = 1)和另一个中断(例如运动)连接到 INT2 引脚(INT_CFG_FF_MT = 0)。 另外,还可以将多个中断路由到同一个中断引脚,然后读取 INT_SOURCE 寄存器 (0x0C) 以了解是哪个事件导致了中断。 顺祝商祺! 托马斯 Re: MMA8451 - INT1 and INT2 on Movement 亲爱的托马斯 实际上,我们正在将TAP事件路由到INT1,而不是自动睡眠-唤醒事件,而且它工作正常。是否有可能将另一个"逻辑" 设置为将运动事件检测到 INt 2,并使其同时作用于两个相似的不同事件?如果我们错过了信号,我们将通过硬件来复制信号。 此致, gianmaria Re: MMA8451 - INT1 and INT2 on Movement 你好,吉安玛丽亚、   自动休眠/唤醒中断只能路由到 INT1 引脚(INT_CFG_ASLP = 1)或 INT2 引脚(INT_CFG_ASLP = 0)。在您的应用程序中,是否可以将其中一个中断引脚同时连接到 CPU 和调制解调器 GPI?   顺祝商祺! 托马斯   Re: MMA8451 - INT1 and INT2 on Movement 对不起,我忘了告诉大家,我们必须将 INT1 连接到 CPU GPIO,将 INT2 连接到调制解调器 GPIO。
查看全文
MMA8652FC イーグル <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Eagle で回路図を作成するには、コンポーネント MMA8652FC が必要でした。ありがとう、 ファビオ・ヴィエイラ 加速度センサ Re: MMA8652FC EAGLE <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ファビオ・ヴィエイラさん。 残念ながら、私たちは OrCAD を使用してデザインを行ったため、Freescale は公式の Eagle ライブラリを提供していませんが、参考として、MMA8652FC の推奨フットプリントと Symbol OrCAD および pdf ファイルが添付されています。 現在、Freescaleコミュニティには、いくつかのFreescaleセンサー(MMA8652FCのライブラリを含む)の非公式イーグルライブラリがあり、「Freescale_Sensors_v2.lbr」という名前のこのライブラリを見つけてダウンロードできます。次のリンクから: https://community.freescale.com/docs/DOC-103424 ご興味があれば、次のリンクから MMA8652FC のブレークアウト ボード デザインファイルも見つかります: https://community.freescale.com/docs/DOC-103427 すてきな一日を、 ホセ・レイエス ----------------------------------------------------------------------------------------------------------------------- 注: この投稿で質問が解決した場合は、「正解」ボタンをクリックしてください。ありがとう! -----------------------------------------------------------------------------------------------------------------------
查看全文
手の位置検出用の大きな電極を備えた MPR121 は、検出が停止します。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは。バー(チューブ)上の手の位置を検出するために MPR121 を使用しています。手を電極の上に長時間置く場合、6つの異なる領域を区別する必要がある。 すべて正常に動作しているように見えますが、しばらくすると電極がランダムに検出状態のままになり、センサをリセットするとすべてが初期状態に戻ります。 vddは3v3です チューブの直径は約 3cm、周囲は約 9cm で、写真のような形状の 6 つの互いに噛み合った銅電極があります。 静電容量電極は接地電極と噛み合って配置されており、近接感知を最小限に抑え、タッチのみを検出します。3mm間隔で3mmのトレース。 電極部分は1mm厚の革で覆われています。総感知面積は約125cm2、電極の実際の面積は約33cm2です。 構成は AN3994 に基づいています。ベースラインフィルタリングを無効にしました。 [0x5E] --> 0x00 [0x34] --> 0x00 [0x35] --> 0x00 [0x2B] --> 0x01 [0x2C] --> 0x01 [0x2D] --> 0x00 [0x2E] --> 0x00 [0x2F] --> 0x01 [0x30] --> 0x01 [0x31] --> 0xFF [0x32] --> 0x02 [0x5D] --> 0x00 [0x7B] --> 0x0B [0x7B] --> 0x0B [0x7D] --> 0xCA [0x7E] --> 0x83 [0x7F] --> 0xB5 [0x5E] --> 0x8C [0x5E] --> 0x4C 電極が検出状態のまま動かなくなる理由について何かアイデアはありますか? ご協力をよろしくお願いいたします。 タッチ・センサ Re: MPR121 with large electrodes for hand position detection gets stuck in detection. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、エンリケ 電極のデザインと MPR121 の構成は正しいようです。 ステアリング ホイールがタッチ状態の基準として使用されるベースラインの値を変更しているようです。タッチを適切に検出するための正しい構成が見つかるまで、しきい値を上限値に変更することをお勧めします。 サルードス、 ホセ・レイエス ----------------------------------------------------------------------------------------------------------------------- 注: この投稿で質問が解決した場合は、「正解」ボタンをクリックしてください。ありがとう! -----------------------------------------------------------------------------------------------------------------------
查看全文
ISSDK センサー フュージョン ライブラリを他のボードに移植する <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ユーザーガイドまたは別の.pdfにセクションがありますか?Sensor Fusion ライブラリを他のボードに移植する方法についてのヒントを教えてもらえますか? Re: Porting ISSDK Sensor Fusion Library to Other Boards <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは クイ・グエン テスト環境とテスト ログの詳細を共有していただけますか?センサ フュージョン ライブラリの出力を視覚化するために、NXP センサ フュージョン ツールボックス ( https://www.nxp.com/webapp/sps/download/license.jsp?colCode=SENSORFUSIONREV7 ) を使用していますか? よろしくお願いいたします。 アミット・プロヒト。 Re: Porting ISSDK Sensor Fusion Library to Other Boards <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> AGM 01 シールドを使用して STM32F4 に移植しています。後のバージョンでは もちろんカスタム PCB 上で実行されますが、現時点ではそれだけです。 磁気キャリブレーションについては後ほどテストします。私は現在6DOFに取り組んでいます GBY「ゲーミングヘッドセット」ですが、ドリフトが少し大きいようです。何が見つからない アルゴリズムの予想されるドリフトは1度ですが、 30秒。 2019年6月27日(木)午後12時26分 amitpurohit Re: Porting ISSDK Sensor Fusion Library to Other Boards <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは クイ・グエン   ドキュメントと参照サンプル プロジェクトに従って、センサー フュージョン ライブラリを別のボードに移植できたことを嬉しく思います。どのプラットフォーム/ボードに移植するのか、また、移植が成功したかどうかをどのように確認するのかを知っておくと興味深いでしょう。これらの詳細を共有してください。 また、磁気キャリブレーションが適切に行われているかどうかを確認するには、magnetic.c/magnetic.h を調べます。ファイル。 よろしくお願いいたします。 アミット・プロヒト。 Re: Porting ISSDK Sensor Fusion Library to Other Boards <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> さて、別のボードに移植してすべて動作するようになりましたが、コンパスのドリフトが許容できないほど高くなっています。何かが壊れていないことを確認するために、sensor_fusion.c/.h と fusion .c/.h のすべてを diff チェッカーで実行します。このバグを引き起こす可能性のあるサブシステムの他の部分はありますか? 編集: sensor_fusion.h/.c と fusion.h/.c を除外しました。私のセンサは標準の HAL を備えた AGM-01 に取り付けられており、指示が参照 K64F-AGM01 と一致していることを確認しました。キャリブレーション データは正常に保存および復元されるため、キャリブレーション データの保存も除外しました。 Re: Porting ISSDK Sensor Fusion Library to Other Boards <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 Quy Nguyenさん。 センサ フュージョン ライブラリ用の移植ガイドはありません。ただし、セクション 4 の一部として高レベルのアーキテクチャを提供するセンサフュージョン用のユーザーガイドがあります (以下にスナップショットを示します)。また、データ構造とともに、さまざまなサブシステムと機能の詳細も提供します。 https://mcuxpresso.nxp.comからサポートされているセンサ キット SDK をダウンロードすると、利用可能なセンサ フュージョン ライブラリ ドキュメント (ユーザーガイド、API リファレンス・マニュアルなど) を参照できます。以下に、センサー フュージョン ライブラリのドキュメントが記載されている FRDM-K64F-AGM01 キットの SDK ドキュメントのスナップショットを示します。 よろしくお願いいたします。 アミット・プロヒト。
查看全文
Supply voltage of MMA6900 and 6901? In the datasheet is the supply voltage of MMA6900 and 6901 not definitely mentioned. 3.3V for 6900 and 5V for 6901? or these two value is optional for the both? Thank you and best regards, Mi Accelerometers Re: Supply voltage of MMA6900 and 6901? Hi Mi, Both accelerometers (MMA6900 and 6901) can work with 3.3V or 5V. All the characterized specs mentioned in the datasheet were calculated with these two typical voltage supply on both sensors. Have a great day, Jose Reyes ----------------------------------------------------------------------------------------------------------------------- Note: If this post answers your question, please click the Correct Answer button. Thank you! -----------------------------------------------------------------------------------------------------------------------
查看全文
FXTH87 STOP1 RTI Error Hey, I'm using FXTH8711 with RTI to 32ms and PWU wake-up mode to 1 second. These 2 timers use LFO clock (always ON in RUN/STOPx modes). I have one specific processus for RTI and one other for PWU. With the PWU: the TPMS wake-up and resets from reset-vector and when in my application I enable INTERRUPT (CLI) it enters in PWU handler. It is OK. With the RTI the TPMS stays in STOP1 mode and when it resets (PWU timeout reached) the RTI interrupt flag is not set. Is RTI timer running in STOP1 mode ? In the datasheet it is written that RTI timer can be used (with LFO clock) to wake-up from STOP1 because of interrupt event. It is indicated too that any reset (example: wake-up from STOP1 mode) clears the RTIF (RTI Flag pending event) so in my application I can never check if this timeout has been reached to execute a specific processus associated to RTI. Can you help me please ? Best regards, Romain Re: FXTH87 STOP1 RTI Error Hi Tomas, Thanks for your help. Best regards, Romain Re: FXTH87 STOP1 RTI Error Hi Romain, Yes, the RTI can be used as wake-up source from STOP1. Below is an example of initialization to use the RTI as wake up source from STOP4 or STOP1:           // First clear flag         SRTISC_RTIACK = SET;         // Select LFO as clock         SRTISC_RTICLKS = CLEAR;         SRTISC_RTIS = period; // where period takes one of the values specified in Table 24         // Enable interrupt // No effect for wake up from STOP1         SRTISC_RTIE = SET;     It is correct that upon wake up from STOP1 on RTI interrupt, there will be no associated flag in TPMS_INTERRUPT_FLAG or SIMSES register. This fact can be used to determine if the wake up from STOP1 was due to RTI or not; for example the following can be done upon wake up from STOP1: if SPMSC2_PDF is set, TPMS_INTERRUPT_FLAG and SIMSES are clear and RTI interrupt was enabled before entering STOP1 (this information can be stored in a variable in the PARAM section) then the wake up was due to RTI and the specific process can be executed. Best regards, Tomas  
查看全文
PCB layout for MMA8653FCR1 Now I am about to do PCB artwork for MMA8653FCR1. If I locate some patterns on the immediate opposite layer of mounting position, could it be a reason of malfunction? Accelerometers Re: PCB layout for MMA8653FCR1 Hello YK Jung, No,  it should be fine as long as you don't place vias underneath the device. You might find useful page 41 of the datasheet: PCB mounting/soldering recommendations: http://cache.freescale.com/files/sensors/doc/data_sheet/MMA8653FC.pdf Hope it helps! Josh
查看全文
2つの独立したMPL3115A2間の正確な高度差を実現する方法 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 私は PCB 上に MPL3115A2 を搭載しており、問題なく読み取りと書き込みを行うことができます。MCU にインターフェースされます。 温度の読み取りは正確ですが、他の投稿で見たように、移動していないときは高度が時間の経過とともに変化します。製造プロセスが校正に影響を与えることは理解しており、それで問題ありません。しかし、私が助けを必要としているのはここではありません。 を使用するという提案を多数見てきましたが、そのレジスタの使用方法を完全に理解しているかどうかはわかりません (「値」であることは理解していますが、その値は全体像の中でどのように計算され、私の問題を解決するのでしょうか)。 私が達成しようとしていることは次のとおりです。 2 つの回路があり、それぞれに MPL3115A2 センサが付いています。GSM モデムを介して両方の回路と通信し、温度と高度の測定値を取得できます。両方の回路が隣接しているときに、それぞれのボタンを押すと、基本高度が 0 メートルに設定されます。 次に、両方の回路をビルディング内に持ち込みます。ビルディングの階数は、2 階から、典型的な北米の都市にある高層ビルの階数までさまざまです。同僚と1人(例:私自身は 1 つの回路 (ベース回路) を持ってビルディングの最下部に留まり、同僚はもう 1 つの回路 (トップ回路) を持ってビルディングの任意の階に移動します。同僚が目的の階に到達したら、同僚の回路から読み取り値を取得し、自分の回路との差を計算して高さの差を算出します。私が知りたいのは両者の身長差だけです。それだけです。 しかし、ここからは少し複雑になってきますので、誰かが正確な助けを提供してくれることを期待します。 私は高度計と GPS を搭載したクワッドコプターを所有していますが、特定の高度で特定の場所に留まるように指示すると、その高度を維持するのは非常に驚くべきことです。ただそこに座って待っているだけです。両方のサーキットで、たとえ隣り合っていても、高度が同じようには変動せず、大きく変動していることに気付きました。 私が現在行っているのは、10 個の値を読み取り、それらの平均を算出し、その平均を「高度」として使用することですが、それでも十分な精度が得られないようです。理想的には、約 1 〜 1.5 メートルの間隔を空けることができれば理想的です。 質問 1:両方のデバイスの 0 ベースの初期化は、最初にビルディングの外で行う必要がありますか、それともビルディング内で行う必要がありますか? 質問 2:温度は全体的なキャリブレーションに影響しますか?もしそうなら、それを考慮に入れるために方程式に温度をどのように導入すればよいでしょうか? 質問 3:両方のセンサの「ベース」オフセットが 0m に設定され、それらが隣り合って配置されたときに同じ高度を提供することを確認するには、どのような計算を使用すればよいですか? 質問 4:両方に 0 ベース高度が設定され、ビルディング内で調整されたとすると、「ベース」回路を屋外に持ち出すことはできますか。それとも、両方とも屋内で調整されたので、屋内に残しておく必要がありますか。外の気温(ここカナダでは)はかなり低くなることがあるため、温度がセンサに影響を与えるのであれば、センサは屋内に留めておくべきだと思いますか? 質問5: OFF_H(2Dh)レジスタを使用する必要があるでしょうか?もしそうなら、それはどのように作用するのでしょうか?その部分が完全に理解できていません。 本当に、私が気にしているのは、両者の高度差がある程度正確であるということだけです。153m離れているなら知りたい。27メートル離れているなら知りたい。 必要な機能を実現するレジスタの一般的な構成があれば、お知らせください。 データシートを読みましたが、データシートだけでは不十分なため(または完全に理解していない部分があるため)、より正確なサポートを求めています。 どのようなご助力もいただければ幸いです。 よろしくお願いします! ベン 圧力センサ Re: How to achieve precise altitude difference between two independant MPL3115A2 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ベン。 1.0 ベースの初期化は、アプリケーションの起動時とアプリケーションが使用される場所で実行する必要があります。たとえば、換気システムなどにより、ビルディング内の圧力が外部よりも高くなることがあります。 2. 温度は圧力に影響しますが、センサの出力はすでに温度補正されています。 3.出力変動を減らすために最大オーバーサンプリング(OS[2:0] = 0b111)を使用することをお勧めします。これを事後平均化と最初のサンプルの除去と組み合わせると役立つ可能性があります。 4. これは前の回答(1と2)で説明されています。 5. OFF_H レジスタは、1 メートル/LSB のスケール係数を使用して 2 の補数形式で高度オフセット調整を可能にするSO、範囲は -128 メートルから +127 メートルになります。このレジスタに書き込まれた値は、データシートのセクション 9.1.3 の式に示すように、周囲圧力に基づいて内部で計算された高度値に自動的に加算されます。 さらに詳しい情報については、 AN4528をご覧ください。 よろしくお願いいたします。 トーマス
查看全文
FXOS8700 magnetic interrupt I am trying to configure the FXOS8700CQR in magnetic threshold interrupt mode. I am using SPI to communicate witth the sensor. Whenever a magnet is in the vicinity of the sensor, the programmed magnetic threshold values is supposed to trigger an interrupt. When the data is streaming I can clearly see the spikes on the signal passing the programmed threshold. The interrupt pin does not go high however. I checked with a scope. I don't see the magnetic interrupts happening.The problem is that the magnetic interrupts in the ISR are not triggered. Even if I trigger them manually by the shaking the unit I cannot clear them. Pin stays always high. Is there any application note with regard to the magnetic threshold interrupt specifically. (not the vector magnitude)? void FXOS8700CQ_ConfigMagTHS(void){    MAG_RST_HIGH();                         // Hard Reset , RST active HIGH   __delay_ms(5);    MAG_RST_LOW();                             __delay_ms(1);                          FXOS8700CQ_WriteByte(CTRL_REG2, SMOD_LOW_NOISE|SLPE_MASK|MOD_LOW_NOISE);      // Low noise, low power, auto-sleep mode enabled FXOS8700CQ_WriteByte(CTRL_REG3, IPOL_MASK);                     // Active HIGH on INT, push-pull mode   FXOS8700CQ_WriteByte(CTRL_REG4, 0x00 );                         // No interrupt enabled here    FXOS8700CQ_WriteByte(CTRL_REG5, 0x00 );                         // No interrupt routed to pin 2 FXOS8700CQ_WriteByte(ASLP_COUNT, 0x05);                         // 20 ms -  if not interrupt is asserted in 20 ms the system will go back to sleep mode FXOS8700CQ_WriteByte(M_CTRL_REG1, M_ACAL_MASK| M_OSR_50_HZ | M_HMS0_MASK);     //  automatic calibration,  one shot magnetic reset, only mag active  FXOS8700CQ_WriteByte(M_CTRL_REG2, M_MAXMIN_DIS_MASK | M_MAXMIN_DIS_THS_MASK | M_MAXMIN_RST_MASK | RST_DISABLED);        //Magnetic min/max enabled    FXOS8700CQ_WriteByte(M_CTRL_REG3, M_ASLP_OSR_100_HZ | M_THS_XYZ_MASK | M_ST_Z_MASK | M_ST_XY_MASK);        // all updated when THS ISR happens       FXOS8700CQ_WriteByte(M_THS_CFG, M_THS_ELE | M_THS_OAE | M_THS_WAKE_EN | M_THS_ZEFE | M_THS_YEFE | M_THS_XEFE| M_THS_WAKE_EN | M_THS_INT_EN );  //M_INT_threshold on INT2 pin  OR INT of all axes for threshold, latch disabled. uint16_t magThreshold = 0x200;                               //counts;    uint8_t magThresholdHi = (magThreshold & 0xFF00) >> 8;    uint8_t magThresholdLo = magThreshold & 0xFF;    FXOS8700CQ_WriteByte(M_THS_Z_MSB, magThresholdHi);        // Debounce countered cleared to zero when threshold is not longer true    FXOS8700CQ_WriteByte(M_THS_Z_LSB, magThresholdLo);        magThreshold = 0x200;                               //counts;    magThresholdHi = (magThreshold & 0xFF00) >> 8;   magThresholdLo = magThreshold & 0xFF;   FXOS8700CQ_WriteByte(M_THS_X_MSB, magThresholdHi);        // Debounce countered cleared to zero when threshold is not longer true    FXOS8700CQ_WriteByte(M_THS_X_LSB, magThresholdLo);    magThreshold = 0x200;                               //counts;    magThresholdHi = (magThreshold & 0xFF00) >> 8;   magThresholdLo = magThreshold & 0xFF;   FXOS8700CQ_WriteByte(M_THS_Y_MSB, magThresholdHi);        // Debounce countered cleared to zero when threshold is not longer true    FXOS8700CQ_WriteByte(M_THS_Y_LSB, magThresholdLo);        FXOS8700CQ_WriteByte(M_THS_COUNT, 1); //debounce sample counts required before a magnetic threshold event is triggered, depends on ODR FXOS8700CQ_WriteByte(CTRL_REG1, ASLP_RATE_20MS | DATA_RATE_100HZ |LNOISE_MASK );     // in sleep mode data rate 50Hz, awake ODR = 100Hz, low noise mode, in standby }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ The code above is executed between: FXOS8700CQ_StandbyMode(); ... FXOS8700CQ_ActiveMode();‍‍‍‍ On the interrupt I try to clear the interrupt and in the main () function I try to print the source but I don't see anything at all. void  _INTInterrupt(void){    MagTHSEvent = 1;   magintsrc = FXOS8700CQ_ReadByte(M_INT_SRC);            //Read interrupt source to clear int    srcmag = FXOS8700CQ_ReadByte(M_THS_SRC);   magintsrc = FXOS8700CQ_ReadByte(M_INT_SRC);            //Read interrupt source to clear int     ..... //Clear the INT interrupt flag }‍‍‍‍‍‍‍‍‍‍ Magnetic Sensors Re: FXOS8700 magnetic interrupt Hello, were you able to carry out your project, I have a similar project, could you help me? Re: FXOS8700 magnetic interrupt @diken or @TomasVaverka  I am looking to do a similar thing - count cars and I have some FXOS8700OS devices on-hand.  Is there an example of using the hardware interrupt for magnetic threshold detection I could use as a staring point?   Thanks, Chip Re: FXOS8700 magnetic interrupt Hi Di, The time step used by the debounce counter depends on the chosen ODR and m_hms[1:0] bits. So the only way to reduce the time step is to increase the ODR and eventually use only the magnetometer (m_hms[1:0] = 0b01). Best regards, Tomas Re: FXOS8700 magnetic interrupt Hi Tomas, I implemented thefirst snippet without the asleep configuration and indeed it works. The issue is with the  M_THS_COUNT_REG which determines the debouncing interval. Specifically the interrupt triggers very late with regards to the project requirements. Initially this was set to 1. Would this sensor work, assuming you have to track very fast moving object such as cars. (transient magnetic fields)? The datasheet suggests the minimum time is 20ms but from experimental results the delay is much larger than that. Best, Di Re: FXOS8700 magnetic interrupt Hi Di, I successfully implemented the sleep mode, here is my code: void FXOS8700CQ_Init (void) {             I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_X_MSB_REG, 0x00); // Threshold value MSB         I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_X_LSB_REG, 0x80); // Threshold value LSB         I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_CFG_REG, 0xCF); // Event flag latch enabled, logic OR of enabled axes, only X-axis enabled, wake on magnetic threshold event, threshold interrupt enabled and routed to INT1        I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_COUNT_REG, 0x0A); // 100ms at 100Hz ODR and magnetometer mode only        I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_CTRL_REG1, 0x1D); // Max OSR, only magnetometer is active        I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG3, 0x00); // Push-pull, active low interrupt               I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG2, 0x04); // Auto-sleep mode enabled              I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, ASLP_COUNT_REG, 0x06);  // Auto-sleep counter set to 1.92s (6 x 0.32s = 1.92s)        I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG4, 0x80); // Auto-sleep/wake interrupt enabled        I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG5, 0x80); // Route auto-sleep/wake interrupt to INT1               I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG1, 0x19); // ODR = 100Hz, Active mode }       ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ void PORTD_IRQHandler() {        PORTD_PCR4 |= PORT_PCR_ISF_MASK; // Clear the interrupt flag        Int_Flag = 1; } ‍‍‍‍‍‍ while(1) {     if (Int_Flag)     {         Int_Flag = 0;                             Int_Source = I2C_ReadRegister(FXOS8700CQ_I2C_ADDRESS, M_INT_SRC_REG);         if (Int_Source & 0x04)  // Magnetic threshold event detected?         {             M_Ths_Src = I2C_ReadRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_SRC_REG); // Read the M_THS_SRC register to clear the SRC_M_THS flag in the M_INT_SRC register and deassert the INT1 pin             Event_Counter++;         }                             Int_Source = I2C_ReadRegister(FXOS8700CQ_I2C_ADDRESS, INT_SOURCE_REG);         if (Int_Source & 0x80)  // Auto-sleep/wake interrupt?         {             Sysmod = I2C_ReadRegister(FXOS8700CQ_I2C_ADDRESS, SYSMOD_REG);         }                        } }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ I hope it will help you. Best regards, Tomas Re: FXOS8700 magnetic interrupt Hi Di, I have just done a simple test using the following settings (without the sleep mode) and it works well as you can see on the picture below. void FXOS8700CQ_Init (void) {        I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_X_MSB_REG, 0x00); // Threshold value MSB         I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_X_LSB_REG, 0x80); // Threshold value LSB         I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_CFG_REG, 0xCB); // Event flag latch enabled, logic OR of enabled axes, only X-axis enabled, threshold interrupt enabled and routed to INT1        I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_COUNT_REG, 0x0A); // 100ms at 100Hz ODR and magnetometer mode only        I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_CTRL_REG1, 0x1D); // Max OSR, only magnetometer is active        I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG3, 0x00); // Push-pull, active low interrupt        I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG1, 0x19); // ODR = 100Hz, Active mode       }‍‍‍‍‍‍‍‍‍‍ void PORTD_IRQHandler() {        PORTD_PCR4 |= PORT_PCR_ISF_MASK; // Clear the interrupt flag        M_Ths_Source = I2C_ReadRegister(FXOS8700CQ_I2C_ADDRESS, M_THS_SRC_REG); // Read the M_THS_SRC register to clear the SRC_M_THS flag in the M_INT_SRC register and deassert the INT1 pin }‍‍‍‍‍ Can you please try to reproduce it? Meanwhile I will try to implement the sleep mode. Best regards, Tomas Re: FXOS8700 magnetic interrupt Hi Tomas, I already tried disabling the sleep mode with the same results. The sleep mode functionality is needed however since this is  a long term solution where you can't easily replace the batteries. I also tried changing the threshold on z axis. Still the same issue. When a magnetic object (ex headphone) is in the vicinity all 3 axis are above 100 counts. As it stands right now the magnetometer streams data correctly however the interrupt functionality is not responsive and does not change as per spec even if taking into account the debouncing counter (M_THS_COUNT) Regards, Di Re: FXOS8700 magnetic interrupt Hi, I will try to reproduce your settings and get back to you soon. At first glance everything seems to be correct. Can you please try to test the magnetometer threshold function without using the sleep mode? Best regards, Tomas
查看全文
IMU 6DOF fusion algorithm, reset yaw angle without re-starting the fusion algorithm I'm using the NXP fusion library with an 6DOF IMU. Unfortunately there is no reference to calibrate the built in gyro, e.g. with a magnetometer in that application. I'm doing short measurements (1..10s) using the linear acceleration output of the fusion algo to detect the movement direction. The algo is continuus running also when not detecting movements. Unfortunately due to the drift of the gyroscope over time the yaw angle changes. Worst case after some time by 180° which results in a sign reversal of the linear acceleration output. I tried to solve this by resetting the algo using "fInitializeFusion(&sfg);". This works but depending on the acceleration at the time of resetting the algo it can take quite long (some 10 seconds) until the output of the fusion lib stabilizes. I'm looking for a way to "zero" the accumulated gyro error without fully resetting the algo. Thanks! Dirk Re: IMU 6DOF fusion algorithm, reset yaw angle without re-starting the fusion algorithm Hi Amit, sorry for bugging you again 😉 The calibration values can be found in sfg->SV_6DOF_GY_KALMAN.fbPl. Does the library calculate those values during init or do I have to provide it? From the documentation of the library this is not clear to me. Thanks! Dirk Re: IMU 6DOF fusion algorithm, reset yaw angle without re-starting the fusion algorithm Hi Dirk, Glad to see that tweaking 6DOF_GY config macros helping you. Regarding storing Gyro calibration offset to NVM: The offsets can be measured by first taking some readings while the unit is not moving, then you can save the measured offset values and apply when reading the gyro values in the future. The calibration offset measurement for 6DOF_GY should take no time. Remember that the sensor calibration is unique to the sensor unit for which it is computed and the calibration values are stored in the MCU flash memory. If you move sensor unit from one MCU board to another you will need to erase previously stored calibrations in MCU flash. You can refer to "EraseGyroCalibrationFromNVM" function). Regards, Amit Purohit. Re: IMU 6DOF fusion algorithm, reset yaw angle without re-starting the fusion algorithm Thanks for your reply. I found that tweaking the 6DOF_GY will help. I'm now emphasizing the accelerometer readings. Concerning the gyro calibration I have a question: >We recommend you to store gyro calibration offset measured during initialization and store in NVM (refer to "SaveGyroCalibrationToNVM" function). When is the best time to do this? Leaving the unit stand still e.g. on the desk for some time? How long does the fusion algorithm need to calculate a reliable Gyro offset? Thanks! Dirk Re: IMU 6DOF fusion algorithm, reset yaw angle without re-starting the fusion algorithm Hello Dirk, Thank you for posting your question. Please share more details on your test setup, hardware used etc. This will help us answer you better. Based on your question and details provided, please see our response below: The initialize routine sets the gyro offset "variable fbPl" based on current measurement with-in "FMIN_6DOF_GY_BPL" & "FMAX_6DOF_GY_BPL" else set to 0. You can try to configure 6DOF GY constants based on your setup. Sensor fusion algorithm also provides optional way to store calibration offset values to NVM, that helps to retrieve calibration offset and reapply if needed. The run 6DOF GY routine keep checking gyro offset error "variable fbErrPl" against maximum permissible gyro offset change "fMaxGyroOffsetChange" and apply gyro offset "variable fbPl" correction accordingly. You can refer to 6DOF GY constants defined in fusion.h file and tune these values as per your setup. We recommend you to store gyro calibration offset measured during initialization and store in NVM (refer to "SaveGyroCalibrationToNVM" function). Tune 6DOF GY constants defined in fusion.h to adjust algorithm performance for your test setup. Let us know if this helps. Amit Purohit.
查看全文
FXTH87 flash operation functions Why nothing changed after calling function TPMS_FLASH_ERASE() and TPMS_FLASH_WRITE() ? What's wrong with code below ? fosc = 8MHz, fbus = 4MHz FCDIV = 21;                                         // Fclk = 4MHz / (21+1) = 181.18KHz - 150KHz~200KHz //---------------------------------------------------------------------------------- const BYTE CParaAddr[] @ 0xD200u = { 0x44, 0x55, 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; ...... FCDIV = 21; SendDebugContent(CParaAddr[0], CParaAddr[1], CParaAddr[2]);          // receive data are { 44 55 66 } mRfData1 = TPMS_FLASH_ERASE((WORD)CParaAddr);                      // the function return 0x00, ERASE succeed ? mCommonBuffer[0] = 0x77; mCommonBuffer[1] = 0x88; mCommonBuffer[2] = 0x99; TPMS_FLASH_WRITE_1A((WORD)CParaAddr, &mCommonBuffer[0], 10); SendDebugContent(CParaAddr[0], CParaAddr[1], CParaAddr[2]); Re: FXTH87 flash operation functions Resolved. CParaAddr is defined as const array. SendDebugContent(CParaAddr[0], CParaAddr[1], CParaAddr[2]); The compiler give three const to the function as parameters directly, instead of accessing the const array again. Re: FXTH87 flash operation functions the 2nd time calling SendDebugContent(CParaAddr[0], CParaAddr[1], CParaAddr[2]); receive data is still { 44 55 66 }, nothing changed
查看全文
Compass FXOS8700 software for angle calculation Hi, Please share the I need firmware driver code for Compass FXOS8700. Thanks, Accelerometers Magnetic Sensors Re: Compass FXOS8700 software for angle calculation Hi, I am getting the below accelerometer & magnetometer data from FXOS sensor.  I would like to calculate Pitch, Roll, Yaw or heading (compass like in mobile North heading)  And in my board sensor direction x & Y is different orientation, in software can it be tune and apply any error factor in software logic. Please help me how to calculate the above values: Regards  Re: Compass FXOS8700 software for angle calculation Hello, Thank you for writing. The tilt-compensated eCompass algorithm, from the NXP Sensor Fusion Libraries, actually calculates all three angles (pitch, roll, and yaw or compass heading) that define the PCB orientation. So, in this case I recommend to download the libraries mentioned in order to get the source code and to review the application note below in order to get more detailed more information: Implementing a Tilt-Compensated eCompass using Accelerometer and Magnetometer Sensors I hope this information helps. Please let me know if you have any further question. Regards, David
查看全文
30% of MPXM2202GS failed within 2 months after installation Hi All, I am having too many sensors failing, its MPXM2202GS, about 30% within 2 months after installation. They are used to measure water level with air column between water and the sensor, the sensors were installed upside down. 1) Using 5vdc as power supply 2)Using pulsing, so the sensor is only On for 10% of the operating time as recommended in the document AN3728 3)I used/tried to insert silicone oil by putting the sensors in vacuum to remove the air and replace it with silicone oil 4)Sensors were installed up-side-down as recommended in the document AN3728 5)There is an air column between sensors and water, so basically we followed the advice in "AN3728, Media Compatibility for IPS PRT Pressure Sensors" 6)Temperature is between 10 and 30 Celsius and all devices installed inside, so no harsh environment 7)The applied pressure is within the range of the sensor (0 to 200Kpa) 8)I noted that the silicone oil (very thick) got out of the sensor port when installing the sensor up side down. It took three or two days before all the silicone oil comes out When I tested the failed sensors the resistance between Out+ and Out- where infinity while its about 2K2 ohms on a good/new sensor. So what have we done wrong here? Is it possible that putting the sensor in vacuum has affected the gel layer of the sensor? Was it better if we did not try to put silicone oil at all? any idea how to improve life of the sensor or solve the problem of the failing sensors? Best regards, Mike. Re: 30% of MPXM2202GS failed within 2 months after installation tanks Josh, The initial offset of any given sensor is not an issue for out application. What I am afraid of is a constant drifting over time. Mike Re: 30% of MPXM2202GS failed within 2 months after installation Mike, You could use the autozero function just before plugging the pressure sensor to the pipe (as a calibration routine), so you can eliminate the offset of that specific sensor. Remember that the offset is different from sensor to sensor even if they share the same part number. I did a test of a similar pressure sensor (MPX5700), which I connected to a 100PSI tank, directly exposed to car coolant at 25°C for over a month and I didn't have any problems related to the offset of the sensor. -Josh Re: 30% of MPXM2202GS failed within 2 months after installation Hi Josh, I am aware of that document. unfortunately the job of the device is to prevent the water pressure to become zero(that is when the tank and pipe are both empty). So if the pressure is zero, then  the device has failed to do its job. I was thinking if the drift not so much, then one might be able to ignore it but if its much then there is no way around. Mike Re: 30% of MPXM2202GS failed within 2 months after installation Mike, Are you using a calibration routine in your application? We do not have a specific document for what you're looking, but we do have a document to auto calibrate our pressure sensors. The software technique name's "Auto Zero" and you can find all the information in the following document: http://cache.freescale.com/files/sensors/doc/app_note/AN1636.pdf -Josh Re: 30% of MPXM2202GS failed within 2 months after installation Thank you Josh for your replies. It seems that the sensors in our application suffer from large amount of drift, probably 5% or more with in weeks after first installation. Do you have some data/documents regarding drifting? Best regards Re: 30% of MPXM2202GS failed within 2 months after installation Mike, In your specific application, the air column is very small, hence high humidity will reach the sensor and eventually the humidity will condensate into the pressure port of the sensor. I would highly recommend you to protect the devices with silicone grease _AND_  change the blue "flexible silicone tube" for a smaller diameter tube and make some loops with it, that way, the high humidity would condensate inside the loops and not in the sensor. Also the silicone grease would be trapped in the loops, protecting the sensor from the high humidity. Hope it helps. Josh Re: 30% of MPXM2202GS failed within 2 months after installation Hi Josh, Thank you for taking so much effort in replying. The note of p1 > p2 is noted. I dont think can happen in our configuration/device but its good to keep in mind though. I can confirm that there is always "air column" is being created. There is no way otherway, and if there is a leak in air, then water will start leaking too after some time but we did not encounter any leakage with our devices. My question is ... is it ok, or mostly ok, to use the sensor just like in the picture above (with air column) without adding extra silicone grease or silicone oil? I mean...Is the gel layer alone good enough if the sensor was used with pulsing duty cycle, air column, p1 >= p2, no harsh environment ? can we expect from the MPXM2202GS to survive for 2 to 3 years in these circumstances? Thank you Re: 30% of MPXM2202GS failed within 2 months after installation Hello Mike, Thanks for the detailed information. The document you followed (AN3728) has something I would change. Take a look at page two, figure 2 "Media Separated by a column of Clean Dry Air" http://cache.freescale.com/files/sensors/doc/app_note/AN3728.pdf The air column should go from the _BOTTOM_ of the tank, up to the pressure sensor, not at the same level of the water or higher as shown in the image. This air column inside the tube would be naturally created, just connect the sensor to the tube while the tank is empty (or before inserting the tube into the water), then when the water goes up, the level of the water will _INCREASE_ the pressure of the air inside the tube. I would modify the image as follows: Otherwise, if you insert the tube into the water before connecting the sensor, the water level inside the tube will be the same than tank level, hence, if the water level goes down, the pressure of the air inside the tube would become vacuum. All of our pressure sensors are designed to be used under P1>P2 condition at any given moment. The MPXM2202GS pressure port #1 (P1) is the only pressure port available, however pressure port #2 (P2) is underneath the device (small hole), hence P2 is always exposed to atmospheric pressure. Therefore, while you apply pressure into P1, you're actually measuring the differential pressure between P1 and atmospheric pressure (gauge pressure type). If the pressure inside of the tube, goes below atmospheric pressure, P2 would become greater than P1, which would permanently damage the sensor. Would you please take a look at this and confirm that the "air column" is being created from the bottom of the tank up to the sensor and not from the water level up to the sensor? Hope it helps. Josh Re: 30% of MPXM2202GS failed within 2 months after installation Hi Josh, The sensor package was put in a vacuum container during the process of inserting the silicone oil. The device will be installed vertically , so there is guarantee always will be a trapped air in the pipe(s). The trapped air will eventually get very humid anyway. the distance between the sensor port and the water is between 3 to 12 cm depending on the applied pressure. I have cut one of the devices to make it clear how it was installed. I hope this will help a bit making clear how the sensor was installed inside the device. Best regards, Mike Re: 30% of MPXM2202GS failed within 2 months after installation Hello Mike, Thanks for using our community. What was the process you followed to add silicon oil to the sensor? did you exposed the entire sensor to vacuum or just the inlet pressure port? After the silicon oil got out of the sensor, is there any chance that high humidity could reached the inlet pressure port? It would help us to better understand the problem if you could share some pictures of your hardware. Thanks in advance. Josh
查看全文
MPXV5050gp arduino Hello, i need to measure water level by mpxv5050gp, so first of all i need to know in which unit of measurement it shows data when it connected to arduino uno analog pin (on air it shows 161) Pressure Sensors Re: MPXV5050gp arduino Hello Skubi, the pressure sensor should also work with the 3.3V instead of the recommended 5V, but then you need to multiply the measured output voltage by 5/3.3=1.515 factor to read the measured pressure. For example if you measure on the output 1.98V for the applied 3.3V supply voltage, the measured applied pressure should be 31kPa +-offset, same when you measure output 3V with recommended 5V supply voltage. For the temperature <=0 or >=85 the value is increases gradually. The 3 multiplier is for the temperatures -40°C and +125°C.  With Best Regards, Jozef Re: MPXV5050gp arduino Hello JosefKozon Thanks a lot, but my arduino like board can give only 3.3 v, is that a real problem? and i want to know, i read in datasheet that if temp <=0 or >=85 the value is increased in 3 times, so its increases when the temp is exactly 0 or 85 or it increases gradually? Thanks. Re: MPXV5050gp arduino Hello Skubi, please refer to Figure 2. in the datasheet attached. The output of the sensor is in voltage and reflects the pressure applied to the P1 input. For example if you measure 3V at the Vout pin, it means the pressure applied is 30kPa +-offset. Please note, that the device is ratiometric and the values are meant for the recommended supply voltage 5V. A stable power supply is recommended. With Best Regards, Jozef
查看全文
Docker-Swarm を使用して Docker-Compose を複製しますか? Docker 認定資格の一部として、相互に通信する 4 つのサービスを実行する 1 つの docker-compose ファイルを含むプロジェクトを作成する必要があります。これら 4 つのサービスは、1 つのタンク コントローラと 3 つのタンク センサのように機能します。Docker Swarm を使用して、4 つのサービスすべてで docker-compose 全体を複製したいと考えています。私がやろうとしていることのイメージは、 最終目標を示すイメージ です docker swarm をセットアップするときに、多くの混乱が生じています。次のコマンドを実行しました: docker swarm init docker stack deploy --compose-file=docker-compose.yml tank しかし、この設定では一度に 1 つのサービスしかスケーリングできません。例えば: docker service scale tank_lowlevelalarm=4 これは私がやりたいことではありません。4 つのサービスをすべて同時に複製することで、docker-compose 全体をスケーリングできるようにしたいと考えています。私の目標は、オーバーレイ ネットワーク上で複数のタンクがあるように見え、各タンクに 1 つのコントローラと 3 つのセンサがあることです。これを私に行うことは可能でしょうか? 参考までに私の docker-compose ファイル: version: '3.0' services: tli: image: tli networks: - my-overlay lowlvlalarm: image: lowlvlalarm build: . networks: - my-overlay highlvlalarm: image: highlvlalarm build: ./HighLvlAlarm networks: - my-overlay plc: image: plc depends_on: - tli - lowlvlalarm - highlvlalarm networks: - my-overlay networks: my-overlay:  
查看全文
MPL3115A2とFXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは! 私は Freescale プラットフォームの初心者ですが、デバイスにいくつかの新しい機能を実装する必要があります。だから助けが必要なんです。現在、ハブとして FXLC95000 を使用し、内部加速度計と外部 MAG3110 の 2 つのセンサを備えています。Intelligent Sensing Framework v1.1 を使用します。MAG3110 および内部加速度計用のセンサ アダプターを備えた追加のライブラリがあります。しかし、今度は新しいセンサ MPL3115A2 を実装する必要があります。しかし、MPL3115用のデジタルセンサ抽象化アダプターが見つかりません。どうすればいいですか?このアダプタのソースコードを持っている人はいますか? インテリジェント・センシング・フレームワーク Re: Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ヴィタリーさん。 Freescaleのアプリケーションエンジニアです。 この問題について、メールまたは電話で詳しくご相談させていただくために 、 aswin.sivakumar @freescale.comまでご連絡いただけますでしょうか。 よろしくお願いします。 アスウィン Re: Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは! ジャイロスコープの問題を解決できません。それは大きな問題です! そこで私は情報を要約することにしました: 回路図の写真は添付ファイルにあります。詳細は 1 つだけ: FXAS21000 ではなく FXAS21002 がどこにあるか。 I2Cバス上にいくつかのセンサがあります。ジャイロスコープ以外はすべて完璧に動作します。 私は、Margaret Nadworny からいただいた FXAS21002C センサ アダプターを使用します。 センサアダプターの設定: {&fsl_fxas21002_i2cspi_3D_gyro_adapter, NULL, &fxas21002SpecificSettings, I2C_MASTER1, 0x20} 回路図では SA0=0 (GND にコネクテッド) なので、アドレス 0x20 を使用します。 ジェームズ、あなたは私にこう書きました。 「トレースを見ると、0x20ではなく0x40を使用していることがわかります」 FXAS21002.pdfを見ると、表 10、ページ 15 を見ると、この場合、デバイス アドレスは 0x20 - マスターによって送信されるアドレス バイトは 0x40 であることがわかります。したがって、住所に関してはすべて問題ないと思います。 あなたは私にこう書きました: FXAS21002 の 0x20 と通信すると、現在のアダプタソフトウェアで問題が発生すると思います。これは、FXAS21000 用に設計されており、WHO_AM_I 値が異なります。FXAS21000 は D1、FXAS21002 は D7 です。初期化中にアダプタは WHO_AM_I を読み取り、想定されるセンサーと通信していることを確認します。誤った値が返された場合は失敗します。 しかし、ロジック アナライザーのデータを見ると、FXLC95000 は最初のWrite 0x40 コマンドに対してNACKを取得し、ジャイロ スコープで何も行わないため、WHO_AM_I の回答を尋ねようともしていないことがわかります。 ジャイロスコープを起動するための遅延や、起動手順やコマンド シーケンスはどこにあるのでしょうか? 絶望的です… Re: Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ヴィタリー、 あなたのロジックのトレースを調べました。 「回路図では SA0=0 なのでアドレス0x20を使用しています。だからすべて問題ないはずです!」と言っていますが、 トレースを見ると、0x20 ではなく 0x40 を使用していることがわかります。これが最初のことです。 次に、400Khz の I2C バス周波数を引き続き使用する必要があります。バス上にセンサが 4 個しかないのに、100 まで下げる理由はありません。 0x20 で FXAS21002 と通信すると、現在のアダプタ ソフトウェアが WHO_AM_I 値が異なる FXAS21000 用に設計されているため、問題が発生すると思います。FXAS21000 - D1、FXAS21002 - D7。初期化中に、アダプターは WHO_AM_I を読み取り、予期されたセンサと通信していることを確認します。間違った値が返された場合は失敗します。 ISF1P195Kに付属するセンサーアダプターは21002がリリースされる前に製造されており、WHO_AM_I値のD7をサポートしていません。 そのため初期化は失敗します。D1 と D7 の両方を適切に認識する更新されたアダプター コードを入手する必要があります。 他の質問にお答えすると、はい。一度だけ試します。センサが一度は応答しないのに、次回は正常に応答するという理由は実際にはありません。 -ジム Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ジェームズ! これが私の設定です: {&fsl_fxas21000_i2cspi_3D_gyro_adapter, NULL, &fxas21000SpecificSettings, I2C_MASTER1, 0x20} 私の回路図では SA0=0 なので、アドレス 0x20 を使用します。SOすべて大丈夫なはずです! ロジックアナライザのログファイルを添付しました。センサは 4 つあります: MPL3115 (アドレス 0xC0 0xC1)、MAG3110 (アドレス 0x1C 0x1D)、FXMS3110 (アドレス 0x1E 0x1F)、FXAS21002 (アドレス 0x40 0x41)。 ご覧のとおり、FXLC95000 は最初にアドレス 0x40 を書き込もうとしますが、NACK が返され、このアドレスをそれ以上要求しません。私の理解するところによると、ジャイロ FXAS21002 は動作しません。 I2C の速度が原因でしょうか?私は400KHzを使います。100KHzを試してみたらどうでしょうか?どうやってやるんですか?ファイルisf_sysconf_comms.cI2C 速度については次の列挙型が確認できます。 列挙型 i2c_Speed{ I2C_SPEED_START = 0, /*!< 速度範囲の開始。*/ I2C_SPEED_600_KHZ = I2C_SPEED_START, /*!< 600 KHz での速度。 */ I2C_SPEED_400_KHZ = 1、/*!<400 KHzでの速度。*/ I2C_SPEED_200_KHZ = 2、/*!<200KHzでの速度。*/ I2C_SPEED_END = 3 /*!<速度範囲の終了。今は200KHzです。*/ }; でも100KHzはないです!この速度を有効にするにはどうすればいいですか? Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> FXAS21002 の I2C アドレスは、構成に応じて 0x20 または 0x21 のいずれかになると思います。isf_sensor_configuration.cのエントリを確認します 次のようになります: {&fsl_fxas21000_i2cspi_3D_gyro_adapter, NULL, &fxas21000SpecificSettings, I2C_MASTER1, 0x21 } -ジム Re: Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは! FXAS21002 に関する問題は次のとおりです。FXLC95000でジャイロスコープを使いたい。FXAS21002 用のセンサ アダプターがあり、すべて問題ないはずです。しかしジャイロスコープは応答しません!この I2C 上の他のセンサは完璧に動作します。ロジック アナライザーを使用すると、FXLC95000 が最初にジャイロ スコープ (アドレス 0x40) に問い合わせようとしたが、NACK が返され、それ以上問い合わせを行わないことに気付きました。それは正しい行動ですか?そしてそれは何を意味するのでしょうか?ロジック アナライザーの回路図とスクリーンショットを添付します。 何が問題なのでしょうか、またそれをどう解決すればよいのでしょうか?! 追伸リセットピンのR14を削除しました。つまり、問題はここにはありません。実際のデバイスで FXAS21002 はどこにありますか (回路図に示されている FXAS21000 ではありません)。 Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ヴィタリー、 あなたの地域の気象条件により、典型的な気圧の変化が見られる可能性があります。 MPL3115 は非常に敏感で、ドアの開閉、HVAC の動作、気象条件による変化による圧力の変化を検出します。 データシートには、MPL3115がプログラムできる最速のODRは1Hzであるが、このODRでオーバーサンプリング比を128まで設定できることが記されている。 内部サンプリング レートは 128Hz になります。(これは、以下で引用した autoAcqTimeStep と oversampleRatio によって制御されます) MPL3115 はワンショット モードでも使用できます。このモードでは、コマンドでサンプルを取得するように外部からトリガーし、1 Hz より高速な有効な ODR を可能にしますが、ワンショット モードは、使用しているセンサー アダプターのバージョンではサポートされていません。(KinetisのISF 2.1でサポートされています) 大気圧は比較的ゆっくりと変化するため、1Hz より高速な圧力 ODR が必要になることはほとんどありません。 実際、時定数が約 5.0 秒のローパス フィルターは、1 Hz の圧力データの**後プロセッシング**に適していることがわかります。 1Hz ODR で 128 倍のオーバーサンプリングを行ってから、5 秒のローパス フィルターを実行することをお勧めします。 -ジム Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ありがとう!私にとっては効果がありました! Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、マーガレット! ご協力いただければ幸いです。MPL3115用のセンサアダプターをいただきましたが、完璧に動作します。しかし、いくつか疑問があります。MPL3115 のサンプル プロジェクトでは次の設定があります。 mpl3115AppState.CfgBuffer.ctrlReg.reg = STATE_STOPPED_UNSUBSCRIBED; mpl3115AppState.CfgBuffer.settings.nSettingsToUse= SM_GIVEN_SETTINGS;; mpl3115AppState.CfgBuffer.settings.nFifoDepth = 1; mpl3115AppState.CfgBuffer.settings.nCurrentReportRate= FSL_MPL3115_PRESS_1HZ; 読んでみると次のデータがあります: ミリ秒 圧力 Alt 温度 [00012210] 高度計: 100195 94.822.7 [00013211] 高度計: 100250 89.1322.11 [00014213] 高度計: 100212 93.122.8 [00015213] 高度計: 100218 92.922.9 [00016208] 高度計: 100209 93.522.9 [00017208] 高度計: 100178 95.1522.6 [00018209] 高度計: 100215 92.1322.9 [00019210] 高度計: 100211 93.222.8 [00020211] 高度計: 100200 94.122.9 ご覧のとおり、圧力と高度は毎秒 89.13 メートルから 94.8 メートルまで変化しています。 翌日、それを読もうとすると、次のデータがありました: ミリ秒 圧力 Alt 温度 [00038198] 高度計: 100082 103.1525.12 [00039198] 高度計: 100124 100.725.14 [00040198] 高度計: 100038 107.1025.9 [00041200] 高度計: 100076 104.825.11 [00042200] 高度計: 100037 107.1225.8 [00043198] 高度計: 100015 109.925.8 [00044198] 高度計: 100052 106.725.10 [00045198] 高度計: 100068 105.225.11 SO、同じ場所で、圧力と高度のデータが異なります。初日は 89.13 ~ 94.8 メートル、2 日目は 100.7 ~ 109.9 メートルです。しかし、実際の高度は約60メートルです。それは、MPL3115 から読み取れる距離よりも 30 ~ 45 メートル短いです。 私の質問は次のとおりです。 1. たとえば、nCurrentReportRate を 1Hz から 10Hz に変更できますか?どうやってやるんですか? 2. ファイルfsl_mpl3115_i2c_1D_press_config_types.h内設定により構造を確認できます: uint8 oversampleRatio; //オーバーサンプル比 = 2^OS (例: 0 = 1、1 = 2、2 = 4、... 7=128)。 uint8 rawMode; //0 = 通常出力; 1 = ADC 後のプロセッシングを行わない生データ。 uint8 altBaroMode; //0 = 気圧計モード; 1 = 高度計モード。 uint8 autoAcqTimeStep; //自動取得時間ステップ = 2^ST (1秒~9.1時間の範囲)。 uint8 alarmSelect; //0 = 絶対圧力-温度ターゲットを使用します。1 = 圧力-温度ウィンドウとしきい値を使用します。 それはどういう意味ですか?データをより安定させるためにこれを使用できますか? 3. データをさらに安定させるにはどうすればよいでしょうか?独自のローパス フィルターを使用する必要がありますか? Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ヴィタリー、 スレーブ アドレス以外は同じなので、同じアダプターを使用できます。 FXLC95000 でこれらすべてをまだ実行していると思います。 必要なのは 2 番目のセンサを構成することだけです。 これは、isf_sensor_configuration.c で、gSensorList[] 配列に新しいセンサ用の新しい行を追加することによって行われます。 SensorConfig_t gSensorList[DSA_NUM_SUPPORTED_SENSORS] = { // sm_DsaAdapter_t、*pSensorHandle、*pSensorSpecificSettings、デバイスチャネル、デバイスアドレス {&fsl_mag3110_i2c_3D_mag_adapter, NULL, &mag3110SpecificSettings, I2C_MASTER1, 0x0E }, {&fsl_mag3110_i2c_3D_mag_adapter, NULL, &mag3110SpecificSettings, I2C_MASTER1, 0x0F}, }; 次に、isf_sensor_configuration.h に新しいセンサ用の新しい列挙型を追加します。 typedef enum Sensor_sensors_en { DSA_FSL_3D_磁力計、 THE_NEW_FXMS3110_MAG、 DSA_サポートされるセンサーの数 } センサーID_t; その後、新しいセンサを会員登録できるようになります。 それがあなたにとってどのように機能するかをお知らせください。 -ジム Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、マーガレット! mpl3115のセンサアダプターをありがとうございます。すべてうまくいっているように思えます。 しかし、もう一つ質問があります。デバイス mag3110 と fxms3110 の 2 つの磁力計を使用したいと考えています。私の知る限り、それらは同じです。違いは住所のみです。 mag3110用のセンサアダプターは持っていますが、fxms3110用はありません。 その問題を解決してもらえますか?fxms3110用のセンサアダプターをいただけますか? Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ヴィタリーさん 英語に問題はありません。謝らないでください。 私があなたに送ったプロジェクトにファイルが含まれていなかったなら、私もそのファイルを持っていなかったことになります。 先ほどのメールでは、人々に助けを求めなければならないと伝えていました。MPL3115 センサ アダプターの作成者は中国にいるので、返答を得るには一晩待たなければなりません。あなたのリクエストを確認し、それに取り組んでいることをお知らせしたかったのです。 しかし、その間に、Kinetis センサ アダプターと思われる対応するファイルを見つけました。 試してみてコンパイルできるかどうか確認してみてください。 FXLC95000 と Kinetis 上の MAG3110 の類似ファイルを比較し、2 つの MCU 間でどのように異なるかを確認することをお勧めします。その後、添付されたファイルに対しても同様の調整を行うことができます。 結果がどうなったか教えてください。 マーガレット Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> マーガレット、ごめんなさい。しかし、あなたの最後のメールを理解したかどうかはわかりません。 先ほども申し上げた通り、MPL3115_release_compass.zip を受け取りました。しかし、 fsl_mpl3115_i2c_1D_press_config_types.hがありません。 そのファイルはありますか? 英語が下手でごめんなさい。完璧ではないよ。 Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ヴィタリー、 援軍にメールを送りましたので、また連絡します。 よろしくお願いいたします。 マーガレット Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、マーガレット! いただいたプロジェクト MPL3115_release_compass をコンパイルしようとしています。しかし、間違いがあります。なぜなら、「fsl_mpl3115_i2c_1D_press_config_types.h」というファイルが存在しないからです。 どこで見つけられますか?手伝ってもらえますか? Re: Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Vitaliyさん、あなたは正しいです。申し訳ありません。トレーニングモジュール7が添付されています。洗練されていないため、Web サイトには掲載されませんでした。誤りがある可能性もあることをご理解の上、自己責任でご利用ください。新しいセンサ アダプターを追加するには、モジュール 6 が必要になります。MAG3110 センサー アダプターを例として見ることは依然として価値があります。 FXAS21000C のセンサ アダプターは FXAS21002C に似ていますが、正しくありません。FXAS21002C 用のものを作成するには、まず FXAS21000C センサ アダプターから始める必要があります。FXAS21002C用の未発表センサアダプターも付属しております。 最後に、MPL3115用のセンサアダプターの未公開バージョンが添付されています。どちらかが機能するかどうかは保証できませんが、出発点にはなるでしょう。 Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> マーガレットさん、ご回答ありがとうございます!しかし、まだいくつか疑問が残ります。 あなたはこう言います: 「 MPL3115A2 用の独自のセンサー アダプターと FXLC95000 用の ISF 1.1 を作成できます。ISF 1.1 トレーニング タブのトレーニング モジュール番号 6 を使用すると、独自のセンサー アダプターを作成するために必要な手順を確認できます。 」 しかし、モジュール 6 では、mag3110 用の既存のセンサ アダプターの追加のみが見つかります。そして次のものを見つけました: 「センサ アダプターの作成は、トレーニングのモジュール 7 の主題です。」 では、モジュール 7 はどこにありますか?見つかりません! そしてもう一つ。実機のfxas21002でセンサアダプター(fsl_fxas21000_i2cspi_3D_gyro_config_types.h)を使用できますか?I2Cのデバイスアドレス以外に何か変更が必要ですか? Re: MPL3115A2 with FXLC95000 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、Vitaliy さん。まず悪いニュースですが、MPL3115A2 のセンサ アダプターは FXLC95000 用に製造されていません。良いニュースです。MPL3115A2 用の独自のセンサー アダプターと FXLC95000 用の ISF 1.1 を作成できます。ISF 1.1 トレーニング タブのトレーニング モジュール番号 6 を使用すると、独自のセンサー アダプターを作成するために必要な手順を確認できます。手順は似ていますが、磁力計を追加する代わりに、MPL3115A2 を追加します。FXLC95000 の他のセンサ アダプターを例として使用することもできます。 さらに、Kinetis デバイス用の MPL3115 センサ アダプターもあります。これを確認するには、Kinetis 用の ISF 2.1 と ISF 2.1 PEupd ファイルをダウンロードする必要があります。そのセンサ アダプターのソース コードが提供されます。API は異なり、プロセッサ Expert コンポーネントとして設定されていますが、2 つの API を区別して MPL3115A2 センサ アダプターの主要な機能をキャプチャできる可能性があります。 作成したら、コミュニティ ページに投稿して他のユーザーと共有してください。
查看全文
Differences between MPX5700 series What is the difference between MPX5700GS and MPX5700GP and MPX5700GP1? Since the MPX5700GS has been discontinued, can either of MPX5700GP or MPX5700GP1 directly replace MPX5700GS? Pressure Sensors Re: Differences between MPX5700 series Hi Yuna, The only difference is the package (Side vs. Axial Port): Both the MPX5700GP and MPX5700GP1 can replace the MPX5700GS if using the Side Port package (Case 867B-04) is not a problem for your application. Best regards, Tomas
查看全文
MPXM2202A、CASE 1320-02 用の STEP モデル ファイルはありますか? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> MPXM2202A、CASE CASE 1320-02 の STEP ファイルを探しています。 圧力センサ Re: Is there a STEP model file available for the MPXM2202A, CASE 1320-02? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ランディ。 MPAK については添付の STEP ファイルを参照してください。図面はツール図面ではなくケース外形に基づいているため、正確さが完全に完璧ではない可能性があることにご注意ください。 長くかかってしまい申し訳ありません。 よろしくお願いいたします。 トーマス Re: Is there a STEP model file available for the MPXM2202A, CASE 1320-02? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ランディ。 当社のデバイス グループにそのようなモデルを依頼しており、フィードバックが得られ次第、このスレッドを更新します。今日か明日遅くなるはずです。 よろしくお願いいたします。 トーマス
查看全文
用于 K64F 和 K22F 的 AGM01 传感器融合裸机项目 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 所有、 传感器融合库的7.00版本已于今天上午发布到KEX生态系统中。不幸的是,由于配置文件出现问题,AGM01 的裸机项目无法分期运行。 不过,将 FreeRTOS 项目转换为裸机非常简单。 流程是这样的 下载 FRDM-K64F 或 FRDM-K22F,在 KEX 配置屏幕中勾选 ISSDK 和 FreeRTOS。 向下浏览传感器融合项目文件夹( /板/frdmk xx f_agm01/issdk_examples/algorms/algorms/sensorfusion) 将 freertos_agm01 复制到 baremetal_agm01 在你选择的集成开发环境中打开复制的项目 移除 FreeRTOSConfig.h源文件夹中的 删除整个 freertos 文件夹 用 main_baremetal.c 替换 main_agm01_freertos_twoo_tasks.c(可以在 /中间件/issdk_1.0/algorms/sensorfusion/sources 下找到) 删除 drivers/freertos 文件夹 版本并下载 就是这样。 请注意,新版传感器融合工具箱将于今天晚些时候在 nxp.com/sensorfusion 上发布。 您需要它来使用磁性和精密加速度计功能。 传感器融合
查看全文