# Increasing PWM frequency beyond 100 Hz

**URL:** <https://discourse.nodered.org/t/increasing-pwm-frequency-beyond-100-hz/32382>\
**Category:** General\
**Created:** [3 September 2020 05:23 UTC](https://discourse.nodered.org/t/increasing-pwm-frequency-beyond-100-hz/32382 "2020-09-03T05:23:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![88bit](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/88bit/32/79334_2.png) [@88bit](https://discourse.nodered.org/u/88bit)\
**Post date:** [3 September 2020 05:23 UTC](https://discourse.nodered.org/t/increasing-pwm-frequency-beyond-100-hz/32382/1 "2020-09-03T05:23:58Z")

</div>

Hi I'm using a Raspberry Pi to drive a PWM output. I use this output to regulate a 0-20 mA circuit . converting the PWM voltage into current. However the library node-red-node-pi-gpiod only allows a maximum of 100 Hz. This is fine to drive an LED but in my case it results in a very noisy DC signal.  
Due to the very low frequency it is difficult to use LF filtering ( the signal is actually not even 100 Hz its 68) I looked into using a DAC but I'm not sure if there is a library for one around where the hardware is reasonable is price.  
After some research I fond that pin 18 & 19 on Pi 3 support hardware PWM. Dose someone knows how to use the library to set the frequency higher or knows of some method to get a variable stable DC voltage 0-3.3 out of a PWM od I2C DAC.

In advance thank you for your help.

---

<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:** [3 September 2020 10:46 UTC](https://discourse.nodered.org/t/increasing-pwm-frequency-beyond-100-hz/32382/2 "2020-09-03T10:46:22Z")

</div>

> [@88bit](#):
>
> node-red-node-pi-gpiod

Have you tried using the standard GPIO Out node instead of gpiod? It can go faster, but is less accurate so you might not benefit.

On the gpiod node I believe the underlying library can go much faster but the node does not support it, I am not sure why.

---

<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:** [2 November 2020 10:46 UTC](https://discourse.nodered.org/t/increasing-pwm-frequency-beyond-100-hz/32382/3 "2020-11-02T10:46:32Z")

</div>

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