sensor pin diagrams

Hi Everyone

This is my first shot at practical electronics, and i have been trying to figure out some of the notation in pin-diagrams
Let me be specific.
In the case of ADXL345, connections required for I2C communication are
1)pin CS to be connected to VDD i/o(What is VDD i/o? and what is it in the case of an Arduino uno?)
2)pin SCL to be connected to Dout(what is Dout? and specifically what is it for the uno?)
3)pin SDA to be connected to D in/out(what is D in/out? and specifically what is it for the uno?)

What does "External pull up resistors are necessary for proper I2C operation" mean?

I know that all these are just basic stuff, but it would help me a lot, if someone clarified all this terminology. A google search for these terms, yielded a bunch of vague answers.

Thanks

  1. I2C Select Pin Vdd = Positive Supply Voltage AKA +5V for Arduino (But I believe that your ADXL part wants it to be 3.3V)
  2. I2C Clock Pin Dout Data Output Pin - Arduino Pin in digitalWrite() mode
  3. I2C Data I/O Pin Din/Dout Data Input/Output Pin - Arduino Pin in digitalRead()/digitalWrite() Mode (as Needed)

4 External Pull-up Means that each of the data lines should have a 4.7K resistor attached to it with the other end tied to +5V Supply.

Example: PCF8574 I2C Connection from one of my existing drawings...

aerosam:
Hi Everyone

This is my first shot at practical electronics, and i have been trying to figure out some of the notation in pin-diagrams
Let me be specific.
In the case of ADXL345, connections required for I2C communication are
1)pin CS to be connected to VDD i/o(What is VDD i/o? and what is it in the case of an Arduino uno?)
2)pin SCL to be connected to Dout(what is Dout? and specifically what is it for the uno?)
3)pin SDA to be connected to D in/out(what is D in/out? and specifically what is it for the uno?)

What does "External pull up resistors are necessary for proper I2C operation" mean?

I know that all these are just basic stuff, but it would help me a lot, if someone clarified all this terminology. A google search for these terms, yielded a bunch of vague answers.

Thanks

Vdd I/O is the supply voltage for the I/O bus drivers on the chip. The spec shows this can be lower than the main supply voltage Vs.

Dout just means data or digital out (from the microcontroller that is), D in/out means a bidirectional signal from the microcontroller. The Arduino has specific hardware to drive an I2C bus, so you can use those pins (see below).

Note the chip only works up to 3.6V, so it is not directly compatible with the Arduino, some sort of level-shifter circuit is needed for the bus signals.

Having read the spec its clear Vdd I/O should be on 3V3 permanently or you'll get bus conflicts. There is a CSB (CS bar) input that needs to be high to enable I2C mode. Vs can be brought low to switch to standby, but it will be simpler to leave it connected to 3V3.

SCL and SDA are the I2C (two wire bus), and connect (via a level shifter) to A4 and A5 pins on the Arduino (look this up I can never remember which way round - those two analog pins are shared with the built-in I2C hardware).

Because you need the sensor to run at 3.3V and the Arduino is at 5V you need a level shifter for the I2C bus and it needs to work with open-drain outputs because that's how I2C works.

If you want to run other 5V devices off the I2C bus you will be getting into tricky territory, but if only 3V3 devices are attached there is a simple solution to the level shifting:

Just run the pullups to 3.3V - but this is only going to work so long as the SLC and SDA pins are never driven HIGH by the Arduino. They should toggle between tristate and LOW to drive the bus. Fortunately the Arduino can read 3V3 logic levels OK on inputs. Personally I'd go for a more sophisticated level shifter since its never reassuring to know that a software error can fry your sensor(s). Adding diodes to protect the bus from the 5V level is the simplest strategy - the Arduino pins can then only pull down.

Thanks, Willard and Mark.
How do you decide on 4.7K pullup resistors? How would you also convert from LSB's to g's?
I believe the sensitivity and bias vary with time/temperature, so what would be a good way of determining the best conversion from LSB to g's?

Thanks
Sam

How do you decide on 4.7K pullup resistors?

It is decided by the specification of the i2C bus. For 5v is is always that. So you have no need to worry about it. Think of it as a rule of thumb

NOTE: The I2C Bus specification is about PULLING the data bus to to ground to indicate activity. I2C chips will never assert a positive voltage. That is why the external PULL-UP resistors are needed.

pwillard-I seem to remember reading somewhere that the arduino I2C library enables the internal pull-up resistors on the I2C pins, but this can be fixed by commenting out two lines of code.

yes, "technically" it should not do that.