The second parameter of
GPIO.PWM(channel, frequency) determine the frequency of the pwm (hertz is the unit of frequency, i.e. cycles/second), in the case of an LED, you will noticed the LED blinking at every 2 second if you set it to 0.5 (i.e. 1/2). But if you set it 100, you will feel the LED is constantly ON even though it is actually blinking at 100 cycles/second.
In the case of motor control using PWM, the frequency does not affect the speed of the motor, the Duty Cycle does. You can set the
freq to 50Hz (which is same as your home appliance power frequency), and change duty cycle to control the speed of the motor. Duty cycle can be controlled between 0% to 100%. A duty cycle of 50% means it is running at half of the full speed. Here is an example in python using RPi.GPIO library that you can try it out. The program increases the duty cycling by 5% between 0% to 100 (i.e. gradually speed up) and then decrease the duty cycling by 5% from 100% to 0% (i.e. gradually slow down):
import RPi.GPIO as GPIO
p = GPIO.PWM(12, 50) # channel=12 frequency=50Hz
# speed up by increase duty cycling by 5% each time
for dc in range(0, 101, 5):
time.sleep(1) # take a break for 1 sec
# speed down
for dc in range(100, -1, -5):
Finally, neither the frequency nor the duty cycling will break your motor. However, your motor may not be able to function properly at very high frequency, so keep the frequency low.