[PD] Sensors GPIO Raspberry Pi Pd

Martin Peach martin.peach at sympatico.ca
Fri May 3 17:31:32 CEST 2013


On 2013-05-03 10:26, Julian Brooks wrote:
> Hey Martin / all,
..
> This is what we have and aren't sure if it's correct

Yes it's a bit wrong...

> 16 to 3.3v RPi
> 14 to SCL (sensor 1)

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.

> 13 to SCL (sensor 2)

Is actually sensor 1

> [Each SCL has 10k resistor and a feed of 3.3v from RPi]
> 11 to  P1-11 (GPIO 17) - RPi

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.

> 10 to SDA (sensor 1)

10 to Ground or another selector pin if you have more than 2 sensors
The sensor data pins are connected directly to the RPi SDA pin, only the 
SCL line goes through the 4051.

> 9   to SDA (sensor 2)

9 to Ground or another selector pin

> 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 Ground

> 3   to SDA P1-03 (GPIO 0) - RPi

3 to SCL RPi, you're switching the clock line, not the data

>
> The power for the sensors is wired directly into 5v from the RPi.
> The ground for the sensors is wired directly into the RPi.
>

Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4051_i2c_mux.jpg
Type: image/jpeg
Size: 42338 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130503/26f3372b/attachment-0001.jpg>


More information about the Pd-list mailing list