Go Down

Topic: Connecting STEVAL-MKI197V1 (3.3V board) with Nano (Read 3448 times) previous topic - next topic

anneme

Hi together,

actually I am trying to fuse STEVAL-MKI197V1 Accelerometer&Gyroscope data with Arduino Nano.
I want to communicate via I2C but acutally I am worried about transforming 5V to 3.3V output voltage from Nano to Evalboard.
I have ordered some voltage converter from 5V to 3.3v but would appreciate, if there is a solution how to solve this problem in short term?

I read that some people are connecting 4k7 or 2k2 Resistors in between Arduino and Evaluation Board Pins.
It makes sense to use resistors for voltage dividing (but value of resistors on evalboard are't shown).
But how can I ensure, that voltage will get divided down to 3.3V?
Otherwise the Evalboard will not detect input as HIGH if voltage is at 3V?
And how does Arduino detect High, if there aren't 5V input for High signal?

Thanks in advance!!!

dougp

I read that some people are connecting 4k7 or 2k2 Resistors in between Arduino and Evaluation Board Pins.
It makes sense to use resistors for voltage dividing (but value of resistors on evalboard are't shown).
But how can I ensure, that voltage will get divided down to 3.3V?
Otherwise the Evalboard will not detect input as HIGH if voltage is at 3V?
And how does Arduino detect High, if there aren't 5V input for High signal?
Make your life simpler and use the level shifter.  I was in the same place and decided not to juggle voltage dividers, accounting for capacitance, etc.  The app. note below give a schematic, as does Sparkfun, so if you've got parts lying around you could fab your own.

http://cdn.sparkfun.com/tutorialimages/BD-LogicLevelConverter/an97055.pdf

https://hackaday.com/2016/12/05/taking-it-to-another-level-making-3-3v-and-5v-logic-communicate-with-level-shifters/
I don't trust atoms.  They make up everything.

No private consultations undertaken!

pert

And how does Arduino detect High, if there aren't 5V input for High signal?
In the datasheet for every microcontroller, and likely every logic device, you'll find a specification of the minimum voltage to create a HIGH signal. If you're using the classic Arduino Nano, the "Common DC Characteristics" table in the datasheet for its ATmega328P microcontroller says this is 0.6Vcc. So if your Nano is running at 5 V then the minimum input voltage for a HIGH signal is 3 V.

Wawa

A classic 5volt Nano only has software pull up.
You can disable that right after the wire.begin() command.
Then there is no pull up to 5volt any more, and you can safely connect a 3.3volt I2C device to those pins.
Assuming that breakout board has it's own internal pull up to 3.3volt.

Note that the 3.3volt supply of a Nano comes from the USB<>Serial chip, and is relatively weak (~30mA).
Most likely not an issue with the breakout board you're using, but it it has it's own 5volt to 3.3volt regulator then it could be better to power the breakout from the 5volt pin of the Nano.

If the Nano is powered from the USB, then the 5volt pin is ~4.6volt, resulting in a HIGH switch point of 0.6*4.6= ~2.75volt. Not a problem for a 3.3volt I2C device.
Leo..

anneme

Thanks a lot so far!

Then there is no pull up to 5volt any more, and you can safely connect a 3.3volt I2C device to those pins.
Assuming that breakout board has it's own internal pull up to 3.3volt.
I just read in datasheet of LSM6DSOX (https://www.st.com/resource/en/datasheet/lsm6dsox.pdf)
on page 18/199 that in Mode 1 (I2C interface)  "Both the lines must be connected to Vdd_IO through external pull-up resistors" , which are shown on page  39/199.
I was assuming to that an Evalboard is having its own pull up resistors.
But am I right, that I still have to add those 10k resisotrs, although it is an Evalboard?

pert

Check the schematic for the board. There's a good chance the pull-up resistors are on the eval board, but that's not certain. It might be purely a breakout.

Wawa

If the resistors are not there, I2C communication just won't work. Nothing bad will happen.
Try to read the I2C address with an I2C scanner sketch.
If no response, then add the two 10k pull up resistors to 3.3volt VDD, and try again.
Leo..

anneme

Communication is fine.
I had to add pull up resistors.

I really appreciate your help!!!

Go Up