I'm a teacher of a secondary school in the Netherlands. My students are working on a sun sensor placed on a moving object, with which the attitude w.r.t the sun is determined. A couple of ambient light sensors (BH1730FVC) in different directions are used for this. The sensor data is processed by an Arduino. The ambient light sensor have a I2C interface and all have the same address.
The sun senor has 3 groups of 4 ambient light sensors. One group must take a measurement simultaneously. To work properly the sun sensor needs light intensity data from all sensors in a set measured at the same time. Time shift between measurements introduces an error in final output. To minimize this negative effect, conversion is triggered in all sensors exactly at the time. In order to do this, all four sensors in a set are connected in a special way.
The idea originates from a PW-Sat2 Cubesat project. See attached page from the CDR. The SCL lines are connected and the SDA's are per sensor connected to a GPIO pin of the MCU. A procedure for Writing and reading is described.
- Has someone an Arduino example code for the type of I2C connections? I was thinking to use SoftWire, but my experience in this field is limited.
- Are there (better) alternatives to simultaneously read I2C sensors with the same address?