1. Todd Giles
  2. lightshowPi


Todd Giles  committed 57cc649

Add a bit more text describing the pwm range, and set default to 100 - as the default of 167 that gives a 60Hz frequency does not work very well unless we are able to trigger on the zero crossings in sync with the AC power line crossings - as well as have random off relays

  • Participants
  • Parent commits a1a1efc
  • Branches master

Comments (0)

Files changed (1)

File config/defaults.cfg

View file
 # https://projects.drogon.net/raspberry-pi/wiringpi/software-pwm-library/
-# Change the pwm range used for this software pwm by changing this setting.
-# The default pwm range of 167 makes for an approximate 60Hz pwm frequency.
-pwm_range = 167
+# TODO(toddgiles): Add a page to the wiki with examples of different types of lights and
+# relays and the effect produced for various PWM ranges.  The text below should be taken
+# with a grain of salt as I have not been able to test as completely as I'd like to yet.
+# Change the pwm range used for this software pwm by changing this setting.  The optimal 
+# setting really depends on your hardware setup.  If you are using zero-cross relays and 
+# driving an AC load then using a pwm range of 500 gives decent results (flickering
+# effect for many led lights with input rectifiers, and a decent fade for incandescents).
+# A range of 500 generates a 20Hz pwm frequency.
+# If you have random cross relays that can shut-off / on at any time then going for a
+# 60 Hz pwm frequency can be advantageous, although timing this to the actual zero crossings
+# of the power line used will give the best fading effect - again with incandescent bulbs.
+# A range of 167 approximately generates a 60Hz pwm frequency.
+# If you are attempting to fade a DC led load then the default range of 100 which gives a
+# 100Hz pwm frequency works fine.
+pwm_range = 100