# Problems with PCF8574 Node

**URL:** https://discourse.nodered.org/t/problems-with-pcf8574-node/20127
**Category:** General
**Created:** [9 January 2020 16:57 UTC](https://discourse.nodered.org/t/problems-with-pcf8574-node/20127 "2020-01-09T16:57:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![klopo36](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@klopo36](https://discourse.nodered.org/u/klopo36)
#### Post date: [9 January 2020 16:57 UTC](https://discourse.nodered.org/t/problems-with-pcf8574-node/20127/1 "2020-01-09T16:57:11Z")

</div>

Hey all,  
I want to use this Node here:

> **[node-red-contrib-pcf8574-cluster](https://flows.nodered.org/node/node-red-contrib-pcf8574-cluster)**
>
> Control each pin of a PCF8574/PCF8574A/PCF8574P I2C port expander IC with Node-RED ( ).

  
to read inputs of a PCF8574.

I'm not really sure how to configure it.  
Can someone help me and tell how to configure cluster configurator correctly?

Is the index number that of the hardware pin?

Thanks a lot for your help !

---

<div class="post-metadata">

### Author: ![klopo36](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@klopo36](https://discourse.nodered.org/u/klopo36)
#### Post date: [9 January 2020 17:27 UTC](https://discourse.nodered.org/t/problems-with-pcf8574-node/20127/2 "2020-01-09T17:27:25Z")

</div>

If I check the inputs with i2c tools, it works without problems.

---

<div class="post-metadata">

### Author: ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)
#### Post date: [9 January 2020 20:05 UTC](https://discourse.nodered.org/t/problems-with-pcf8574-node/20127/3 "2020-01-09T20:05:13Z")

</div>

I had problems with this node too - it was a year ago. Used the generic i2c node instead and it worked. Sorry I can’t send you a flow because the system don’t exist any more

---

<div class="post-metadata">

### Author: ![klopo36](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@klopo36](https://discourse.nodered.org/u/klopo36)
#### Post date: [9 January 2020 20:45 UTC](https://discourse.nodered.org/t/problems-with-pcf8574-node/20127/4 "2020-01-09T20:45:13Z")

</div>

Ok I didn't know that there is a universal i2c node. I find hits one here:

> **[node-red-contrib-i2c](https://flows.nodered.org/node/node-red-contrib-i2c)**
>
> A Node-RED node to talk to the Raspiberry PI's I2C port

  
But if I'm honest, I can't deal with it. Unfortunately, google isn't much help either.  
You can find a few forum posts about it, but none about the PCF8574

---

<div class="post-metadata">

### Author: ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)
#### Post date: [9 January 2020 21:12 UTC](https://discourse.nodered.org/t/problems-with-pcf8574-node/20127/5 "2020-01-09T21:12:24Z")

</div>

I could not remember which node it was, I think it was automatically installed by Scargills script

> **[Node Red Script - Scargill's Tech Blog](https://tech.scargill.net/node-red-script/)**
>
> Now that I’m back in the UK, I’ve left a Raspberry Pi2 in Spain monitoring my solar pergola lighting installation as an ESP8266 measures the state of a solar-charged car battery every 15 minutes and reports minimum and maximum voltages daily by...

But the node-red-contrib-i2c looks familiar. First you should use the scan node to detect your i2c device and get the address (A2-A0 as the jumpers on your pcb are set) .

Then you have to use the i2c in node which sends the command and reads the answer. All commands (as I remember) are one (read) two (write) bytes. See datasheet 8.3

[http://www.ti.com/lit/ds/symlink/pcf8574.pdf](http://www.ti.com/lit/ds/symlink/pcf8574.pdf)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/9/99ef947165b5d1a032483a12d551d03a879856e4.png)

so I think you have to write 0100 A2 A1 A0 1

and you will get a byte back with the state of the 8 ports. It took a little bit of try and error but in the end it was a good experience learning to read a datasheet and not only using a library or custom node.

Good luck.
