Hi!
We are in the development phase of a project were we would like to use multiple (4pcs) of the FS2012 flow sensors. We would prefer to have them all on the same I2C bus but is that even possible?
As far as we can see there is no way of changing the default I2C address of the sensors (x07).
Hi Marcus!
Thank you for using our flow sensor. The I2C address is fixed in the FS2012 firmware and cannot be changed by the user. As per I2C protocol, we cannot communicate with devices having the same slave address. So, we would suggest you use I2C mux (image shown below) so each sensor can be addressed individually.
For more information, I have shared an application note (regarding I2C Mux); please go through it.
https://www.renesas.com/us/en/document/apn/cm-285-i2c-bus-multiplexerhttps://www.renesas.com/us/en/products/programmable-mixed-signal-asic-ip-products/greenpak-programmable-mixed-signal-products/greenpak-system-programmability/slg46826-greenpak-programmable-mixed-signal-matrix-system-programmability
Regards:
Raja.
Thanks for the answer. We are already looking at implementing a mux so we probably will go that route.
I try to connect FS2012 with Raspberry Pi 4B+ but no address showing. How to solve it?
Hi RB,
Thanks for the request. Could you please share the circuit schematic and error message that you are getting for our better understanding? I have also attached the working Arduino code for your reference please go through that.
#include <Wire.h> #include<Arduino.h> #define sensoraddress 0x07 void setup () { Wire.begin(); delay (500); Serial.begin(9600); } void loop(){ Wire.beginTransmission(sensoraddress); Wire.write(1); Wire.endTransmission(); delay(30); Wire.requestFrom(sensoraddress,2); while(Wire.available()==0); byte MSB = Wire.read(); byte LSB = Wire.read(); float flow = ((MSB<<8)+LSB)/1000.0; Serial.print(flow); Serial.println("(L/min)"); delay(1000); }
No error message. When I connect fs2012 to Raspberry Pi 4B+ it doesn't show any I2C address. But when I connect to Arduino it works fine.
Thanks for the update. The main problem is with the host MCU. So, I would recommend starting with looking at the host IC driver <Raspberry Pi 4B+> - the Fs2012 is an i2c slave and typically any interfacing errors tend to be driven from the host side. it is difficult for us to diagnose a 3rd party MCU issue - so I would recommend posting your question onto the Raspberry Pi platform.