Do you mean both SDA and SCL pin need to connect this way ? I need 4 NPN BC547?
I have no Arduino micro, I want to wire it by Arduino Uno.
People are using 12C bus as follwing way.
// SDA: PIN 2 with pull up 4.7K to 3.3V on arduino Micro
// SCL: PIN 3 with pull up 4.7K to 3.3V on arduino Micro
They might be using +3.3V of arduino to Accelerometer MMA8652FC module.
Can you kindly explain why 74HC4050 can not be use this application?
Because of biderectional line of SDA and SCL , because of 74HC4050 is a hex buffer?
I am using this circuit in attachment,
it works now.
In case of I2C for free-scale MAG3110 sensor which is built in FRDM-FXS-MULTI-B, I need an interrupt high pin (INT_MAG) to Arduino Uno digital I/O pin 3. How to convert it in voltage snifter ?
Kindly look at this attachment and give me a solution.
Just put a 1K resistor from the output to the base of an NPN transistor, any will do.
Then connect the emitter to ground and the collector to the Arduino input. Enable the internal pull up resistor on that input.
Please do not use the transistors for level shifting, that is a theoretical exercise, but it is not good in the real world.
A high level of 3.3V is a little outside the specifications of the Arduino Uno I2C bus. But it will work. As long as you don't add pullup resistors to 5V. If you need pullup resistors, connect them to 3.3V.
To make everything right, you have to level shift the Serial, the SPI, the I2C, and the Interrupts.
I suggest to use a 3.3V Arduino for all those signals.
Grumpy_Mike, yeah, okay, I didn't read it very well.
And I have also made that circuit with transistors. With too many I2C modules at 3.3V it didn't work so well anymore. The modules with the mosfets have not failed me yet.
The only way to know how accurate a sensor is to calibrate it against a known quantity, and that can be tricky for an accelerometer without a whole room full of test equipment.
It is basically down to the sensor and your requirements. How far are the two out from each other?
Understand that these sensors are not perfect, they all suffer from noise and drift so you have to resort to extra tricks when using them, like supporting and correcting them with other sensors like gyroscopes.
But unless you have a specific requirement of what parameters you want to achieve you are wasting your time worrying about it.
Some problems like inertial navigation tracking are beyond what the present day sensors can do.