# Node-red-node-pi-gpio: open collector output

**URL:** https://discourse.nodered.org/t/node-red-node-pi-gpio-open-collector-output/20031
**Category:** Feature Requests
**Created:** [8 January 2020 00:33 UTC](https://discourse.nodered.org/t/node-red-node-pi-gpio-open-collector-output/20031 "2020-01-08T00:33:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![tkanjar](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@tkanjar](https://discourse.nodered.org/u/tkanjar)
#### Post date: [8 January 2020 00:33 UTC](https://discourse.nodered.org/t/node-red-node-pi-gpio-open-collector-output/20031/1 "2020-01-08T00:33:40Z")

</div>

"node-red-node-pi-gpio" can not use the open collector output.  
I think it is useful for industrial equipments.

Incidentally,  
for workaround, I used the exec node and write shell command to implement corrector output.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [8 January 2020 07:50 UTC](https://discourse.nodered.org/t/node-red-node-pi-gpio-open-collector-output/20031/2 "2020-01-08T07:50:04Z")

</div>

I wasn't aware the Pi had any open collector outputs. Which are they ? Can you share your workaround ?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [8 January 2020 10:54 UTC](https://discourse.nodered.org/t/node-red-node-pi-gpio-open-collector-output/20031/3 "2020-01-08T10:54:54Z")

</div>

Do you mean you want an open collector output on the pi, or do you mean you want to connect an open collector output on another device to a pi input?

---

<div class="post-metadata">

### Author: ![tkanjar](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@tkanjar](https://discourse.nodered.org/u/tkanjar)
#### Post date: [17 January 2020 00:48 UTC](https://discourse.nodered.org/t/node-red-node-pi-gpio-open-collector-output/20031/4 "2020-01-17T00:48:29Z")

</div>

> [@dceejay](#):
>
> I wasn't aware the Pi had any open collector outputs. Which are they ? Can you share your workaround ?

For example, using 26 pin as open collector output.  
In exec node, write following shell command:

Initialize:

```auto
# Enable to use gpio pin
echo 26 > /sys/class/gpio/export
# Setup pin as open collector output
echo in > /sys/class/gpio/gpio26/direction
echo 0 > /sys/class/gpio/gpio26/value

```

Output Low:

```auto
echo out > /sys/class/gpio/gpio26/direction

```

Output Hi-Z:

```auto
echo in > /sys/class/gpio/gpio26/direction

```

---

<div class="post-metadata">

### Author: ![tkanjar](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@tkanjar](https://discourse.nodered.org/u/tkanjar)
#### Post date: [17 January 2020 00:52 UTC](https://discourse.nodered.org/t/node-red-node-pi-gpio-open-collector-output/20031/5 "2020-01-17T00:52:25Z")

</div>

> [@Colin](#):
>
> Do you mean you want an open collector output on the pi, or do you mean you want to connect an open collector output on another device to a pi input?

I mean I want an open collector output on the pi.

---

<div class="post-metadata">

### Author: ![tkanjar](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@tkanjar](https://discourse.nodered.org/u/tkanjar)
#### Post date: [17 January 2020 01:01 UTC](https://discourse.nodered.org/t/node-red-node-pi-gpio-open-collector-output/20031/6 "2020-01-17T01:01:59Z")

</div>

What I really wanted to do was output from the Raspberry Pi to a 24V open collector input device, but this didn't work...  
Perhaps due to the electrical characteristics of the Raspberry Pi, 24V could not be pulled.  
I've tried and it seems to work fine with 5V.
