3

I am trying to connect a MPL3115A2 Altitude/Pressure/Temp Sensor Breakout which I bought from Hobbytronics to my Arduino Mega. What I had in mind was (Breakout -> Arduino):

3.3V -> 3.3 V GND -> GND SDA -> A4 SCL -> A5

The information which I've found so far is very conflicting and I'm not sure whether or not I should be using pull-up or in-line resistors, and if so, what value?

The code which the product page links to also differs, with one stating that the Wire library is unsafe to use with a 3.3V rated sensor due to the internal pull-ups, but the other code uses the Wire library?

If anyone could advise me on how best to use this sensor without frying it, it would be much appreciated!

1 Answer 1

3

Since the device is 3.3V and the Arduino is 5V, you will need a I2C level converter such as the TCA9517. Simply supply the Mega side with 5V and the device side with 3.3V and attach 4.7kohm pull-ups to 5V on the Mega side, and it will convert both SDA and SCL for you. You won't need pull-ups on the device side since it includes pull-ups on the board.

For I1 and I2 (push-pull outputs) you can use either normal level converters or you can use a SN74LVC2G07 along with the pull-ups found on the Mega inputs.

8
  • Thanks very much for the response, but I really would prefer to do it without another device if possible. Do you think it would be an option to do it just using resistors?
    – user_name
    Commented Apr 7, 2014 at 23:55
  • Not reliably. 3.3V is marginal for a Mega input (3.0V minimum Vih), which means that your system will be moderately susceptible to noise. And you certainly don't want to apply 5V to the device. Commented Apr 7, 2014 at 23:58
  • I just want to power the board using the USB port, since I'd like to read the live data from the COM port. What do you think of the idea of using inline resistors for SDA and SCL as per this tutorial for a slightly different breakout board? learn.sparkfun.com/tutorials/…
    – user_name
    Commented Apr 8, 2014 at 0:02
  • 1
    TI gets samples out fairly quickly (if they're in-stock with the distributor), and you can use point-to-point soldering until you get an adapter in. Commented Apr 8, 2014 at 0:19
  • 2
    For the I2C connection, yes. Don't forget the (external) pull-ups. Commented Apr 8, 2014 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.