SUCESS!! (Sort of kind of, but more on that in a second)
OK, when I last updated this thread, I had ordered some temperature sensors and other hardware. Well, I got a temperature sensor (TI TMP75) wired up and connected to the Ras Pi via I2C. I got the surface-mount TMP75 parts (using the SOIC package with 1.27 mm pitches) attached to a standard breadboard using...
Schmartboard which makes soldering *almost* foolproof even for a dolt like me.
Here were a few hurdles I had to clear:
1. None of the default images that are available on the internet actually include i2c support! doh! I ended up getting Raspbian, then on top of Raspbian I installed the 3.2.23 kernel, which includes the correct drivers, from
bootc who is ahead of the curve on RasPi kernel development.
P.S. --> If you try to manually install this package on Raspbian using dpkg, the installer will fail with an incorrect architecture error. You need to dig down into the dpkg command documentation and forcibly ignore the "architecture" error and install anyway. The architecture difference (ARMel for the kernel vs. ARMhf for Raspbian) does not matter and the kernel will boot fine.
2. After I got I2c installed I tried to get the board going... no dice.
One problem: I needed to ground all the address pins to make my device have the default "0x48" i2c address. Duh. (you can select from 8 different addresses using combinations of ground and VCC if you really want).
Next problem: I studiously followed the tmp75 documentation that said the SDA and SCL pins needed pull-up resistors. Well, that's true *but* the SDA and SCL pins on the RasPi already have built-in pull-up resistors, so the ones I put on the bread board were hurting not helping. However, the alert output pin (which I'm not actually using) *should* still have a pull-up resistor, and I am using a 2.2K ohm resistor right now.
3. After all of that and lots of extra trial & error I finally got it working! (sort of)
So... If you happen to have a board like this that is actually working, here are the magic commands to get it initialized:
0. Make sure that lm-sensors is installed ("apt-get install lm-sensors" if you are using debian)
1. modprobe i2c_bcm2708 --> may already be loaded for you
2. modprobe lm75 --> my device-specific driver that works with the TMP75 sensor, but you may be using a different device with a different driver
3. modprobe i2c-dev --> another important i2c driver
4. Here's my problem: I can get the sensor to work, but it has proven to be *flaky* with the i2c connect. For example, it will work for a while, then just stop. I've fiddled with the wiring, made sure the solder joints were secure, but it has been a challenge. I'm worried that the i2c implementation in the Rpi itself is not all its cracked up to be. I've noticed that the sensors will still return a temperature, but that the temperature value never changes even though it obviously should be heating up or cooling down based on stuff I've done to the chip.
I did manage to get the thing working for a while to actually sense changes in temperature tonight. Here are my results after using the fiance's hair drier to heat up the chip, then letting it cool down slowly:
Adapter: bcm2708_i2c.0
temp1: +97.7°F (high = +176.0°F, hyst = +167.0°F)
root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +96.8°F (high = +176.0°F, hyst = +167.0°F)
root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +95.9°F (high = +176.0°F, hyst = +167.0°F)
root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +95.0°F (high = +176.0°F, hyst = +167.0°F)
root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +95.0°F (high = +176.0°F, hyst = +167.0°F)
root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +95.0°F (high = +176.0°F, hyst = +167.0°F)
root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +90.5°F (high = +176.0°F, hyst = +167.0°F)
root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +85.1°F (high = +176.0°F, hyst = +167.0°F)
root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +78.8°F (high = +176.0°F, hyst = +167.0°F)
root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +77.0°F (high = +176.0°F, hyst = +167.0°F)
root@pisces:/sys/class/i2c-adapter/i2c-0# sensors -f tmp75-i2c-0-48
tmp75-i2c-0-48
Adapter: bcm2708_i2c.0
temp1: +76.1°F (high = +176.0°F, hyst = +167.0°F)
w00t!