Hi,
I recently posted this by mistake in another forum - I have since realised that this is most probably the more correct forum to ask this question.
I'm very new to electronics, specifically physical computing.
my first real project I'm trying to take on is to build a weather station.
I want to hook up my humidity sensor (HH10D), and through the reading that I've done it seems that is communicates via I2C. my question is should i be using a resistor(s) when connecting it to the Arduino pins?
and if so where in the circuit should the resistors be?
my set up is as follows;
Vss - Gnd
Vdd - +3.3V
SDA - A4
SCL - A5
Some guidance and help would be greatly appreciated.
Thanks.
You need two resistor's one from A4 to +3.3V and the other from A5 to +3.3V
Use 2K7 for each. That is 2.7K ohms.
If this is a 3.3v device (which it appears to be) you should read this.
http://playground.arduino.cc//Main/I2CBi-directionalLevelShifter
Basically, if you are not going to use a level shifter then you are trading off getting a high enough voltage for the Arduino to recognize it (by using pullups to 3.3v) against using too high a voltage and damaging the device (by using them to 5v). Note that I'm talking about the pullups here, not Vdd, which should only go to 3.3v
Good news is that it appears (from what I have read) that most I2C devices are pretty tolerant of 5v so if putting the pullups to 3.3v gives you flaky results you can try 5v.
I would be interested in Grumpy_Mike's perspective on this since he has way more experience than I do.
Sorry I missed it was a 3V3 device but I have edited it now.
If the arduino is 5V but the device is 3V3 what you need is an I2C driver on the arduino that does not enable the internal pull up resistors like the I2C master library.
that most I2C devices are pretty tolerant of 5v
Unless it says so in the data sheet don't assume it.
I am curious why you would suggest pulling up the clock line to one voltage and the data line to a different voltage ?
michinyon:
I am curious why you would suggest pulling up the clock line to one voltage and the data line to a different voltage ?
Because I forgot to edit that as well, sorry all correct now.