# Raspberry PWM out - a warning

**URL:** <https://discourse.nodered.org/t/raspberry-pwm-out-a-warning/47133>\
**Category:** General\
**Created:** [14 June 2021 11:12 UTC](https://discourse.nodered.org/t/raspberry-pwm-out-a-warning/47133 "2021-06-14T11:12:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexander77](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@alexander77](https://discourse.nodered.org/u/alexander77)\
**Post date:** [14 June 2021 11:12 UTC](https://discourse.nodered.org/t/raspberry-pwm-out-a-warning/47133/1 "2021-06-14T11:12:39Z")

</div>

I tried to use the pwm output with an opamp as a source for a 0-10V dimmer. I saw a short spike in the brightness from time to time, 10 - 15 minutes or so.  
So i made a simple setup: Slider, a pwm output pin, a 1kOhm resistor and a 2µ2 Elko to ground. I monitored the output with a scope.

 ![pwm screenshot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/8/c8d61426914b86894d629d434cf43cfeb1c17b7c.png)  
The pwm output is not as stable as suggested. For sensitive applications a separate hardware must be used.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [14 June 2021 11:25 UTC](https://discourse.nodered.org/t/raspberry-pwm-out-a-warning/47133/2 "2021-06-14T11:25:30Z")

</div>

The standard node just uses software pwm so it can be affected by other things the pi is doing.  
I don't use it myself but the alternative pigpiod node should be more stable as it uses hardware timing

---

<div class="post-metadata">

**Author:** ![alexander77](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@alexander77](https://discourse.nodered.org/u/alexander77)\
**Post date:** [14 June 2021 12:07 UTC](https://discourse.nodered.org/t/raspberry-pwm-out-a-warning/47133/3 "2021-06-14T12:07:35Z")

</div>

> [@cymplecy](#):
>
> pigpiod

Could somone please share his experience with that node?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [14 June 2021 12:48 UTC](https://discourse.nodered.org/t/raspberry-pwm-out-a-warning/47133/4 "2021-06-14T12:48:03Z")

</div>

Just try it yourself and let us all know if it helps 🙂

> **[node-red-node-pi-gpiod](https://flows.nodered.org/node/node-red-node-pi-gpiod)**
>
> A node-red node for PiGPIOd

---

<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:** [14 June 2021 13:04 UTC](https://discourse.nodered.org/t/raspberry-pwm-out-a-warning/47133/5 "2021-06-14T13:04:38Z")

</div>

I have run 4 servos at the same time using gpiod node - rock solid, vs constant jitter with gpio node with only one servo.

---

<div class="post-metadata">

**Author:** ![alexander77](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@alexander77](https://discourse.nodered.org/u/alexander77)\
**Post date:** [14 June 2021 16:41 UTC](https://discourse.nodered.org/t/raspberry-pwm-out-a-warning/47133/6 "2021-06-14T16:41:37Z")

</div>

I tried it now, looks much better!  
Now i have 2 quetions:  
1 - the requirements for the node point to a line in the rc.local file  
The addon is

```auto
/usr/bin/pigpiod

```

Is this the same as in Raspi-Configuration, where the GPIO remote access can be activated / deactivated?

2 - The requirements point to a vulnerability in the setup of  
/usr/bin/pigpiod -l  
The -l option is explained to configure the program for local access only.  
I tried this, seeing the node to say connection refused. After removing the -l option it worked. Is there a trick to get that running?

Kind regards  
Alexander

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 August 2021 16:42 UTC](https://discourse.nodered.org/t/raspberry-pwm-out-a-warning/47133/7 "2021-08-13T16:42:02Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
