About Us Knowledge Base Community Forum Electronics Toolbox FAQ Shipping & Delivery

Community Forum

Share your projects and post your questions

Register or Sign In

PWM through IO Pi Plus Pins

1238 Views - Created 15/06/2017


Posted by:

Users Avatar



In a python environment is it possible to generate software PWM through IO Pi Plus pins with a library such as RPI.GPIO?  The key question I have being are you able to assign reference to a pin so I could refer to the IO pin required in a function call such as GPIO.PWM(PWM_PIN, 255)?

Any help would be much appreciated.

Many Thanks,



Posted by:

Users Avatar

United Kingdom

Users Twitter  Users Website  

I am affraid it is not possible to generate a proper PWM output on the IO Pi Plus pins.  The closest you could get is to toggle a pin on and off manually with a software timer to control the on and off durations but it takes around 0.4ms to change the state of a pin so you wouldn't be able to create a PWM output that is faster than around 100Hz and the accuracy would change depending on the CPU usage.

We do sell a dedicated PWM output board, the Servo Pi Zero, which can generate a 40Hz to 1000Hz PWM signal with a 12 bit resolution duty cycle.

AB Electronics UK Tech Support

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.