# Frequency input for PWM node?

**URL:** <https://forum.xod.io/t/frequency-input-for-pwm-node/2904>\
**Category:** Uncategorized\
**Created:** [November 23, 2019, 10:10pm UTC](https://forum.xod.io/t/frequency-input-for-pwm-node/2904 "2019-11-23T22:10:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![julian](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@julian](https://forum.xod.io/u/julian)\
**Post date:** [November 23, 2019, 10:10pm UTC](https://forum.xod.io/t/frequency-input-for-pwm-node/2904/1 "2019-11-23T22:10:22Z")

</div>

Any chance of someone adding a frequency input for the PWM node? ie so the PWM frequency can be changed? That would be really useful when driving different loads.

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [November 27, 2019, 4:27pm UTC](https://forum.xod.io/t/frequency-input-for-pwm-node/2904/2 "2019-11-27T16:27:47Z")

</div>

That would be great but the problem looks hard to solve in a universal way. Adjusting the PWM frequency precisely and at the pin level is only available on high-end controllers. If we’d take, say, Arduino Nano we actually have a very few choices which are set by so-called prescaler (hardware frequency divider). To make things worse, setting a custom prescaler will also affect other pins because they share the same hardware counter or even break the time counter.

Maybe the problem is solvable in other way? What are you trying to accomplish by changing the frequency?

---

<div class="post-metadata">

**Author:** ![julian](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@julian](https://forum.xod.io/u/julian)\
**Post date:** [November 27, 2019, 7:40pm UTC](https://forum.xod.io/t/frequency-input-for-pwm-node/2904/3 "2019-11-27T19:40:32Z")

</div>

Thank you for your reply. Setting the PWM frequency to suit the hardware is useful when driving motors and variable flow solenoid valves. eg some motors ‘sing’ if the frequency is too low and, most variable flow solenoid valves need a specific PWM frequency if they are to work correctly.
