DATV Repeater i2c Interface

From BATC Wiki
Jump to navigation Jump to search
Back to repeater controller main page

The i2c interface for the repeater controller is configured to use GPIO pin 8 for sda and GPIO pin 10 for scl. Note that these are not the default Raspberry Pi i2c pins (normally pins 3 and 5, which are reserved for the future clock module in the repeater) and must be addressed using the interface /dev/i2c-22). The config.txt file is modified to activate these pins for 100 kHz i2c with the lines

dtparam=i2c_arm=on
dtoverlay=i2c-gpio,i2c_gpio_sda=14,i2c_gpio_scl=15

Raspberry Pi interface

The i2c interface on the Raspberry Pi uses 3.3v and requires 1.8k resistors to the 3.3v supply (GPIO pin 1) on both the sda and scl lines.

The audio switch board i2c interface should ideally be driven with 5v i2c, but does work with 3.3v i2c with reduced noise immunity. The noise immunity can be improved by using an i2c level shifter such as the PCA9306 available on PCBs such as this: https://www.sparkfun.com/products/15439. Other users have reported that the Raspberry Pi interfaces reliably with the MCP23008 audio switch powered from 5v; a full discussion can be found here: https://forums.raspberrypi.com/viewtopic.php?t=329873.

The i2c address for the MCP23008 audio switch is in the range 0x20 to 0x27. The final digit can be selected by jumpers on the PCB. The address used by the controller is set in the range 0-7 by this paramter in the config file:

audioi2caddress=7

The base address of 0x20 is hard-coded.