On 2013-05-03 10:26, Julian Brooks wrote:
Hey Martin / all,
..Yes it's a bit wrong...
This is what we have and aren't sure if it's correct
Yes, pin 3 is connected through to pin 13 when pin 11 is low, and to pin 14 when 11 is high. So it's actually sensor 2 on pin 14.
16 to 3.3v RPi
14 to SCL (sensor 1)
Is actually sensor 1
13 to SCL (sensor 2)
Yes, 11 selects which channel. 9,10, and 11 make up a 3-bit address which selects which of the 8 output channels is connected to the input on pin 3. If you only have 2 sensors the two extra selector pins must be set low.
[Each SCL has 10k resistor and a feed of 3.3v from RPi]
11 to P1-11 (GPIO 17) - RPi
10 to Ground or another selector pin if you have more than 2 sensors
10 to SDA (sensor 1)
The sensor data pins are connected directly to the RPi SDA pin, only the SCL line goes through the 4051.9 to Ground or another selector pin
9 to SDA (sensor 2)
7 to Ground
Also, 6 (Inhibit) must be low for the chip to function (this permits expanding to more than 8 channels by using more 4051s)
Pin 8 to Ground3 to SCL RPi, you're switching the clock line, not the data
3 to SDA P1-03 (GPIO 0) - RPi
Martin
The power for the sensors is wired directly into 5v from the RPi.
The ground for the sensors is wired directly into the RPi.