@gloomyandy You are quite correct. I am measuring the voltage using a digital voltmeter. (I do not have access to an Oscilloscope) I had a suspicion that this may not show the variation in voltage because of the PWM. But I did not know enough about the subject to be sure. I will install the PWM to analog converter and measure the output from that.
Thanks for your comments. I think they were helpful.