Hi, I wanted to use 4 same type sensor NXP NMH1000 magnetic sensor to measure the movemet using I2C, as per the data sheet we can set the address each device but unable to find any suitable header files to use it also the sensors loses it address if it reset. Please write how I can get the data from all 4 sensors with different address and also not losing the sequence of the sensors.
Then you need to choose a different sensor! One that fits your requirements.
This is the best available sensor for the application of the project, there are are no other sensor having the same features ie., I2C communication and hall effect together
Disclaimer: I'm not familiar with the sensor.
From the datasheet (https://www.nxp.com/docs/en/data-sheet/NMH1000.pdf)
Emphasis added; to me that would imply that it should not loose the address.
As an alternative, you can use something like TCA9548A I2C Multiplexer : ID 2717 : $6.95 : Adafruit Industries, Unique & fun DIY electronics and kits. All devices can have the same address but you select which one you talk to using the multiplexer.
For the specific use with 4 sensors with different addresses? NMH1000_Arduino - Arduino Reference links to GitHub - ryraki/NMH1000_Arduino.
Maybe you know this already.
There is a function to that allows you to read/write from a specific address (that you should have previously configured)
/** Create a NMH1000_Arduino instance
* @param mode Be selected from _I2C when I2C mode or _STDALONE when STANDALONE mode
* @param i2c_address I2C address for NMH1000. This does NOT change NMH1000 I2C address by writing register.
*/
NMH1000_Arduino(Mode mode, uint8_t i2c_address);
Please note the comment that this does not change the address in NVM.
Thanks for your elobrate reply, I have gone thru ryraki github, trying it in a different way but yet to make it work! also adding another multiplexer will increase the cost to the project as the sensor itself is $2.2, need some solution which has only the sensor and not anyother additional compnents which will add more program to handle reducing the speed of the measurement.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.