I have been planing to do a project with Arduino Mega 2560 and 8 MPU-9150s + I2C Mux. I was just advised to have a regulator 5V -> 3.3V (for example, PCA9306, https://www.sparkfun.com/products/11955) for I2C, instead of connecting to 3.3V directly. Can someone explain me why it is risky to connect directly to 3.3V on Arduino Mega 2560?
I was just advised to have a regulator 5V -> 3.3V .......
That is not a regulator it is a signal level converter. There is no need to use this on a Mega 2560 unless the thing you are connecting the I2C bus to is a 3V3 device. Then you need it to protect the device from the 5V of the Mega.
3.3V regulator only has ~150mA current capability, if you need more current an external regulator is needed. Disable the I2C pullup resistors on the Mega so that I2C can be pulled up to 3.3V instead. Mega board has 10K pullups RN1B and RN1C to 5V unfortunately. If you added 2.7K pullup to 3.3V, the math says the resulting level should be ~3.67V, you'd have to check to see that exceeds the absolute max limits for your devices, the mux specifically if it sits between the 2560 and the MPU9150.
Thank you for your reply. I agree with this. Because I will have the 8 MPS-9150s, it looks like it is better to have an external regulator. I saw the web site of Arduino Mega 2560, and it said "DC Current for 3.3V Pin 50 mA":
for 5V Pin, it is a bit less than 1A?
Therefore, I have an idea. How about 8 MPU-9150s -> 8 PCA 9306s, and then all goes to SCL and SDA on Arduino Mega? With EN, the channels can be switched very rapidly, like a multiplexer? Or would it better to have 8 MPU-9150s -> 1 PCA9548A (or 2 PCA9544As), and then one single PCA 9306 (or 2 PCA 9306s)?
PCA 9306 http://dlnmh9ip6v2uc.cloudfront.net/datasheets/BreakoutBoards/PCA9306.pdf https://www.sparkfun.com/products/11955 PCA9548A http://www.nxp.com/documents/data_sheet/PCA9548A.pdf PCA9544A http://dsscircuits.com/images/datasheets/PCA9544A.pdf http://dsscircuits.com/index.php/i2c-multiplexer
The MPU-9150 spec states it consumes 10ma. If you only have 50ma from the Mega then you don't have enough to run eight chips.
Each device on an I2C bus needs to have a unique address. The MPU-9150 only has two possible addresses it can be set to, so you cannot have up to two on a single bus. The PCA9544 would be sufficient for eight chips / two on each bus.
The PCA9544 or PCA9548 state that they both include level translation; the PCA9306 wouldn't be needed. Not sure I understand the doc's instructions on how to set that though.
The PCA9544 or PCA9548 state that they both include level translation; the PCA9306 wouldn’t be needed. Not sure I understand the doc’s instructions on how to set that though.
I had the same problem to understand this. It briefly says that they both include level translation, but they don’t say more than this.
The I2C voltage level translator that we are talking above, needs to have the 5V side as well as the 3.3V side like PCA9306. However, the PCA9544 and the PCA9548 don’t have them. Then we need to add the PCA9306 in order to do the voltage-level translation…?
Figure 14 (Page 12) of the PCA9544 datasheet shows the wiring. You would power the PCA9544 with 3.3V and the pull ups on the Mega will keep that side of the I2C bus at 5V. The MPU-9150 buses would need 3.3V pull ups and everything should be kosher. I'd appreciate if CrossRoads or Grumpy would chime in on that though.
Regarding your earlier question about a 3.3V supply, just get a 3.3V 1117. In addition to the regulator itself you'll just need a 2.2uF to 10uF electrolytic capacitor between the input and GND and a second between the output and GND, keeping those caps as close as possible to the regulator. These SOT-223 packages claim up to 1A of output which is way more than you'd be using here.
Chagrin: Figure 14 (Page 12) of the PCA9544 datasheet shows the wiring. You would power the PCA9544 with 3.3V and the pull ups on the Mega will keep that side of the I2C bus at 5V. The MPU-9150 buses would need 3.3V pull ups and everything should be kosher. I'd appreciate if CrossRoads or Grumpy would chime in on that though.
Thank you fro your reply. With this setting, I can have only one PCA 9544 and eight MPU-9150s, but no voltage level translator. (Because the MPU-9150 can have two different address, 2 MPU-9150s can be connected with one I2C bus.) The MPU-9150 breakout that I have, already has the pull-up registers:
I saw it somewhere, but is it OK to use the pull-up registers in Arduino Mega 2560 (SCL and SDA for 5V) or should I need external ones?:
(P.S. I don’t mean to be picky, but the Figure 14 (Page 12) of the PCA9544 data sheet says « VDD ». Maybe I don’t have to worry too much and I can connect 3.3V Pin of Arduino to this, but just in case, do I have to concern about FET drain, especially in this case?)