PCF8575 expander
Adding a PCF8575 16-pin GPIO expander on the I2C bus.
The PCF8575 is a 16-pin GPIO expander, used for example to drive extra relays. None of the controller types you choose in boneIO uses it, so this section is only for a PCF8575 that is not set up for you, for example one you connect to the I2C bus yourself. If you have not added one, you do not need this page.
Support for the PCF8575 is marked unstable.
There is no form for it in the panel. The section is edited only in Settings → Advanced → YAML editor.
Adding a PCF8575
- Check the chip's address: Diagnostics → Buses → I2C scans the bus and lists what responds. Nothing is saved there.
The scan names every address from
0x20to0x27"MCP23017 GPIO expander", a PCF8575 included. - Open Settings → Advanced → YAML editor and add a
pcf8575:section, as in the example below. - Click Save and Restart. The chip is set up only when the application starts, so Save alone is not enough.
- If the address is wrong, the controller lists the failure in Settings → Maintenance → Hardware errors, and the outputs on that chip do nothing.
The address is set by the chip's address pins, 0x20 to 0x27. The controller's own MCP23017 expanders use addresses from the same range (see MCP23017 expander), so pick one they do not.
pcf8575:
- id: pcf1
address: 0x26
- id: pcf2
address: 0x27| Option | Required | Type | Default | Description |
|---|---|---|---|---|
| id | yes, in practice | string | none | Outputs refer to the chip by this ID (pcf_id). |
| address | yes | integer | none | I2C address, as hex (0x26) or decimal (38). |
| init_sleep | no | time period | 0s | How long to wait after setting up the chip, for chips that start slowly. |
An output on the chip is defined in the output: section with kind: pcf, pcf_id (the ID above) and pin (0–15).